Browse Source

update

master
DengBiao 1 year ago
parent
commit
40c2390bac
1 changed files with 12 additions and 4 deletions
  1. +12
    -4
      internal/logic/app/group_app.go

+ 12
- 4
internal/logic/app/group_app.go View File

@@ -188,11 +188,19 @@ func (*groupApp) DeleteMember(ctx context.Context, groupId int64, userId int64,

// GetMembers 获取群组成员
func (*groupApp) GetMembers(ctx context.Context, groupId, limit int64) ([]*pb.GroupMember, error) {
group, err := repo.GroupRepo.GetLimit(groupId, limit)
if err != nil {
return nil, err
if limit == 0 {
group, err := repo.GroupRepo.Get(groupId)
if err != nil {
return nil, err
}
return group.GetMembers(ctx)
} else {
group, err := repo.GroupRepo.GetLimit(groupId, limit)
if err != nil {
return nil, err
}
return group.GetMembers(ctx)
}
return group.GetMembers(ctx)
}

// SendMessage 发送群组消息


Loading…
Cancel
Save