This commit is contained in:
withchao
2023-02-16 17:08:24 +08:00
parent fe2cf94d36
commit 20ba4e33e8
10 changed files with 122 additions and 100 deletions
+4 -4
View File
@@ -69,8 +69,8 @@ func (g *GroupGorm) Search(ctx context.Context, keyword string, pageNumber, show
}
func (g *GroupGorm) GetGroupIDsByGroupType(ctx context.Context, groupType int) (groupIDs []string, err error) {
if err := g.DB.Model(&relation.GroupModel{}).Where("group_type = ? ", groupType).Pluck("group_id", &groupIDs).Error; err != nil {
return nil, utils.Wrap(err, "")
}
return groupIDs, nil
defer func() {
tracelog.SetCtxDebug(ctx, utils.GetFuncName(1), err, "groupType", groupType, "groupIDs", groupIDs)
}()
return groupIDs, utils.Wrap(g.DB.Model(&relation.GroupModel{}).Where("group_type = ? ", groupType).Pluck("group_id", &groupIDs).Error, "")
}