...
|
...
|
@@ -316,10 +316,7 @@ public class SellerDepositOrderService extends AbsGoodsServiceOrderService imple |
|
|
public int platformReceiveGoods(AppraiseOrder appraiseOrder){
|
|
|
int rows = super.platformReceiveGoods(appraiseOrder);
|
|
|
if (rows>0) {
|
|
|
|
|
|
AppraiseOrderStatus targetOrderStatus = AppraiseOrderStatus.PLATFORM_RECEIVE;
|
|
|
inBoxFacade.sellerDepositOrderNotice(appraiseOrder.getUid(), appraiseOrder.getOrderCode(), targetOrderStatus);
|
|
|
}
|
|
|
}
|
|
|
return rows;
|
|
|
}
|
|
|
|
...
|
...
|
@@ -653,6 +650,14 @@ public class SellerDepositOrderService extends AbsGoodsServiceOrderService imple |
|
|
return appraiseOrder.getParentOrderCode()==null ? orderCode : appraiseOrder.getParentOrderCode();
|
|
|
}
|
|
|
|
|
|
private Long findoutParentOrderCode(AppraiseOrder appraiseOrder){
|
|
|
Long orderCode = appraiseOrder.getOrderCode();
|
|
|
if (Objects.isNull(appraiseOrder)){
|
|
|
logger.warn("in getSubOrderStatistic selectByOrderCode null, orderCode {}", orderCode);
|
|
|
return orderCode;
|
|
|
}
|
|
|
return appraiseOrder.getParentOrderCode()==null ? orderCode : appraiseOrder.getParentOrderCode();
|
|
|
}
|
|
|
|
|
|
|
|
|
public DepositOrderStatisticInfo getAppraiseProgress(int uid, long orderCode){
|
...
|
...
|
@@ -710,7 +715,21 @@ public class SellerDepositOrderService extends AbsGoodsServiceOrderService imple |
|
|
return dosi;
|
|
|
}
|
|
|
|
|
|
public int platformFinishReceiveGoods(long parentCode){
|
|
|
public int platformFinishReceiveGoods(int uid, long parentCode){
|
|
|
AppraiseOrderStatus targetStatus = AppraiseOrderStatus.PLATFORM_RECEIVE,
|
|
|
expectedStatus = AppraiseOrderStatus.SELLER_SEND_OUT;
|
|
|
int rows = triggerStatusChange(parentCode,targetStatus,expectedStatus);
|
|
|
|
|
|
if(rows>0){
|
|
|
AppraiseOrderStatus targetOrderStatus = AppraiseOrderStatus.PLATFORM_RECEIVE;
|
|
|
inBoxFacade.sellerDepositOrderNotice(uid, parentCode, targetOrderStatus);
|
|
|
|
|
|
}
|
|
|
return rows;
|
|
|
}
|
|
|
|
|
|
|
|
|
public int platformFinishAppraiseGoods(long parentCode){
|
|
|
AppraiseOrderStatus targetStatus = AppraiseOrderStatus.FINISH,
|
|
|
expectedStatus = AppraiseOrderStatus.PLATFORM_RECEIVE;
|
|
|
return triggerStatusChange(parentCode,targetStatus,expectedStatus);
|
...
|
...
|
@@ -719,14 +738,20 @@ public class SellerDepositOrderService extends AbsGoodsServiceOrderService imple |
|
|
|
|
|
public int detectAppraiseFinish(SellerDepositOrderStatusConsistencyAsyncEvent event ){
|
|
|
logger.info("detectAppraiseFinish event {}", event);
|
|
|
|
|
|
long orderCode = event.getOrderCode();
|
|
|
long parentOrderCode = findoutParentOrderCode(orderCode);
|
|
|
AppraiseOrder appraiseOrder = appraiseOrderMapper.selectByOrderCode(orderCode);
|
|
|
long parentOrderCode = findoutParentOrderCode(appraiseOrder);
|
|
|
int cnt =appraiseOrderMapper.selectSubOrderCntIncludeStatus(parentOrderCode,Arrays.asList(AppraiseOrderStatus.PLATFORM_RECEIVE.getCode()));
|
|
|
logger.info("detectAppraiseFinish event {},parentOrderCode {} PLATFORM_RECEIVE count {}", event, parentOrderCode, cnt);
|
|
|
if (cnt == 0){
|
|
|
int prows = platformFinishReceiveGoods(parentOrderCode);
|
|
|
int prows = platformFinishAppraiseGoods(parentOrderCode);
|
|
|
logger.info("detectAppraiseFinish platformFinishReceiveGoods, orderCode {},parentOrderCode {} parent count {}",
|
|
|
orderCode, parentOrderCode, prows);
|
|
|
if (prows>0){
|
|
|
AppraiseOrderStatus targetStatus = AppraiseOrderStatus.FINISH;
|
|
|
inBoxFacade.sellerDepositOrderNotice(appraiseOrder.getUid(), parentOrderCode, targetStatus);
|
|
|
}
|
|
|
return prows;
|
|
|
}
|
|
|
return 0;
|
...
|
...
|
|