Browse Source

update

master
DengBiao 1 year ago
parent
commit
879d3015cb
2 changed files with 3 additions and 0 deletions
  1. +2
    -0
      internal/logic/app/group_app.go
  2. +1
    -0
      internal/logic/domain/group/model/group.go

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

@@ -174,6 +174,8 @@ func (*groupApp) DeleteMember(ctx context.Context, groupId int64, userId int64,
if err != nil { if err != nil {
return err return err
} }

group.UserNum-- //群组人数减一
err = repo.GroupRepo.Save(group) err = repo.GroupRepo.Save(group)
if err != nil { if err != nil {
return err return err


+ 1
- 0
internal/logic/domain/group/model/group.go View File

@@ -93,6 +93,7 @@ func CreateGroup(userId, masterId int64, in *pb.CreateGroupReq) *Group {
Extra: in.Extra, Extra: in.Extra,
Members: make([]GroupUser, 0, len(in.MemberIds)+1), Members: make([]GroupUser, 0, len(in.MemberIds)+1),
IsAllMemberBanned: 2, IsAllMemberBanned: 2,
UserNum: int32(len(in.MemberIds)) + 1,
CreateTime: now, CreateTime: now,
UpdateTime: now, UpdateTime: now,
} }


Loading…
Cancel
Save