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