diff --git a/plugins/Baskets/src/EasyAbp.EShop.Plugins.Baskets.Application/EasyAbp/EShop/Plugins/Baskets/BasketItems/BasicBasketItemProductInfoUpdater.cs b/plugins/Baskets/src/EasyAbp.EShop.Plugins.Baskets.Application/EasyAbp/EShop/Plugins/Baskets/BasketItems/BasicBasketItemProductInfoUpdater.cs index bebfd596..83cbaa78 100644 --- a/plugins/Baskets/src/EasyAbp.EShop.Plugins.Baskets.Application/EasyAbp/EShop/Plugins/Baskets/BasketItems/BasicBasketItemProductInfoUpdater.cs +++ b/plugins/Baskets/src/EasyAbp.EShop.Plugins.Baskets.Application/EasyAbp/EShop/Plugins/Baskets/BasketItems/BasicBasketItemProductInfoUpdater.cs @@ -1,3 +1,4 @@ +using System; using System.Threading.Tasks; using EasyAbp.EShop.Products.Products; using EasyAbp.EShop.Products.Products.Dtos; @@ -31,7 +32,6 @@ public class BasicBasketItemProductInfoUpdater : IBasketItemProductInfoUpdater, if (productSkuDto == null) { item.SetIsInvalid(true); - return; } @@ -52,11 +52,19 @@ public class BasicBasketItemProductInfoUpdater : IBasketItemProductInfoUpdater, if (productDto.InventoryStrategy != InventoryStrategy.NoNeed && targetQuantity > productSkuDto.Inventory) { item.SetIsInvalid(true); + return; } if (!productDto.IsPublished) { item.SetIsInvalid(true); + return; + } + + if (!targetQuantity.IsBetween(productSkuDto.OrderMinQuantity, productSkuDto.OrderMaxQuantity)) + { + item.SetIsInvalid(true); + return; } } } \ No newline at end of file