| | |
| | | import com.stylefeng.guns.modular.system.util.qianyuntong.OrderUtil; |
| | | import com.stylefeng.guns.modular.system.util.qianyuntong.model.ModifyTravelItineraryRequest; |
| | | import com.stylefeng.guns.modular.system.util.qianyuntong.model.QYTPaymentCallback; |
| | | import com.stylefeng.guns.modular.system.util.qianyuntong.model.QYTPaymentCallbackData; |
| | | import com.stylefeng.guns.modular.system.warpper.*; |
| | | import com.stylefeng.guns.modular.taxi.model.OrderTaxi; |
| | | import com.stylefeng.guns.modular.taxi.model.PaymentRecord; |
| | |
| | | case 2: |
| | | return orderTaxiService.payTaxiOrder1(payType, orderId, objectId, objectType, type, path, ip); |
| | | case 3: |
| | | return orderCrossCityService.payCrossCityOrder1(payType, orderId, objectId, objectType, type); |
| | | ResultUtil resultUtil = orderCrossCityService.payCrossCityOrder1(payType, orderId, objectId, objectType, type); |
| | | |
| | | orderCrossCityService.promotion(orderId); |
| | | |
| | | return resultUtil; |
| | | case 4: |
| | | return orderLogisticsService.payLogisticsOrder1(payType, orderId, objectId, objectType, type); |
| | | case 5: |
| | |
| | | @PostMapping("/base/order/qytPaymentCallback") |
| | | public String qytPaymentCallback(@RequestBody QYTPaymentCallback qytPaymentCallback) { |
| | | log.info("【黔云通支付回调通知】请求参数:" + JSON.toJSONString(qytPaymentCallback)); |
| | | if (null == qytPaymentCallback) { |
| | | try { |
| | | if (null == qytPaymentCallback) { |
| | | return "error"; |
| | | } |
| | | QYTPaymentCallbackData data = qytPaymentCallback.getData(); |
| | | if("1".equals(data.getStatus())){ |
| | | return "error"; |
| | | } |
| | | String partnerPayId = data.getPartnerPayId(); |
| | | String payId = data.getPayId(); |
| | | //网约车 |
| | | if(partnerPayId.contains("PR")){ |
| | | partnerPayId = partnerPayId.substring(2); |
| | | orderPrivateCarService.payOrderPrivateCarCallback(Integer.valueOf(partnerPayId), payId, 1); |
| | | |
| | | |
| | | orderPrivateCarService.promotion(Integer.valueOf(partnerPayId)); |
| | | } |
| | | //出租车 |
| | | if(partnerPayId.contains("TA")){ |
| | | partnerPayId = partnerPayId.substring(2); |
| | | orderTaxiService.payOrderTaxiCallback(Integer.valueOf(partnerPayId), payId, 1, 0); |
| | | |
| | | orderTaxiService.promotion(Integer.valueOf(partnerPayId)); |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | }catch (Exception e){ |
| | | e.printStackTrace(); |
| | | return "error"; |
| | | } |
| | | return "success"; |
| | |
| | | */ |
| | | private void promotion(Integer orderType, Integer orderId) { |
| | | switch (orderType) { |
| | | case 1: |
| | | orderPrivateCarService.promotion(orderId); |
| | | break; |
| | | case 2: |
| | | orderTaxiService.promotion(orderId); |
| | | break; |
| | | case 3: |
| | | orderCrossCityService.promotion(orderId); |
| | | break; |