...
|
...
|
@@ -162,7 +162,7 @@ public class SellerOrderService implements IOrderListService, IOrderDetailServi |
|
|
int num = pcn.getNum();
|
|
|
BigDecimal salePrice = pcn.getPrdPrice();
|
|
|
String tips = null;
|
|
|
PrdPrice prdPrice = sellerOrderPrepareProcessor.checkPrice(storageId, salePrice, true);
|
|
|
PrdPrice prdPrice = sellerOrderPrepareProcessor.checkPriceRange(storageId, salePrice, true);
|
|
|
SkupType skupType = SkupType.getSkupType(req.getSkupType());
|
|
|
try {
|
|
|
sellerOrderPrepareProcessor.checkSuggestPrice(prdPrice, salePrice, skupType);
|
...
|
...
|
@@ -912,14 +912,59 @@ public class SellerOrderService implements IOrderListService, IOrderDetailServi |
|
|
return confirmDesc;
|
|
|
}
|
|
|
|
|
|
|
|
|
private SellerOrderGoods rebuildNESReq(SellerOrderComputeReq req){
|
|
|
int uid = req.getUid();
|
|
|
if (uid <=0){
|
|
|
log.warn("in rebuildNESReq uid illegal, req {}", req);
|
|
|
throw new UfoServiceException(400, "参数uid非法");
|
|
|
}
|
|
|
int skup = req.getSkup();
|
|
|
if (skup<=0){
|
|
|
log.warn("in rebuildNESReq find illegal skup code, req {}", req);
|
|
|
throw new UfoServiceException(400, "参数skup非法");
|
|
|
}
|
|
|
SellerOrderGoods psog = sellerOrderGoodsMapper.selectByPrimaryKey(skup);
|
|
|
if (Objects.isNull(psog)){
|
|
|
log.warn("in rebuildNESReq can not find skup in sys, req {}", req);
|
|
|
throw new UfoServiceException(400, "商品不存在");
|
|
|
}
|
|
|
Integer puid = psog.getUid();
|
|
|
if (!puid.equals(uid)){
|
|
|
log.warn("in rebuildNESReq can not find one hacker , req {} sys-uid {}", req, puid);
|
|
|
throw new UfoServiceException(400, "你是猴子么");
|
|
|
}
|
|
|
|
|
|
int storageId = psog.getId();
|
|
|
req.setNum(1);
|
|
|
req.setStorageId(storageId);
|
|
|
return psog;
|
|
|
}
|
|
|
/**
|
|
|
* compute Change Price4 NES(Not Entry Seller)
|
|
|
* @param req
|
|
|
* @return
|
|
|
*/
|
|
|
public SoldPrdComputeBo computeChangePrice4NES(SellerOrderComputeReq req){
|
|
|
|
|
|
return null;
|
|
|
log.info("in computeChangePrice4NES, req {}", req);
|
|
|
rebuildNESReq(req);
|
|
|
PriceComputePrepareProcessor.PriceComputeNode pcn = priceComputePrepareProcessor.checkBasePrice(req);
|
|
|
int uid = pcn.getUid();
|
|
|
Integer storageId = pcn.getStorageId();
|
|
|
int num = pcn.getNum();
|
|
|
BigDecimal salePrice = pcn.getPrdPrice();
|
|
|
String tips = null;
|
|
|
PrdPrice prdPrice = sellerOrderPrepareProcessor.checkPriceRange(storageId, salePrice, true);
|
|
|
SkupType skupType = SkupType.getSkupType(req.getSkupType());
|
|
|
try {
|
|
|
sellerOrderPrepareProcessor.checkSuggestPrice(prdPrice, salePrice, skupType);
|
|
|
}catch (UfoServiceException ex){
|
|
|
tips = ex.getErrorMessage();
|
|
|
}
|
|
|
boolean isSuper = sellerService.isSuperEntrySeller(uid);
|
|
|
SoldPrdComputeBo spc = buildSoldPrdComputeBo(uid, num, salePrice, isSuper, skupType);
|
|
|
spc.setTips(tips);
|
|
|
return spc;
|
|
|
}
|
|
|
|
|
|
/**
|
...
|
...
|
|