This website works better with JavaScript.
Home
Explore
Help
Sign In
Independent
/
gim
Watch
1
Star
0
Fork
0
Code
Issues
0
Pull Requests
0
Releases
0
Wiki
Activity
Browse Source
update
master
DengBiao
1 year ago
parent
51096fa627
commit
879d3015cb
2 changed files
with
3 additions
and
0 deletions
Unified View
Diff Options
Show Stats
Download Patch File
Download Diff File
+2
-0
internal/logic/app/group_app.go
+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,
}
}
Write
Preview
Loading…
Cancel
Save