dal

package
v0.0.0-...-7de97a6 Latest Latest
Warning

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

Go to latest
Published: Mar 27, 2023 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateUser

func CreateUser(ctx context.Context, user *db.User) error

将用户信息插到表中

func DecreaseFollowCount

func DecreaseFollowCount(ctx context.Context, userID int64, toUserID int64) error

取关操作--减少用户的关注数&减少被关注用户的粉丝数

func GetUserById

func GetUserById(ctx context.Context, userId int64) (db.User, error)

根据userId获得User对象--一对一

func GetUserByName

func GetUserByName(ctx context.Context, userName string) (db.User, error)

根据username获得User对象--一对一

func GetUserInfoListById

func GetUserInfoListById(ctx context.Context, userIDs []int64) ([]*db.User, error)

批量根据ID获得用户信息---一对多

func IncreaseFollowCount

func IncreaseFollowCount(ctx context.Context, userID int64, toUserID int64) error

关注操作--增加用户的关注数&增加被关注用户的粉丝数

Types

This section is empty.

Jump to

Keyboard shortcuts

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