Authored by LUOXC

fixbug

@@ -314,7 +314,7 @@ public class AppraiseService { @@ -314,7 +314,7 @@ public class AppraiseService {
314 } 314 }
315 // 买家接受瑕疵,走非寄存流程 315 // 买家接受瑕疵,走非寄存流程
316 else if (buyerOrder.getStatus() == OrderStatus.MINI_FAULT_ACCEPT.getCode()) { 316 else if (buyerOrder.getStatus() == OrderStatus.MINI_FAULT_ACCEPT.getCode()) {
317 - deliveryNonDepositGoodsToBuyerAndRun(appraiseExpressInfoBo,buyerOrder,sog -> { 317 + deliveryGoodsToBuyerAndRun(appraiseExpressInfoBo,buyerOrder, sog -> {
318 // 通知买家已发货 318 // 通知买家已发货
319 buyerNoticeFacade.deliveryDepositGoodsToBuyer(buyerOrder.getUid(), appraiseExpressInfoBo.getWayBillCode(), sog, 319 buyerNoticeFacade.deliveryDepositGoodsToBuyer(buyerOrder.getUid(), appraiseExpressInfoBo.getWayBillCode(), sog,
320 sellerOrderGoods -> Optional.ofNullable(sellerOrderGoods).map(SellerOrderGoods::getProductId).map(productMapper::selectByPrimaryKey).orElse(null)); 320 sellerOrderGoods -> Optional.ofNullable(sellerOrderGoods).map(SellerOrderGoods::getProductId).map(productMapper::selectByPrimaryKey).orElse(null));
@@ -325,7 +325,7 @@ public class AppraiseService { @@ -325,7 +325,7 @@ public class AppraiseService {
325 } 325 }
326 } 326 }
327 327
328 - private void deliveryNonDepositGoodsToBuyerAndRun(AppraiseExpressInfoBo appraiseExpressInfoBo, BuyerOrder buyerOrder, Consumer<SellerOrderGoods> run) { 328 + private void deliveryGoodsToBuyerAndRun(AppraiseExpressInfoBo appraiseExpressInfoBo, BuyerOrder buyerOrder, Consumer<SellerOrderGoods> run) {
329 final Long orderCode = buyerOrder.getOrderCode(); 329 final Long orderCode = buyerOrder.getOrderCode();
330 final OrderStatus expectOrderStatus; 330 final OrderStatus expectOrderStatus;
331 final OrderStatus targetOrderStatus = OrderStatus.WAITING_RECEIVE; 331 final OrderStatus targetOrderStatus = OrderStatus.WAITING_RECEIVE;
@@ -373,7 +373,7 @@ public class AppraiseService { @@ -373,7 +373,7 @@ public class AppraiseService {
373 } 373 }
374 374
375 private void deliveryNonDepositGoodsToBuyer(AppraiseExpressInfoBo appraiseExpressInfoBo, BuyerOrder buyerOrder) { 375 private void deliveryNonDepositGoodsToBuyer(AppraiseExpressInfoBo appraiseExpressInfoBo, BuyerOrder buyerOrder) {
376 - deliveryNonDepositGoodsToBuyerAndRun(appraiseExpressInfoBo, buyerOrder, sellerOrderGoods -> { 376 + deliveryGoodsToBuyerAndRun(appraiseExpressInfoBo, buyerOrder, sellerOrderGoods -> {
377 Product product = Optional.ofNullable(sellerOrderGoods).map(SellerOrderGoods::getProductId).map(productMapper::selectByPrimaryKey).orElse(null); 377 Product product = Optional.ofNullable(sellerOrderGoods).map(SellerOrderGoods::getProductId).map(productMapper::selectByPrimaryKey).orElse(null);
378 buyerNoticeFacade.deliveryGoodsToBuyer(buyerOrder, sellerOrderGoods, product); 378 buyerNoticeFacade.deliveryGoodsToBuyer(buyerOrder, sellerOrderGoods, product);
379 }); 379 });
@@ -114,9 +114,15 @@ public class BuyerOrderServiceImpl implements IBuyerOrderService { @@ -114,9 +114,15 @@ public class BuyerOrderServiceImpl implements IBuyerOrderService {
114 // 参数检查 ![待收货] 不合法 114 // 参数检查 ![待收货] 不合法
115 DataNode node = checkBase(orderRequest); 115 DataNode node = checkBase(orderRequest);
116 BuyerOrder buyerOrder = node.buyerOrderInDB; 116 BuyerOrder buyerOrder = node.buyerOrderInDB;
117 - // 待寄存或待收货  
118 - OrderStatus expectStatus = BuyerOrderUtils.isDeposit(buyerOrder) ?  
119 - OrderStatus.JUDGE_PASS_WAIT_WAREHOUSE : OrderStatus.WAITING_RECEIVE; 117 + OrderStatus buyerOrderStatus = OrderStatus.getOrderStatus(buyerOrder.getStatus());
  118 + OrderStatus expectStatus;
  119 + // 如果当前订单状态为待寄存或待收货
  120 + if(buyerOrderStatus == OrderStatus.JUDGE_PASS_WAIT_WAREHOUSE
  121 + || buyerOrderStatus == OrderStatus.WAITING_RECEIVE){
  122 + expectStatus = buyerOrderStatus;
  123 + } else {
  124 + expectStatus = OrderStatus.WAITING_RECEIVE;
  125 + }
120 checkStatus(node,orderRequest, expectStatus); 126 checkStatus(node,orderRequest, expectStatus);
121 int uid = buyerOrder.getUid(); 127 int uid = buyerOrder.getUid();
122 long orderCode = buyerOrder.getOrderCode(); 128 long orderCode = buyerOrder.getOrderCode();