package friend import ( "go_dreamfactory/comm" "go_dreamfactory/pb" ) func (this *ApiComp) ApplyList_Check(session comm.IUserSession, req *pb.FriendApplyListReq) (chk map[string]interface{}, code pb.ErrorCode) { return } //申请列表 func (this *ApiComp) ApplyList(session comm.IUserSession, chk map[string]interface{}, req *pb.FriendApplyListReq) (err error) { var ( code pb.ErrorCode self *pb.DB_FriendData rsp *pb.FriendApplyListRsp list []*pb.FriendBase ) defer func() { if code == pb.ErrorCode_Success { rsp = &pb.FriendApplyListRsp{ List: list, } } session.SendMsg(string(this.module.GetType()), Friend_SubType_ApplyList, code, rsp) }() err = this.module.model_friend.GetObj(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 nil }