Authored by chaogeng

修改订单推送

@@ -49,7 +49,7 @@ public class PanshiServiceImpl implements IOrderPushService { @@ -49,7 +49,7 @@ public class PanshiServiceImpl implements IOrderPushService {
49 param.put("sign", MD5.md5(SOURCE + SECRETKEY + currentTime)); 49 param.put("sign", MD5.md5(SOURCE + SECRETKEY + currentTime));
50 param.put("method", "push"); 50 param.put("method", "push");
51 param.put("v", "2.0"); 51 param.put("v", "2.0");
52 - param.put("orNo", orderInfo.getOrderCode()); 52 + param.put("orNo", orderInfo.getParentOrderCode());
53 param.put("orTime",DateUtil.date2String(new Date((long)orderInfo.getOrderTime() * 1000), "yyyy-MM-dd HH:mm:ss")); 53 param.put("orTime",DateUtil.date2String(new Date((long)orderInfo.getOrderTime() * 1000), "yyyy-MM-dd HH:mm:ss"));
54 param.put("code", orderInfo.getTrackingCode()); 54 param.put("code", orderInfo.getTrackingCode());
55 // param.put("code", "1|2|3|4|5|6"); 测试时code 55 // param.put("code", "1|2|3|4|5|6"); 测试时code
@@ -107,14 +107,14 @@ public class PanshiServiceImpl implements IOrderPushService { @@ -107,14 +107,14 @@ public class PanshiServiceImpl implements IOrderPushService {
107 logger.info("pushOrder: url is {}, param is {}", URL, param); 107 logger.info("pushOrder: url is {}, param is {}", URL, param);
108 pair = HttpUtils.httpPost(URL, param); 108 pair = HttpUtils.httpPost(URL, param);
109 } catch (Exception e) { 109 } catch (Exception e) {
110 - logger.error("panshi order post fail,orderCode is {}", orderInfo.getOrderCode()); 110 + logger.error("panshi order post fail,orderCode is {}", orderInfo.getParentOrderCode());
111 } 111 }
112 JSONObject json = JSONObject.parseObject(pair.getRight()); 112 JSONObject json = JSONObject.parseObject(pair.getRight());
113 if (((String) json.get("code")).equals("200")) { 113 if (((String) json.get("code")).equals("200")) {
114 - logger.info("panshi pushOrder success,orderCode is {}", orderInfo.getOrderCode());  
115 - successCodes.add(orderInfo.getOrderCode()); 114 + logger.info("panshi pushOrder success,orderCode is {}", orderInfo.getParentOrderCode());
  115 + successCodes.add(orderInfo.getParentOrderCode());
116 } else { 116 } else {
117 - logger.warn("panshi pushOrder fail,orderCode is {},message is {}", orderInfo.getOrderCode(), (String) json.get("msg")); 117 + logger.warn("panshi pushOrder fail,orderCode is {},message is {}", orderInfo.getParentOrderCode(), (String) json.get("msg"));
118 } 118 }
119 } 119 }
120 //批量更新推送成功的订单状态为1 120 //批量更新推送成功的订单状态为1
@@ -59,7 +59,7 @@ public class BigDataOrderInfoTask { @@ -59,7 +59,7 @@ public class BigDataOrderInfoTask {
59 Map<String, OrderInfo> orderMap = Maps.uniqueIndex(orderInfoList, new Function<OrderInfo, String>() { 59 Map<String, OrderInfo> orderMap = Maps.uniqueIndex(orderInfoList, new Function<OrderInfo, String>() {
60 @Override 60 @Override
61 public String apply(OrderInfo input) { 61 public String apply(OrderInfo input) {
62 - return input.getOrderCode(); 62 + return input.getParentOrderCode();
63 } 63 }
64 }); 64 });
65 //获取校验后的订单code 65 //获取校验后的订单code