Browse Source

Use `UpdateForAnonymousAsync`

pull/190/head
gdlcf88 4 years ago
parent
commit
68af8c0fe3
  1. 14
      plugins/Baskets/src/EasyAbp.EShop.Plugins.Baskets.Application/EasyAbp/EShop/Plugins/Baskets/BasketItems/BasketItemAppService.cs

14
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<IEnumerable<IBasketItemProductInfoUpdater>>();
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);
}
}
}

Loading…
Cancel
Save