pull/351/head
wangchuxiao 2 years ago
parent 2c2d3e4641
commit 87dfdb2ddc

@ -38,6 +38,8 @@ func GetGroups(c *gin.Context) {
c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": errMsg})
return
}
reqPb.GroupID = req.GroupID
reqPb.GroupName = req.GroupName
client := pbGroup.NewGroupClient(etcdConn)
respPb, err := client.GetGroups(context.Background(), &reqPb)
if err != nil {
@ -55,7 +57,7 @@ func GetGroups(c *gin.Context) {
resp.GroupNums = int(respPb.GroupNum)
resp.CurrentPage = int(respPb.Pagination.CurrentPage)
resp.ShowNumber = int(respPb.Pagination.ShowNumber)
log.NewInfo("", utils.GetSelfFuncName(), "resp: ", resp)
log.NewInfo(req.OperationID, utils.GetSelfFuncName(), "resp: ", resp)
c.JSON(http.StatusOK, gin.H{"errCode": respPb.CommonResp.ErrCode, "errMsg": respPb.CommonResp.ErrMsg, "data": resp})
}

@ -1387,7 +1387,7 @@ func (s *groupServer) GetGroups(_ context.Context, req *pbGroup.GetGroupsReq) (*
func (s *groupServer) GetGroupMembersCMS(_ context.Context, req *pbGroup.GetGroupMembersCMSReq) (*pbGroup.GetGroupMembersCMSResp, error) {
log.NewInfo(req.OperationID, utils.GetSelfFuncName(), "args:", req.String())
resp := &pbGroup.GetGroupMembersCMSResp{}
resp := &pbGroup.GetGroupMembersCMSResp{CommonResp: &pbGroup.CommonResp{}}
groupMembers, err := imdb.GetGroupMembersByGroupIdCMS(req.GroupID, req.UserName, req.Pagination.ShowNumber, req.Pagination.PageNumber)
if err != nil {
log.NewError(req.OperationID, utils.GetSelfFuncName(), "GetGroupMembersByGroupIdCMS Error", err.Error())

@ -25,6 +25,8 @@ type GroupResponse struct {
type GetGroupsRequest struct {
RequestPagination
OperationID string `json:"operationID" binding:"required"`
GroupID string `json:"groupID"`
GroupName string `json:"groupName"`
}
type GetGroupsResponse struct {
@ -36,7 +38,7 @@ type GetGroupsResponse struct {
type GetGroupMembersRequest struct {
GroupID string `form:"groupID" binding:"required"`
UserName string `form:"userName"`
OperationID string `json:"operationID"`
OperationID string `json:"operationID" binding:"required"`
RequestPagination
}

Loading…
Cancel
Save