【BUG】解决运费计算错误的问题

This commit is contained in:
痴货 2024-09-14 20:04:48 +08:00
parent cf0ee966c8
commit ee7d1d5017

View File

@ -123,10 +123,11 @@ public class TradeDeliveryPriceCalculator implements TradePriceCalculator {
private boolean isGlobalExpressFree(TradePriceCalculateRespBO result) { private boolean isGlobalExpressFree(TradePriceCalculateRespBO result) {
TradeConfigDO config = tradeConfigService.getTradeConfig(); TradeConfigDO config = tradeConfigService.getTradeConfig();
return config == null return result.getFreeDelivery() ||
|| Boolean.TRUE.equals(config.getDeliveryExpressFreeEnabled()) // 开启包邮 (config != null
|| result.getFreeDelivery() //满减包邮 && Boolean.TRUE.equals(config.getDeliveryExpressFreeEnabled()) // 开启包邮
|| result.getPrice().getPayPrice() >= config.getDeliveryExpressFreePrice(); // 满足包邮的价格 && result.getPrice().getPayPrice() >= config.getDeliveryExpressFreePrice()
); // 满足包邮的价格
} }
private void calculateDeliveryPrice(List<OrderItem> selectedSkus, private void calculateDeliveryPrice(List<OrderItem> selectedSkus,