mirror of
				https://github.com/YunaiV/ruoyi-vue-pro.git
				synced 2025-10-31 18:49:06 +08:00 
			
		
		
		
	【缺陷修复】商城:全局包邮判断
This commit is contained in:
		| @ -122,9 +122,13 @@ 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 |         // 情况一:交易中心配置不存在默认不包邮 | ||||||
|                 || Boolean.TRUE.equals(config.getDeliveryExpressFreeEnabled()) // 开启包邮 |         if (config == null) { | ||||||
|                 || result.getPrice().getPayPrice() >= config.getDeliveryExpressFreePrice(); // 满足包邮的价格 |             return false; | ||||||
|  |         } | ||||||
|  |         // 情况二:开启了全局包邮 && 满足包邮金额 | ||||||
|  |         return Boolean.TRUE.equals(config.getDeliveryExpressFreeEnabled()) && | ||||||
|  |                 result.getPrice().getPayPrice() >= config.getDeliveryExpressFreePrice(); | ||||||
|     } |     } | ||||||
|  |  | ||||||
|     private void calculateDeliveryPrice(List<OrderItem> selectedSkus, |     private void calculateDeliveryPrice(List<OrderItem> selectedSkus, | ||||||
|  | |||||||
		Reference in New Issue
	
	Block a user
	 puhui999
					puhui999