diff --git a/hai-cweb/src/main/java/com/cweb/controller/HighTestController.java b/hai-cweb/src/main/java/com/cweb/controller/HighTestController.java index 6f07756b..ccf3efef 100644 --- a/hai-cweb/src/main/java/com/cweb/controller/HighTestController.java +++ b/hai-cweb/src/main/java/com/cweb/controller/HighTestController.java @@ -161,7 +161,7 @@ public class HighTestController { @ApiOperation(value = "测试") public ResponseData test1() { try { - return ResponseMsgUtil.success(QianZhuConfig.payKfcOrder("20210712232301218036376")); + return ResponseMsgUtil.success(QianZhuConfig.payKfcOrder("20210725184842879067286")); } catch (Exception e) { log.error("HighOrderController --> getOrderById() error!", e); return ResponseMsgUtil.exception(e); diff --git a/hai-service/src/main/java/com/hai/service/pay/impl/CinemaOrderService.java b/hai-service/src/main/java/com/hai/service/pay/impl/CinemaOrderService.java index 82b85983..0bfc6699 100644 --- a/hai-service/src/main/java/com/hai/service/pay/impl/CinemaOrderService.java +++ b/hai-service/src/main/java/com/hai/service/pay/impl/CinemaOrderService.java @@ -2,7 +2,9 @@ package com.hai.service.pay.impl; import com.alibaba.fastjson.JSONObject; import com.hai.config.QianZhuConfig; +import com.hai.dao.HighGasOrderPushMapper; import com.hai.entity.HighChildOrder; +import com.hai.entity.HighGasOrderPush; import com.hai.entity.HighOrder; import com.hai.service.HighOrderService; import com.hai.service.pay.PayService; @@ -19,6 +21,9 @@ public class CinemaOrderService implements PayService { @Resource private HighOrderService highOrderService; + @Resource + private HighGasOrderPushMapper highGasOrderPushMapper; + @Override public void paySuccess(Map map, String payType) throws Exception { if (payType.equals("Alipay")) { @@ -39,7 +44,13 @@ public class CinemaOrderService implements PayService { } highOrderService.updateOrder(order); // 支付给千猪 - QianZhuConfig.payMovieOrder(order.getOrderNo()); + JSONObject object = QianZhuConfig.payMovieOrder(order.getOrderNo()); + // 推送订单记录 + HighGasOrderPush highGasOrderPush = new HighGasOrderPush(); + highGasOrderPush.setCreateTime(new Date()); + highGasOrderPush.setRequestContent(order.getOrderNo()); + highGasOrderPush.setReturnContent(object.toJSONString()); + highGasOrderPushMapper.insert(highGasOrderPush); } } diff --git a/hai-service/src/main/java/com/hai/service/pay/impl/KfcOrderService.java b/hai-service/src/main/java/com/hai/service/pay/impl/KfcOrderService.java index 9ece365c..0e4eff56 100644 --- a/hai-service/src/main/java/com/hai/service/pay/impl/KfcOrderService.java +++ b/hai-service/src/main/java/com/hai/service/pay/impl/KfcOrderService.java @@ -3,7 +3,9 @@ package com.hai.service.pay.impl; import com.alibaba.fastjson.JSONObject; import com.hai.config.QianZhuConfig; +import com.hai.dao.HighGasOrderPushMapper; import com.hai.entity.HighChildOrder; +import com.hai.entity.HighGasOrderPush; import com.hai.entity.HighOrder; import com.hai.service.HighOrderService; import com.hai.service.pay.PayService; @@ -20,6 +22,9 @@ public class KfcOrderService implements PayService { @Resource private HighOrderService highOrderService; + @Resource + private HighGasOrderPushMapper highGasOrderPushMapper; + @Override public void paySuccess(Map map, String payType) throws Exception { if (payType.equals("Alipay")) { @@ -40,7 +45,14 @@ public class KfcOrderService implements PayService { } highOrderService.updateOrder(order); // 支付给千猪 - QianZhuConfig.payKfcOrder(order.getOrderNo()); + JSONObject object = QianZhuConfig.payKfcOrder(order.getOrderNo()); + + // 推送订单记录 + HighGasOrderPush highGasOrderPush = new HighGasOrderPush(); + highGasOrderPush.setCreateTime(new Date()); + highGasOrderPush.setRequestContent(order.getOrderNo()); + highGasOrderPush.setReturnContent(object.toJSONString()); + highGasOrderPushMapper.insert(highGasOrderPush); } } } diff --git a/hai-service/src/main/java/com/hai/service/pay/impl/MobileOrderServiceImpl.java b/hai-service/src/main/java/com/hai/service/pay/impl/MobileOrderServiceImpl.java index 16c018d5..57dd9c96 100644 --- a/hai-service/src/main/java/com/hai/service/pay/impl/MobileOrderServiceImpl.java +++ b/hai-service/src/main/java/com/hai/service/pay/impl/MobileOrderServiceImpl.java @@ -1,7 +1,10 @@ package com.hai.service.pay.impl; +import com.alibaba.fastjson.JSONObject; import com.hai.config.QianZhuConfig; +import com.hai.dao.HighGasOrderPushMapper; import com.hai.entity.HighChildOrder; +import com.hai.entity.HighGasOrderPush; import com.hai.entity.HighOrder; import com.hai.service.HighOrderService; import com.hai.service.pay.PayService; @@ -25,6 +28,9 @@ public class MobileOrderServiceImpl implements PayService { @Resource private HighOrderService highOrderService; + @Resource + private HighGasOrderPushMapper highGasOrderPushMapper; + @Override public void paySuccess(Map map, String payType) throws Exception { if (payType.equals("Alipay")) { @@ -44,8 +50,16 @@ public class MobileOrderServiceImpl implements PayService { childOrder.setChildOrdeStatus(2); // 子订单状态:1 待支付 2 已支付 3.已完成 4. 已退款 5.已取消 } highOrderService.updateOrder(order); + // 支付给千猪 - QianZhuConfig.payMobileOrder(order.getOrderNo()); + JSONObject object = QianZhuConfig.payMobileOrder(order.getOrderNo()); + + // 推送订单记录 + HighGasOrderPush highGasOrderPush = new HighGasOrderPush(); + highGasOrderPush.setCreateTime(new Date()); + highGasOrderPush.setRequestContent(order.getOrderNo()); + highGasOrderPush.setReturnContent(object.toJSONString()); + highGasOrderPushMapper.insert(highGasOrderPush); } } } diff --git a/hai-service/src/main/resources/dev/commonConfig.properties b/hai-service/src/main/resources/dev/commonConfig.properties index 4103099f..9a3f8ebe 100644 --- a/hai-service/src/main/resources/dev/commonConfig.properties +++ b/hai-service/src/main/resources/dev/commonConfig.properties @@ -1,18 +1,16 @@ -tuanYouUrl=https://test02-motorcade-hcs.czb365.com -tuanYouAppKey=208241666939552 -tuanYouAppSecret=adecc3cff077834cb8632c8ab3bec0e6 -tuanYouDieselAccount=9b115eao4400 -tuanYouGasolineAccount=9b115e5g4400 +tuanYouUrl=https://hcs.czb365.com +tuanYouAppKey=210091174083104 +tuanYouAppSecret=f9811df6791d309bf48f4a8db9edaa45 +tuanYouDieselAccount=9hp52qgg4400 +tuanYouGasolineAccount=9hp52qf04400 -qinzhuUrl=https://live-test.qianzhu8.com -qinzhuPlatformId=10376 -qinzhuSecret=ktxb49sh2jfhgn8g -qianzhuOrderNotify=https://hsgcs.dctpay.com/crest/qianzhu/orderNotify +qinzhuUrl=https://live.qianzhu8.com/ +qinzhuPlatformId=10458 +qinzhuSecret=nnl3gg4ss0pka11t +qianzhuOrderNotify=https://hsg.dctpay.com/crest/qianzhu/orderNotify wx_cert=/home/project/wx_cert/ -telApiKey=2d01f6b520254b1a80f6b167832cea18 -telApiSecret=d11ee9b41e014a039f030e53ae6f5295 -telMemberId=d13091df65d64aafbf0f35d2093157b7 -telUrl=http://cz.jjcxy.com:80/api/2d01f6b520254b1a80f6b167832cea18 -czOrderNotify=https://cz.cqzhongkahui.com/crest/czOrder/orderRefundNotify +TelApiKey=2d01f6b520254b1a80f6b167832cea18 +TelApiSecret=d11ee9b41e014a039f030e53ae6f5295 +TelMemberId=d13091df65d64aafbf0f35d2093157b7