From 32e79ef93b057a1ab20268d452f2d82c1a69b1e5 Mon Sep 17 00:00:00 2001 From: hurui <177768073@qq.com> Date: Mon, 13 Sep 2021 12:47:08 +0800 Subject: [PATCH] =?UTF-8?q?'=E6=8F=90=E4=BA=A4=E4=BB=A3=E7=A0=81'?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/java/com/cweb/controller/HighTestController.java | 2 +- .../src/main/java/com/hai/config/HuiLianTongConfig.java | 4 ++-- .../java/com/hai/service/impl/HighOrderServiceImpl.java | 8 ++++---- .../com/hai/service/pay/impl/GoodsOrderServiceImpl.java | 4 ++-- 4 files changed, 9 insertions(+), 9 deletions(-) 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 e659e90c..f6d466c5 100644 --- a/hai-cweb/src/main/java/com/cweb/controller/HighTestController.java +++ b/hai-cweb/src/main/java/com/cweb/controller/HighTestController.java @@ -231,7 +231,7 @@ public class HighTestController { @ApiOperation(value = "测试") public ResponseData couJointDist(@RequestParam(name = "token", required = true) String token) { try { - return ResponseMsgUtil.success(HuiLianTongConfig.couJointDist(token,"20JY000251",2,"17726395120", "oArhO6XxKSvjI9wLP3cTK-iSG8yY")); + return ResponseMsgUtil.success(HuiLianTongConfig.couJointDist(token,"HF"+new Date().getTime(),"20JY000251",2,"17726395120", "oArhO6XxKSvjI9wLP3cTK-iSG8yY")); } catch (Exception e) { log.error("HighOrderController --> getOrderById() error!", e); return ResponseMsgUtil.exception(e); diff --git a/hai-service/src/main/java/com/hai/config/HuiLianTongConfig.java b/hai-service/src/main/java/com/hai/config/HuiLianTongConfig.java index 8b69f97d..ec3849f0 100644 --- a/hai-service/src/main/java/com/hai/config/HuiLianTongConfig.java +++ b/hai-service/src/main/java/com/hai/config/HuiLianTongConfig.java @@ -81,7 +81,7 @@ public class HuiLianTongConfig { * @return * @throws Exception */ - public static JSONObject couJointDist(String token,String couTypeCode,Integer distCouCount,String userPhone,String thirdUserId) throws Exception { + public static JSONObject couJointDist(String token,String orderNo,String couTypeCode,Integer distCouCount,String userPhone,String thirdUserId) throws Exception { // 券列表 List> objectList = new ArrayList<>(); Map object = new HashMap<>(); @@ -93,7 +93,7 @@ public class HuiLianTongConfig { param.put("coupons", objectList); param.put("phone", userPhone); param.put("thirdUserId", thirdUserId); - param.put("orderNo", "HF"+new Date().getTime()); + param.put("orderNo", orderNo); param.put("distOuCode", "guizhouhltcs"); Map map = new HashMap<>(); diff --git a/hai-service/src/main/java/com/hai/service/impl/HighOrderServiceImpl.java b/hai-service/src/main/java/com/hai/service/impl/HighOrderServiceImpl.java index ed338459..45ca9baa 100644 --- a/hai-service/src/main/java/com/hai/service/impl/HighOrderServiceImpl.java +++ b/hai-service/src/main/java/com/hai/service/impl/HighOrderServiceImpl.java @@ -199,14 +199,14 @@ public class HighOrderServiceImpl implements HighOrderService { throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "获取token失败"); } Map push = new HashMap<>(); - push.put("token", "data"); + push.put("token", tokenObject.getString("data")); push.put("couTypeCode", coupon.getCouponKey()); push.put("distCouCount", highChildOrder.getSaleCount()); push.put("userPhone", highUser.getPhone()); push.put("thirdUserId", highUser.getUnionId()); // 推送给高速 - JSONObject returnParam = HuiLianTongConfig.couJointDist(tokenObject.getString("data"), coupon.getCouponKey(), highChildOrder.getSaleCount(), highUser.getPhone(), highUser.getUnionId()); + JSONObject returnParam = HuiLianTongConfig.couJointDist(tokenObject.getString("data"), highOrder.getOrderNo(), coupon.getCouponKey(), highChildOrder.getSaleCount(), highUser.getPhone(), highUser.getUnionId()); if (returnParam != null && returnParam.getString("result").equals("success")) { JSONArray dataArray = returnParam.getJSONArray("data"); for (Object data : dataArray) { @@ -353,14 +353,14 @@ public class HighOrderServiceImpl implements HighOrderService { throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "获取token失败"); } Map push = new HashMap<>(); - push.put("token", "data"); + push.put("token", tokenObject.getString("data")); push.put("couTypeCode", coupon.getCouponKey()); push.put("distCouCount", highChildOrder.getSaleCount()); push.put("userPhone", highUser.getPhone()); push.put("thirdUserId", highUser.getUnionId()); // 推送给高速 - JSONObject returnParam = HuiLianTongConfig.couJointDist(tokenObject.getString("data"), coupon.getCouponKey(), highChildOrder.getSaleCount(), highUser.getPhone(), highUser.getUnionId()); + JSONObject returnParam = HuiLianTongConfig.couJointDist(tokenObject.getString("data"), order.getOrderNo(),coupon.getCouponKey(), highChildOrder.getSaleCount(), highUser.getPhone(), highUser.getUnionId()); if (returnParam != null && returnParam.getString("result").equals("success")) { JSONArray dataArray = returnParam.getJSONArray("data"); for (Object data : dataArray) { diff --git a/hai-service/src/main/java/com/hai/service/pay/impl/GoodsOrderServiceImpl.java b/hai-service/src/main/java/com/hai/service/pay/impl/GoodsOrderServiceImpl.java index 771a8728..8d672557 100644 --- a/hai-service/src/main/java/com/hai/service/pay/impl/GoodsOrderServiceImpl.java +++ b/hai-service/src/main/java/com/hai/service/pay/impl/GoodsOrderServiceImpl.java @@ -129,14 +129,14 @@ public class GoodsOrderServiceImpl implements PayService { } Map push = new HashMap<>(); - push.put("token", "data"); + push.put("token", tokenObject.getString("data")); push.put("couTypeCode", coupon.getCouponKey()); push.put("distCouCount", highChildOrder.getSaleCount()); push.put("userPhone", highUser.getPhone()); push.put("thirdUserId", highUser.getUnionId()); // 推送给高速 - JSONObject returnParam = HuiLianTongConfig.couJointDist(tokenObject.getString("data"), coupon.getCouponKey(), highChildOrder.getSaleCount(), highUser.getPhone(), highUser.getUnionId()); + JSONObject returnParam = HuiLianTongConfig.couJointDist(tokenObject.getString("data"), order.getOrderNo(),coupon.getCouponKey(), highChildOrder.getSaleCount(), highUser.getPhone(), highUser.getUnionId()); if (returnParam != null && returnParam.getString("result").equals("success")) { JSONArray dataArray = returnParam.getJSONArray("data"); for (Object data : dataArray) {