Error code standardization

This commit is contained in:
skiffer-git
2023-02-09 10:58:30 +08:00
parent f20e9e71b7
commit 9a7ed2d24d
9 changed files with 183 additions and 187 deletions
+5 -3
View File
@@ -10,6 +10,8 @@ import (
type UserInterface interface {
//获取指定用户的信息 如有userID未找到 也返回错误
FindWithError(ctx context.Context, userIDs []string) (users []*relation2.UserModel, err error)
//获取指定用户的信息 如有userID未找到 不返回错误
Find(ctx context.Context, userIDs []string) (users []*relation2.UserModel, err error)
//插入多条 外部保证userID 不重复 且在db中不存在
Create(ctx context.Context, users []*relation2.UserModel) (err error)
@@ -17,9 +19,9 @@ type UserInterface interface {
Update(ctx context.Context, users []*relation2.UserModel) (err error)
//更新(零值) 外部保证userID存在
UpdateByMap(ctx context.Context, userID string, args map[string]interface{}) (err error)
//获取,如果没找到,不返回错误
Get(ctx context.Context, pageNumber, showNumber int32) (users []*relation2.UserModel, count int64, err error)
//userIDs是否存在 只要有一个存在就为true
//如果没找到,不返回错误
Page(ctx context.Context, pageNumber, showNumber int32) (users []*relation2.UserModel, count int64, err error)
//只要有一个存在就为true
IsExist(ctx context.Context, userIDs []string) (exist bool, err error)
}