mirror of
https://github.com/openimsdk/open-im-server.git
synced 2025-04-06 04:15:46 +08:00
Refactor code
This commit is contained in:
parent
6692867db5
commit
88aaa38676
@ -9,6 +9,7 @@ import (
|
||||
imdb "Open_IM/pkg/common/db/mysql_model/im_mysql_model"
|
||||
"Open_IM/pkg/common/log"
|
||||
"Open_IM/pkg/common/token_verify"
|
||||
cp "Open_IM/pkg/common/utils"
|
||||
"Open_IM/pkg/grpc-etcdv3/getcdv3"
|
||||
pbGroup "Open_IM/pkg/proto/group"
|
||||
open_im_sdk "Open_IM/pkg/proto/sdk_ws"
|
||||
@ -396,10 +397,11 @@ func (s *groupServer) GetGroupApplicationList(_ context.Context, req *pbGroup.Ge
|
||||
return &pbGroup.GetGroupApplicationListResp{ErrCode: 701, ErrMsg: "GetGroupApplicationList failed"}, nil
|
||||
}
|
||||
|
||||
log.NewDebug(req.OperationID, "GetGroupApplicationList reply ", reply)
|
||||
resp := pbGroup.GetGroupApplicationListResp{}
|
||||
for _, v := range reply {
|
||||
var node open_im_sdk.GroupRequest
|
||||
utils.CopyStructFields(&node, v)
|
||||
cp.GroupRequestDBCopyOpenIM(&node, &v)
|
||||
log.NewDebug(req.OperationID, "node ", node, "v ", v)
|
||||
}
|
||||
log.NewInfo(req.OperationID, "GetGroupMembersInfo rpc return ", resp)
|
||||
|
@ -105,12 +105,12 @@ func GetGroupApplicationList(userID string) ([]GroupRequest, error) {
|
||||
if v.RoleLevel > constant.GroupOrdinaryUsers {
|
||||
list, err := GetGroupRequestByGroupID(v.GroupID)
|
||||
if err != nil {
|
||||
fmt.Println("111 GetGroupRequestByGroupID failed ", err.Error())
|
||||
// fmt.Println("111 GetGroupRequestByGroupID failed ", err.Error())
|
||||
continue
|
||||
}
|
||||
fmt.Println("222 GetGroupRequestByGroupID ok ", list)
|
||||
// fmt.Println("222 GetGroupRequestByGroupID ok ", list)
|
||||
groupRequestList = append(groupRequestList, list...)
|
||||
fmt.Println("333 GetGroupRequestByGroupID ok ", groupRequestList)
|
||||
// fmt.Println("333 GetGroupRequestByGroupID ok ", groupRequestList)
|
||||
}
|
||||
}
|
||||
return groupRequestList, nil
|
||||
|
Loading…
x
Reference in New Issue
Block a user