|
@@ -147,6 +147,8 @@ public class SellerOrderService implements IOrderListService, IOrderDetailServi |
|
@@ -147,6 +147,8 @@ public class SellerOrderService implements IOrderListService, IOrderDetailServi |
147
|
log.info("in computePublishPrd, req {}", req);
|
147
|
log.info("in computePublishPrd, req {}", req);
|
148
|
PriceComputePrepareProcessor.PriceComputeNode pcn = priceComputePrepareProcessor.checkBasePrice(req);
|
148
|
PriceComputePrepareProcessor.PriceComputeNode pcn = priceComputePrepareProcessor.checkBasePrice(req);
|
149
|
int uid = pcn.getUid();
|
149
|
int uid = pcn.getUid();
|
|
|
150
|
+
|
|
|
151
|
+
|
150
|
Integer storageId = pcn.getStorageId();
|
152
|
Integer storageId = pcn.getStorageId();
|
151
|
int num = pcn.getNum();
|
153
|
int num = pcn.getNum();
|
152
|
BigDecimal salePrice = pcn.getPrdPrice();
|
154
|
BigDecimal salePrice = pcn.getPrdPrice();
|
|
@@ -157,8 +159,8 @@ public class SellerOrderService implements IOrderListService, IOrderDetailServi |
|
@@ -157,8 +159,8 @@ public class SellerOrderService implements IOrderListService, IOrderDetailServi |
157
|
}catch (UfoServiceException ex){
|
159
|
}catch (UfoServiceException ex){
|
158
|
tips = ex.getErrorMessage();
|
160
|
tips = ex.getErrorMessage();
|
159
|
}
|
161
|
}
|
160
|
-
|
|
|
161
|
- SoldPrdComputeBo spc = buildSoldPrdComputeBo(uid, num, salePrice);
|
162
|
+ boolean isSuper = sellerService.isSuperEntrySeller(uid);
|
|
|
163
|
+ SoldPrdComputeBo spc = buildSoldPrdComputeBo(uid, num, salePrice, isSuper);
|
162
|
spc.setTips(tips);
|
164
|
spc.setTips(tips);
|
163
|
return spc;
|
165
|
return spc;
|
164
|
}
|
166
|
}
|
|
@@ -259,7 +261,8 @@ public class SellerOrderService implements IOrderListService, IOrderDetailServi |
|
@@ -259,7 +261,8 @@ public class SellerOrderService implements IOrderListService, IOrderDetailServi |
259
|
boolean isSurper = sellerService.isSuperEntrySeller(uid);
|
261
|
boolean isSurper = sellerService.isSuperEntrySeller(uid);
|
260
|
SellerOrderComputeResult socr = ctx.getSellerOrderComputeResult();
|
262
|
SellerOrderComputeResult socr = ctx.getSellerOrderComputeResult();
|
261
|
BigDecimal singleEarestMoney = socr.getEarnestMoney().getEarnestMoney();
|
263
|
BigDecimal singleEarestMoney = socr.getEarnestMoney().getEarnestMoney();
|
262
|
- BigDecimal mEarestMoney = sellerOrderPrepareProcessor.checkNGetMergeEarnestMoney(uid, singleEarestMoney, num, ctx.getSalePrice());
|
264
|
+ BigDecimal mEarestMoney = sellerOrderPrepareProcessor.checkNGetMergeEarnestMoney(uid, singleEarestMoney,
|
|
|
265
|
+ num, ctx.getSalePrice(), isSurper);
|
263
|
SellerWalletDetail.Type swdType = SellerWalletDetail.Type.PUBLISH;
|
266
|
SellerWalletDetail.Type swdType = SellerWalletDetail.Type.PUBLISH;
|
264
|
MerchantOrderAttachInfo moai = MerchantOrderAttachInfo.builder().uid(uid)
|
267
|
MerchantOrderAttachInfo moai = MerchantOrderAttachInfo.builder().uid(uid)
|
265
|
.storageId(ctx.getStorageId()).earnestMoney(mEarestMoney)
|
268
|
.storageId(ctx.getStorageId()).earnestMoney(mEarestMoney)
|
|
@@ -484,13 +487,14 @@ public class SellerOrderService implements IOrderListService, IOrderDetailServi |
|
@@ -484,13 +487,14 @@ public class SellerOrderService implements IOrderListService, IOrderDetailServi |
484
|
}
|
487
|
}
|
485
|
}
|
488
|
}
|
486
|
|
489
|
|
487
|
- private SoldPrdComputeBo buildSoldPrdComputeBo(int uid, int num, BigDecimal prdPrice){
|
490
|
+ private SoldPrdComputeBo buildSoldPrdComputeBo(int uid, int num, BigDecimal prdPrice, boolean isSuper){
|
488
|
SellerOrderComputeResult computeResult = computeHandler.compute(prdPrice);
|
491
|
SellerOrderComputeResult computeResult = computeHandler.compute(prdPrice);
|
489
|
/**
|
492
|
/**
|
490
|
* 验证是否是入驻商家
|
493
|
* 验证是否是入驻商家
|
491
|
*/
|
494
|
*/
|
492
|
if(sellerOrderPrepareProcessor.checkIsEntry(uid)){
|
495
|
if(sellerOrderPrepareProcessor.checkIsEntry(uid)){
|
493
|
- sellerOrderPrepareProcessor.checkNGetMergeEarnestMoney(uid, computeResult.getEarnestMoney().getEarnestMoney(), num, prdPrice);
|
496
|
+ sellerOrderPrepareProcessor.checkNGetMergeEarnestMoney(uid,
|
|
|
497
|
+ computeResult.getEarnestMoney().getEarnestMoney(), num, prdPrice, isSuper);
|
494
|
}
|
498
|
}
|
495
|
|
499
|
|
496
|
SoldPrdComputeBo computeBo = SellerOrderConvertor.computeResult2SoldPrdComputeBo(computeResult);
|
500
|
SoldPrdComputeBo computeBo = SellerOrderConvertor.computeResult2SoldPrdComputeBo(computeResult);
|
|
@@ -568,6 +572,7 @@ public class SellerOrderService implements IOrderListService, IOrderDetailServi |
|
@@ -568,6 +572,7 @@ public class SellerOrderService implements IOrderListService, IOrderDetailServi |
568
|
ChangePricePrepareDTO cppDto = changePricePrepareProcessor.checkAndAcquire(req);
|
572
|
ChangePricePrepareDTO cppDto = changePricePrepareProcessor.checkAndAcquire(req);
|
569
|
BigDecimal preSalePrice = cppDto.getPreSalePrice(),
|
573
|
BigDecimal preSalePrice = cppDto.getPreSalePrice(),
|
570
|
salePrice = cppDto.getSalePrice();
|
574
|
salePrice = cppDto.getSalePrice();
|
|
|
575
|
+ boolean isSurper = cppDto.isSuper();
|
571
|
int uid = req.getUid();
|
576
|
int uid = req.getUid();
|
572
|
Map<Integer, SkupDto> skupMap = cppDto.getSkupMap();
|
577
|
Map<Integer, SkupDto> skupMap = cppDto.getSkupMap();
|
573
|
SellerOrderComputeResult computeResult = cppDto.getComputeResult();
|
578
|
SellerOrderComputeResult computeResult = cppDto.getComputeResult();
|
|
@@ -583,7 +588,7 @@ public class SellerOrderService implements IOrderListService, IOrderDetailServi |
|
@@ -583,7 +588,7 @@ public class SellerOrderService implements IOrderListService, IOrderDetailServi |
583
|
.earnestMoney(totalDiffMoney).productCount(skupMap.size())
|
588
|
.earnestMoney(totalDiffMoney).productCount(skupMap.size())
|
584
|
.seriNo(String.valueOf(req.getBatchNo()))
|
589
|
.seriNo(String.valueOf(req.getBatchNo()))
|
585
|
.type(swdType.getValue()).build();
|
590
|
.type(swdType.getValue()).build();
|
586
|
- boolean isSurper = sellerService.isSuperEntrySeller(uid);
|
591
|
+
|
587
|
SellerWallet sellerWallet = isSurper ? new SellerWallet() : merchantOrderPaymentService.changePriceUseEarnest(uid, totalDiffMoney, moai);
|
592
|
SellerWallet sellerWallet = isSurper ? new SellerWallet() : merchantOrderPaymentService.changePriceUseEarnest(uid, totalDiffMoney, moai);
|
588
|
int successCnt = 0;
|
593
|
int successCnt = 0;
|
589
|
int failCnt = 0;
|
594
|
int failCnt = 0;
|