提交 7fbc4716 authored 作者: hzh's avatar hzh

代码优化

上级 ba040b56
package org.dromara.common.ys.exception;
/**
* @author hzh
* @date 2025-06-20
**/
public class YunShangException extends RuntimeException {
public YunShangException(String message) {
super("云上资源方调用失败:" + message);
}
}
...@@ -9,6 +9,7 @@ import org.dromara.common.ys.common.Code; ...@@ -9,6 +9,7 @@ import org.dromara.common.ys.common.Code;
import org.dromara.common.ys.common.PageInfo; import org.dromara.common.ys.common.PageInfo;
import org.dromara.common.ys.enums.DomainEnum; import org.dromara.common.ys.enums.DomainEnum;
import org.dromara.common.ys.enums.airport.AirportApiEnum; import org.dromara.common.ys.enums.airport.AirportApiEnum;
import org.dromara.common.ys.exception.YunShangException;
import org.dromara.common.ys.model.req.airport.*; import org.dromara.common.ys.model.req.airport.*;
import org.dromara.common.ys.model.res.airport.AddChangeOrderModel; import org.dromara.common.ys.model.res.airport.AddChangeOrderModel;
import org.dromara.common.ys.model.res.airport.CheckCabinModel; import org.dromara.common.ys.model.res.airport.CheckCabinModel;
...@@ -58,7 +59,7 @@ public class AirPortServiceImpl implements IAirportService { ...@@ -58,7 +59,7 @@ public class AirPortServiceImpl implements IAirportService {
JSON.toJSONString(model) JSON.toJSONString(model)
); );
if (!CharSequenceUtil.equals(res.getErrCode(), Code.SUCCESS.getCode())) { if (!CharSequenceUtil.equals(res.getErrCode(), Code.SUCCESS.getCode())) {
throw new RuntimeException(res.getTips()); throw new YunShangException(res.getTips());
} }
return JSON.parseObject(res.getData(), QueryFlightModel.class); return JSON.parseObject(res.getData(), QueryFlightModel.class);
} }
...@@ -74,7 +75,7 @@ public class AirPortServiceImpl implements IAirportService { ...@@ -74,7 +75,7 @@ public class AirPortServiceImpl implements IAirportService {
JSON.toJSONString(model) JSON.toJSONString(model)
); );
if (!CharSequenceUtil.equals(res.getErrCode(), Code.SUCCESS.getCode())) { if (!CharSequenceUtil.equals(res.getErrCode(), Code.SUCCESS.getCode())) {
throw new RuntimeException(res.getTips()); throw new YunShangException(res.getTips());
} }
return JSON.parseObject(res.getData(), QueryFlightRuleModel.class); return JSON.parseObject(res.getData(), QueryFlightRuleModel.class);
} }
...@@ -90,7 +91,7 @@ public class AirPortServiceImpl implements IAirportService { ...@@ -90,7 +91,7 @@ public class AirPortServiceImpl implements IAirportService {
JSON.toJSONString(model) JSON.toJSONString(model)
); );
if (!CharSequenceUtil.equals(res.getErrCode(), Code.SUCCESS.getCode())) { if (!CharSequenceUtil.equals(res.getErrCode(), Code.SUCCESS.getCode())) {
throw new RuntimeException(res.getTips()); throw new YunShangException(res.getTips());
} }
return JSON.parseObject(res.getData(), MatchClbzModel.class); return JSON.parseObject(res.getData(), MatchClbzModel.class);
} }
...@@ -106,7 +107,7 @@ public class AirPortServiceImpl implements IAirportService { ...@@ -106,7 +107,7 @@ public class AirPortServiceImpl implements IAirportService {
JSON.toJSONString(model) JSON.toJSONString(model)
); );
if (!CharSequenceUtil.equals(res.getErrCode(), Code.SUCCESS.getCode())) { if (!CharSequenceUtil.equals(res.getErrCode(), Code.SUCCESS.getCode())) {
throw new RuntimeException(res.getTips()); throw new YunShangException(res.getTips());
} }
return JSON.parseObject(res.getData(), CheckPriceForFlightModel.class); return JSON.parseObject(res.getData(), CheckPriceForFlightModel.class);
} }
...@@ -122,7 +123,7 @@ public class AirPortServiceImpl implements IAirportService { ...@@ -122,7 +123,7 @@ public class AirPortServiceImpl implements IAirportService {
JSON.toJSONString(model) JSON.toJSONString(model)
); );
if (!CharSequenceUtil.equals(res.getErrCode(), Code.SUCCESS.getCode())) { if (!CharSequenceUtil.equals(res.getErrCode(), Code.SUCCESS.getCode())) {
throw new RuntimeException(res.getTips()); throw new YunShangException(res.getTips());
} }
return JSON.parseObject(res.getData(), CheckCabinModel.class); return JSON.parseObject(res.getData(), CheckCabinModel.class);
} }
...@@ -138,7 +139,7 @@ public class AirPortServiceImpl implements IAirportService { ...@@ -138,7 +139,7 @@ public class AirPortServiceImpl implements IAirportService {
JSON.toJSONString(model) JSON.toJSONString(model)
); );
if (!CharSequenceUtil.equals(res.getErrCode(), Code.SUCCESS.getCode())) { if (!CharSequenceUtil.equals(res.getErrCode(), Code.SUCCESS.getCode())) {
throw new RuntimeException(res.getTips()); throw new YunShangException(res.getTips());
} }
return JSON.parseObject(res.getData(), CheckXyhBmdModel.class); return JSON.parseObject(res.getData(), CheckXyhBmdModel.class);
} }
...@@ -154,7 +155,7 @@ public class AirPortServiceImpl implements IAirportService { ...@@ -154,7 +155,7 @@ public class AirPortServiceImpl implements IAirportService {
JSON.toJSONString(model) JSON.toJSONString(model)
); );
if (!CharSequenceUtil.equals(res.getErrCode(), Code.SUCCESS.getCode())) { if (!CharSequenceUtil.equals(res.getErrCode(), Code.SUCCESS.getCode())) {
throw new RuntimeException(res.getTips()); throw new YunShangException(res.getTips());
} }
return JSON.parseObject(res.getData(), PlaneCheckStateModel.class); return JSON.parseObject(res.getData(), PlaneCheckStateModel.class);
} }
...@@ -170,7 +171,7 @@ public class AirPortServiceImpl implements IAirportService { ...@@ -170,7 +171,7 @@ public class AirPortServiceImpl implements IAirportService {
JSON.toJSONString(model) JSON.toJSONString(model)
); );
if (!CharSequenceUtil.equals(res.getErrCode(), Code.SUCCESS.getCode())) { if (!CharSequenceUtil.equals(res.getErrCode(), Code.SUCCESS.getCode())) {
throw new RuntimeException(res.getTips()); throw new YunShangException(res.getTips());
} }
return JSON.parseObject(res.getData(), GetTicketStatusModel.class); return JSON.parseObject(res.getData(), GetTicketStatusModel.class);
} }
...@@ -186,7 +187,7 @@ public class AirPortServiceImpl implements IAirportService { ...@@ -186,7 +187,7 @@ public class AirPortServiceImpl implements IAirportService {
JSON.toJSONString(model) JSON.toJSONString(model)
); );
if (!CharSequenceUtil.equals(res.getErrCode(), Code.SUCCESS.getCode())) { if (!CharSequenceUtil.equals(res.getErrCode(), Code.SUCCESS.getCode())) {
throw new RuntimeException(res.getTips()); throw new YunShangException(res.getTips());
} }
return JSON.parseObject(res.getData(), GetVoyageForChangeModel.class); return JSON.parseObject(res.getData(), GetVoyageForChangeModel.class);
} }
...@@ -202,7 +203,7 @@ public class AirPortServiceImpl implements IAirportService { ...@@ -202,7 +203,7 @@ public class AirPortServiceImpl implements IAirportService {
JSON.toJSONString(model) JSON.toJSONString(model)
); );
if (!CharSequenceUtil.equals(res.getErrCode(), Code.SUCCESS.getCode())) { if (!CharSequenceUtil.equals(res.getErrCode(), Code.SUCCESS.getCode())) {
throw new RuntimeException(res.getTips()); throw new YunShangException(res.getTips());
} }
return JSON.parseObject(res.getData(), QueryFlightForChangeModel.class); return JSON.parseObject(res.getData(), QueryFlightForChangeModel.class);
} }
...@@ -218,7 +219,7 @@ public class AirPortServiceImpl implements IAirportService { ...@@ -218,7 +219,7 @@ public class AirPortServiceImpl implements IAirportService {
JSON.toJSONString(model) JSON.toJSONString(model)
); );
if (!CharSequenceUtil.equals(res.getErrCode(), Code.SUCCESS.getCode())) { if (!CharSequenceUtil.equals(res.getErrCode(), Code.SUCCESS.getCode())) {
throw new RuntimeException(res.getTips()); throw new YunShangException(res.getTips());
} }
return JSON.parseObject(res.getData(), AddChangeOrderModel.class); return JSON.parseObject(res.getData(), AddChangeOrderModel.class);
} }
...@@ -234,7 +235,7 @@ public class AirPortServiceImpl implements IAirportService { ...@@ -234,7 +235,7 @@ public class AirPortServiceImpl implements IAirportService {
JSON.toJSONString(model) JSON.toJSONString(model)
); );
if (!CharSequenceUtil.equals(res.getErrCode(), Code.SUCCESS.getCode())) { if (!CharSequenceUtil.equals(res.getErrCode(), Code.SUCCESS.getCode())) {
throw new RuntimeException(res.getTips()); throw new YunShangException(res.getTips());
} }
return JSON.parseObject(res.getData(), QueryChangeOrderModel.class); return JSON.parseObject(res.getData(), QueryChangeOrderModel.class);
} }
...@@ -250,7 +251,7 @@ public class AirPortServiceImpl implements IAirportService { ...@@ -250,7 +251,7 @@ public class AirPortServiceImpl implements IAirportService {
JSON.toJSONString(model) JSON.toJSONString(model)
); );
if (!CharSequenceUtil.equals(res.getErrCode(), Code.SUCCESS.getCode())) { if (!CharSequenceUtil.equals(res.getErrCode(), Code.SUCCESS.getCode())) {
throw new RuntimeException(res.getTips()); throw new YunShangException(res.getTips());
} }
return JSON.parseObject(res.getData(), QueryFlightMinPriceModel.class); return JSON.parseObject(res.getData(), QueryFlightMinPriceModel.class);
} }
...@@ -266,7 +267,7 @@ public class AirPortServiceImpl implements IAirportService { ...@@ -266,7 +267,7 @@ public class AirPortServiceImpl implements IAirportService {
JSON.toJSONString(model) JSON.toJSONString(model)
); );
if (!CharSequenceUtil.equals(res.getErrCode(), Code.SUCCESS.getCode())) { if (!CharSequenceUtil.equals(res.getErrCode(), Code.SUCCESS.getCode())) {
throw new RuntimeException(res.getTips()); throw new YunShangException(res.getTips());
} }
} }
...@@ -281,7 +282,7 @@ public class AirPortServiceImpl implements IAirportService { ...@@ -281,7 +282,7 @@ public class AirPortServiceImpl implements IAirportService {
JSON.toJSONString(model) JSON.toJSONString(model)
); );
if (!CharSequenceUtil.equals(res.getErrCode(), Code.SUCCESS.getCode())) { if (!CharSequenceUtil.equals(res.getErrCode(), Code.SUCCESS.getCode())) {
throw new RuntimeException(res.getTips()); throw new YunShangException(res.getTips());
} }
} }
...@@ -296,7 +297,7 @@ public class AirPortServiceImpl implements IAirportService { ...@@ -296,7 +297,7 @@ public class AirPortServiceImpl implements IAirportService {
JSON.toJSONString(model) JSON.toJSONString(model)
); );
if (!CharSequenceUtil.equals(res.getErrCode(), Code.SUCCESS.getCode())) { if (!CharSequenceUtil.equals(res.getErrCode(), Code.SUCCESS.getCode())) {
throw new RuntimeException(res.getTips()); throw new YunShangException(res.getTips());
} }
return JSON.parseObject(res.getData(), QueryMoreCabinModel.class); return JSON.parseObject(res.getData(), QueryMoreCabinModel.class);
} }
...@@ -312,7 +313,7 @@ public class AirPortServiceImpl implements IAirportService { ...@@ -312,7 +313,7 @@ public class AirPortServiceImpl implements IAirportService {
JSON.toJSONString(model) JSON.toJSONString(model)
); );
if (!CharSequenceUtil.equals(res.getErrCode(), Code.SUCCESS.getCode())) { if (!CharSequenceUtil.equals(res.getErrCode(), Code.SUCCESS.getCode())) {
throw new RuntimeException(res.getTips()); throw new YunShangException(res.getTips());
} }
return JSON.parseArray(JSON.parseObject(res.getData()).getString("orderList"), BookOrderModel.class); return JSON.parseArray(JSON.parseObject(res.getData()).getString("orderList"), BookOrderModel.class);
} }
...@@ -328,7 +329,7 @@ public class AirPortServiceImpl implements IAirportService { ...@@ -328,7 +329,7 @@ public class AirPortServiceImpl implements IAirportService {
JSON.toJSONString(model) JSON.toJSONString(model)
); );
if (!CharSequenceUtil.equals(res.getErrCode(), Code.SUCCESS.getCode())) { if (!CharSequenceUtil.equals(res.getErrCode(), Code.SUCCESS.getCode())) {
throw new RuntimeException(res.getTips()); throw new YunShangException(res.getTips());
} }
if (res.getData() == null) { if (res.getData() == null) {
return PageInfo.<OrderListModel>builder().build() return PageInfo.<OrderListModel>builder().build()
...@@ -360,7 +361,7 @@ public class AirPortServiceImpl implements IAirportService { ...@@ -360,7 +361,7 @@ public class AirPortServiceImpl implements IAirportService {
JSON.toJSONString(model) JSON.toJSONString(model)
); );
if (!CharSequenceUtil.equals(res.getErrCode(), Code.SUCCESS.getCode())) { if (!CharSequenceUtil.equals(res.getErrCode(), Code.SUCCESS.getCode())) {
throw new RuntimeException(res.getTips()); throw new YunShangException(res.getTips());
} }
if (res.getData() == null) { if (res.getData() == null) {
return PageInfo.<PlaneOrderQueryChangeOrderApiBeanModel>builder().build() return PageInfo.<PlaneOrderQueryChangeOrderApiBeanModel>builder().build()
...@@ -392,7 +393,7 @@ public class AirPortServiceImpl implements IAirportService { ...@@ -392,7 +393,7 @@ public class AirPortServiceImpl implements IAirportService {
JSON.toJSONString(model) JSON.toJSONString(model)
); );
if (!CharSequenceUtil.equals(res.getErrCode(), Code.SUCCESS.getCode())) { if (!CharSequenceUtil.equals(res.getErrCode(), Code.SUCCESS.getCode())) {
throw new RuntimeException(res.getTips()); throw new YunShangException(res.getTips());
} }
return JSON.parseObject(res.getData(), QueryTkOrderModel.class); return JSON.parseObject(res.getData(), QueryTkOrderModel.class);
} }
...@@ -408,7 +409,7 @@ public class AirPortServiceImpl implements IAirportService { ...@@ -408,7 +409,7 @@ public class AirPortServiceImpl implements IAirportService {
JSON.toJSONString(model) JSON.toJSONString(model)
); );
if (!CharSequenceUtil.equals(res.getErrCode(), Code.SUCCESS.getCode())) { if (!CharSequenceUtil.equals(res.getErrCode(), Code.SUCCESS.getCode())) {
throw new RuntimeException(res.getTips()); throw new YunShangException(res.getTips());
} }
return JSON.parseArray(JSON.parseObject(res.getData()).getString("list"), QueryFlightByHbhModel.class); return JSON.parseArray(JSON.parseObject(res.getData()).getString("list"), QueryFlightByHbhModel.class);
} }
...@@ -424,7 +425,7 @@ public class AirPortServiceImpl implements IAirportService { ...@@ -424,7 +425,7 @@ public class AirPortServiceImpl implements IAirportService {
JSON.toJSONString(model) JSON.toJSONString(model)
); );
if (!CharSequenceUtil.equals(res.getErrCode(), Code.SUCCESS.getCode())) { if (!CharSequenceUtil.equals(res.getErrCode(), Code.SUCCESS.getCode())) {
throw new RuntimeException(res.getTips()); throw new YunShangException(res.getTips());
} }
return JSON.parseObject(res.getData(), QueryFlightStopVOModel.class); return JSON.parseObject(res.getData(), QueryFlightStopVOModel.class);
} }
...@@ -440,7 +441,7 @@ public class AirPortServiceImpl implements IAirportService { ...@@ -440,7 +441,7 @@ public class AirPortServiceImpl implements IAirportService {
JSON.toJSONString(model) JSON.toJSONString(model)
); );
if (!CharSequenceUtil.equals(res.getErrCode(), Code.SUCCESS.getCode())) { if (!CharSequenceUtil.equals(res.getErrCode(), Code.SUCCESS.getCode())) {
throw new RuntimeException(res.getTips()); throw new YunShangException(res.getTips());
} }
} }
...@@ -455,7 +456,7 @@ public class AirPortServiceImpl implements IAirportService { ...@@ -455,7 +456,7 @@ public class AirPortServiceImpl implements IAirportService {
JSON.toJSONString(model) JSON.toJSONString(model)
); );
if (!CharSequenceUtil.equals(res.getErrCode(), Code.SUCCESS.getCode())) { if (!CharSequenceUtil.equals(res.getErrCode(), Code.SUCCESS.getCode())) {
throw new RuntimeException(res.getTips()); throw new YunShangException(res.getTips());
} }
return JSON.parseObject(res.getData(), OrderCheckPriceModel.class); return JSON.parseObject(res.getData(), OrderCheckPriceModel.class);
} }
...@@ -471,7 +472,7 @@ public class AirPortServiceImpl implements IAirportService { ...@@ -471,7 +472,7 @@ public class AirPortServiceImpl implements IAirportService {
JSON.toJSONString(model) JSON.toJSONString(model)
); );
if (!CharSequenceUtil.equals(res.getErrCode(), Code.SUCCESS.getCode())) { if (!CharSequenceUtil.equals(res.getErrCode(), Code.SUCCESS.getCode())) {
throw new RuntimeException(res.getTips()); throw new YunShangException(res.getTips());
} }
} }
...@@ -486,7 +487,7 @@ public class AirPortServiceImpl implements IAirportService { ...@@ -486,7 +487,7 @@ public class AirPortServiceImpl implements IAirportService {
JSON.toJSONString(model) JSON.toJSONString(model)
); );
if (!CharSequenceUtil.equals(res.getErrCode(), Code.SUCCESS.getCode())) { if (!CharSequenceUtil.equals(res.getErrCode(), Code.SUCCESS.getCode())) {
throw new RuntimeException(res.getTips()); throw new YunShangException(res.getTips());
} }
} }
...@@ -501,7 +502,7 @@ public class AirPortServiceImpl implements IAirportService { ...@@ -501,7 +502,7 @@ public class AirPortServiceImpl implements IAirportService {
JSON.toJSONString(model) JSON.toJSONString(model)
); );
if (!CharSequenceUtil.equals(res.getErrCode(), Code.SUCCESS.getCode())) { if (!CharSequenceUtil.equals(res.getErrCode(), Code.SUCCESS.getCode())) {
throw new RuntimeException(res.getTips()); throw new YunShangException(res.getTips());
} }
return JSON.parseObject(res.getData(), RefundOfVoyageModel.class); return JSON.parseObject(res.getData(), RefundOfVoyageModel.class);
} }
...@@ -517,7 +518,7 @@ public class AirPortServiceImpl implements IAirportService { ...@@ -517,7 +518,7 @@ public class AirPortServiceImpl implements IAirportService {
JSON.toJSONString(model) JSON.toJSONString(model)
); );
if (!CharSequenceUtil.equals(res.getErrCode(), Code.SUCCESS.getCode())) { if (!CharSequenceUtil.equals(res.getErrCode(), Code.SUCCESS.getCode())) {
throw new RuntimeException(res.getTips()); throw new YunShangException(res.getTips());
} }
return JSON.parseObject(res.getData(), OrderRefundAddModel.class); return JSON.parseObject(res.getData(), OrderRefundAddModel.class);
} }
...@@ -533,7 +534,7 @@ public class AirPortServiceImpl implements IAirportService { ...@@ -533,7 +534,7 @@ public class AirPortServiceImpl implements IAirportService {
JSON.toJSONString(model) JSON.toJSONString(model)
); );
if (!CharSequenceUtil.equals(res.getErrCode(), Code.SUCCESS.getCode())) { if (!CharSequenceUtil.equals(res.getErrCode(), Code.SUCCESS.getCode())) {
throw new RuntimeException(res.getTips()); throw new YunShangException(res.getTips());
} }
return JSON.parseArray(JSON.parseObject(res.getData()).getString("refundOrderList"),OrderRefundDetailModel.class); return JSON.parseArray(JSON.parseObject(res.getData()).getString("refundOrderList"),OrderRefundDetailModel.class);
} }
...@@ -549,7 +550,7 @@ public class AirPortServiceImpl implements IAirportService { ...@@ -549,7 +550,7 @@ public class AirPortServiceImpl implements IAirportService {
JSON.toJSONString(model) JSON.toJSONString(model)
); );
if (!CharSequenceUtil.equals(res.getErrCode(), Code.SUCCESS.getCode())) { if (!CharSequenceUtil.equals(res.getErrCode(), Code.SUCCESS.getCode())) {
throw new RuntimeException(res.getTips()); throw new YunShangException(res.getTips());
} }
return true; return true;
} }
...@@ -565,7 +566,7 @@ public class AirPortServiceImpl implements IAirportService { ...@@ -565,7 +566,7 @@ public class AirPortServiceImpl implements IAirportService {
JSON.toJSONString(model) JSON.toJSONString(model)
); );
if (!CharSequenceUtil.equals(res.getErrCode(), Code.SUCCESS.getCode())) { if (!CharSequenceUtil.equals(res.getErrCode(), Code.SUCCESS.getCode())) {
throw new RuntimeException(res.getTips()); throw new YunShangException(res.getTips());
} }
if (res.getData() == null) { if (res.getData() == null) {
return PageInfo.<OrderRefundListModel>builder().build() return PageInfo.<OrderRefundListModel>builder().build()
......
...@@ -8,6 +8,7 @@ import org.dromara.common.ys.common.Code; ...@@ -8,6 +8,7 @@ import org.dromara.common.ys.common.Code;
import org.dromara.common.ys.common.PageInfo; import org.dromara.common.ys.common.PageInfo;
import org.dromara.common.ys.enums.DomainEnum; import org.dromara.common.ys.enums.DomainEnum;
import org.dromara.common.ys.enums.bill.BillApiEnum; import org.dromara.common.ys.enums.bill.BillApiEnum;
import org.dromara.common.ys.exception.YunShangException;
import org.dromara.common.ys.model.req.bill.AccountDetailModel; import org.dromara.common.ys.model.req.bill.AccountDetailModel;
import org.dromara.common.ys.model.req.bill.ConfirmReconModel; import org.dromara.common.ys.model.req.bill.ConfirmReconModel;
import org.dromara.common.ys.model.res.bill.*; import org.dromara.common.ys.model.res.bill.*;
...@@ -33,7 +34,7 @@ public class BillServiceImpl implements IBillService { ...@@ -33,7 +34,7 @@ public class BillServiceImpl implements IBillService {
JSON.toJSONString(model) JSON.toJSONString(model)
); );
if (!CharSequenceUtil.equals(res.getErrCode(), Code.SUCCESS.getCode())) { if (!CharSequenceUtil.equals(res.getErrCode(), Code.SUCCESS.getCode())) {
throw new RuntimeException(res.getTips()); throw new YunShangException(res.getTips());
} }
return JSON.parseObject(JSON.parseObject(res.getData()).toJSONString(), QueryBillModel.class); return JSON.parseObject(JSON.parseObject(res.getData()).toJSONString(), QueryBillModel.class);
} }
...@@ -48,7 +49,7 @@ public class BillServiceImpl implements IBillService { ...@@ -48,7 +49,7 @@ public class BillServiceImpl implements IBillService {
JSON.toJSONString(model) JSON.toJSONString(model)
); );
if (!CharSequenceUtil.equals(res.getErrCode(), Code.SUCCESS.getCode())) { if (!CharSequenceUtil.equals(res.getErrCode(), Code.SUCCESS.getCode())) {
throw new RuntimeException(res.getTips()); throw new YunShangException(res.getTips());
} }
return JSON.parseObject(JSON.parseObject(res.getData()).toJSONString(), QueryBillAllModel.class); return JSON.parseObject(JSON.parseObject(res.getData()).toJSONString(), QueryBillAllModel.class);
} }
...@@ -63,7 +64,7 @@ public class BillServiceImpl implements IBillService { ...@@ -63,7 +64,7 @@ public class BillServiceImpl implements IBillService {
JSON.toJSONString(model) JSON.toJSONString(model)
); );
if (!CharSequenceUtil.equals(res.getErrCode(), Code.SUCCESS.getCode())) { if (!CharSequenceUtil.equals(res.getErrCode(), Code.SUCCESS.getCode())) {
throw new RuntimeException(res.getTips()); throw new YunShangException(res.getTips());
} }
if (res.getData() == null) { if (res.getData() == null) {
return PageInfo.<AccountDetailBeanModel>builder().build() return PageInfo.<AccountDetailBeanModel>builder().build()
...@@ -94,7 +95,7 @@ public class BillServiceImpl implements IBillService { ...@@ -94,7 +95,7 @@ public class BillServiceImpl implements IBillService {
JSON.toJSONString(model) JSON.toJSONString(model)
); );
if (!CharSequenceUtil.equals(res.getErrCode(), Code.SUCCESS.getCode())) { if (!CharSequenceUtil.equals(res.getErrCode(), Code.SUCCESS.getCode())) {
throw new RuntimeException(res.getTips()); throw new YunShangException(res.getTips());
} }
return JSON.parseObject(JSON.parseObject(res.getData()).toJSONString(), ConsTicketListModel.class); return JSON.parseObject(JSON.parseObject(res.getData()).toJSONString(), ConsTicketListModel.class);
} }
...@@ -109,7 +110,7 @@ public class BillServiceImpl implements IBillService { ...@@ -109,7 +110,7 @@ public class BillServiceImpl implements IBillService {
JSON.toJSONString(model) JSON.toJSONString(model)
); );
if (!CharSequenceUtil.equals(res.getErrCode(), Code.SUCCESS.getCode())) { if (!CharSequenceUtil.equals(res.getErrCode(), Code.SUCCESS.getCode())) {
throw new RuntimeException(res.getTips()); throw new YunShangException(res.getTips());
} }
return JSON.parseObject(JSON.parseObject(res.getData()).toJSONString(), TravelBillPushStatementModel.class); return JSON.parseObject(JSON.parseObject(res.getData()).toJSONString(), TravelBillPushStatementModel.class);
} }
...@@ -124,7 +125,7 @@ public class BillServiceImpl implements IBillService { ...@@ -124,7 +125,7 @@ public class BillServiceImpl implements IBillService {
JSON.toJSONString(model) JSON.toJSONString(model)
); );
if (!CharSequenceUtil.equals(res.getErrCode(), Code.SUCCESS.getCode())) { if (!CharSequenceUtil.equals(res.getErrCode(), Code.SUCCESS.getCode())) {
throw new RuntimeException(res.getTips()); throw new YunShangException(res.getTips());
} }
return JSON.parseObject(JSON.parseObject(res.getData()).toJSONString(), TravelBillGetCompareResultModel.class); return JSON.parseObject(JSON.parseObject(res.getData()).toJSONString(), TravelBillGetCompareResultModel.class);
} }
...@@ -139,7 +140,7 @@ public class BillServiceImpl implements IBillService { ...@@ -139,7 +140,7 @@ public class BillServiceImpl implements IBillService {
JSON.toJSONString(model) JSON.toJSONString(model)
); );
if (!CharSequenceUtil.equals(res.getErrCode(), Code.SUCCESS.getCode())) { if (!CharSequenceUtil.equals(res.getErrCode(), Code.SUCCESS.getCode())) {
throw new RuntimeException(res.getTips()); throw new YunShangException(res.getTips());
} }
return JSON.parseObject(JSON.parseObject(res.getData()).toJSONString(), EditBxjlModel.class); return JSON.parseObject(JSON.parseObject(res.getData()).toJSONString(), EditBxjlModel.class);
} }
...@@ -154,7 +155,7 @@ public class BillServiceImpl implements IBillService { ...@@ -154,7 +155,7 @@ public class BillServiceImpl implements IBillService {
JSON.toJSONString(model) JSON.toJSONString(model)
); );
if (!CharSequenceUtil.equals(res.getErrCode(), Code.SUCCESS.getCode())) { if (!CharSequenceUtil.equals(res.getErrCode(), Code.SUCCESS.getCode())) {
throw new RuntimeException(res.getTips()); throw new YunShangException(res.getTips());
} }
} }
} }
...@@ -7,6 +7,7 @@ import org.dromara.common.ys.common.ApiHttpResponse; ...@@ -7,6 +7,7 @@ import org.dromara.common.ys.common.ApiHttpResponse;
import org.dromara.common.ys.common.Code; import org.dromara.common.ys.common.Code;
import org.dromara.common.ys.enums.DomainEnum; import org.dromara.common.ys.enums.DomainEnum;
import org.dromara.common.ys.enums.resource.CommonResourceApiEnum; import org.dromara.common.ys.enums.resource.CommonResourceApiEnum;
import org.dromara.common.ys.exception.YunShangException;
import org.dromara.common.ys.model.req.commonResource.*; import org.dromara.common.ys.model.req.commonResource.*;
import org.dromara.common.ys.service.ICommonResourceService; import org.dromara.common.ys.service.ICommonResourceService;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
...@@ -32,7 +33,7 @@ public class CommonResourceServiceImpl implements ICommonResourceService { ...@@ -32,7 +33,7 @@ public class CommonResourceServiceImpl implements ICommonResourceService {
JSON.toJSONString(new CountryModel()) JSON.toJSONString(new CountryModel())
); );
if (!CharSequenceUtil.equals(res.getErrCode(), Code.SUCCESS.getCode())) { if (!CharSequenceUtil.equals(res.getErrCode(), Code.SUCCESS.getCode())) {
throw new RuntimeException(res.getTips()); throw new YunShangException(res.getTips());
} }
return JSON.parseArray(JSON.parseObject(res.getData()).getString("countryDataList"), org.dromara.common.ys.model.res.comomResource.CountryModel.class); return JSON.parseArray(JSON.parseObject(res.getData()).getString("countryDataList"), org.dromara.common.ys.model.res.comomResource.CountryModel.class);
} }
...@@ -47,7 +48,7 @@ public class CommonResourceServiceImpl implements ICommonResourceService { ...@@ -47,7 +48,7 @@ public class CommonResourceServiceImpl implements ICommonResourceService {
JSON.toJSONString(new ProvinceModel()) JSON.toJSONString(new ProvinceModel())
); );
if (!CharSequenceUtil.equals(res.getErrCode(), Code.SUCCESS.getCode())) { if (!CharSequenceUtil.equals(res.getErrCode(), Code.SUCCESS.getCode())) {
throw new RuntimeException(res.getTips()); throw new YunShangException(res.getTips());
} }
return JSON.parseArray(JSON.parseObject(res.getData()).getString("provinceDataList"), org.dromara.common.ys.model.res.comomResource.ProvinceModel.class); return JSON.parseArray(JSON.parseObject(res.getData()).getString("provinceDataList"), org.dromara.common.ys.model.res.comomResource.ProvinceModel.class);
} }
...@@ -62,7 +63,7 @@ public class CommonResourceServiceImpl implements ICommonResourceService { ...@@ -62,7 +63,7 @@ public class CommonResourceServiceImpl implements ICommonResourceService {
JSON.toJSONString(new CityModel()) JSON.toJSONString(new CityModel())
); );
if (!CharSequenceUtil.equals(res.getErrCode(), Code.SUCCESS.getCode())) { if (!CharSequenceUtil.equals(res.getErrCode(), Code.SUCCESS.getCode())) {
throw new RuntimeException(res.getTips()); throw new YunShangException(res.getTips());
} }
if (res.getData() == null) { if (res.getData() == null) {
return new ArrayList<>(); return new ArrayList<>();
...@@ -80,7 +81,7 @@ public class CommonResourceServiceImpl implements ICommonResourceService { ...@@ -80,7 +81,7 @@ public class CommonResourceServiceImpl implements ICommonResourceService {
JSON.toJSONString(new AirportModel()) JSON.toJSONString(new AirportModel())
); );
if (!CharSequenceUtil.equals(res.getErrCode(), Code.SUCCESS.getCode())) { if (!CharSequenceUtil.equals(res.getErrCode(), Code.SUCCESS.getCode())) {
throw new RuntimeException(res.getTips()); throw new YunShangException(res.getTips());
} }
if (res.getData() == null) { if (res.getData() == null) {
return new ArrayList<>(); return new ArrayList<>();
...@@ -99,7 +100,7 @@ public class CommonResourceServiceImpl implements ICommonResourceService { ...@@ -99,7 +100,7 @@ public class CommonResourceServiceImpl implements ICommonResourceService {
JSON.toJSONString(new StationModel()) JSON.toJSONString(new StationModel())
); );
if (!CharSequenceUtil.equals(res.getErrCode(), Code.SUCCESS.getCode())) { if (!CharSequenceUtil.equals(res.getErrCode(), Code.SUCCESS.getCode())) {
throw new RuntimeException(res.getTips()); throw new YunShangException(res.getTips());
} }
if (res.getData() == null) { if (res.getData() == null) {
return new ArrayList<>(); return new ArrayList<>();
...@@ -118,7 +119,7 @@ public class CommonResourceServiceImpl implements ICommonResourceService { ...@@ -118,7 +119,7 @@ public class CommonResourceServiceImpl implements ICommonResourceService {
JSON.toJSONString(new TrainBaseModel()) JSON.toJSONString(new TrainBaseModel())
); );
if (!CharSequenceUtil.equals(res.getErrCode(), Code.SUCCESS.getCode())) { if (!CharSequenceUtil.equals(res.getErrCode(), Code.SUCCESS.getCode())) {
throw new RuntimeException(res.getTips()); throw new YunShangException(res.getTips());
} }
if (res.getData() == null) { if (res.getData() == null) {
return new ArrayList<>(); return new ArrayList<>();
...@@ -138,7 +139,7 @@ public class CommonResourceServiceImpl implements ICommonResourceService { ...@@ -138,7 +139,7 @@ public class CommonResourceServiceImpl implements ICommonResourceService {
JSON.toJSONString(model) JSON.toJSONString(model)
); );
if (!CharSequenceUtil.equals(res.getErrCode(), Code.SUCCESS.getCode())) { if (!CharSequenceUtil.equals(res.getErrCode(), Code.SUCCESS.getCode())) {
throw new RuntimeException(res.getTips()); throw new YunShangException(res.getTips());
} }
if (res.getData() == null) { if (res.getData() == null) {
return new ArrayList<>(); return new ArrayList<>();
......
...@@ -8,6 +8,7 @@ import org.dromara.common.ys.common.Code; ...@@ -8,6 +8,7 @@ import org.dromara.common.ys.common.Code;
import org.dromara.common.ys.common.PageInfo; import org.dromara.common.ys.common.PageInfo;
import org.dromara.common.ys.enums.DomainEnum; import org.dromara.common.ys.enums.DomainEnum;
import org.dromara.common.ys.enums.hotel.HotelApiEnum; import org.dromara.common.ys.enums.hotel.HotelApiEnum;
import org.dromara.common.ys.exception.YunShangException;
import org.dromara.common.ys.model.req.hotel.HotelQueryOrderModel; import org.dromara.common.ys.model.req.hotel.HotelQueryOrderModel;
import org.dromara.common.ys.model.req.hotel.HotelQueryRefundOrderModel; import org.dromara.common.ys.model.req.hotel.HotelQueryRefundOrderModel;
import org.dromara.common.ys.model.req.hotel.PayOrderModel; import org.dromara.common.ys.model.req.hotel.PayOrderModel;
...@@ -37,7 +38,7 @@ public class HotelServiceImpl implements IHotelService { ...@@ -37,7 +38,7 @@ public class HotelServiceImpl implements IHotelService {
JSON.toJSONString(model) JSON.toJSONString(model)
); );
if (!CharSequenceUtil.equals(res.getErrCode(), Code.SUCCESS.getCode())) { if (!CharSequenceUtil.equals(res.getErrCode(), Code.SUCCESS.getCode())) {
throw new RuntimeException(res.getTips()); throw new YunShangException(res.getTips());
} }
if (res.getData() == null) { if (res.getData() == null) {
return null; return null;
...@@ -55,7 +56,7 @@ public class HotelServiceImpl implements IHotelService { ...@@ -55,7 +56,7 @@ public class HotelServiceImpl implements IHotelService {
JSON.toJSONString(model) JSON.toJSONString(model)
); );
if (!CharSequenceUtil.equals(res.getErrCode(), Code.SUCCESS.getCode())) { if (!CharSequenceUtil.equals(res.getErrCode(), Code.SUCCESS.getCode())) {
throw new RuntimeException(res.getTips()); throw new YunShangException(res.getTips());
} }
return Optional.ofNullable(res.getData()).map(data->JSON.parseObject(JSON.parseObject(data).toJSONString(), HotelShoppingPricePlanModel.class)).orElse(null); return Optional.ofNullable(res.getData()).map(data->JSON.parseObject(JSON.parseObject(data).toJSONString(), HotelShoppingPricePlanModel.class)).orElse(null);
} }
...@@ -70,7 +71,7 @@ public class HotelServiceImpl implements IHotelService { ...@@ -70,7 +71,7 @@ public class HotelServiceImpl implements IHotelService {
JSON.toJSONString(model) JSON.toJSONString(model)
); );
if (!CharSequenceUtil.equals(res.getErrCode(), Code.SUCCESS.getCode())) { if (!CharSequenceUtil.equals(res.getErrCode(), Code.SUCCESS.getCode())) {
throw new RuntimeException(res.getTips()); throw new YunShangException(res.getTips());
} }
if (res.getData() == null) { if (res.getData() == null) {
return PageInfo.<HotelShoppingBaseListModel>builder().build() return PageInfo.<HotelShoppingBaseListModel>builder().build()
...@@ -101,7 +102,7 @@ public class HotelServiceImpl implements IHotelService { ...@@ -101,7 +102,7 @@ public class HotelServiceImpl implements IHotelService {
JSON.toJSONString(model) JSON.toJSONString(model)
); );
if (!CharSequenceUtil.equals(res.getErrCode(), Code.SUCCESS.getCode())) { if (!CharSequenceUtil.equals(res.getErrCode(), Code.SUCCESS.getCode())) {
throw new RuntimeException(res.getTips()); throw new YunShangException(res.getTips());
} }
return JSON.parseObject(JSON.parseObject(res.getData()).toJSONString(), HotelOrderBookModel.class); return JSON.parseObject(JSON.parseObject(res.getData()).toJSONString(), HotelOrderBookModel.class);
} }
...@@ -116,7 +117,7 @@ public class HotelServiceImpl implements IHotelService { ...@@ -116,7 +117,7 @@ public class HotelServiceImpl implements IHotelService {
JSON.toJSONString(model) JSON.toJSONString(model)
); );
if (!CharSequenceUtil.equals(res.getErrCode(), Code.SUCCESS.getCode())) { if (!CharSequenceUtil.equals(res.getErrCode(), Code.SUCCESS.getCode())) {
throw new RuntimeException(res.getTips()); throw new YunShangException(res.getTips());
} }
return JSON.parseObject(JSON.parseObject(res.getData()).toJSONString(), CancelOrderModel.class); return JSON.parseObject(JSON.parseObject(res.getData()).toJSONString(), CancelOrderModel.class);
} }
...@@ -131,7 +132,7 @@ public class HotelServiceImpl implements IHotelService { ...@@ -131,7 +132,7 @@ public class HotelServiceImpl implements IHotelService {
JSON.toJSONString(model) JSON.toJSONString(model)
); );
if (!CharSequenceUtil.equals(res.getErrCode(), Code.SUCCESS.getCode())) { if (!CharSequenceUtil.equals(res.getErrCode(), Code.SUCCESS.getCode())) {
throw new RuntimeException(res.getTips()); throw new YunShangException(res.getTips());
} }
return true; return true;
} }
...@@ -146,7 +147,7 @@ public class HotelServiceImpl implements IHotelService { ...@@ -146,7 +147,7 @@ public class HotelServiceImpl implements IHotelService {
JSON.toJSONString(model) JSON.toJSONString(model)
); );
if (!CharSequenceUtil.equals(res.getErrCode(), Code.SUCCESS.getCode())) { if (!CharSequenceUtil.equals(res.getErrCode(), Code.SUCCESS.getCode())) {
throw new RuntimeException(res.getTips()); throw new YunShangException(res.getTips());
} }
return JSON.parseObject(JSON.parseObject(res.getData()).toJSONString(), HotelOrderQueryDetailModel.class); return JSON.parseObject(JSON.parseObject(res.getData()).toJSONString(), HotelOrderQueryDetailModel.class);
} }
...@@ -161,7 +162,7 @@ public class HotelServiceImpl implements IHotelService { ...@@ -161,7 +162,7 @@ public class HotelServiceImpl implements IHotelService {
JSON.toJSONString(model) JSON.toJSONString(model)
); );
if (!CharSequenceUtil.equals(res.getErrCode(), Code.SUCCESS.getCode())) { if (!CharSequenceUtil.equals(res.getErrCode(), Code.SUCCESS.getCode())) {
throw new RuntimeException(res.getTips()); throw new YunShangException(res.getTips());
} }
if (res.getData() == null) { if (res.getData() == null) {
return PageInfo.<HotelOrderQueryListModel>builder().build() return PageInfo.<HotelOrderQueryListModel>builder().build()
...@@ -192,7 +193,7 @@ public class HotelServiceImpl implements IHotelService { ...@@ -192,7 +193,7 @@ public class HotelServiceImpl implements IHotelService {
JSON.toJSONString(model) JSON.toJSONString(model)
); );
if (!CharSequenceUtil.equals(res.getErrCode(), Code.SUCCESS.getCode())) { if (!CharSequenceUtil.equals(res.getErrCode(), Code.SUCCESS.getCode())) {
throw new RuntimeException(res.getTips()); throw new YunShangException(res.getTips());
} }
return JSON.parseArray(JSON.parseObject(res.getData()).getString("orderGather"), HtOrderInfoModel.class); return JSON.parseArray(JSON.parseObject(res.getData()).getString("orderGather"), HtOrderInfoModel.class);
} }
...@@ -207,7 +208,7 @@ public class HotelServiceImpl implements IHotelService { ...@@ -207,7 +208,7 @@ public class HotelServiceImpl implements IHotelService {
JSON.toJSONString(model) JSON.toJSONString(model)
); );
if (!CharSequenceUtil.equals(res.getErrCode(), Code.SUCCESS.getCode())) { if (!CharSequenceUtil.equals(res.getErrCode(), Code.SUCCESS.getCode())) {
throw new RuntimeException(res.getTips()); throw new YunShangException(res.getTips());
} }
return JSON.parseArray(JSON.parseObject(res.getData()).getString("orderGather"), HtRefundInfoModel.class); return JSON.parseArray(JSON.parseObject(res.getData()).getString("orderGather"), HtRefundInfoModel.class);
} }
...@@ -222,7 +223,7 @@ public class HotelServiceImpl implements IHotelService { ...@@ -222,7 +223,7 @@ public class HotelServiceImpl implements IHotelService {
JSON.toJSONString(model) JSON.toJSONString(model)
); );
if (!CharSequenceUtil.equals(res.getErrCode(), Code.SUCCESS.getCode())) { if (!CharSequenceUtil.equals(res.getErrCode(), Code.SUCCESS.getCode())) {
throw new RuntimeException(res.getTips()); throw new YunShangException(res.getTips());
} }
return JSON.parseObject(JSON.parseObject(res.getData()).toJSONString(), HotelOrderXjdModel.class); return JSON.parseObject(JSON.parseObject(res.getData()).toJSONString(), HotelOrderXjdModel.class);
} }
......
...@@ -7,6 +7,7 @@ import org.dromara.common.ys.common.ApiHttpResponse; ...@@ -7,6 +7,7 @@ import org.dromara.common.ys.common.ApiHttpResponse;
import org.dromara.common.ys.common.Code; import org.dromara.common.ys.common.Code;
import org.dromara.common.ys.enums.DomainEnum; import org.dromara.common.ys.enums.DomainEnum;
import org.dromara.common.ys.enums.insurance.InsuranceApiEnum; import org.dromara.common.ys.enums.insurance.InsuranceApiEnum;
import org.dromara.common.ys.exception.YunShangException;
import org.dromara.common.ys.model.req.insurance.BxcpModel; import org.dromara.common.ys.model.req.insurance.BxcpModel;
import org.dromara.common.ys.service.IInsuranceService; import org.dromara.common.ys.service.IInsuranceService;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
...@@ -31,7 +32,7 @@ public class InsuranceServiceImpl implements IInsuranceService { ...@@ -31,7 +32,7 @@ public class InsuranceServiceImpl implements IInsuranceService {
JSON.toJSONString(model) JSON.toJSONString(model)
); );
if (!CharSequenceUtil.equals(res.getErrCode(), Code.SUCCESS.getCode())) { if (!CharSequenceUtil.equals(res.getErrCode(), Code.SUCCESS.getCode())) {
throw new RuntimeException(res.getTips()); throw new YunShangException(res.getTips());
} }
return JSON.parseArray(JSON.parseObject(res.getData()).getString("cpList"), org.dromara.common.ys.model.res.insurance.BxcpModel.class); return JSON.parseArray(JSON.parseObject(res.getData()).getString("cpList"), org.dromara.common.ys.model.res.insurance.BxcpModel.class);
} }
......
...@@ -7,8 +7,9 @@ import org.dromara.common.ys.common.ApiHttpResponse; ...@@ -7,8 +7,9 @@ import org.dromara.common.ys.common.ApiHttpResponse;
import org.dromara.common.ys.common.Code; import org.dromara.common.ys.common.Code;
import org.dromara.common.ys.enums.DomainEnum; import org.dromara.common.ys.enums.DomainEnum;
import org.dromara.common.ys.enums.org.OrgApiEnum; import org.dromara.common.ys.enums.org.OrgApiEnum;
import org.dromara.common.ys.service.IOrgService; import org.dromara.common.ys.exception.YunShangException;
import org.dromara.common.ys.model.req.org.EditEmployeeModel; import org.dromara.common.ys.model.req.org.EditEmployeeModel;
import org.dromara.common.ys.service.IOrgService;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
/** /**
...@@ -29,7 +30,7 @@ public class OrgServiceImpl implements IOrgService { ...@@ -29,7 +30,7 @@ public class OrgServiceImpl implements IOrgService {
JSON.toJSONString(model) JSON.toJSONString(model)
); );
if (!CharSequenceUtil.equals(res.getErrCode(), Code.SUCCESS.getCode())) { if (!CharSequenceUtil.equals(res.getErrCode(), Code.SUCCESS.getCode())) {
throw new RuntimeException(res.getTips()); throw new YunShangException(res.getTips());
} }
return true; return true;
} }
......
...@@ -8,6 +8,7 @@ import org.dromara.common.ys.common.Code; ...@@ -8,6 +8,7 @@ import org.dromara.common.ys.common.Code;
import org.dromara.common.ys.common.PageInfo; import org.dromara.common.ys.common.PageInfo;
import org.dromara.common.ys.enums.DomainEnum; import org.dromara.common.ys.enums.DomainEnum;
import org.dromara.common.ys.enums.qz.QzApiEnum; import org.dromara.common.ys.enums.qz.QzApiEnum;
import org.dromara.common.ys.exception.YunShangException;
import org.dromara.common.ys.model.req.qz.*; import org.dromara.common.ys.model.req.qz.*;
import org.dromara.common.ys.model.res.qz.GetAssociatDetailModel; import org.dromara.common.ys.model.res.qz.GetAssociatDetailModel;
import org.dromara.common.ys.model.res.qz.GetProdDetailModel; import org.dromara.common.ys.model.res.qz.GetProdDetailModel;
...@@ -36,7 +37,7 @@ public class QzServiceImpl implements IQzService { ...@@ -36,7 +37,7 @@ public class QzServiceImpl implements IQzService {
JSON.toJSONString(model) JSON.toJSONString(model)
); );
if (!CharSequenceUtil.equals(res.getErrCode(), Code.SUCCESS.getCode())) { if (!CharSequenceUtil.equals(res.getErrCode(), Code.SUCCESS.getCode())) {
throw new RuntimeException(res.getTips()); throw new YunShangException(res.getTips());
} }
if (res.getData() == null) { if (res.getData() == null) {
return PageInfo.<VisaProdBeanModel>builder().build() return PageInfo.<VisaProdBeanModel>builder().build()
...@@ -67,7 +68,7 @@ public class QzServiceImpl implements IQzService { ...@@ -67,7 +68,7 @@ public class QzServiceImpl implements IQzService {
JSON.toJSONString(model) JSON.toJSONString(model)
); );
if (!CharSequenceUtil.equals(res.getErrCode(), Code.SUCCESS.getCode())) { if (!CharSequenceUtil.equals(res.getErrCode(), Code.SUCCESS.getCode())) {
throw new RuntimeException(res.getTips()); throw new YunShangException(res.getTips());
} }
if (res.getData() == null) { if (res.getData() == null) {
return PageInfo.<AssocitionBeanModel>builder().build() return PageInfo.<AssocitionBeanModel>builder().build()
...@@ -98,7 +99,7 @@ public class QzServiceImpl implements IQzService { ...@@ -98,7 +99,7 @@ public class QzServiceImpl implements IQzService {
JSON.toJSONString(model) JSON.toJSONString(model)
); );
if (!CharSequenceUtil.equals(res.getErrCode(), Code.SUCCESS.getCode())) { if (!CharSequenceUtil.equals(res.getErrCode(), Code.SUCCESS.getCode())) {
throw new RuntimeException(res.getTips()); throw new YunShangException(res.getTips());
} }
if (res.getData() == null) { if (res.getData() == null) {
return PageInfo.<OrderListBeanModel>builder().build() return PageInfo.<OrderListBeanModel>builder().build()
...@@ -129,7 +130,7 @@ public class QzServiceImpl implements IQzService { ...@@ -129,7 +130,7 @@ public class QzServiceImpl implements IQzService {
JSON.toJSONString(model) JSON.toJSONString(model)
); );
if (!CharSequenceUtil.equals(res.getErrCode(), Code.SUCCESS.getCode())) { if (!CharSequenceUtil.equals(res.getErrCode(), Code.SUCCESS.getCode())) {
throw new RuntimeException(res.getTips()); throw new YunShangException(res.getTips());
} }
return JSON.parseObject(JSON.parseObject(res.getData()).toJSONString(), GetProdDetailModel.class); return JSON.parseObject(JSON.parseObject(res.getData()).toJSONString(), GetProdDetailModel.class);
} }
...@@ -144,7 +145,7 @@ public class QzServiceImpl implements IQzService { ...@@ -144,7 +145,7 @@ public class QzServiceImpl implements IQzService {
JSON.toJSONString(model) JSON.toJSONString(model)
); );
if (!CharSequenceUtil.equals(res.getErrCode(), Code.SUCCESS.getCode())) { if (!CharSequenceUtil.equals(res.getErrCode(), Code.SUCCESS.getCode())) {
throw new RuntimeException(res.getTips()); throw new YunShangException(res.getTips());
} }
return JSON.parseObject(JSON.parseObject(res.getData()).toJSONString(), QzOrderGetDetailModel.class); return JSON.parseObject(JSON.parseObject(res.getData()).toJSONString(), QzOrderGetDetailModel.class);
} }
...@@ -159,7 +160,7 @@ public class QzServiceImpl implements IQzService { ...@@ -159,7 +160,7 @@ public class QzServiceImpl implements IQzService {
JSON.toJSONString(model) JSON.toJSONString(model)
); );
if (!CharSequenceUtil.equals(res.getErrCode(), Code.SUCCESS.getCode())) { if (!CharSequenceUtil.equals(res.getErrCode(), Code.SUCCESS.getCode())) {
throw new RuntimeException(res.getTips()); throw new YunShangException(res.getTips());
} }
} }
...@@ -173,7 +174,7 @@ public class QzServiceImpl implements IQzService { ...@@ -173,7 +174,7 @@ public class QzServiceImpl implements IQzService {
JSON.toJSONString(model) JSON.toJSONString(model)
); );
if (!CharSequenceUtil.equals(res.getErrCode(), Code.SUCCESS.getCode())) { if (!CharSequenceUtil.equals(res.getErrCode(), Code.SUCCESS.getCode())) {
throw new RuntimeException(res.getTips()); throw new YunShangException(res.getTips());
} }
return JSON.parseObject(JSON.parseObject(res.getData()).toJSONString(), GetAssociatDetailModel.class); return JSON.parseObject(JSON.parseObject(res.getData()).toJSONString(), GetAssociatDetailModel.class);
} }
...@@ -188,7 +189,7 @@ public class QzServiceImpl implements IQzService { ...@@ -188,7 +189,7 @@ public class QzServiceImpl implements IQzService {
JSON.toJSONString(model) JSON.toJSONString(model)
); );
if (!CharSequenceUtil.equals(res.getErrCode(), Code.SUCCESS.getCode())) { if (!CharSequenceUtil.equals(res.getErrCode(), Code.SUCCESS.getCode())) {
throw new RuntimeException(res.getTips()); throw new YunShangException(res.getTips());
} }
return JSON.parseArray(JSON.parseObject(res.getData()).getString("newAppointmentBeans"), NewAppointmentBeanModel.class); return JSON.parseArray(JSON.parseObject(res.getData()).getString("newAppointmentBeans"), NewAppointmentBeanModel.class);
} }
...@@ -203,7 +204,7 @@ public class QzServiceImpl implements IQzService { ...@@ -203,7 +204,7 @@ public class QzServiceImpl implements IQzService {
JSON.toJSONString(model) JSON.toJSONString(model)
); );
if (!CharSequenceUtil.equals(res.getErrCode(), Code.SUCCESS.getCode())) { if (!CharSequenceUtil.equals(res.getErrCode(), Code.SUCCESS.getCode())) {
throw new RuntimeException(res.getTips()); throw new YunShangException(res.getTips());
} }
} }
} }
...@@ -9,6 +9,7 @@ import org.dromara.common.ys.common.Code; ...@@ -9,6 +9,7 @@ import org.dromara.common.ys.common.Code;
import org.dromara.common.ys.common.PageInfo; import org.dromara.common.ys.common.PageInfo;
import org.dromara.common.ys.enums.DomainEnum; import org.dromara.common.ys.enums.DomainEnum;
import org.dromara.common.ys.enums.train.TrainApiEnum; import org.dromara.common.ys.enums.train.TrainApiEnum;
import org.dromara.common.ys.exception.YunShangException;
import org.dromara.common.ys.model.req.train.*; import org.dromara.common.ys.model.req.train.*;
import org.dromara.common.ys.model.res.train.AllStationModel; import org.dromara.common.ys.model.res.train.AllStationModel;
import org.dromara.common.ys.model.res.train.OrderRefundApplyModel; import org.dromara.common.ys.model.res.train.OrderRefundApplyModel;
...@@ -43,7 +44,7 @@ public class TrainServiceImpl implements ITrainService { ...@@ -43,7 +44,7 @@ public class TrainServiceImpl implements ITrainService {
JSON.toJSONString(model) JSON.toJSONString(model)
); );
if (!CharSequenceUtil.equals(res.getErrCode(), Code.SUCCESS.getCode())) { if (!CharSequenceUtil.equals(res.getErrCode(), Code.SUCCESS.getCode())) {
throw new RuntimeException(res.getErrMsg()); throw new YunShangException(res.getErrMsg());
} }
if (StrUtil.isEmpty(res.getData())) { if (StrUtil.isEmpty(res.getData())) {
return Collections.emptyList(); return Collections.emptyList();
...@@ -61,7 +62,7 @@ public class TrainServiceImpl implements ITrainService { ...@@ -61,7 +62,7 @@ public class TrainServiceImpl implements ITrainService {
JSON.toJSONString(model) JSON.toJSONString(model)
); );
if (!CharSequenceUtil.equals(res.getErrCode(), Code.SUCCESS.getCode())) { if (!CharSequenceUtil.equals(res.getErrCode(), Code.SUCCESS.getCode())) {
throw new RuntimeException(res.getErrMsg()); throw new YunShangException(res.getErrMsg());
} }
if (StrUtil.isEmpty(res.getData())) { if (StrUtil.isEmpty(res.getData())) {
return Collections.emptyList(); return Collections.emptyList();
...@@ -79,7 +80,7 @@ public class TrainServiceImpl implements ITrainService { ...@@ -79,7 +80,7 @@ public class TrainServiceImpl implements ITrainService {
JSON.toJSONString(model) JSON.toJSONString(model)
); );
if (!CharSequenceUtil.equals(res.getErrCode(), Code.SUCCESS.getCode())) { if (!CharSequenceUtil.equals(res.getErrCode(), Code.SUCCESS.getCode())) {
throw new RuntimeException(res.getErrMsg()); throw new YunShangException(res.getErrMsg());
} }
if (StrUtil.isEmpty(res.getData())) { if (StrUtil.isEmpty(res.getData())) {
return Collections.emptyList(); return Collections.emptyList();
...@@ -97,7 +98,7 @@ public class TrainServiceImpl implements ITrainService { ...@@ -97,7 +98,7 @@ public class TrainServiceImpl implements ITrainService {
JSON.toJSONString(model) JSON.toJSONString(model)
); );
if (!CharSequenceUtil.equals(res.getErrCode(), Code.SUCCESS.getCode())) { if (!CharSequenceUtil.equals(res.getErrCode(), Code.SUCCESS.getCode())) {
throw new RuntimeException(res.getErrMsg()); throw new YunShangException(res.getErrMsg());
} }
if (StrUtil.isEmpty(res.getData())) { if (StrUtil.isEmpty(res.getData())) {
return Collections.emptyList(); return Collections.emptyList();
...@@ -115,7 +116,7 @@ public class TrainServiceImpl implements ITrainService { ...@@ -115,7 +116,7 @@ public class TrainServiceImpl implements ITrainService {
JSON.toJSONString(model) JSON.toJSONString(model)
); );
if (!CharSequenceUtil.equals(res.getErrCode(), Code.SUCCESS.getCode())) { if (!CharSequenceUtil.equals(res.getErrCode(), Code.SUCCESS.getCode())) {
throw new RuntimeException(res.getErrMsg()); throw new YunShangException(res.getErrMsg());
} }
if (StrUtil.isEmpty(res.getData())) { if (StrUtil.isEmpty(res.getData())) {
return Collections.emptyList(); return Collections.emptyList();
...@@ -133,7 +134,7 @@ public class TrainServiceImpl implements ITrainService { ...@@ -133,7 +134,7 @@ public class TrainServiceImpl implements ITrainService {
JSON.toJSONString(model) JSON.toJSONString(model)
); );
if (!CharSequenceUtil.equals(res.getErrCode(), Code.SUCCESS.getCode())) { if (!CharSequenceUtil.equals(res.getErrCode(), Code.SUCCESS.getCode())) {
throw new RuntimeException(res.getErrMsg()); throw new YunShangException(res.getErrMsg());
} }
if (StrUtil.isEmpty(res.getData())) { if (StrUtil.isEmpty(res.getData())) {
return Collections.emptyList(); return Collections.emptyList();
...@@ -151,7 +152,7 @@ public class TrainServiceImpl implements ITrainService { ...@@ -151,7 +152,7 @@ public class TrainServiceImpl implements ITrainService {
JSON.toJSONString(new AllStationModel()) JSON.toJSONString(new AllStationModel())
); );
if (!CharSequenceUtil.equals(res.getErrCode(), Code.SUCCESS.getCode())) { if (!CharSequenceUtil.equals(res.getErrCode(), Code.SUCCESS.getCode())) {
throw new RuntimeException(res.getTips()); throw new YunShangException(res.getTips());
} }
return JSON.parseArray(JSON.parseObject(res.getData()).getString("list"), AllStationModel.class); return JSON.parseArray(JSON.parseObject(res.getData()).getString("list"), AllStationModel.class);
} }
...@@ -166,7 +167,7 @@ public class TrainServiceImpl implements ITrainService { ...@@ -166,7 +167,7 @@ public class TrainServiceImpl implements ITrainService {
JSON.toJSONString(model) JSON.toJSONString(model)
); );
if (!CharSequenceUtil.equals(res.getErrCode(), Code.SUCCESS.getCode())) { if (!CharSequenceUtil.equals(res.getErrCode(), Code.SUCCESS.getCode())) {
throw new RuntimeException(res.getTips()); throw new YunShangException(res.getTips());
} }
return JSON.parseObject(JSON.parseObject(res.getData()).toJSONString(), CheckAccountResModel.class); return JSON.parseObject(JSON.parseObject(res.getData()).toJSONString(), CheckAccountResModel.class);
} }
...@@ -181,7 +182,7 @@ public class TrainServiceImpl implements ITrainService { ...@@ -181,7 +182,7 @@ public class TrainServiceImpl implements ITrainService {
JSON.toJSONString(model) JSON.toJSONString(model)
); );
if (!CharSequenceUtil.equals(res.getErrCode(), Code.SUCCESS.getCode())) { if (!CharSequenceUtil.equals(res.getErrCode(), Code.SUCCESS.getCode())) {
throw new RuntimeException(res.getTips()); throw new YunShangException(res.getTips());
} }
return JSON.parseObject(JSON.parseObject(res.getData()).toJSONString(), TrainSetRegisterModel.class); return JSON.parseObject(JSON.parseObject(res.getData()).toJSONString(), TrainSetRegisterModel.class);
} }
...@@ -196,7 +197,7 @@ public class TrainServiceImpl implements ITrainService { ...@@ -196,7 +197,7 @@ public class TrainServiceImpl implements ITrainService {
JSON.toJSONString(model) JSON.toJSONString(model)
); );
if (!CharSequenceUtil.equals(res.getErrCode(), Code.SUCCESS.getCode())) { if (!CharSequenceUtil.equals(res.getErrCode(), Code.SUCCESS.getCode())) {
throw new RuntimeException(res.getTips()); throw new YunShangException(res.getTips());
} }
return JSON.parseObject(JSON.parseObject(res.getData()).toJSONString(), TrainChangeApplyApiModel.class); return JSON.parseObject(JSON.parseObject(res.getData()).toJSONString(), TrainChangeApplyApiModel.class);
} }
...@@ -211,7 +212,7 @@ public class TrainServiceImpl implements ITrainService { ...@@ -211,7 +212,7 @@ public class TrainServiceImpl implements ITrainService {
JSON.toJSONString(model) JSON.toJSONString(model)
); );
if (!CharSequenceUtil.equals(res.getErrCode(), Code.SUCCESS.getCode())) { if (!CharSequenceUtil.equals(res.getErrCode(), Code.SUCCESS.getCode())) {
throw new RuntimeException(res.getTips()); throw new YunShangException(res.getTips());
} }
} }
...@@ -225,7 +226,7 @@ public class TrainServiceImpl implements ITrainService { ...@@ -225,7 +226,7 @@ public class TrainServiceImpl implements ITrainService {
JSON.toJSONString(model) JSON.toJSONString(model)
); );
if (!CharSequenceUtil.equals(res.getErrCode(), Code.SUCCESS.getCode())) { if (!CharSequenceUtil.equals(res.getErrCode(), Code.SUCCESS.getCode())) {
throw new RuntimeException(res.getTips()); throw new YunShangException(res.getTips());
} }
} }
...@@ -239,7 +240,7 @@ public class TrainServiceImpl implements ITrainService { ...@@ -239,7 +240,7 @@ public class TrainServiceImpl implements ITrainService {
JSON.toJSONString(model) JSON.toJSONString(model)
); );
if (!CharSequenceUtil.equals(res.getErrCode(), Code.SUCCESS.getCode())) { if (!CharSequenceUtil.equals(res.getErrCode(), Code.SUCCESS.getCode())) {
throw new RuntimeException(res.getTips()); throw new YunShangException(res.getTips());
} }
} }
...@@ -253,7 +254,7 @@ public class TrainServiceImpl implements ITrainService { ...@@ -253,7 +254,7 @@ public class TrainServiceImpl implements ITrainService {
JSON.toJSONString(model) JSON.toJSONString(model)
); );
if (!CharSequenceUtil.equals(res.getErrCode(), Code.SUCCESS.getCode())) { if (!CharSequenceUtil.equals(res.getErrCode(), Code.SUCCESS.getCode())) {
throw new RuntimeException(res.getTips()); throw new YunShangException(res.getTips());
} }
} }
...@@ -267,7 +268,7 @@ public class TrainServiceImpl implements ITrainService { ...@@ -267,7 +268,7 @@ public class TrainServiceImpl implements ITrainService {
JSON.toJSONString(model) JSON.toJSONString(model)
); );
if (!CharSequenceUtil.equals(res.getErrCode(), Code.SUCCESS.getCode())) { if (!CharSequenceUtil.equals(res.getErrCode(), Code.SUCCESS.getCode())) {
throw new RuntimeException(res.getTips()); throw new YunShangException(res.getTips());
} }
} }
...@@ -281,7 +282,7 @@ public class TrainServiceImpl implements ITrainService { ...@@ -281,7 +282,7 @@ public class TrainServiceImpl implements ITrainService {
JSON.toJSONString(model) JSON.toJSONString(model)
); );
if (!CharSequenceUtil.equals(res.getErrCode(), Code.SUCCESS.getCode())) { if (!CharSequenceUtil.equals(res.getErrCode(), Code.SUCCESS.getCode())) {
throw new RuntimeException(res.getTips()); throw new YunShangException(res.getTips());
} }
} }
...@@ -295,7 +296,7 @@ public class TrainServiceImpl implements ITrainService { ...@@ -295,7 +296,7 @@ public class TrainServiceImpl implements ITrainService {
JSON.toJSONString(model) JSON.toJSONString(model)
); );
if (!CharSequenceUtil.equals(res.getErrCode(), Code.SUCCESS.getCode())) { if (!CharSequenceUtil.equals(res.getErrCode(), Code.SUCCESS.getCode())) {
throw new RuntimeException(res.getTips()); throw new YunShangException(res.getTips());
} }
} }
...@@ -309,7 +310,7 @@ public class TrainServiceImpl implements ITrainService { ...@@ -309,7 +310,7 @@ public class TrainServiceImpl implements ITrainService {
JSON.toJSONString(model) JSON.toJSONString(model)
); );
if (!CharSequenceUtil.equals(res.getErrCode(), Code.SUCCESS.getCode())) { if (!CharSequenceUtil.equals(res.getErrCode(), Code.SUCCESS.getCode())) {
throw new RuntimeException(res.getTips()); throw new YunShangException(res.getTips());
} }
} }
...@@ -323,7 +324,7 @@ public class TrainServiceImpl implements ITrainService { ...@@ -323,7 +324,7 @@ public class TrainServiceImpl implements ITrainService {
JSON.toJSONString(model) JSON.toJSONString(model)
); );
if (!CharSequenceUtil.equals(res.getErrCode(), Code.SUCCESS.getCode())) { if (!CharSequenceUtil.equals(res.getErrCode(), Code.SUCCESS.getCode())) {
throw new RuntimeException(res.getTips()); throw new YunShangException(res.getTips());
} }
return JSON.parseObject(JSON.parseObject(res.getData()).toJSONString(), OrderBookResModel.class); return JSON.parseObject(JSON.parseObject(res.getData()).toJSONString(), OrderBookResModel.class);
} }
...@@ -338,7 +339,7 @@ public class TrainServiceImpl implements ITrainService { ...@@ -338,7 +339,7 @@ public class TrainServiceImpl implements ITrainService {
JSON.toJSONString(model) JSON.toJSONString(model)
); );
if (!CharSequenceUtil.equals(res.getErrCode(), Code.SUCCESS.getCode())) { if (!CharSequenceUtil.equals(res.getErrCode(), Code.SUCCESS.getCode())) {
throw new RuntimeException(res.getTips()); throw new YunShangException(res.getTips());
} }
} }
...@@ -352,7 +353,7 @@ public class TrainServiceImpl implements ITrainService { ...@@ -352,7 +353,7 @@ public class TrainServiceImpl implements ITrainService {
JSON.toJSONString(model) JSON.toJSONString(model)
); );
if (!CharSequenceUtil.equals(res.getErrCode(), Code.SUCCESS.getCode())) { if (!CharSequenceUtil.equals(res.getErrCode(), Code.SUCCESS.getCode())) {
throw new RuntimeException(res.getTips()); throw new YunShangException(res.getTips());
} }
} }
...@@ -366,7 +367,7 @@ public class TrainServiceImpl implements ITrainService { ...@@ -366,7 +367,7 @@ public class TrainServiceImpl implements ITrainService {
JSON.toJSONString(model) JSON.toJSONString(model)
); );
if (!CharSequenceUtil.equals(res.getErrCode(), Code.SUCCESS.getCode())) { if (!CharSequenceUtil.equals(res.getErrCode(), Code.SUCCESS.getCode())) {
throw new RuntimeException(res.getTips()); throw new YunShangException(res.getTips());
} }
if (res.getData() == null) { if (res.getData() == null) {
return PageInfo.<OrderListQueryResModel>builder().build() return PageInfo.<OrderListQueryResModel>builder().build()
...@@ -397,7 +398,7 @@ public class TrainServiceImpl implements ITrainService { ...@@ -397,7 +398,7 @@ public class TrainServiceImpl implements ITrainService {
JSON.toJSONString(model) JSON.toJSONString(model)
); );
if (!CharSequenceUtil.equals(res.getErrCode(), Code.SUCCESS.getCode())) { if (!CharSequenceUtil.equals(res.getErrCode(), Code.SUCCESS.getCode())) {
throw new RuntimeException(res.getTips()); throw new YunShangException(res.getTips());
} }
if (res.getData() == null) { if (res.getData() == null) {
return PageInfo.<TrainRefundQueryRefundListApiBeanModel>builder().build() return PageInfo.<TrainRefundQueryRefundListApiBeanModel>builder().build()
...@@ -428,7 +429,7 @@ public class TrainServiceImpl implements ITrainService { ...@@ -428,7 +429,7 @@ public class TrainServiceImpl implements ITrainService {
JSON.toJSONString(model) JSON.toJSONString(model)
); );
if (!CharSequenceUtil.equals(res.getErrCode(), Code.SUCCESS.getCode())) { if (!CharSequenceUtil.equals(res.getErrCode(), Code.SUCCESS.getCode())) {
throw new RuntimeException(res.getTips()); throw new YunShangException(res.getTips());
} }
if (res.getData() == null) { if (res.getData() == null) {
return PageInfo.<TrainChangeQueryChangeListApiBeanModel>builder().build() return PageInfo.<TrainChangeQueryChangeListApiBeanModel>builder().build()
...@@ -459,7 +460,7 @@ public class TrainServiceImpl implements ITrainService { ...@@ -459,7 +460,7 @@ public class TrainServiceImpl implements ITrainService {
JSON.toJSONString(model) JSON.toJSONString(model)
); );
if (!CharSequenceUtil.equals(res.getErrCode(), Code.SUCCESS.getCode())) { if (!CharSequenceUtil.equals(res.getErrCode(), Code.SUCCESS.getCode())) {
throw new RuntimeException(res.getTips()); throw new YunShangException(res.getTips());
} }
return JSON.parseArray(JSON.parseObject(res.getData()).getString("orderGather"), OrderInfoModel.class).get(0); return JSON.parseArray(JSON.parseObject(res.getData()).getString("orderGather"), OrderInfoModel.class).get(0);
} }
...@@ -474,7 +475,7 @@ public class TrainServiceImpl implements ITrainService { ...@@ -474,7 +475,7 @@ public class TrainServiceImpl implements ITrainService {
JSON.toJSONString(model) JSON.toJSONString(model)
); );
if (!CharSequenceUtil.equals(res.getErrCode(), Code.SUCCESS.getCode())) { if (!CharSequenceUtil.equals(res.getErrCode(), Code.SUCCESS.getCode())) {
throw new RuntimeException(res.getTips()); throw new YunShangException(res.getTips());
} }
return true; return true;
} }
...@@ -489,7 +490,7 @@ public class TrainServiceImpl implements ITrainService { ...@@ -489,7 +490,7 @@ public class TrainServiceImpl implements ITrainService {
JSON.toJSONString(model) JSON.toJSONString(model)
); );
if (!CharSequenceUtil.equals(res.getErrCode(), Code.SUCCESS.getCode())) { if (!CharSequenceUtil.equals(res.getErrCode(), Code.SUCCESS.getCode())) {
throw new RuntimeException(res.getTips()); throw new YunShangException(res.getTips());
} }
return JSON.parseArray(JSON.parseObject(res.getData()).getString("trainNoList"), TrainStopModel.class); return JSON.parseArray(JSON.parseObject(res.getData()).getString("trainNoList"), TrainStopModel.class);
} }
...@@ -504,7 +505,7 @@ public class TrainServiceImpl implements ITrainService { ...@@ -504,7 +505,7 @@ public class TrainServiceImpl implements ITrainService {
JSON.toJSONString(model) JSON.toJSONString(model)
); );
if (!CharSequenceUtil.equals(res.getErrCode(), Code.SUCCESS.getCode())) { if (!CharSequenceUtil.equals(res.getErrCode(), Code.SUCCESS.getCode())) {
throw new RuntimeException(res.getTips()); throw new YunShangException(res.getTips());
} }
return JSON.parseObject(JSON.parseObject(res.getData()).toJSONString(), OrderRefundApplyModel.class); return JSON.parseObject(JSON.parseObject(res.getData()).toJSONString(), OrderRefundApplyModel.class);
} }
...@@ -519,7 +520,7 @@ public class TrainServiceImpl implements ITrainService { ...@@ -519,7 +520,7 @@ public class TrainServiceImpl implements ITrainService {
JSON.toJSONString(model) JSON.toJSONString(model)
); );
if (!CharSequenceUtil.equals(res.getErrCode(), Code.SUCCESS.getCode())) { if (!CharSequenceUtil.equals(res.getErrCode(), Code.SUCCESS.getCode())) {
throw new RuntimeException(res.getTips()); throw new YunShangException(res.getTips());
} }
return JSON.parseArray(JSON.parseObject(res.getData()).getString("orderGather"), OrderRefundDetailModel.class); return JSON.parseArray(JSON.parseObject(res.getData()).getString("orderGather"), OrderRefundDetailModel.class);
} }
...@@ -534,7 +535,7 @@ public class TrainServiceImpl implements ITrainService { ...@@ -534,7 +535,7 @@ public class TrainServiceImpl implements ITrainService {
JSON.toJSONString(model) JSON.toJSONString(model)
); );
if (!CharSequenceUtil.equals(res.getErrCode(), Code.SUCCESS.getCode())) { if (!CharSequenceUtil.equals(res.getErrCode(), Code.SUCCESS.getCode())) {
throw new RuntimeException(res.getTips()); throw new YunShangException(res.getTips());
} }
return true; return true;
} }
...@@ -549,7 +550,7 @@ public class TrainServiceImpl implements ITrainService { ...@@ -549,7 +550,7 @@ public class TrainServiceImpl implements ITrainService {
JSON.toJSONString(model) JSON.toJSONString(model)
); );
if (!CharSequenceUtil.equals(res.getErrCode(), Code.SUCCESS.getCode())) { if (!CharSequenceUtil.equals(res.getErrCode(), Code.SUCCESS.getCode())) {
throw new RuntimeException(res.getTips()); throw new YunShangException(res.getTips());
} }
if (res.getData() == null) { if (res.getData() == null) {
return PageInfo.<OrderRefundListModel>builder().build() return PageInfo.<OrderRefundListModel>builder().build()
......
...@@ -8,6 +8,7 @@ import org.dromara.common.ys.common.Code; ...@@ -8,6 +8,7 @@ import org.dromara.common.ys.common.Code;
import org.dromara.common.ys.common.PageInfo; import org.dromara.common.ys.common.PageInfo;
import org.dromara.common.ys.enums.DomainEnum; import org.dromara.common.ys.enums.DomainEnum;
import org.dromara.common.ys.enums.vehicles.VehiclesApiEnum; import org.dromara.common.ys.enums.vehicles.VehiclesApiEnum;
import org.dromara.common.ys.exception.YunShangException;
import org.dromara.common.ys.model.req.vehicles.ConfirmPayApiModel; import org.dromara.common.ys.model.req.vehicles.ConfirmPayApiModel;
import org.dromara.common.ys.model.req.vehicles.EstimateJsycPriceModel; import org.dromara.common.ys.model.req.vehicles.EstimateJsycPriceModel;
import org.dromara.common.ys.model.req.vehicles.EstimateYyycPriceModel; import org.dromara.common.ys.model.req.vehicles.EstimateYyycPriceModel;
...@@ -37,7 +38,7 @@ public class VehiclesServiceImpl implements IVehiclesService { ...@@ -37,7 +38,7 @@ public class VehiclesServiceImpl implements IVehiclesService {
JSON.toJSONString(model) JSON.toJSONString(model)
); );
if (!CharSequenceUtil.equals(res.getErrCode(), Code.SUCCESS.getCode())) { if (!CharSequenceUtil.equals(res.getErrCode(), Code.SUCCESS.getCode())) {
throw new RuntimeException(res.getTips()); throw new YunShangException(res.getTips());
} }
return JSON.parseObject(res.getData(), org.dromara.common.ys.model.res.vehicles.EstimateYyycPriceModel.class); return JSON.parseObject(res.getData(), org.dromara.common.ys.model.res.vehicles.EstimateYyycPriceModel.class);
} }
...@@ -53,7 +54,7 @@ public class VehiclesServiceImpl implements IVehiclesService { ...@@ -53,7 +54,7 @@ public class VehiclesServiceImpl implements IVehiclesService {
JSON.toJSONString(model) JSON.toJSONString(model)
); );
if (!CharSequenceUtil.equals(res.getErrCode(), Code.SUCCESS.getCode())) { if (!CharSequenceUtil.equals(res.getErrCode(), Code.SUCCESS.getCode())) {
throw new RuntimeException(res.getTips()); throw new YunShangException(res.getTips());
} }
return JSON.parseObject(res.getData(), org.dromara.common.ys.model.res.vehicles.EstimateJsycPriceModel.class); return JSON.parseObject(res.getData(), org.dromara.common.ys.model.res.vehicles.EstimateJsycPriceModel.class);
} }
...@@ -69,7 +70,7 @@ public class VehiclesServiceImpl implements IVehiclesService { ...@@ -69,7 +70,7 @@ public class VehiclesServiceImpl implements IVehiclesService {
JSON.toJSONString(model) JSON.toJSONString(model)
); );
if (!CharSequenceUtil.equals(res.getErrCode(), Code.SUCCESS.getCode())) { if (!CharSequenceUtil.equals(res.getErrCode(), Code.SUCCESS.getCode())) {
throw new RuntimeException(res.getTips()); throw new YunShangException(res.getTips());
} }
return JSON.parseObject(res.getData(), OrderDetailModel.class); return JSON.parseObject(res.getData(), OrderDetailModel.class);
} }
...@@ -85,7 +86,7 @@ public class VehiclesServiceImpl implements IVehiclesService { ...@@ -85,7 +86,7 @@ public class VehiclesServiceImpl implements IVehiclesService {
JSON.toJSONString(model) JSON.toJSONString(model)
); );
if (!CharSequenceUtil.equals(res.getErrCode(), Code.SUCCESS.getCode())) { if (!CharSequenceUtil.equals(res.getErrCode(), Code.SUCCESS.getCode())) {
throw new RuntimeException(res.getTips()); throw new YunShangException(res.getTips());
} }
if (res.getData() == null) { if (res.getData() == null) {
return PageInfo.<OrderListModel>builder().build() return PageInfo.<OrderListModel>builder().build()
...@@ -117,7 +118,7 @@ public class VehiclesServiceImpl implements IVehiclesService { ...@@ -117,7 +118,7 @@ public class VehiclesServiceImpl implements IVehiclesService {
JSON.toJSONString(model) JSON.toJSONString(model)
); );
if (!CharSequenceUtil.equals(res.getErrCode(), Code.SUCCESS.getCode())) { if (!CharSequenceUtil.equals(res.getErrCode(), Code.SUCCESS.getCode())) {
throw new RuntimeException(res.getTips()); throw new YunShangException(res.getTips());
} }
return JSON.parseObject(res.getData(), OrderBookJsycModel.class); return JSON.parseObject(res.getData(), OrderBookJsycModel.class);
} }
...@@ -133,7 +134,7 @@ public class VehiclesServiceImpl implements IVehiclesService { ...@@ -133,7 +134,7 @@ public class VehiclesServiceImpl implements IVehiclesService {
JSON.toJSONString(model) JSON.toJSONString(model)
); );
if (!CharSequenceUtil.equals(res.getErrCode(), Code.SUCCESS.getCode())) { if (!CharSequenceUtil.equals(res.getErrCode(), Code.SUCCESS.getCode())) {
throw new RuntimeException(res.getTips()); throw new YunShangException(res.getTips());
} }
return JSON.parseObject(res.getData(), OrderBookYyycModel.class); return JSON.parseObject(res.getData(), OrderBookYyycModel.class);
} }
...@@ -149,7 +150,7 @@ public class VehiclesServiceImpl implements IVehiclesService { ...@@ -149,7 +150,7 @@ public class VehiclesServiceImpl implements IVehiclesService {
JSON.toJSONString(model) JSON.toJSONString(model)
); );
if (!CharSequenceUtil.equals(res.getErrCode(), Code.SUCCESS.getCode())) { if (!CharSequenceUtil.equals(res.getErrCode(), Code.SUCCESS.getCode())) {
throw new RuntimeException(res.getTips()); throw new YunShangException(res.getTips());
} }
return JSON.parseObject(res.getData(), DriverLocationModel.class); return JSON.parseObject(res.getData(), DriverLocationModel.class);
} }
...@@ -165,7 +166,7 @@ public class VehiclesServiceImpl implements IVehiclesService { ...@@ -165,7 +166,7 @@ public class VehiclesServiceImpl implements IVehiclesService {
JSON.toJSONString(model) JSON.toJSONString(model)
); );
if (!CharSequenceUtil.equals(res.getErrCode(), Code.SUCCESS.getCode())) { if (!CharSequenceUtil.equals(res.getErrCode(), Code.SUCCESS.getCode())) {
throw new RuntimeException(res.getTips()); throw new YunShangException(res.getTips());
} }
return JSON.parseObject(res.getData(), CancelFeeModel.class); return JSON.parseObject(res.getData(), CancelFeeModel.class);
} }
...@@ -181,7 +182,7 @@ public class VehiclesServiceImpl implements IVehiclesService { ...@@ -181,7 +182,7 @@ public class VehiclesServiceImpl implements IVehiclesService {
JSON.toJSONString(model) JSON.toJSONString(model)
); );
if (!CharSequenceUtil.equals(res.getErrCode(), Code.SUCCESS.getCode())) { if (!CharSequenceUtil.equals(res.getErrCode(), Code.SUCCESS.getCode())) {
throw new RuntimeException(res.getTips()); throw new YunShangException(res.getTips());
} }
return JSON.parseObject(res.getData(), OrderCancelModel.class); return JSON.parseObject(res.getData(), OrderCancelModel.class);
} }
...@@ -197,7 +198,7 @@ public class VehiclesServiceImpl implements IVehiclesService { ...@@ -197,7 +198,7 @@ public class VehiclesServiceImpl implements IVehiclesService {
JSON.toJSONString(model) JSON.toJSONString(model)
); );
if (!CharSequenceUtil.equals(res.getErrCode(), Code.SUCCESS.getCode())) { if (!CharSequenceUtil.equals(res.getErrCode(), Code.SUCCESS.getCode())) {
throw new RuntimeException(res.getTips()); throw new YunShangException(res.getTips());
} }
} }
...@@ -212,7 +213,7 @@ public class VehiclesServiceImpl implements IVehiclesService { ...@@ -212,7 +213,7 @@ public class VehiclesServiceImpl implements IVehiclesService {
JSON.toJSONString(new HashMap<>(8)) JSON.toJSONString(new HashMap<>(8))
); );
if (!CharSequenceUtil.equals(res.getErrCode(), Code.SUCCESS.getCode())) { if (!CharSequenceUtil.equals(res.getErrCode(), Code.SUCCESS.getCode())) {
throw new RuntimeException(res.getTips()); throw new YunShangException(res.getTips());
} }
return JSON.parseArray(JSON.parseObject(res.getData()).getString("qxyyList"), OrderGetQxyyModel.class); return JSON.parseArray(JSON.parseObject(res.getData()).getString("qxyyList"), OrderGetQxyyModel.class);
} }
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论