错误码输出

This commit is contained in:
meixiongfeng 2024-02-02 10:13:36 +08:00
parent 6c0c1be875
commit dc594f64eb

View File

@ -31,16 +31,17 @@ func (this *apiComp) ChallengeCycle(session comm.IUserSession, req *pb.PagodaCha
pagoda, err = this.module.modelCyclePagoda.getPagodaCycleList(session.GetUserId()) pagoda, err = this.module.modelCyclePagoda.getPagodaCycleList(session.GetUserId())
if err != nil { if err != nil {
errdata = &pb.ErrorData{ errdata = &pb.ErrorData{
Code: pb.ErrorCode_PagodaNotFound, Code: pb.ErrorCode_DBError,
Title: pb.ErrorCode_PagodaNotFound.ToString(), Title: pb.ErrorCode_DBError.ToString(),
Message: err.Error(),
} }
return return
} }
conf, err := this.module.configure.GetPagodaCirculateConf(pagoda.Itype, req.Floor) conf, err := this.module.configure.GetPagodaCirculateConf(pagoda.Itype, req.Floor)
if err != nil { if err != nil {
errdata = &pb.ErrorData{ errdata = &pb.ErrorData{
Code: pb.ErrorCode_PagodaNotFound, Code: pb.ErrorCode_ConfigNoFound,
Title: pb.ErrorCode_PagodaNotFound.ToString(), Title: pb.ErrorCode_ConfigNoFound.ToString(),
Message: err.Error(), Message: err.Error(),
} }
return return