From d76c1c73d9ba89ff94705631f47a93554e71f205 Mon Sep 17 00:00:00 2001 From: Jadyn Date: Sat, 2 Jul 2022 18:17:24 +0800 Subject: [PATCH] Remove unnecessary services --- .../FlashSalesPlans/FlashSalesPlanAppService.cs | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/plugins/FlashSales/src/EasyAbp.EShop.Plugins.FlashSales.Application/EasyAbp/EShop/Plugins/FlashSales/FlashSalesPlans/FlashSalesPlanAppService.cs b/plugins/FlashSales/src/EasyAbp.EShop.Plugins.FlashSales.Application/EasyAbp/EShop/Plugins/FlashSales/FlashSalesPlans/FlashSalesPlanAppService.cs index db951ed3..c51f6579 100644 --- a/plugins/FlashSales/src/EasyAbp.EShop.Plugins.FlashSales.Application/EasyAbp/EShop/Plugins/FlashSales/FlashSalesPlans/FlashSalesPlanAppService.cs +++ b/plugins/FlashSales/src/EasyAbp.EShop.Plugins.FlashSales.Application/EasyAbp/EShop/Plugins/FlashSales/FlashSalesPlans/FlashSalesPlanAppService.cs @@ -4,7 +4,6 @@ using System.Threading.Tasks; using EasyAbp.EShop.Plugins.FlashSales.FlashSalesPlans.Dtos; using EasyAbp.EShop.Plugins.FlashSales.FlashSalesResults; using EasyAbp.EShop.Plugins.FlashSales.Permissions; -using EasyAbp.EShop.Products.ProductDetails; using EasyAbp.EShop.Products.Products; using EasyAbp.EShop.Products.Products.Dtos; using EasyAbp.EShop.Stores.Authorization; @@ -37,8 +36,6 @@ public class FlashSalesPlanAppService : protected IProductAppService ProductAppService { get; } - protected IProductDetailAppService ProductDetailAppService { get; } - protected IDistributedCache TokenDistributedCache { get; } protected IDistributedCache DistributedCache { get; } @@ -54,7 +51,6 @@ public class FlashSalesPlanAppService : public FlashSalesPlanAppService( IFlashSalesPlanRepository flashSalesPlanRepository, IProductAppService productAppService, - IProductDetailAppService productDetailAppService, IDistributedCache tokenDistributedCache, IDistributedCache distributedCache, IDistributedEventBus distributedEventBus, @@ -65,7 +61,6 @@ public class FlashSalesPlanAppService : { FlashSalesPlanRepository = flashSalesPlanRepository; ProductAppService = productAppService; - ProductDetailAppService = productDetailAppService; TokenDistributedCache = tokenDistributedCache; DistributedCache = distributedCache; DistributedEventBus = distributedEventBus; @@ -232,7 +227,7 @@ public class FlashSalesPlanAppService : throw new BusinessException(FlashSalesErrorCodes.ProductSkuInventoryExceeded); } - if (!await ComparekHashTokenAsync(cacheHashToken, plan, product, productSku)) + if (!await CompareHashTokenAsync(cacheHashToken, plan, product, productSku)) { throw new BusinessException(FlashSalesErrorCodes.PreOrderExpried); } @@ -340,7 +335,7 @@ public class FlashSalesPlanAppService : }); } - protected virtual async Task ComparekHashTokenAsync(string cacheHashToken, FlashSalesPlanCacheItem plan, ProductDto product, ProductSkuDto productSku) + protected virtual async Task CompareHashTokenAsync(string cacheHashToken, FlashSalesPlanCacheItem plan, ProductDto product, ProductSkuDto productSku) { if (cacheHashToken.IsNullOrWhiteSpace()) {