mirror of
https://github.com/openimsdk/open-im-server.git
synced 2026-05-12 21:16:00 +08:00
model
This commit is contained in:
@@ -56,11 +56,11 @@ func (*Group) UpdateByMap(ctx context.Context, groupID string, args map[string]i
|
||||
return utils.Wrap(GroupDB.Where("group_id = ?", groupID).Updates(args).Error, "")
|
||||
}
|
||||
|
||||
func (*Group) Update(ctx context.Context, groups []*Group) (err error) {
|
||||
func (g *Group) Update(ctx context.Context, groups []*Group, tx ...*gorm.DB) (err error) {
|
||||
defer func() {
|
||||
trace_log.SetCtxDebug(ctx, utils.GetFuncName(1), err, "groups", groups)
|
||||
}()
|
||||
return utils.Wrap(GroupDB.Updates(&groups).Error, "")
|
||||
return utils.Wrap(getDBConn(g.DB, tx...).Updates(&groups).Error, "")
|
||||
}
|
||||
|
||||
func (*Group) Find(ctx context.Context, groupIDs []string) (groups []*Group, err error) {
|
||||
|
||||
Reference in New Issue
Block a user