...
|
...
|
@@ -48,6 +48,7 @@ import com.yohoufo.order.service.impl.visitor.UserCancelCase; |
|
|
import com.yohoufo.order.service.proxy.*;
|
|
|
import com.yohoufo.order.service.seller.SellerAuthCheckService;
|
|
|
import com.yohoufo.order.service.seller.SellerOrderCancelService;
|
|
|
import com.yohoufo.order.service.seller.support.SellerOrderContextFactory;
|
|
|
import com.yohoufo.order.service.seller.trade.SellerOrderComputeService;
|
|
|
import com.yohoufo.order.service.seller.SkupBatchService;
|
|
|
import com.yohoufo.order.service.seller.orderMeta.SellerFeeService;
|
...
|
...
|
@@ -994,9 +995,24 @@ public class SellerOrderService implements IOrderListService, IOrderDetailServic |
|
|
|
|
|
|
|
|
|
|
|
public void submitWithCoupon(SellerOrderRelatedBuyerOrderContext sorboc){
|
|
|
SellerOrderChargeParam chargeParam = sorboc.getChargeParam();
|
|
|
chargeParam.setChargeStage(SellerOrderChargeParam.SUBMIT);
|
|
|
public void submitWithCoupon(String couponCode,
|
|
|
String businessClient,
|
|
|
BuyerOrderAssistant.PreparedData preparedData){
|
|
|
SellerOrderGoods psog = preparedData.getSellerOrderGoods();
|
|
|
SellerOrderChargeParam chargeParam = SellerOrderChargeParam.builder()
|
|
|
.chargeStage(SellerOrderChargeParam.SUBMIT).build();
|
|
|
|
|
|
Supplier<SellerOrderComputeResult> computeResultSupplier = ()->sellerFeeService.getSellerOrderComputeResult(psog.getUid(), psog.getId());
|
|
|
SellerOrderRelatedBuyerOrderContext sorboc = SellerOrderContextFactory.builder()
|
|
|
.uid(psog.getUid())
|
|
|
.couponCode(couponCode).businessClient(businessClient)
|
|
|
.chargeParam(chargeParam)
|
|
|
.computeResultSupplier(computeResultSupplier)
|
|
|
.sellerOrderGoods(psog)
|
|
|
.build().buildSellerOrderRelatedBuyerOrderContext();
|
|
|
|
|
|
|
|
|
|
|
|
sellerOrderComputeService.compute(sorboc);
|
|
|
//TODO how to keep atomic,rollback when fail
|
|
|
|
...
|
...
|
@@ -1006,7 +1022,6 @@ public class SellerOrderService implements IOrderListService, IOrderDetailServic |
|
|
|
|
|
CouponBoList couponBoList = CouponSupport.buildOrderCouponBoList(computeResult.getCouponPayResultList());
|
|
|
|
|
|
SellerOrderGoods psog = sorboc.getSkupInfo();
|
|
|
|
|
|
SellerOrder sellerOrder = sellerOrderMapper.selectBySkup(psog.getId());
|
|
|
|
...
|
...
|
|