Authored by qinchao

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

... ... @@ -67,13 +67,22 @@ private static final Logger LOGGER = LoggerUtils.getMqConsumerLogger();
if (!checkValidMessage(jsonMsg)) {
return;
}
long orderCode = jsonMsg.getLongValue("orderCode");
int uid = jsonMsg.getIntValue("uid");
if (uid == 0) {
LOGGER.info("handle express info update message, not give me a uid, message is {}.", message);
return;
}
long orderCode = jsonMsg.getLongValue("orderCode");
String waybillCode = jsonMsg.getString("waybillCode");
int logisticsType = jsonMsg.getIntValue("logisticsType");
int createTime = jsonMsg.getIntValue("createTime");
int state = jsonMsg.getIntValue("state");
String acceptAddress = jsonMsg.getString("acceptAddress");
String acceptRemark = jsonMsg.getString("acceptRemark");
/*
BuyerOrder buyerOrder = buyerOrderMapper.selectOnlyByOrderCode(orderCode);
if (buyerOrder == null){
... ... @@ -81,9 +90,7 @@ private static final Logger LOGGER = LoggerUtils.getMqConsumerLogger();
//遇到这种情况,也记录物流信息
//throw new ServiceException(ServiceError.ORDER_NULL);
}
String waybillCode = jsonMsg.getString("waybillCode");
*/
//根据uid,orderCode,waybillCode查状态expressType
... ... @@ -101,15 +108,11 @@ private static final Logger LOGGER = LoggerUtils.getMqConsumerLogger();
}
}
int createTime = jsonMsg.getIntValue("createTime");
int state = jsonMsg.getIntValue("state");
// 正常订单,签收消息
if (state == ExpressInfoConstant.EXPRESS_STATUS_SIGN) {
handleAcceptExpress(jsonMsg,initExpressType.intValue());
return;
}
int logisticsType = jsonMsg.getIntValue("logisticsType");
// 正常订单,物流调拨消息(获取不到物流信息,标记为未发货)
if (state == ExpressInfoConstant.EXPRESS_STATUS_UNSING
... ... @@ -118,8 +121,7 @@ private static final Logger LOGGER = LoggerUtils.getMqConsumerLogger();
state = ExpressInfoConstant.EXPRESS_STATUS_UNSEND;
}
String acceptAddress = jsonMsg.getString("acceptAddress");
String acceptRemark = jsonMsg.getString("acceptRemark");
ExpressInfo expressInfo = new ExpressInfo();
expressInfo.setUid(uid);
expressInfo.setOrderCode(orderCode);
... ...