Authored by qinchao

触发物流

... ... @@ -232,7 +232,7 @@ public class AppraiseService {
LOGGER.info("AppraiseService triggerSellerToPlatformExpress enter , appraiseExpressInfoBo {} ",appraiseExpressInfoBo);
String wayBillCode = appraiseExpressInfoBo.getWayBillCode();
Long orderCode = appraiseExpressInfoBo.getOrderCode();
if(StringUtils.isBlank(wayBillCode)||orderCode==null){
LOGGER.warn("triggerSellerToPlatformExpress error param {}", appraiseExpressInfoBo);
throw new ServiceException(ServiceError.PARAM_ERROR);
... ... @@ -249,14 +249,18 @@ public class AppraiseService {
if(buyerOrder.getStatus().byteValue() == OrderStatus.SELLER_SEND_OUT.getCode()) {
ExpressRecord record = expressRecordMapper.selectByOrderCodeAndExpressType(orderCode,expressInfoService.getExpressTypeSeller(OrderStatus.SELLER_SEND_OUT.getCode()));
LOGGER.info("triggerSellerToPlatformExpress begin trigger , orderCode {} ,record = {}", orderCode,record);
Integer uid = record.getUid();
String mobile ="";
AppraiseAddressResp appraiseAddressResp =appraiseAddressService.queryInitAddressByDepotNum(record.getDepotNum());
if(appraiseAddressResp!=null){
mobile = appraiseAddressResp.getMobile();
if(record!=null&&StringUtils.equals(wayBillCode,record.getWaybillCode())){
Integer uid = record.getUid();
String mobile ="";
AppraiseAddressResp appraiseAddressResp =appraiseAddressService.queryInitAddressByDepotNum(record.getDepotNum());
if(appraiseAddressResp!=null){
mobile = appraiseAddressResp.getMobile();
}
expressInfoService.triggerExpressMQ(uid,record.getLogisticsType(),orderCode,wayBillCode,mobile);
}else{
LOGGER.warn("triggerSellerToPlatformExpress begin trigger fail ,express record is null or wayBillCode not the same, orderCode {},changed wayBillCode {},record {} ", orderCode,wayBillCode,record);
}
expressInfoService.triggerExpressMQ(uid,record.getLogisticsType(),orderCode,wayBillCode,mobile);
}else{
LOGGER.info("triggerSellerToPlatformExpress not trigger because of error status , orderCode {} ,status {}", orderCode,buyerOrder.getStatus());
}
... ...