提交 015dbcfb authored 作者: hzh's avatar hzh

代码优化

上级 7a1ca51d
......@@ -67,7 +67,7 @@ public class AirPortServiceImpl implements IAirportService {
public QueryFlightRuleModel queryFlightRule(String userId, org.dromara.common.ys.model.req.airport.QueryFlightRuleModel model) {
ApiHttpResponse res = Api.v1(
RequestMethodEnum.POST,
DomainEnum.TEST.getDomain(),
DomainEnum.PROD.getDomain(),
AirportApiEnum.QUERY_FLIGHT_RULE.getUrl(),
userId,
null,
......@@ -83,7 +83,7 @@ public class AirPortServiceImpl implements IAirportService {
public MatchClbzModel matchClbz(String userId, org.dromara.common.ys.model.req.airport.MatchClbzModel model) {
ApiHttpResponse res = Api.v1(
RequestMethodEnum.POST,
DomainEnum.TEST.getDomain(),
DomainEnum.PROD.getDomain(),
AirportApiEnum.MATCH_CLBZ.getUrl(),
userId,
null,
......@@ -99,7 +99,7 @@ public class AirPortServiceImpl implements IAirportService {
public CheckPriceForFlightModel checkPriceForFlight(String userId, org.dromara.common.ys.model.req.airport.CheckPriceForFlightModel model) {
ApiHttpResponse res = Api.v1(
RequestMethodEnum.POST,
DomainEnum.TEST.getDomain(),
DomainEnum.PROD.getDomain(),
AirportApiEnum.CHECK_PRICE_FOR_FLIGHT.getUrl(),
userId,
null,
......@@ -115,7 +115,7 @@ public class AirPortServiceImpl implements IAirportService {
public CheckCabinModel checkCabin(String userId, org.dromara.common.ys.model.req.airport.CheckCabinModel model) {
ApiHttpResponse res = Api.v1(
RequestMethodEnum.POST,
DomainEnum.TEST.getDomain(),
DomainEnum.PROD.getDomain(),
AirportApiEnum.CHECK_CABIN.getUrl(),
userId,
null,
......@@ -131,7 +131,7 @@ public class AirPortServiceImpl implements IAirportService {
public CheckXyhBmdModel checkXyhBmd(String userId, org.dromara.common.ys.model.req.airport.CheckXyhBmdModel model) {
ApiHttpResponse res = Api.v1(
RequestMethodEnum.POST,
DomainEnum.TEST.getDomain(),
DomainEnum.PROD.getDomain(),
AirportApiEnum.CHECK_XYH_BMD.getUrl(),
userId,
null,
......@@ -147,7 +147,7 @@ public class AirPortServiceImpl implements IAirportService {
public PlaneCheckStateModel planeCheckState(String userId, org.dromara.common.ys.model.req.airport.PlaneCheckStateModel model) {
ApiHttpResponse res = Api.v1(
RequestMethodEnum.POST,
DomainEnum.TEST.getDomain(),
DomainEnum.PROD.getDomain(),
AirportApiEnum.PLANE_CHECK_STATE.getUrl(),
userId,
null,
......@@ -163,7 +163,7 @@ public class AirPortServiceImpl implements IAirportService {
public GetTicketStatusModel getTicketStatus(String userId, org.dromara.common.ys.model.req.airport.GetTicketStatusModel model) {
ApiHttpResponse res = Api.v1(
RequestMethodEnum.POST,
DomainEnum.TEST.getDomain(),
DomainEnum.PROD.getDomain(),
AirportApiEnum.GET_TICKET_STATUS.getUrl(),
userId,
null,
......@@ -179,7 +179,7 @@ public class AirPortServiceImpl implements IAirportService {
public GetVoyageForChangeModel getVoyageForChange(String userId, org.dromara.common.ys.model.req.airport.GetVoyageForChangeModel model) {
ApiHttpResponse res = Api.v1(
RequestMethodEnum.POST,
DomainEnum.TEST.getDomain(),
DomainEnum.PROD.getDomain(),
AirportApiEnum.GET_VOYAGE_FOR_CHANGE.getUrl(),
userId,
null,
......@@ -195,7 +195,7 @@ public class AirPortServiceImpl implements IAirportService {
public QueryFlightForChangeModel queryFlightForChange(String userId, org.dromara.common.ys.model.req.airport.QueryFlightForChangeModel model) {
ApiHttpResponse res = Api.v1(
RequestMethodEnum.POST,
DomainEnum.TEST.getDomain(),
DomainEnum.PROD.getDomain(),
AirportApiEnum.QUERY_FLIGHT_FOR_CHANGE.getUrl(),
userId,
null,
......@@ -211,7 +211,7 @@ public class AirPortServiceImpl implements IAirportService {
public AddChangeOrderModel addChangeOrderModel(String userId, org.dromara.common.ys.model.req.airport.AddChangeOrderModel model) {
ApiHttpResponse res = Api.v1(
RequestMethodEnum.POST,
DomainEnum.TEST.getDomain(),
DomainEnum.PROD.getDomain(),
AirportApiEnum.ADD_CHANGE_ORDER.getUrl(),
userId,
null,
......@@ -227,7 +227,7 @@ public class AirPortServiceImpl implements IAirportService {
public QueryChangeOrderModel queryChangeOrder(String userId, org.dromara.common.ys.model.req.airport.QueryChangeOrderModel model) {
ApiHttpResponse res = Api.v1(
RequestMethodEnum.POST,
DomainEnum.TEST.getDomain(),
DomainEnum.PROD.getDomain(),
AirportApiEnum.QUERY_CHANGE_ORDER.getUrl(),
userId,
null,
......@@ -259,7 +259,7 @@ public class AirPortServiceImpl implements IAirportService {
public void cancelChangeOrder(String userId, CancelChangeOrderModel model) {
ApiHttpResponse res = Api.v1(
RequestMethodEnum.POST,
DomainEnum.TEST.getDomain(),
DomainEnum.PROD.getDomain(),
AirportApiEnum.CANCEL_CHANGE_ORDER.getUrl(),
userId,
null,
......@@ -274,7 +274,7 @@ public class AirPortServiceImpl implements IAirportService {
public void changeDispatch(String userId, DispatchChangeOrderModel model) {
ApiHttpResponse res = Api.v1(
RequestMethodEnum.POST,
DomainEnum.TEST.getDomain(),
DomainEnum.PROD.getDomain(),
AirportApiEnum.CHANGE_DISPATCH.getUrl(),
userId,
null,
......@@ -353,7 +353,7 @@ public class AirPortServiceImpl implements IAirportService {
public PageInfo<PlaneOrderQueryChangeOrderApiBeanModel> changeQueryList(String userId, PlaneOrderQueryChangeOrderApiModel model) {
ApiHttpResponse res = Api.v1(
RequestMethodEnum.POST,
DomainEnum.TEST.getDomain(),
DomainEnum.PROD.getDomain(),
AirportApiEnum.CHANGE_QUERY_LIST.getUrl(),
userId,
null,
......@@ -401,7 +401,7 @@ public class AirPortServiceImpl implements IAirportService {
public List<QueryFlightByHbhModel> queryFlightByHbh(String userId, org.dromara.common.ys.model.req.airport.QueryFlightByHbhModel model) {
ApiHttpResponse res = Api.v1(
RequestMethodEnum.POST,
DomainEnum.TEST.getDomain(),
DomainEnum.PROD.getDomain(),
AirportApiEnum.QUERY_FLIGHT_BY_HBH.getUrl(),
userId,
null,
......
......@@ -27,7 +27,7 @@ public class BillServiceImpl implements IBillService {
public QueryBillModel queryBill(String userId, org.dromara.common.ys.model.req.bill.QueryBillModel model) {
ApiHttpResponse res = Api.v1(
com.wenhe.base.base.RequestMethodEnum.POST,
DomainEnum.TEST.getDomain(),
DomainEnum.PROD.getDomain(),
BillApiEnum.QUERY_BILL.getUrl(),
userId,
JSON.toJSONString(model)
......@@ -42,7 +42,7 @@ public class BillServiceImpl implements IBillService {
public QueryBillAllModel queryBillAll(String userId, org.dromara.common.ys.model.req.bill.QueryBillAllModel model) {
ApiHttpResponse res = Api.v1(
com.wenhe.base.base.RequestMethodEnum.POST,
DomainEnum.TEST.getDomain(),
DomainEnum.PROD.getDomain(),
BillApiEnum.QUERY_BILL_ALL.getUrl(),
userId,
JSON.toJSONString(model)
......@@ -57,7 +57,7 @@ public class BillServiceImpl implements IBillService {
public PageInfo<AccountDetailBeanModel> accountDetail(String userId, AccountDetailModel model) {
ApiHttpResponse res = Api.v1(
com.wenhe.base.base.RequestMethodEnum.POST,
DomainEnum.TEST.getDomain(),
DomainEnum.PROD.getDomain(),
BillApiEnum.ACCOUNT_DETAIL.getUrl(),
userId,
JSON.toJSONString(model)
......@@ -88,7 +88,7 @@ public class BillServiceImpl implements IBillService {
public ConsTicketListModel consTicketList(String userId, org.dromara.common.ys.model.req.bill.ConsTicketListModel model) {
ApiHttpResponse res = Api.v1(
com.wenhe.base.base.RequestMethodEnum.POST,
DomainEnum.TEST.getDomain(),
DomainEnum.PROD.getDomain(),
BillApiEnum.CONS_TICKET_LIST.getUrl(),
userId,
JSON.toJSONString(model)
......@@ -103,7 +103,7 @@ public class BillServiceImpl implements IBillService {
public TravelBillPushStatementModel pushStatement(String userId, org.dromara.common.ys.model.req.bill.TravelBillPushStatementModel model) {
ApiHttpResponse res = Api.v1(
com.wenhe.base.base.RequestMethodEnum.POST,
DomainEnum.TEST.getDomain(),
DomainEnum.PROD.getDomain(),
BillApiEnum.PUSH_STATEMENT.getUrl(),
userId,
JSON.toJSONString(model)
......@@ -118,7 +118,7 @@ public class BillServiceImpl implements IBillService {
public TravelBillGetCompareResultModel getCompareResult(String userId, org.dromara.common.ys.model.req.bill.TravelBillGetCompareResultModel model) {
ApiHttpResponse res = Api.v1(
com.wenhe.base.base.RequestMethodEnum.POST,
DomainEnum.TEST.getDomain(),
DomainEnum.PROD.getDomain(),
BillApiEnum.GET_COMPARE_RESULT.getUrl(),
userId,
JSON.toJSONString(model)
......@@ -133,7 +133,7 @@ public class BillServiceImpl implements IBillService {
public EditBxjlModel editBxjl(String userId, org.dromara.common.ys.model.req.bill.EditBxjlModel model) {
ApiHttpResponse res = Api.v1(
com.wenhe.base.base.RequestMethodEnum.POST,
DomainEnum.TEST.getDomain(),
DomainEnum.PROD.getDomain(),
BillApiEnum.EDIT_BXJL.getUrl(),
userId,
JSON.toJSONString(model)
......@@ -148,7 +148,7 @@ public class BillServiceImpl implements IBillService {
public void confirmRecon(String userId, ConfirmReconModel model) {
ApiHttpResponse res = Api.v1(
com.wenhe.base.base.RequestMethodEnum.POST,
DomainEnum.TEST.getDomain(),
DomainEnum.PROD.getDomain(),
BillApiEnum.CONFIRM_RECON.getUrl(),
userId,
JSON.toJSONString(model)
......
......@@ -30,7 +30,7 @@ public class QzServiceImpl implements IQzService {
public PageInfo<VisaProdBeanModel> queryProdList(String userId, QueryProdListModel model) {
ApiHttpResponse res = Api.v1(
com.wenhe.base.base.RequestMethodEnum.POST,
DomainEnum.TEST.getDomain(),
DomainEnum.PROD.getDomain(),
QzApiEnum.QUERY_PROD_LIST.getUrl(),
userId,
JSON.toJSONString(model)
......@@ -61,7 +61,7 @@ public class QzServiceImpl implements IQzService {
public PageInfo<AssocitionBeanModel> queryAssociation(String userId, QueryAssociationModel model) {
ApiHttpResponse res = Api.v1(
com.wenhe.base.base.RequestMethodEnum.POST,
DomainEnum.TEST.getDomain(),
DomainEnum.PROD.getDomain(),
QzApiEnum.QUERY_ASSOCIATION.getUrl(),
userId,
JSON.toJSONString(model)
......@@ -92,7 +92,7 @@ public class QzServiceImpl implements IQzService {
public PageInfo<OrderListBeanModel> queryList(String userId, QzOrderQueryListModel model) {
ApiHttpResponse res = Api.v1(
com.wenhe.base.base.RequestMethodEnum.POST,
DomainEnum.TEST.getDomain(),
DomainEnum.PROD.getDomain(),
QzApiEnum.QUERY_LIST.getUrl(),
userId,
JSON.toJSONString(model)
......@@ -123,7 +123,7 @@ public class QzServiceImpl implements IQzService {
public GetProdDetailModel getProdDetail(String userId, org.dromara.common.ys.model.req.qz.GetProdDetailModel model) {
ApiHttpResponse res = Api.v1(
com.wenhe.base.base.RequestMethodEnum.POST,
DomainEnum.TEST.getDomain(),
DomainEnum.PROD.getDomain(),
QzApiEnum.GET_PROD_DETAIL.getUrl(),
userId,
JSON.toJSONString(model)
......@@ -138,7 +138,7 @@ public class QzServiceImpl implements IQzService {
public QzOrderGetDetailModel getDetail(String userId, org.dromara.common.ys.model.req.qz.QzOrderGetDetailModel model) {
ApiHttpResponse res = Api.v1(
com.wenhe.base.base.RequestMethodEnum.POST,
DomainEnum.TEST.getDomain(),
DomainEnum.PROD.getDomain(),
QzApiEnum.GET_DETAIL.getUrl(),
userId,
JSON.toJSONString(model)
......@@ -153,7 +153,7 @@ public class QzServiceImpl implements IQzService {
public void cancelOrder(String userId, QzOrderCancelOrderModel model) {
ApiHttpResponse res = Api.v1(
com.wenhe.base.base.RequestMethodEnum.POST,
DomainEnum.TEST.getDomain(),
DomainEnum.PROD.getDomain(),
QzApiEnum.CANCEL_ORDER.getUrl(),
userId,
JSON.toJSONString(model)
......@@ -167,7 +167,7 @@ public class QzServiceImpl implements IQzService {
public GetAssociatDetailModel getAssociatDetail(String userId, org.dromara.common.ys.model.req.qz.GetAssociatDetailModel model) {
ApiHttpResponse res = Api.v1(
com.wenhe.base.base.RequestMethodEnum.POST,
DomainEnum.TEST.getDomain(),
DomainEnum.PROD.getDomain(),
QzApiEnum.GET_ASSOCIAT_DETAIL.getUrl(),
userId,
JSON.toJSONString(model)
......@@ -182,7 +182,7 @@ public class QzServiceImpl implements IQzService {
public List<NewAppointmentBeanModel> queryNewAppointment(String userId, QueryNewAppointmentModel model) {
ApiHttpResponse res = Api.v1(
com.wenhe.base.base.RequestMethodEnum.POST,
DomainEnum.TEST.getDomain(),
DomainEnum.PROD.getDomain(),
QzApiEnum.QUERY_NEW_APPOINTMENT.getUrl(),
userId,
JSON.toJSONString(model)
......@@ -197,7 +197,7 @@ public class QzServiceImpl implements IQzService {
public void bookOrder(String userId, QzOrderBookOrderModel model) {
ApiHttpResponse res = Api.v1(
com.wenhe.base.base.RequestMethodEnum.POST,
DomainEnum.TEST.getDomain(),
DomainEnum.PROD.getDomain(),
QzApiEnum.BOOK_ORDER.getUrl(),
userId,
JSON.toJSONString(model)
......
......@@ -15,6 +15,9 @@ import org.dromara.common.ys.model.res.train.OrderRefundApplyModel;
import org.dromara.common.ys.model.res.train.OrderRefundDetailModel;
import org.dromara.common.ys.model.res.train.OrderRefundListModel;
import org.dromara.common.ys.model.res.train.QueryModel;
import org.dromara.common.ys.model.res.train.TrChangeInfoBeanModel;
import org.dromara.common.ys.model.res.train.TrainChangeApplyApiModel;
import org.dromara.common.ys.model.res.train.TrainSetRegisterModel;
import org.dromara.common.ys.model.res.train.TrainStopModel;
import org.dromara.common.ys.model.res.train.*;
import org.dromara.common.ys.service.ITrainService;
......@@ -52,7 +55,7 @@ public class TrainServiceImpl implements ITrainService {
public List<TrChangeInfoBeanModel> queryChangeOrder(String userId, TrainQueryChangeOrderModel model) {
ApiHttpResponse res = Api.v1(
com.wenhe.base.base.RequestMethodEnum.POST,
DomainEnum.TEST.getDomain(),
DomainEnum.PROD.getDomain(),
TrainApiEnum.CHANGE_QUERY_CHANGE_ORDER.getUrl(),
userId,
JSON.toJSONString(model)
......@@ -70,7 +73,7 @@ public class TrainServiceImpl implements ITrainService {
public List<TrChangeInfoBeanModel> orderQueryChangeOrder(String userId, TrainQueryChangeOrderModel model) {
ApiHttpResponse res = Api.v1(
com.wenhe.base.base.RequestMethodEnum.POST,
DomainEnum.TEST.getDomain(),
DomainEnum.PROD.getDomain(),
TrainApiEnum.QUERY_CHANGE_ORDER.getUrl(),
userId,
JSON.toJSONString(model)
......@@ -88,7 +91,7 @@ public class TrainServiceImpl implements ITrainService {
public List<TrRefundInfoBeanModel> queryRefundOrder(String userId, TrainQueryRefundOrderModel model) {
ApiHttpResponse res = Api.v1(
com.wenhe.base.base.RequestMethodEnum.POST,
DomainEnum.TEST.getDomain(),
DomainEnum.PROD.getDomain(),
TrainApiEnum.QUERY_REFUND_ORDER.getUrl(),
userId,
JSON.toJSONString(model)
......@@ -106,7 +109,7 @@ public class TrainServiceImpl implements ITrainService {
public List<TrainSetFindClkBeanModel> findClk(String userId, TrainSetFindClkModel model) {
ApiHttpResponse res = Api.v1(
com.wenhe.base.base.RequestMethodEnum.POST,
DomainEnum.TEST.getDomain(),
DomainEnum.PROD.getDomain(),
TrainApiEnum.FIND_CLK.getUrl(),
userId,
JSON.toJSONString(model)
......@@ -124,7 +127,7 @@ public class TrainServiceImpl implements ITrainService {
public List<TrainSetSaveClkResBeanModel> saveClk(String userId, TrainSetSaveClkModel model) {
ApiHttpResponse res = Api.v1(
com.wenhe.base.base.RequestMethodEnum.POST,
DomainEnum.TEST.getDomain(),
DomainEnum.PROD.getDomain(),
TrainApiEnum.SAVE_CLK.getUrl(),
userId,
JSON.toJSONString(model)
......@@ -168,6 +171,148 @@ public class TrainServiceImpl implements ITrainService {
return JSON.parseObject(JSON.parseObject(res.getData()).toJSONString(), CheckAccountResModel.class);
}
@Override
public TrainSetRegisterModel register(String userId, org.dromara.common.ys.model.req.train.TrainSetRegisterModel model) {
ApiHttpResponse res = Api.v1(
com.wenhe.base.base.RequestMethodEnum.POST,
DomainEnum.PROD.getDomain(),
TrainApiEnum.REGISTER.getUrl(),
userId,
JSON.toJSONString(model)
);
if (!CharSequenceUtil.equals(res.getErrCode(), Code.SUCCESS.getCode())) {
throw new RuntimeException(res.getTips());
}
return JSON.parseObject(JSON.parseObject(res.getData()).toJSONString(), TrainSetRegisterModel.class);
}
@Override
public TrainChangeApplyApiModel apply(String userId, org.dromara.common.ys.model.req.train.TrainChangeApplyApiModel model) {
ApiHttpResponse res = Api.v1(
com.wenhe.base.base.RequestMethodEnum.POST,
DomainEnum.PROD.getDomain(),
TrainApiEnum.APPLY.getUrl(),
userId,
JSON.toJSONString(model)
);
if (!CharSequenceUtil.equals(res.getErrCode(), Code.SUCCESS.getCode())) {
throw new RuntimeException(res.getTips());
}
return JSON.parseObject(JSON.parseObject(res.getData()).toJSONString(), TrainChangeApplyApiModel.class);
}
@Override
public void changeCancel(String userId, TrainChangeCancelApiModel model) {
ApiHttpResponse res = Api.v1(
com.wenhe.base.base.RequestMethodEnum.POST,
DomainEnum.PROD.getDomain(),
TrainApiEnum.CHANGE_CANCEL.getUrl(),
userId,
JSON.toJSONString(model)
);
if (!CharSequenceUtil.equals(res.getErrCode(), Code.SUCCESS.getCode())) {
throw new RuntimeException(res.getTips());
}
}
@Override
public void changeConfirm(String userId, TrainChangeConfirmApiModel model) {
ApiHttpResponse res = Api.v1(
com.wenhe.base.base.RequestMethodEnum.POST,
DomainEnum.PROD.getDomain(),
TrainApiEnum.CHANGE_CONFIRM.getUrl(),
userId,
JSON.toJSONString(model)
);
if (!CharSequenceUtil.equals(res.getErrCode(), Code.SUCCESS.getCode())) {
throw new RuntimeException(res.getTips());
}
}
@Override
public void changeConfirm(String userId, org.dromara.common.ys.model.req.hotel.PayOrderModel model) {
ApiHttpResponse res = Api.v1(
com.wenhe.base.base.RequestMethodEnum.POST,
DomainEnum.PROD.getDomain(),
TrainApiEnum.PAY_CHANGE_ORDER.getUrl(),
userId,
JSON.toJSONString(model)
);
if (!CharSequenceUtil.equals(res.getErrCode(), Code.SUCCESS.getCode())) {
throw new RuntimeException(res.getTips());
}
}
@Override
public void checkAccountCode(String userId, TrainSetCheckAccountCodeModel model) {
ApiHttpResponse res = Api.v1(
com.wenhe.base.base.RequestMethodEnum.POST,
DomainEnum.PROD.getDomain(),
TrainApiEnum.CHECK_ACCOUNT_CODE.getUrl(),
userId,
JSON.toJSONString(model)
);
if (!CharSequenceUtil.equals(res.getErrCode(), Code.SUCCESS.getCode())) {
throw new RuntimeException(res.getTips());
}
}
@Override
public void checkRegisterCode(String userId, TrainSetCheckRegisterCodeModel model) {
ApiHttpResponse res = Api.v1(
com.wenhe.base.base.RequestMethodEnum.POST,
DomainEnum.PROD.getDomain(),
TrainApiEnum.CHECK_REGISTER_CODE.getUrl(),
userId,
JSON.toJSONString(model)
);
if (!CharSequenceUtil.equals(res.getErrCode(), Code.SUCCESS.getCode())) {
throw new RuntimeException(res.getTips());
}
}
@Override
public void checkResetPwd(String userId, TrainSetCheckResetPwdModel model) {
ApiHttpResponse res = Api.v1(
com.wenhe.base.base.RequestMethodEnum.POST,
DomainEnum.PROD.getDomain(),
TrainApiEnum.CHECK_RESET_PWD.getUrl(),
userId,
JSON.toJSONString(model)
);
if (!CharSequenceUtil.equals(res.getErrCode(), Code.SUCCESS.getCode())) {
throw new RuntimeException(res.getTips());
}
}
@Override
public void deleteClk(String userId, TrainSetDeleteClkModel model) {
ApiHttpResponse res = Api.v1(
com.wenhe.base.base.RequestMethodEnum.POST,
DomainEnum.PROD.getDomain(),
TrainApiEnum.DELETE_CLK.getUrl(),
userId,
JSON.toJSONString(model)
);
if (!CharSequenceUtil.equals(res.getErrCode(), Code.SUCCESS.getCode())) {
throw new RuntimeException(res.getTips());
}
}
@Override
public void resetPwd(String userId, TrainSetResetPwdModel model) {
ApiHttpResponse res = Api.v1(
com.wenhe.base.base.RequestMethodEnum.POST,
DomainEnum.PROD.getDomain(),
TrainApiEnum.RESET_PWD.getUrl(),
userId,
JSON.toJSONString(model)
);
if (!CharSequenceUtil.equals(res.getErrCode(), Code.SUCCESS.getCode())) {
throw new RuntimeException(res.getTips());
}
}
@Override
public OrderBookResModel bookOrder(String userId, OrderBookReqModel model) {
ApiHttpResponse res = Api.v1(
......@@ -242,6 +387,68 @@ public class TrainServiceImpl implements ITrainService {
.setList(JSON.parseArray(JSON.toJSONString(pageInfo.getList()), OrderListQueryResModel.class));
}
@Override
public PageInfo<TrainRefundQueryRefundListApiBeanModel> queryRefundList(String userId, TrainRefundQueryRefundListApiModel model) {
ApiHttpResponse res = Api.v1(
com.wenhe.base.base.RequestMethodEnum.POST,
DomainEnum.PROD.getDomain(),
TrainApiEnum.QUERY_REFUND_LIST.getUrl(),
userId,
JSON.toJSONString(model)
);
if (!CharSequenceUtil.equals(res.getErrCode(), Code.SUCCESS.getCode())) {
throw new RuntimeException(res.getTips());
}
if (res.getData() == null) {
return PageInfo.<TrainRefundQueryRefundListApiBeanModel>builder().build()
.setCount(model.getCount())
.setMap(Collections.emptyMap())
.setPageNum(model.getPageNum())
.setPages(0)
.setTotal(0)
.setList(Collections.emptyList());
}
PageInfo pageInfo = JSON.parseObject(JSON.parseObject(res.getData()).getString("refundListApiBeanPageInfo"), PageInfo.class);
return PageInfo.<TrainRefundQueryRefundListApiBeanModel>builder().build()
.setCount(pageInfo.getCount())
.setMap(pageInfo.getMap())
.setPageNum(pageInfo.getPageNum())
.setPages(pageInfo.getPages())
.setTotal(pageInfo.getTotal())
.setList(JSON.parseArray(JSON.toJSONString(pageInfo.getList()), TrainRefundQueryRefundListApiBeanModel.class));
}
@Override
public PageInfo<TrainChangeQueryChangeListApiBeanModel> queryChangeList(String userId, TrainoChangeQueryChangeListApiModel model) {
ApiHttpResponse res = Api.v1(
com.wenhe.base.base.RequestMethodEnum.POST,
DomainEnum.PROD.getDomain(),
TrainApiEnum.QUERY_CHANGE_LIST.getUrl(),
userId,
JSON.toJSONString(model)
);
if (!CharSequenceUtil.equals(res.getErrCode(), Code.SUCCESS.getCode())) {
throw new RuntimeException(res.getTips());
}
if (res.getData() == null) {
return PageInfo.<TrainChangeQueryChangeListApiBeanModel>builder().build()
.setCount(model.getCount())
.setMap(Collections.emptyMap())
.setPageNum(model.getPageNum())
.setPages(0)
.setTotal(0)
.setList(Collections.emptyList());
}
PageInfo pageInfo = JSON.parseObject(JSON.parseObject(res.getData()).getString("changeListApiBeanPageInfo"), PageInfo.class);
return PageInfo.<TrainChangeQueryChangeListApiBeanModel>builder().build()
.setCount(pageInfo.getCount())
.setMap(pageInfo.getMap())
.setPageNum(pageInfo.getPageNum())
.setPages(pageInfo.getPages())
.setTotal(pageInfo.getTotal())
.setList(JSON.parseArray(JSON.toJSONString(pageInfo.getList()), TrainChangeQueryChangeListApiBeanModel.class));
}
@Override
public OrderInfoModel detail(String userId, OrderQueryModel model) {
ApiHttpResponse res = Api.v1(
......@@ -337,8 +544,6 @@ public class TrainServiceImpl implements ITrainService {
ApiHttpResponse res = Api.v1(
com.wenhe.base.base.RequestMethodEnum.POST,
DomainEnum.PROD.getDomain(),
TrainApiEnum.REFUND_QUERY_REFUND_ORDER.getUrl(),
DomainEnum.TEST.getDomain(),
TrainApiEnum.QUERY_REFUND_LIST.getUrl(),
userId,
JSON.toJSONString(model)
......
......@@ -190,7 +190,7 @@ public class VehiclesServiceImpl implements IVehiclesService {
public void confirmPay(String userId, ConfirmPayApiModel model) {
ApiHttpResponse res = Api.v1(
com.wenhe.base.base.RequestMethodEnum.POST,
DomainEnum.TEST.getDomain(),
DomainEnum.PROD.getDomain(),
VehiclesApiEnum.CONFIRM_PAY.getUrl(),
userId,
null,
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论