diff --git a/plugins/Baskets/src/EasyAbp.EShop.Plugins.Baskets.Application/EasyAbp/EShop/Plugins/Baskets/BasketItems/BasketItemAppService.cs b/plugins/Baskets/src/EasyAbp.EShop.Plugins.Baskets.Application/EasyAbp/EShop/Plugins/Baskets/BasketItems/BasketItemAppService.cs index ffb639e8..f58bbea8 100644 --- a/plugins/Baskets/src/EasyAbp.EShop.Plugins.Baskets.Application/EasyAbp/EShop/Plugins/Baskets/BasketItems/BasketItemAppService.cs +++ b/plugins/Baskets/src/EasyAbp.EShop.Plugins.Baskets.Application/EasyAbp/EShop/Plugins/Baskets/BasketItems/BasketItemAppService.cs @@ -130,9 +130,19 @@ namespace EasyAbp.EShop.Plugins.Baskets.BasketItems var updaters = LazyServiceProvider.LazyGetRequiredService>(); - foreach (var updater in updaters) + if (CurrentUser.IsAuthenticated) { - await updater.UpdateForIdentifiedAsync(targetQuantity, item, productDto); + foreach (var updater in updaters) + { + await updater.UpdateForIdentifiedAsync(targetQuantity, item, productDto); + } + } + else + { + foreach (var updater in updaters) + { + await updater.UpdateForAnonymousAsync(targetQuantity, item, productDto); + } } }