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
test-errcode
wangchuxiao 2 years ago
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) {
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, "")
return groupList, err
}
func (*Group) Take(ctx context.Context, groupID string) (group *Group, err error) {
defer trace_log.SetContextInfo(ctx, utils.GetSelfFuncName(), err, "groupID", groupID)
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, "")
return group, err
}

Loading…
Cancel
Save