mirror of
https://github.com/openimsdk/open-im-server.git
synced 2025-08-30 18:49:50 +08:00
Merge branch 'errcode' of github.com:OpenIMSDK/Open-IM-Server into errcode
# Conflicts: # pkg/common/db/mysql_model/im_mysql_model/group_model_k.go
This commit is contained in:
parent
b9a11e4ca1
commit
633aefad56
@ -50,14 +50,14 @@ func (*Group) Update(ctx context.Context, groups []*Group) (err error) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (*Group) Find(ctx context.Context, groupIDList []string) (groupList []*Group, err error) {
|
func (*Group) Find(ctx context.Context, groupIDList []string) (groupList []*Group, err error) {
|
||||||
defer trace_log.SetContextInfo(ctx, utils.GetSelfFuncName(), err, "groupIDList", groupIDList)
|
defer trace_log.SetContextInfo(ctx, utils.GetSelfFuncName(), err, "groupIDList", groupIDList, "groupList", groupList)
|
||||||
err = utils.Wrap(db.DB.MysqlDB.DefaultGormDB().Where("group_id in (?)", groupIDList).Find(&groupList).Error, "")
|
err = utils.Wrap(db.DB.MysqlDB.DefaultGormDB().Where("group_id in (?)", groupIDList).Find(&groupList).Error, "")
|
||||||
return groupList, err
|
return groupList, err
|
||||||
}
|
}
|
||||||
|
|
||||||
func (*Group) Take(ctx context.Context, groupID string) (group *Group, err error) {
|
func (*Group) Take(ctx context.Context, groupID string) (group *Group, err error) {
|
||||||
defer trace_log.SetContextInfo(ctx, utils.GetSelfFuncName(), err, "groupID", groupID)
|
|
||||||
group = &Group{}
|
group = &Group{}
|
||||||
|
defer trace_log.SetContextInfo(ctx, utils.GetSelfFuncName(), err, "groupID", groupID, "group", *group)
|
||||||
err = utils.Wrap(db.DB.MysqlDB.DefaultGormDB().Where("group_id = ?", groupID).Take(group).Error, "")
|
err = utils.Wrap(db.DB.MysqlDB.DefaultGormDB().Where("group_id = ?", groupID).Take(group).Error, "")
|
||||||
return group, err
|
return group, err
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user