Commit ee7d1d50176084126f918f596fb896da4e3f9491
1 parent
cf0ee966
【BUG】解决运费计算错误的问题
Showing
1 changed file
with
5 additions
and
4 deletions
yudao-module-mall/yudao-module-trade-biz/src/main/java/cn/iocoder/yudao/module/trade/service/price/calculator/TradeDeliveryPriceCalculator.java
| @@ -123,10 +123,11 @@ public class TradeDeliveryPriceCalculator implements TradePriceCalculator { | @@ -123,10 +123,11 @@ public class TradeDeliveryPriceCalculator implements TradePriceCalculator { | ||
| 123 | private boolean isGlobalExpressFree(TradePriceCalculateRespBO result) { | 123 | private boolean isGlobalExpressFree(TradePriceCalculateRespBO result) { |
| 124 | 124 | ||
| 125 | TradeConfigDO config = tradeConfigService.getTradeConfig(); | 125 | TradeConfigDO config = tradeConfigService.getTradeConfig(); |
| 126 | - return config == null | ||
| 127 | - || Boolean.TRUE.equals(config.getDeliveryExpressFreeEnabled()) // 开启包邮 | ||
| 128 | - || result.getFreeDelivery() //满减包邮 | ||
| 129 | - || result.getPrice().getPayPrice() >= config.getDeliveryExpressFreePrice(); // 满足包邮的价格 | 126 | + return result.getFreeDelivery() || |
| 127 | + (config != null | ||
| 128 | + && Boolean.TRUE.equals(config.getDeliveryExpressFreeEnabled()) // 开启包邮 | ||
| 129 | + && result.getPrice().getPayPrice() >= config.getDeliveryExpressFreePrice() | ||
| 130 | + ); // 满足包邮的价格 | ||
| 130 | } | 131 | } |
| 131 | 132 | ||
| 132 | private void calculateDeliveryPrice(List<OrderItem> selectedSkus, | 133 | private void calculateDeliveryPrice(List<OrderItem> selectedSkus, |