|
@@ -229,6 +229,7 @@ public class AppraiseService { |
|
@@ -229,6 +229,7 @@ public class AppraiseService { |
229
|
* 触发物流
|
229
|
* 触发物流
|
230
|
*/
|
230
|
*/
|
231
|
public void triggerSellerToPlatformExpress(AppraiseExpressInfoBo appraiseExpressInfoBo ){
|
231
|
public void triggerSellerToPlatformExpress(AppraiseExpressInfoBo appraiseExpressInfoBo ){
|
|
|
232
|
+ LOGGER.info("AppraiseService triggerSellerToPlatformExpress enter , appraiseExpressInfoBo {} ",appraiseExpressInfoBo);
|
232
|
Integer expressCompanyId = appraiseExpressInfoBo.getExpressCompanyId();
|
233
|
Integer expressCompanyId = appraiseExpressInfoBo.getExpressCompanyId();
|
233
|
String wayBillCode = appraiseExpressInfoBo.getWayBillCode();
|
234
|
String wayBillCode = appraiseExpressInfoBo.getWayBillCode();
|
234
|
Long orderCode = appraiseExpressInfoBo.getOrderCode();
|
235
|
Long orderCode = appraiseExpressInfoBo.getOrderCode();
|
|
@@ -244,16 +245,23 @@ public class AppraiseService { |
|
@@ -244,16 +245,23 @@ public class AppraiseService { |
244
|
BuyerOrder buyerOrder = buyerOrderMapper.selectOnlyByOrderCode(orderCode);
|
245
|
BuyerOrder buyerOrder = buyerOrderMapper.selectOnlyByOrderCode(orderCode);
|
245
|
|
246
|
|
246
|
if (buyerOrder == null){
|
247
|
if (buyerOrder == null){
|
247
|
- LOGGER.warn("returnBack getOrderInfo order not exist, orderCode {}", orderCode);
|
248
|
+ LOGGER.warn("triggerSellerToPlatformExpress getOrderInfo order not exist, orderCode {}", orderCode);
|
248
|
throw new ServiceException(ServiceError.ORDER_NULL);
|
249
|
throw new ServiceException(ServiceError.ORDER_NULL);
|
249
|
}
|
250
|
}
|
250
|
- Integer uid = buyerOrder.getSellerUid();
|
|
|
251
|
- String mobile ="";
|
|
|
252
|
- AppraiseAddressResp appraiseAddressResp =appraiseAddressService.queryInitAddressByDepotNum(depotNum);
|
|
|
253
|
- if(appraiseAddressResp!=null){
|
|
|
254
|
- mobile = appraiseAddressResp.getMobile();
|
251
|
+
|
|
|
252
|
+ //只有卖家已发货才能更改物流
|
|
|
253
|
+ if(buyerOrder.getStatus().byteValue() == OrderStatus.SELLER_SEND_OUT.getCode()) {
|
|
|
254
|
+ LOGGER.info("triggerSellerToPlatformExpress begin trigger , orderCode {}", orderCode);
|
|
|
255
|
+ Integer uid = buyerOrder.getSellerUid();
|
|
|
256
|
+ String mobile ="";
|
|
|
257
|
+ AppraiseAddressResp appraiseAddressResp =appraiseAddressService.queryInitAddressByDepotNum(depotNum);
|
|
|
258
|
+ if(appraiseAddressResp!=null){
|
|
|
259
|
+ mobile = appraiseAddressResp.getMobile();
|
|
|
260
|
+ }
|
|
|
261
|
+ expressInfoService.triggerExpressMQ(uid,expressCompanyId,orderCode,wayBillCode,mobile);
|
|
|
262
|
+ }else{
|
|
|
263
|
+ LOGGER.info("triggerSellerToPlatformExpress not trigger because of error status , orderCode {} ,status {}", orderCode,buyerOrder.getStatus());
|
255
|
}
|
264
|
}
|
256
|
- //sendExpressMQ(uid,expressCompanyId,orderCode,wayBillCode,mobile);
|
|
|
257
|
}
|
265
|
}
|
258
|
|
266
|
|
259
|
/**
|
267
|
/**
|