package smithy import ( "go_dreamfactory/comm" "go_dreamfactory/pb" ) //参数校验 func (this *apiComp) GetStoveInfoCheck(session comm.IUserSession, req *pb.SmithyGetStoveInfoReq) (errdata *pb.ErrorData) { return } // 获取铁匠铺信息 func (this *apiComp) GetStoveInfo(session comm.IUserSession, req *pb.SmithyGetStoveInfoReq) (errdata *pb.ErrorData) { errdata = this.GetStoveInfoCheck(session, req) if errdata != nil { return // 参数校验失败直接返回 } _smithy, err := this.module.modelStove.getSmithyStoveList(session.GetUserId()) if err != nil { errdata = &pb.ErrorData{ Code: pb.ErrorCode_DBError, Title: pb.ErrorCode_DBError.ToString(), Message: err.Error(), } return } this.module.modelStove.calculationRecoveryT(session.GetUserId(), _smithy) session.SendMsg(string(this.module.GetType()), "getstoveinfo", &pb.SmithyGetStoveInfoResp{Data: _smithy}) return }