Authored by chenchao

fix

@@ -462,12 +462,17 @@ public class SellerDepositOrderService extends AbsGoodsServiceOrderService imple @@ -462,12 +462,17 @@ public class SellerDepositOrderService extends AbsGoodsServiceOrderService imple
462 // 462 //
463 Long orderCode = appraiseOrder.getOrderCode(); 463 Long orderCode = appraiseOrder.getOrderCode();
464 Long parentOrderCode; 464 Long parentOrderCode;
  465 + Long paidOrderCode;
465 boolean isParent = Objects.isNull(parentOrderCode=appraiseOrder.getParentOrderCode()); 466 boolean isParent = Objects.isNull(parentOrderCode=appraiseOrder.getParentOrderCode());
466 AppraiseOrderStatus targetOrderStatus = AppraiseOrderStatus.SHAM_SEND_OUT; 467 AppraiseOrderStatus targetOrderStatus = AppraiseOrderStatus.SHAM_SEND_OUT;
467 AppraiseOrderStatus expectedStatus = AppraiseOrderStatus.SELLER_SEND_OUT; 468 AppraiseOrderStatus expectedStatus = AppraiseOrderStatus.SELLER_SEND_OUT;
468 if(isParent){ 469 if(isParent){
469 - triggerStatusChangeByParentCode(parentOrderCode, targetOrderStatus, expectedStatus); 470 + logger.info("shamDeliver isParent orderCode {} ", orderCode);
  471 + paidOrderCode = orderCode;
  472 + triggerStatusChangeByParentCode(orderCode, targetOrderStatus, expectedStatus);
470 }else { 473 }else {
  474 + logger.info("shamDeliver is not Parent orderCode {} ", orderCode);
  475 + paidOrderCode = parentOrderCode;
471 //no parent 476 //no parent
472 triggerStatusConsistencyCheck(orderCode); 477 triggerStatusConsistencyCheck(orderCode);
473 } 478 }
@@ -479,7 +484,7 @@ public class SellerDepositOrderService extends AbsGoodsServiceOrderService imple @@ -479,7 +484,7 @@ public class SellerDepositOrderService extends AbsGoodsServiceOrderService imple
479 .loadUser(appraiseOrder.getUid()) 484 .loadUser(appraiseOrder.getUid())
480 .loadActionCase(SellerWalletDetail.Type.SELLER_SHAM_SEND_OUT) 485 .loadActionCase(SellerWalletDetail.Type.SELLER_SHAM_SEND_OUT)
481 .loadRefundAction(payRefundService::refund) 486 .loadRefundAction(payRefundService::refund)
482 - .loadOrder(appraiseOrder.getOrderCode(), appraiseOrder.getParentOrderCode(), appraiseOrder.getPayment(), appraiseOrder.getAmount()) 487 + .loadOrder(orderCode, paidOrderCode, appraiseOrder.getPayment(), appraiseOrder.getAmount())
483 .refund(); 488 .refund();
484 return rows; 489 return rows;
485 } 490 }
@@ -4,6 +4,7 @@ import com.alibaba.fastjson.JSONObject; @@ -4,6 +4,7 @@ import com.alibaba.fastjson.JSONObject;
4 import com.yohobuy.ufo.model.order.bo.AppraiseOrderBo; 4 import com.yohobuy.ufo.model.order.bo.AppraiseOrderBo;
5 import com.yohoufo.order.BaseWebTest; 5 import com.yohoufo.order.BaseWebTest;
6 import com.yohoufo.order.event.OrderCancelEvent; 6 import com.yohoufo.order.event.OrderCancelEvent;
  7 +import com.yohoufo.order.service.impl.ServiceOrderProcessor;
7 import org.junit.Test; 8 import org.junit.Test;
8 import org.springframework.beans.factory.annotation.Autowired; 9 import org.springframework.beans.factory.annotation.Autowired;
9 10
@@ -13,6 +14,9 @@ public class SellerDepositOrderServiceTest extends BaseWebTest { @@ -13,6 +14,9 @@ public class SellerDepositOrderServiceTest extends BaseWebTest {
13 @Autowired 14 @Autowired
14 private SellerDepositOrderService sellerDepositOrderService; 15 private SellerDepositOrderService sellerDepositOrderService;
15 16
  17 + @Autowired
  18 + private ServiceOrderProcessor serviceOrderProcessor;
  19 +
16 @Test 20 @Test
17 public void testGetSubOrderStatistic(){ 21 public void testGetSubOrderStatistic(){
18 //sub 36378862305176 22 //sub 36378862305176
@@ -29,4 +33,12 @@ public class SellerDepositOrderServiceTest extends BaseWebTest { @@ -29,4 +33,12 @@ public class SellerDepositOrderServiceTest extends BaseWebTest {
29 sellerDepositOrderService.cancelByTimeout(orderCancelEvent); 33 sellerDepositOrderService.cancelByTimeout(orderCancelEvent);
30 34
31 } 35 }
  36 +
  37 +
  38 + @Test
  39 + public void testshamDeliver(){
  40 + long orderCode = 36380351864658L;
  41 + ServiceOrderProcessor.ExistenceNode existenceNode = serviceOrderProcessor.isAppraiseOrder(orderCode);
  42 + sellerDepositOrderService.shamDeliver(existenceNode.getAppraiseOrder());
  43 + }
32 } 44 }