...
|
...
|
@@ -147,6 +147,8 @@ public class SellerOrderService implements IOrderListService, IOrderDetailServi |
|
|
log.info("in computePublishPrd, req {}", req);
|
|
|
PriceComputePrepareProcessor.PriceComputeNode pcn = priceComputePrepareProcessor.checkBasePrice(req);
|
|
|
int uid = pcn.getUid();
|
|
|
|
|
|
|
|
|
Integer storageId = pcn.getStorageId();
|
|
|
int num = pcn.getNum();
|
|
|
BigDecimal salePrice = pcn.getPrdPrice();
|
...
|
...
|
@@ -157,8 +159,8 @@ public class SellerOrderService implements IOrderListService, IOrderDetailServi |
|
|
}catch (UfoServiceException ex){
|
|
|
tips = ex.getErrorMessage();
|
|
|
}
|
|
|
|
|
|
SoldPrdComputeBo spc = buildSoldPrdComputeBo(uid, num, salePrice);
|
|
|
boolean isSuper = sellerService.isSuperEntrySeller(uid);
|
|
|
SoldPrdComputeBo spc = buildSoldPrdComputeBo(uid, num, salePrice, isSuper);
|
|
|
spc.setTips(tips);
|
|
|
return spc;
|
|
|
}
|
...
|
...
|
@@ -259,7 +261,8 @@ public class SellerOrderService implements IOrderListService, IOrderDetailServi |
|
|
boolean isSurper = sellerService.isSuperEntrySeller(uid);
|
|
|
SellerOrderComputeResult socr = ctx.getSellerOrderComputeResult();
|
|
|
BigDecimal singleEarestMoney = socr.getEarnestMoney().getEarnestMoney();
|
|
|
BigDecimal mEarestMoney = sellerOrderPrepareProcessor.checkNGetMergeEarnestMoney(uid, singleEarestMoney, num, ctx.getSalePrice());
|
|
|
BigDecimal mEarestMoney = sellerOrderPrepareProcessor.checkNGetMergeEarnestMoney(uid, singleEarestMoney,
|
|
|
num, ctx.getSalePrice(), isSurper);
|
|
|
SellerWalletDetail.Type swdType = SellerWalletDetail.Type.PUBLISH;
|
|
|
MerchantOrderAttachInfo moai = MerchantOrderAttachInfo.builder().uid(uid)
|
|
|
.storageId(ctx.getStorageId()).earnestMoney(mEarestMoney)
|
...
|
...
|
@@ -484,13 +487,14 @@ public class SellerOrderService implements IOrderListService, IOrderDetailServi |
|
|
}
|
|
|
}
|
|
|
|
|
|
private SoldPrdComputeBo buildSoldPrdComputeBo(int uid, int num, BigDecimal prdPrice){
|
|
|
private SoldPrdComputeBo buildSoldPrdComputeBo(int uid, int num, BigDecimal prdPrice, boolean isSuper){
|
|
|
SellerOrderComputeResult computeResult = computeHandler.compute(prdPrice);
|
|
|
/**
|
|
|
* 验证是否是入驻商家
|
|
|
*/
|
|
|
if(sellerOrderPrepareProcessor.checkIsEntry(uid)){
|
|
|
sellerOrderPrepareProcessor.checkNGetMergeEarnestMoney(uid, computeResult.getEarnestMoney().getEarnestMoney(), num, prdPrice);
|
|
|
sellerOrderPrepareProcessor.checkNGetMergeEarnestMoney(uid,
|
|
|
computeResult.getEarnestMoney().getEarnestMoney(), num, prdPrice, isSuper);
|
|
|
}
|
|
|
|
|
|
SoldPrdComputeBo computeBo = SellerOrderConvertor.computeResult2SoldPrdComputeBo(computeResult);
|
...
|
...
|
@@ -568,6 +572,7 @@ public class SellerOrderService implements IOrderListService, IOrderDetailServi |
|
|
ChangePricePrepareDTO cppDto = changePricePrepareProcessor.checkAndAcquire(req);
|
|
|
BigDecimal preSalePrice = cppDto.getPreSalePrice(),
|
|
|
salePrice = cppDto.getSalePrice();
|
|
|
boolean isSurper = cppDto.isSuper();
|
|
|
int uid = req.getUid();
|
|
|
Map<Integer, SkupDto> skupMap = cppDto.getSkupMap();
|
|
|
SellerOrderComputeResult computeResult = cppDto.getComputeResult();
|
...
|
...
|
@@ -583,7 +588,7 @@ public class SellerOrderService implements IOrderListService, IOrderDetailServi |
|
|
.earnestMoney(totalDiffMoney).productCount(skupMap.size())
|
|
|
.seriNo(String.valueOf(req.getBatchNo()))
|
|
|
.type(swdType.getValue()).build();
|
|
|
boolean isSurper = sellerService.isSuperEntrySeller(uid);
|
|
|
|
|
|
SellerWallet sellerWallet = isSurper ? new SellerWallet() : merchantOrderPaymentService.changePriceUseEarnest(uid, totalDiffMoney, moai);
|
|
|
int successCnt = 0;
|
|
|
int failCnt = 0;
|
...
|
...
|
|