package friend import ( "go_dreamfactory/comm" "go_dreamfactory/pb" ) func (this *apiComp) ApplyListCheck(session comm.IUserSession, req *pb.FriendApplyListReq) (code pb.ErrorCode) { return } //申请列表 func (this *apiComp) ApplyList(session comm.IUserSession, req *pb.FriendApplyListReq) (code pb.ErrorCode) { var ( self *pb.DBFriend rsp *pb.FriendApplyListRsp list []*pb.FriendBase ) defer func() { if code == pb.ErrorCode_Success { rsp = &pb.FriendApplyListRsp{ List: list, } } if err := session.SendMsg(string(this.module.GetType()), FriendSubTypeApplyList, rsp); err != nil { code = pb.ErrorCode_SystemError } }() self = &pb.DBFriend{UId: session.GetUserId()} err := this.module.modelFriend.Get(session.GetUserId(), self) if self == nil || err != nil { code = pb.ErrorCode_FriendSelfNoData return } for _, userId := range self.ApplyIds { //TODO 组装FriendBase明细数据 list = append(list, &pb.FriendBase{ UserId: userId, }) } return }