|
@@ -316,10 +316,7 @@ public class SellerDepositOrderService extends AbsGoodsServiceOrderService imple |
|
@@ -316,10 +316,7 @@ public class SellerDepositOrderService extends AbsGoodsServiceOrderService imple |
316
|
public int platformReceiveGoods(AppraiseOrder appraiseOrder){
|
316
|
public int platformReceiveGoods(AppraiseOrder appraiseOrder){
|
317
|
int rows = super.platformReceiveGoods(appraiseOrder);
|
317
|
int rows = super.platformReceiveGoods(appraiseOrder);
|
318
|
if (rows>0) {
|
318
|
if (rows>0) {
|
319
|
-
|
|
|
320
|
- AppraiseOrderStatus targetOrderStatus = AppraiseOrderStatus.PLATFORM_RECEIVE;
|
|
|
321
|
- inBoxFacade.sellerDepositOrderNotice(appraiseOrder.getUid(), appraiseOrder.getOrderCode(), targetOrderStatus);
|
|
|
322
|
- }
|
319
|
+ }
|
323
|
return rows;
|
320
|
return rows;
|
324
|
}
|
321
|
}
|
325
|
|
322
|
|
|
@@ -653,6 +650,14 @@ public class SellerDepositOrderService extends AbsGoodsServiceOrderService imple |
|
@@ -653,6 +650,14 @@ public class SellerDepositOrderService extends AbsGoodsServiceOrderService imple |
653
|
return appraiseOrder.getParentOrderCode()==null ? orderCode : appraiseOrder.getParentOrderCode();
|
650
|
return appraiseOrder.getParentOrderCode()==null ? orderCode : appraiseOrder.getParentOrderCode();
|
654
|
}
|
651
|
}
|
655
|
|
652
|
|
|
|
653
|
+ private Long findoutParentOrderCode(AppraiseOrder appraiseOrder){
|
|
|
654
|
+ Long orderCode = appraiseOrder.getOrderCode();
|
|
|
655
|
+ if (Objects.isNull(appraiseOrder)){
|
|
|
656
|
+ logger.warn("in getSubOrderStatistic selectByOrderCode null, orderCode {}", orderCode);
|
|
|
657
|
+ return orderCode;
|
|
|
658
|
+ }
|
|
|
659
|
+ return appraiseOrder.getParentOrderCode()==null ? orderCode : appraiseOrder.getParentOrderCode();
|
|
|
660
|
+ }
|
656
|
|
661
|
|
657
|
|
662
|
|
658
|
public DepositOrderStatisticInfo getAppraiseProgress(int uid, long orderCode){
|
663
|
public DepositOrderStatisticInfo getAppraiseProgress(int uid, long orderCode){
|
|
@@ -710,7 +715,21 @@ public class SellerDepositOrderService extends AbsGoodsServiceOrderService imple |
|
@@ -710,7 +715,21 @@ public class SellerDepositOrderService extends AbsGoodsServiceOrderService imple |
710
|
return dosi;
|
715
|
return dosi;
|
711
|
}
|
716
|
}
|
712
|
|
717
|
|
713
|
- public int platformFinishReceiveGoods(long parentCode){
|
718
|
+ public int platformFinishReceiveGoods(int uid, long parentCode){
|
|
|
719
|
+ AppraiseOrderStatus targetStatus = AppraiseOrderStatus.PLATFORM_RECEIVE,
|
|
|
720
|
+ expectedStatus = AppraiseOrderStatus.SELLER_SEND_OUT;
|
|
|
721
|
+ int rows = triggerStatusChange(parentCode,targetStatus,expectedStatus);
|
|
|
722
|
+
|
|
|
723
|
+ if(rows>0){
|
|
|
724
|
+ AppraiseOrderStatus targetOrderStatus = AppraiseOrderStatus.PLATFORM_RECEIVE;
|
|
|
725
|
+ inBoxFacade.sellerDepositOrderNotice(uid, parentCode, targetOrderStatus);
|
|
|
726
|
+
|
|
|
727
|
+ }
|
|
|
728
|
+ return rows;
|
|
|
729
|
+ }
|
|
|
730
|
+
|
|
|
731
|
+
|
|
|
732
|
+ public int platformFinishAppraiseGoods(long parentCode){
|
714
|
AppraiseOrderStatus targetStatus = AppraiseOrderStatus.FINISH,
|
733
|
AppraiseOrderStatus targetStatus = AppraiseOrderStatus.FINISH,
|
715
|
expectedStatus = AppraiseOrderStatus.PLATFORM_RECEIVE;
|
734
|
expectedStatus = AppraiseOrderStatus.PLATFORM_RECEIVE;
|
716
|
return triggerStatusChange(parentCode,targetStatus,expectedStatus);
|
735
|
return triggerStatusChange(parentCode,targetStatus,expectedStatus);
|
|
@@ -719,14 +738,20 @@ public class SellerDepositOrderService extends AbsGoodsServiceOrderService imple |
|
@@ -719,14 +738,20 @@ public class SellerDepositOrderService extends AbsGoodsServiceOrderService imple |
719
|
|
738
|
|
720
|
public int detectAppraiseFinish(SellerDepositOrderStatusConsistencyAsyncEvent event ){
|
739
|
public int detectAppraiseFinish(SellerDepositOrderStatusConsistencyAsyncEvent event ){
|
721
|
logger.info("detectAppraiseFinish event {}", event);
|
740
|
logger.info("detectAppraiseFinish event {}", event);
|
|
|
741
|
+
|
722
|
long orderCode = event.getOrderCode();
|
742
|
long orderCode = event.getOrderCode();
|
723
|
- long parentOrderCode = findoutParentOrderCode(orderCode);
|
743
|
+ AppraiseOrder appraiseOrder = appraiseOrderMapper.selectByOrderCode(orderCode);
|
|
|
744
|
+ long parentOrderCode = findoutParentOrderCode(appraiseOrder);
|
724
|
int cnt =appraiseOrderMapper.selectSubOrderCntIncludeStatus(parentOrderCode,Arrays.asList(AppraiseOrderStatus.PLATFORM_RECEIVE.getCode()));
|
745
|
int cnt =appraiseOrderMapper.selectSubOrderCntIncludeStatus(parentOrderCode,Arrays.asList(AppraiseOrderStatus.PLATFORM_RECEIVE.getCode()));
|
725
|
logger.info("detectAppraiseFinish event {},parentOrderCode {} PLATFORM_RECEIVE count {}", event, parentOrderCode, cnt);
|
746
|
logger.info("detectAppraiseFinish event {},parentOrderCode {} PLATFORM_RECEIVE count {}", event, parentOrderCode, cnt);
|
726
|
if (cnt == 0){
|
747
|
if (cnt == 0){
|
727
|
- int prows = platformFinishReceiveGoods(parentOrderCode);
|
748
|
+ int prows = platformFinishAppraiseGoods(parentOrderCode);
|
728
|
logger.info("detectAppraiseFinish platformFinishReceiveGoods, orderCode {},parentOrderCode {} parent count {}",
|
749
|
logger.info("detectAppraiseFinish platformFinishReceiveGoods, orderCode {},parentOrderCode {} parent count {}",
|
729
|
orderCode, parentOrderCode, prows);
|
750
|
orderCode, parentOrderCode, prows);
|
|
|
751
|
+ if (prows>0){
|
|
|
752
|
+ AppraiseOrderStatus targetStatus = AppraiseOrderStatus.FINISH;
|
|
|
753
|
+ inBoxFacade.sellerDepositOrderNotice(appraiseOrder.getUid(), parentOrderCode, targetStatus);
|
|
|
754
|
+ }
|
730
|
return prows;
|
755
|
return prows;
|
731
|
}
|
756
|
}
|
732
|
return 0;
|
757
|
return 0;
|