diff --git a/common.props b/common.props index ce343862..77431ee0 100644 --- a/common.props +++ b/common.props @@ -1,7 +1,7 @@ latest - 2.2.6 + 2.2.7 $(NoWarn);CS1591 true EasyAbp Team diff --git a/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Application/EasyAbp/EShop/Products/Products/ProductViewAppService.cs b/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Application/EasyAbp/EShop/Products/Products/ProductViewAppService.cs index b90c786f..f62addca 100644 --- a/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Application/EasyAbp/EShop/Products/Products/ProductViewAppService.cs +++ b/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Application/EasyAbp/EShop/Products/Products/ProductViewAppService.cs @@ -20,18 +20,18 @@ namespace EasyAbp.EShop.Products.Products private readonly IProductViewCacheKeyProvider _productViewCacheKeyProvider; private readonly IDistributedCache _cache; - private readonly IProductAppService _productAppService; + private readonly IProductRepository _productRepository; private readonly IProductViewRepository _repository; public ProductViewAppService( IProductViewCacheKeyProvider productViewCacheKeyProvider, IDistributedCache cache, - IProductAppService productAppService, + IProductRepository productRepository, IProductViewRepository repository) : base(repository) { _productViewCacheKeyProvider = productViewCacheKeyProvider; _cache = cache; - _productAppService = productAppService; + _productRepository = productRepository; _repository = repository; } @@ -96,18 +96,15 @@ namespace EasyAbp.EShop.Products.Products protected virtual async Task BuildStoreProductViewsAsync(Guid storeId) { - var resultDto = await _productAppService.GetListAsync(new GetProductListInput - { - StoreId = storeId - }); + var products = await _productRepository.GetListAsync(x => x.StoreId == storeId); using var uow = UnitOfWorkManager.Begin(true, true); await _repository.DeleteAsync(x => x.StoreId == storeId, true); - foreach (var product in resultDto.Items) + foreach (var product in products) { - await _repository.InsertAsync(ObjectMapper.Map(product)); + await _repository.InsertAsync(ObjectMapper.Map(product)); } await uow.CompleteAsync(); diff --git a/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Application/EasyAbp/EShop/Products/ProductsApplicationAutoMapperProfile.cs b/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Application/EasyAbp/EShop/Products/ProductsApplicationAutoMapperProfile.cs index 2d1d94a1..43c98589 100644 --- a/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Application/EasyAbp/EShop/Products/ProductsApplicationAutoMapperProfile.cs +++ b/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Application/EasyAbp/EShop/Products/ProductsApplicationAutoMapperProfile.cs @@ -67,7 +67,7 @@ namespace EasyAbp.EShop.Products CreateMap(); CreateMap(); CreateMap(); - CreateMap(MemberList.Destination); + CreateMap(MemberList.Destination); } } }