Authored by qinchao

多个订单对应一个物流单号

@@ -67,13 +67,22 @@ private static final Logger LOGGER = LoggerUtils.getMqConsumerLogger(); @@ -67,13 +67,22 @@ private static final Logger LOGGER = LoggerUtils.getMqConsumerLogger();
67 if (!checkValidMessage(jsonMsg)) { 67 if (!checkValidMessage(jsonMsg)) {
68 return; 68 return;
69 } 69 }
70 - long orderCode = jsonMsg.getLongValue("orderCode"); 70 +
71 int uid = jsonMsg.getIntValue("uid"); 71 int uid = jsonMsg.getIntValue("uid");
72 if (uid == 0) { 72 if (uid == 0) {
73 LOGGER.info("handle express info update message, not give me a uid, message is {}.", message); 73 LOGGER.info("handle express info update message, not give me a uid, message is {}.", message);
74 return; 74 return;
75 } 75 }
76 76
  77 + long orderCode = jsonMsg.getLongValue("orderCode");
  78 + String waybillCode = jsonMsg.getString("waybillCode");
  79 + int logisticsType = jsonMsg.getIntValue("logisticsType");
  80 + int createTime = jsonMsg.getIntValue("createTime");
  81 + int state = jsonMsg.getIntValue("state");
  82 + String acceptAddress = jsonMsg.getString("acceptAddress");
  83 + String acceptRemark = jsonMsg.getString("acceptRemark");
  84 +
  85 + /*
77 BuyerOrder buyerOrder = buyerOrderMapper.selectOnlyByOrderCode(orderCode); 86 BuyerOrder buyerOrder = buyerOrderMapper.selectOnlyByOrderCode(orderCode);
78 87
79 if (buyerOrder == null){ 88 if (buyerOrder == null){
@@ -81,9 +90,7 @@ private static final Logger LOGGER = LoggerUtils.getMqConsumerLogger(); @@ -81,9 +90,7 @@ private static final Logger LOGGER = LoggerUtils.getMqConsumerLogger();
81 //遇到这种情况,也记录物流信息 90 //遇到这种情况,也记录物流信息
82 //throw new ServiceException(ServiceError.ORDER_NULL); 91 //throw new ServiceException(ServiceError.ORDER_NULL);
83 } 92 }
84 -  
85 -  
86 - String waybillCode = jsonMsg.getString("waybillCode"); 93 + */
87 94
88 //根据uid,orderCode,waybillCode查状态expressType 95 //根据uid,orderCode,waybillCode查状态expressType
89 96
@@ -101,15 +108,11 @@ private static final Logger LOGGER = LoggerUtils.getMqConsumerLogger(); @@ -101,15 +108,11 @@ private static final Logger LOGGER = LoggerUtils.getMqConsumerLogger();
101 } 108 }
102 } 109 }
103 110
104 - int createTime = jsonMsg.getIntValue("createTime");  
105 - int state = jsonMsg.getIntValue("state");  
106 -  
107 // 正常订单,签收消息 111 // 正常订单,签收消息
108 if (state == ExpressInfoConstant.EXPRESS_STATUS_SIGN) { 112 if (state == ExpressInfoConstant.EXPRESS_STATUS_SIGN) {
109 handleAcceptExpress(jsonMsg,initExpressType.intValue()); 113 handleAcceptExpress(jsonMsg,initExpressType.intValue());
110 return; 114 return;
111 } 115 }
112 - int logisticsType = jsonMsg.getIntValue("logisticsType");  
113 116
114 // 正常订单,物流调拨消息(获取不到物流信息,标记为未发货) 117 // 正常订单,物流调拨消息(获取不到物流信息,标记为未发货)
115 if (state == ExpressInfoConstant.EXPRESS_STATUS_UNSING 118 if (state == ExpressInfoConstant.EXPRESS_STATUS_UNSING
@@ -118,8 +121,7 @@ private static final Logger LOGGER = LoggerUtils.getMqConsumerLogger(); @@ -118,8 +121,7 @@ private static final Logger LOGGER = LoggerUtils.getMqConsumerLogger();
118 state = ExpressInfoConstant.EXPRESS_STATUS_UNSEND; 121 state = ExpressInfoConstant.EXPRESS_STATUS_UNSEND;
119 122
120 } 123 }
121 - String acceptAddress = jsonMsg.getString("acceptAddress");  
122 - String acceptRemark = jsonMsg.getString("acceptRemark"); 124 +
123 ExpressInfo expressInfo = new ExpressInfo(); 125 ExpressInfo expressInfo = new ExpressInfo();
124 expressInfo.setUid(uid); 126 expressInfo.setUid(uid);
125 expressInfo.setOrderCode(orderCode); 127 expressInfo.setOrderCode(orderCode);