错误码输出

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())
if err != nil {
errdata = &pb.ErrorData{
Code: pb.ErrorCode_PagodaNotFound,
Title: pb.ErrorCode_PagodaNotFound.ToString(),
Code: pb.ErrorCode_DBError,
Title: pb.ErrorCode_DBError.ToString(),
Message: err.Error(),
}
return
}
conf, err := this.module.configure.GetPagodaCirculateConf(pagoda.Itype, req.Floor)
if err != nil {
errdata = &pb.ErrorData{
Code: pb.ErrorCode_PagodaNotFound,
Title: pb.ErrorCode_PagodaNotFound.ToString(),
Code: pb.ErrorCode_ConfigNoFound,
Title: pb.ErrorCode_ConfigNoFound.ToString(),
Message: err.Error(),
}
return