...
|
...
|
@@ -26,6 +26,7 @@ import com.yohoufo.order.convert.SellerOrderConvertor; |
|
|
import com.yohoufo.order.event.*;
|
|
|
import com.yohoufo.order.model.SellerOrderContext;
|
|
|
import com.yohoufo.order.model.SellerOrderRelatedBuyerOrderContext;
|
|
|
import com.yohoufo.order.model.bo.CouponBoList;
|
|
|
import com.yohoufo.order.model.dto.*;
|
|
|
import com.yohoufo.order.model.request.OrderListRequest;
|
|
|
import com.yohoufo.order.model.request.OrderRequest;
|
...
|
...
|
@@ -53,6 +54,8 @@ import com.yohoufo.order.service.seller.orderMeta.SellerFeeService; |
|
|
import com.yohoufo.order.service.seller.processor.*;
|
|
|
import com.yohoufo.order.service.seller.setting.SellerService;
|
|
|
import com.yohoufo.order.service.seller.setting.SellerWrapper;
|
|
|
import com.yohoufo.order.service.seller.trade.SellerOrderSubmitService;
|
|
|
import com.yohoufo.order.service.support.CouponSupport;
|
|
|
import com.yohoufo.order.service.support.codegenerator.OrderCodeGenerator;
|
|
|
import com.yohoufo.order.service.support.codegenerator.bean.CodeMeta;
|
|
|
import com.yohoufo.order.utils.LoggerUtils;
|
...
|
...
|
@@ -177,6 +180,9 @@ public class SellerOrderService implements IOrderListService, IOrderDetailServic |
|
|
@Autowired
|
|
|
private BuyerOrderAssistant buyerOrderAssistant;
|
|
|
|
|
|
@Autowired
|
|
|
private SellerOrderSubmitService sellerOrderSubmitService;
|
|
|
|
|
|
private static final int MAX_DEAL = 10;
|
|
|
|
|
|
public SoldPrdComputeBo computePublishPrd(SellerOrderComputeReq req) {
|
...
|
...
|
@@ -988,12 +994,35 @@ public class SellerOrderService implements IOrderListService, IOrderDetailServic |
|
|
|
|
|
|
|
|
|
|
|
public boolean submitWithCoupon(SellerOrderRelatedBuyerOrderContext sorboc){
|
|
|
public void submitWithCoupon(SellerOrderRelatedBuyerOrderContext sorboc){
|
|
|
SellerOrderChargeParam chargeParam = sorboc.getChargeParam();
|
|
|
chargeParam.setChargeStage(SellerOrderChargeParam.SUBMIT);
|
|
|
sellerOrderComputeService.compute(sorboc);
|
|
|
//TODO how to keep atomic,rollback when fail
|
|
|
|
|
|
|
|
|
//after compute, may be reset
|
|
|
SellerOrderComputeResult computeResult = sorboc.getSellerOrderComputeResult();
|
|
|
|
|
|
CouponBoList couponBoList = CouponSupport.buildOrderCouponBoList(computeResult.getCouponPayResultList());
|
|
|
|
|
|
SellerOrderGoods psog = sorboc.getSkupInfo();
|
|
|
|
|
|
SellerOrder sellerOrder = sellerOrderMapper.selectBySkup(psog.getId());
|
|
|
|
|
|
SellerOrderSubmitDTO submitDTO = SellerOrderSubmitDTO.builder()
|
|
|
.sellerOrder(sellerOrder)
|
|
|
.couponBoList(couponBoList)
|
|
|
.computeResult(computeResult)
|
|
|
.build();
|
|
|
sellerOrderSubmitService.submitByOld(submitDTO);
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public void cancelWithCoupon(){
|
|
|
|
|
|
|
|
|
return false;
|
|
|
}
|
|
|
|
|
|
|
...
|
...
|
|