package monkey import ( "go_dreamfactory/comm" "go_dreamfactory/pb" ) func (this *apiComp) GetListCheck(session comm.IUserSession, req *pb.MonkeyGetListReq) (errdata *pb.ErrorData) { return } // 获取猴拳基本信息 func (this *apiComp) GetList(session comm.IUserSession, req *pb.MonkeyGetListReq) (errdata *pb.ErrorData) { var ( err error info *pb.DBMonkey ) if errdata = this.GetListCheck(session, req); errdata != nil { return } if info, err = this.module.model.getMonkeyData(session.GetUserId()); err != nil { errdata = &pb.ErrorData{ Code: pb.ErrorCode_DBError, Message: err.Error(), } return } session.SendMsg(string(this.module.GetType()), "getlist", &pb.MonkeyGetListResp{ Data: info, }) return }