Authored by chaogeng

修改订单推送

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