Browse Source

update

master
DengBiao 1 year ago
parent
commit
ec757fac62
1 changed files with 2 additions and 2 deletions
  1. +2
    -2
      internal/logic/app/group_app.go

+ 2
- 2
internal/logic/app/group_app.go View File

@@ -199,14 +199,14 @@ func (*groupApp) SetGroupMemberBanned(ctx context.Context, optId, groupId int64,
} else {
//设置成员禁言
//1、更新 `group` 的 is_all_member_banned 状态
group.IsAllMemberBanned = int32(pb.AllMemberBannedType_YES_All_Member_Banned)
group.IsAllMemberBanned = int32(pb.AllMemberBannedType_NOT_All_Member_Banned)
err := repo.GroupRepo.Save(group)
if err != nil {
return nil, err
}

//2、更新 `group_user` 的 status 状态
db.DB.Model(model.GroupUser{}).Where("group_id = ?", groupId).Where("user_id IN ?", userIds).Updates(model.GroupUser{Status: int(pb.GroupUserStatusType_GROUP_USER_STATUS_Banned)})
db.DB.Model(model.GroupUser{}).Where("user_id in (?) and group_id = ?", userIds, groupId).Updates(model.GroupUser{Status: int(pb.GroupUserStatusType_GROUP_USER_STATUS_Banned)})

//3、发送推送消息
for _, u := range userIds {


Loading…
Cancel
Save