UserFocus2

package
v5.2.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 4, 2024 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckFocus

func CheckFocus(userID int64, mark string, system string, bindID int64) bool

CheckFocus 检查是否关注了数据

func GetFocusCount

func GetFocusCount(mark string, system string, bindID int64) (count int)

GetFocusCount 获取关注人数

func GetFocusCountByUserID

func GetFocusCountByUserID(userID int64, mark string, system string) (count int)

GetFocusCountByUserID 获取用户关注的数量

func GetFocusTarget

func GetFocusTarget(userID int64, mark string, system string, bindID int64) (b bool)

GetFocusTarget 获取是否关注过目标

func SetFocus

func SetFocus(args ArgsSetFocus) (err error)

SetFocus 设置是否关注

Types

type ArgsGetFocusList

type ArgsGetFocusList struct {
	//分页
	Pages CoreSQLPages.ArgsDataList `json:"pages"`
	//用户ID
	UserID int64 `json:"userID" check:"id" empty:"true"`
	//关注类型
	Mark string `db:"mark" json:"mark" check:"mark" empty:"true"`
	//关注来源
	System string `db:"system" json:"system" check:"mark" empty:"true"`
	//来源ID
	BindID int64 `db:"bind_id" json:"bindID" check:"id" empty:"true"`
}

ArgsGetFocusList 获取来源的关注列表参数

type ArgsSetFocus

type ArgsSetFocus struct {
	//用户ID
	UserID int64 `db:"user_id" json:"userID" check:"id"`
	//关注类型
	// focus 关注; like 喜欢
	Mark string `db:"mark" json:"mark" check:"mark"`
	//关注来源
	System string `db:"system" json:"system" check:"mark"`
	//来源ID
	BindID int64 `db:"bind_id" json:"bindID" check:"id"`
	//是否删除关注
	IsFocus bool `json:"isFocus" check:"bool"`
}

ArgsSetFocus 设置是否关注参数

type FieldsFocus

type FieldsFocus struct {
	//ID
	ID int64 `db:"id" json:"id"`
	//创建时间
	CreateAt time.Time `db:"create_at" json:"createAt"`
	//用户ID
	UserID int64 `db:"user_id" json:"userID"`
	//关注类型
	// focus 关注; like 喜欢
	Mark string `db:"mark" json:"mark"`
	//关注来源
	System string `db:"system" json:"system"`
	//来源ID
	BindID int64 `db:"bind_id" json:"bindID"`
}

FieldsFocus 用户关注

func GetFocusList

func GetFocusList(args *ArgsGetFocusList) (dataList []FieldsFocus, dataCount int64, err error)

GetFocusList 获取来源的关注列表

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL