...
|
...
|
@@ -118,6 +118,15 @@ public class SellerOrderService { |
|
|
throw new GatewayException(400, "商品不存在");
|
|
|
}
|
|
|
context.setSoldProduct(goodsInfo);
|
|
|
StorageLeastPriceResp leastPriceResp = ufoServiceCaller.call("ufo.product.storage.leastprice", storageId);
|
|
|
BigDecimal leastPrice;
|
|
|
if (Objects.isNull(leastPriceResp) || Objects.isNull(leastPrice = leastPriceResp.getLeastPrice()) || leastPrice.doubleValue() == 0D){
|
|
|
throw new GatewayException(501, "无法比对商品最低价");
|
|
|
}
|
|
|
if (goodsInfo.getPrice().subtract(leastPrice).doubleValue() < 0D){
|
|
|
log.warn("in computePublishPrd,leastPrice {}, req {}", leastPrice, req);
|
|
|
throw new GatewayException(501, "设定的价格低于商品最低价");
|
|
|
}
|
|
|
// compute every fee from price
|
|
|
SellerOrderComputeResult computeResult = computeHandler.compute(goodsInfo.getPrice());
|
|
|
log.info("in publishPrd , uid {}, storageId {}, price {}, computeResult {}", uid, storageId,
|
...
|
...
|
|