...
|
...
|
@@ -39,16 +39,13 @@ import com.yohoufo.order.service.handler.RefundGoodsMoneyHandler; |
|
|
import com.yohoufo.order.service.handler.penalty.PenaltyResult;
|
|
|
import com.yohoufo.order.service.handler.penalty.SellerEarnestMoney2BuyerPenaltyCalculator;
|
|
|
import com.yohoufo.order.service.impl.PayRefundService;
|
|
|
import com.yohoufo.order.service.proxy.BuyerNoticeFacade;
|
|
|
import com.yohoufo.order.service.proxy.*;
|
|
|
import com.yohoufo.order.service.seller.setting.SellerService;
|
|
|
import com.yohoufo.order.service.impl.TransferService;
|
|
|
import com.yohoufo.order.service.impl.visitor.*;
|
|
|
import com.yohoufo.order.service.listener.BuyerOrderChangeEvent;
|
|
|
import com.yohoufo.order.service.listener.OrderChangeListenerContainer;
|
|
|
import com.yohoufo.order.service.pay.AbstractPayService;
|
|
|
import com.yohoufo.order.service.proxy.InBoxFacade;
|
|
|
import com.yohoufo.order.service.proxy.OrderStatusFlowService;
|
|
|
import com.yohoufo.order.service.proxy.ProductProxyService;
|
|
|
import com.yohoufo.order.service.seller.changePrice.SingleGoodsChangePriceService;
|
|
|
import com.yohoufo.order.service.support.codegenerator.OrderCodeGenerator;
|
|
|
import com.yohoufo.order.service.support.codegenerator.bean.CodeMeta;
|
...
|
...
|
@@ -143,6 +140,9 @@ public class SellerOrderCancelService { |
|
|
@Autowired
|
|
|
private DepositService depositService;
|
|
|
|
|
|
@Autowired
|
|
|
private SellerNoticeFacade sellerNoticeFacade;
|
|
|
|
|
|
/**
|
|
|
* TODO 如何控制好并发,必须控制不能重复转账 退款
|
|
|
* 使用乐观锁,带着查询到的状态且符合条件时再去更新
|
...
|
...
|
@@ -749,7 +749,12 @@ public class SellerOrderCancelService { |
|
|
}
|
|
|
SellerOrderGoods psog = cpn.psog;
|
|
|
Integer sellerUid = psog.getUid();
|
|
|
inBoxFacade.notifyUnshelfCauseBySpecialReason(sellerUid, psog);
|
|
|
if (cpn.isQuickDeliver){
|
|
|
//TODO notice seller
|
|
|
sellerNoticeFacade.noticeSellerWhenPlatformOffShelve(psog);
|
|
|
}else {
|
|
|
inBoxFacade.notifyUnshelfCauseBySpecialReason(sellerUid, psog);
|
|
|
}
|
|
|
}
|
|
|
private static class CancelStatusNode{
|
|
|
int skup;
|
...
|
...
|
@@ -758,6 +763,8 @@ public class SellerOrderCancelService { |
|
|
}
|
|
|
private static class CancelPreparedNode{
|
|
|
SellerOrderGoods psog;
|
|
|
SkupType skupType;
|
|
|
boolean isQuickDeliver;
|
|
|
}
|
|
|
|
|
|
private CancelPreparedNode doCancelByErp(CancelStatusNode csn,
|
...
|
...
|
@@ -863,6 +870,8 @@ public class SellerOrderCancelService { |
|
|
}
|
|
|
cpn = new CancelPreparedNode();
|
|
|
cpn.psog = psog;
|
|
|
cpn.skupType = skupType;
|
|
|
cpn.isQuickDeliver = isQuickDeliver;
|
|
|
return cpn;
|
|
|
}
|
|
|
|
...
|
...
|
|