This commit is contained in:
wangchuxiao
2022-09-06 16:08:28 +08:00
parent 70e8811d5c
commit 5233e4c097
4 changed files with 16 additions and 2 deletions
+8
View File
@@ -1365,6 +1365,14 @@ func (s *groupServer) GetGroups(_ context.Context, req *pbGroup.GetGroupsReq) (*
resp.CommonResp.ErrMsg = err.Error()
return resp, nil
}
memberNum, err := imdb.GetGroupMembersCount(req.GroupID, "")
if err != nil {
log.NewError(req.OperationID, utils.GetSelfFuncName(), err.Error(), req.GroupID)
resp.CommonResp.ErrCode = constant.ErrDB.ErrCode
resp.CommonResp.ErrMsg = err.Error()
return resp, nil
}
groupInfo.MemberCount = uint32(memberNum)
resp.CMSGroups = append(resp.CMSGroups, &pbGroup.CMSGroup{GroupInfo: groupInfo, GroupOwnerUserName: groupMember.Nickname, GroupOwnerUserID: groupMember.UserID})
} else {
groups, err := imdb.GetGroupsByName(req.GroupName, req.Pagination.PageNumber, req.Pagination.ShowNumber)