Browse Source

update

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

+ 7
- 1
internal/logic/app/group_app.go View File

@@ -278,7 +278,13 @@ func (*groupApp) SetGroupMemberBanned(ctx context.Context, optId, groupId int64,
db.DB.Model(model.GroupUser{}).Where("(user_id) not in (?) and group_id = ?", userIds, groupId).Updates(model.GroupUserV2{Status: sql.NullInt32{Int32: int32(pb.GroupUserStatusType_GROUP_USER_STATUS_NORMAL), Valid: true}}) db.DB.Model(model.GroupUser{}).Where("(user_id) not in (?) and group_id = ?", userIds, groupId).Updates(model.GroupUserV2{Status: sql.NullInt32{Int32: int32(pb.GroupUserStatusType_GROUP_USER_STATUS_NORMAL), Valid: true}})
} }


//3、发送推送消息
//3、删除缓存
err := repo.GroupCache.Del(groupId)
if err != nil {
return nil, err
}

//4、发送推送消息
for _, u := range userIds { for _, u := range userIds {
err = group.PushGroupMemberBanned(ctx, optId, u, isAllMemberBanned) err = group.PushGroupMemberBanned(ctx, optId, u, isAllMemberBanned)
if err != nil { if err != nil {


Loading…
Cancel
Save