From 28c4b7b6406ca0fba918407d881aa1d636e69c1e Mon Sep 17 00:00:00 2001 From: Jadyn Date: Thu, 7 Jul 2022 01:15:00 +0800 Subject: [PATCH] Fix the missing part by rename to `FlashSalePlan` and `FlashSaleResult` --- .../CreateFlashSaleOrderEventHandler.cs | 1 - .../FlashSalePlans/FlashSalePlanAppService.cs | 27 +++++++++---------- .../FlashSalePlanCacheInvalidator.cs | 3 +-- .../FlashSalePlans/FlashSalePlanCacheItem.cs | 2 +- .../ProductIsNotInThisStoreException.cs | 2 +- .../ProductSkuIsNotFoundException.cs | 2 +- .../RelatedFlashSaleResultsExistException.cs | 3 +-- .../UnexpectedInventoryStrategyException.cs | 3 ++- .../FlashSaleResultAppService.cs | 15 +++++------ .../FlashSalesApplicationAutoMapperProfile.cs | 1 - .../CreateFlashSaleOrderCompleteEto.cs | 2 +- ...reateFlashSaleOrderCompleteEventHandler.cs | 16 +++++------ .../FlashSalePlans/FlashSalePlan/index.js | 2 +- .../FlashSaleResult/Index.cshtml | 2 +- .../FlashSaleResult/Index.cshtml.cs | 2 +- .../FlashSaleReduceInventoryEventHandler.cs | 1 - 16 files changed, 39 insertions(+), 45 deletions(-) diff --git a/plugins/FlashSales/src/EasyAbp.EShop.Orders.Plugins.FlashSales.Application/EasyAbp/EShop/Orders/Orders/CreateFlashSaleOrderEventHandler.cs b/plugins/FlashSales/src/EasyAbp.EShop.Orders.Plugins.FlashSales.Application/EasyAbp/EShop/Orders/Orders/CreateFlashSaleOrderEventHandler.cs index b381f7c0..441f4234 100644 --- a/plugins/FlashSales/src/EasyAbp.EShop.Orders.Plugins.FlashSales.Application/EasyAbp/EShop/Orders/Orders/CreateFlashSaleOrderEventHandler.cs +++ b/plugins/FlashSales/src/EasyAbp.EShop.Orders.Plugins.FlashSales.Application/EasyAbp/EShop/Orders/Orders/CreateFlashSaleOrderEventHandler.cs @@ -3,7 +3,6 @@ using System.Collections.Generic; using System.Threading.Tasks; using EasyAbp.EShop.Orders.Orders.Dtos; using EasyAbp.EShop.Plugins.FlashSales.FlashSalePlans; -using EasyAbp.EShop.Plugins.FlashSales.FlashSalesPlans; using EasyAbp.EShop.Products.ProductDetails.Dtos; using EasyAbp.EShop.Products.Products.Dtos; using Volo.Abp.DependencyInjection; diff --git a/plugins/FlashSales/src/EasyAbp.EShop.Plugins.FlashSales.Application/EasyAbp/EShop/Plugins/FlashSales/FlashSalePlans/FlashSalePlanAppService.cs b/plugins/FlashSales/src/EasyAbp.EShop.Plugins.FlashSales.Application/EasyAbp/EShop/Plugins/FlashSales/FlashSalePlans/FlashSalePlanAppService.cs index 06b0c5e0..6fb4fa52 100644 --- a/plugins/FlashSales/src/EasyAbp.EShop.Plugins.FlashSales.Application/EasyAbp/EShop/Plugins/FlashSales/FlashSalePlans/FlashSalePlanAppService.cs +++ b/plugins/FlashSales/src/EasyAbp.EShop.Plugins.FlashSales.Application/EasyAbp/EShop/Plugins/FlashSales/FlashSalePlans/FlashSalePlanAppService.cs @@ -1,7 +1,6 @@ using System; using System.Linq; using System.Threading.Tasks; -using EasyAbp.EShop.Plugins.FlashSales.FlashSalePlans; using EasyAbp.EShop.Plugins.FlashSales.FlashSalePlans.Dtos; using EasyAbp.EShop.Plugins.FlashSales.FlashSaleResults; using EasyAbp.EShop.Plugins.FlashSales.Permissions; @@ -20,7 +19,7 @@ using Volo.Abp.Domain.Repositories; using Volo.Abp.EventBus.Distributed; using Volo.Abp.Users; -namespace EasyAbp.EShop.Plugins.FlashSales.FlashSalesPlans; +namespace EasyAbp.EShop.Plugins.FlashSales.FlashSalePlans; [Authorize] public class FlashSalePlanAppService : @@ -48,7 +47,7 @@ public class FlashSalePlanAppService : protected IAbpDistributedLock DistributedLock { get; } - protected IFlashSalePlanHasher FlashSalesPlanHasher { get; } + protected IFlashSalePlanHasher FlashSalePlanHasher { get; } public FlashSalePlanAppService( IFlashSalePlanRepository flashSalePlanRepository, @@ -58,7 +57,7 @@ public class FlashSalePlanAppService : IDistributedEventBus distributedEventBus, IFlashSaleResultRepository flashSaleResultRepository, IAbpDistributedLock distributedLock, - IFlashSalePlanHasher flashSalesPlanHasher) + IFlashSalePlanHasher flashSalePlanHasher) : base(flashSalePlanRepository) { FlashSalePlanRepository = flashSalePlanRepository; @@ -68,7 +67,7 @@ public class FlashSalePlanAppService : DistributedEventBus = distributedEventBus; FlashSaleResultRepository = flashSaleResultRepository; DistributedLock = distributedLock; - FlashSalesPlanHasher = flashSalesPlanHasher; + FlashSalePlanHasher = flashSalePlanHasher; } public override async Task GetAsync(Guid id) @@ -127,7 +126,7 @@ public class FlashSalePlanAppService : await ValidateCreateOrUpdateProductAsync(input.ProductId, product, input.ProductSkuId, productSku, flashSalePlan.StoreId); - if (await ExistRelatedFlashSalesResultsAsync(id) && (input.ProductId != flashSalePlan.ProductId || input.ProductSkuId != flashSalePlan.ProductSkuId)) + if (await ExistRelatedFlashSaleResultsAsync(id) && (input.ProductId != flashSalePlan.ProductId || input.ProductSkuId != flashSalePlan.ProductSkuId)) { throw new RelatedFlashSaleResultsExistException(id); } @@ -149,7 +148,7 @@ public class FlashSalePlanAppService : await CheckMultiStorePolicyAsync(flashSalePlan.StoreId, DeletePolicyName); - if (await ExistRelatedFlashSalesResultsAsync(id)) + if (await ExistRelatedFlashSaleResultsAsync(id)) { throw new RelatedFlashSaleResultsExistException(id); } @@ -229,7 +228,7 @@ public class FlashSalePlanAppService : var userId = CurrentUser.GetId(); - var result = await CreatePendingFlashSalesResultAsync(plan, userId); + var result = await CreatePendingFlashSaleResultAsync(plan, userId); var flashSalesReduceInventoryEto = await PrepareFlashSalesReduceInventoryEtoAsync(plan, result.Id, input, userId, now, cacheHashToken); @@ -276,8 +275,8 @@ public class FlashSalePlanAppService : { return await DistributedCache.GetOrAddAsync(id, async () => { - var flashSalesPlan = await FlashSalePlanRepository.GetAsync(id); - return ObjectMapper.Map(flashSalesPlan); + var flashSalePlan = await FlashSalePlanRepository.GetAsync(id); + return ObjectMapper.Map(flashSalePlan); }); } @@ -298,7 +297,7 @@ public class FlashSalePlanAppService : protected virtual async Task SetCacheHashTokenAsync(FlashSalePlanCacheItem plan, ProductDto product, ProductSkuDto productSku) { - var hashToken = await FlashSalesPlanHasher.HashAsync(plan.LastModificationTime, product.LastModificationTime, productSku.LastModificationTime); + var hashToken = await FlashSalePlanHasher.HashAsync(plan.LastModificationTime, product.LastModificationTime, productSku.LastModificationTime); await TokenDistributedCache.SetStringAsync(await GetCacheKeyAsync(plan), hashToken, new DistributedCacheEntryOptions() { @@ -313,12 +312,12 @@ public class FlashSalePlanAppService : return false; } - var hashToken = await FlashSalesPlanHasher.HashAsync(plan.LastModificationTime, product.LastModificationTime, productSku.LastModificationTime); + var hashToken = await FlashSalePlanHasher.HashAsync(plan.LastModificationTime, product.LastModificationTime, productSku.LastModificationTime); return cacheHashToken == hashToken; } - protected virtual async Task CreatePendingFlashSalesResultAsync(FlashSalePlanCacheItem plan, Guid userId) + protected virtual async Task CreatePendingFlashSaleResultAsync(FlashSalePlanCacheItem plan, Guid userId) { var lockKey = $"create-flash-sales-order-{plan.Id}-{userId}"; @@ -380,7 +379,7 @@ public class FlashSalePlanAppService : return Task.CompletedTask; } - protected virtual async Task ExistRelatedFlashSalesResultsAsync(Guid planId) + protected virtual async Task ExistRelatedFlashSaleResultsAsync(Guid planId) { return await FlashSaleResultRepository.AnyAsync(x => x.PlanId == planId); } diff --git a/plugins/FlashSales/src/EasyAbp.EShop.Plugins.FlashSales.Application/EasyAbp/EShop/Plugins/FlashSales/FlashSalePlans/FlashSalePlanCacheInvalidator.cs b/plugins/FlashSales/src/EasyAbp.EShop.Plugins.FlashSales.Application/EasyAbp/EShop/Plugins/FlashSales/FlashSalePlans/FlashSalePlanCacheInvalidator.cs index e220c65d..7c3c568a 100644 --- a/plugins/FlashSales/src/EasyAbp.EShop.Plugins.FlashSales.Application/EasyAbp/EShop/Plugins/FlashSales/FlashSalePlans/FlashSalePlanCacheInvalidator.cs +++ b/plugins/FlashSales/src/EasyAbp.EShop.Plugins.FlashSales.Application/EasyAbp/EShop/Plugins/FlashSales/FlashSalePlans/FlashSalePlanCacheInvalidator.cs @@ -1,13 +1,12 @@ using System; using System.Threading.Tasks; -using EasyAbp.EShop.Plugins.FlashSales.FlashSalePlans; using Volo.Abp.Caching; using Volo.Abp.DependencyInjection; using Volo.Abp.Domain.Entities.Events; using Volo.Abp.EventBus; using Volo.Abp.Uow; -namespace EasyAbp.EShop.Plugins.FlashSales.FlashSalesPlans; +namespace EasyAbp.EShop.Plugins.FlashSales.FlashSalePlans; public class FlashSalePlanCacheInvalidator : ILocalEventHandler>, ITransientDependency { diff --git a/plugins/FlashSales/src/EasyAbp.EShop.Plugins.FlashSales.Application/EasyAbp/EShop/Plugins/FlashSales/FlashSalePlans/FlashSalePlanCacheItem.cs b/plugins/FlashSales/src/EasyAbp.EShop.Plugins.FlashSales.Application/EasyAbp/EShop/Plugins/FlashSales/FlashSalePlans/FlashSalePlanCacheItem.cs index 0bb2d31e..da5e41a0 100644 --- a/plugins/FlashSales/src/EasyAbp.EShop.Plugins.FlashSales.Application/EasyAbp/EShop/Plugins/FlashSales/FlashSalePlans/FlashSalePlanCacheItem.cs +++ b/plugins/FlashSales/src/EasyAbp.EShop.Plugins.FlashSales.Application/EasyAbp/EShop/Plugins/FlashSales/FlashSalePlans/FlashSalePlanCacheItem.cs @@ -1,7 +1,7 @@ using System; using EasyAbp.EShop.Plugins.FlashSales.FlashSalePlans.Dtos; -namespace EasyAbp.EShop.Plugins.FlashSales.FlashSalesPlans; +namespace EasyAbp.EShop.Plugins.FlashSales.FlashSalePlans; [Serializable] public class FlashSalePlanCacheItem : FlashSalePlanDto diff --git a/plugins/FlashSales/src/EasyAbp.EShop.Plugins.FlashSales.Application/EasyAbp/EShop/Plugins/FlashSales/FlashSalePlans/ProductIsNotInThisStoreException.cs b/plugins/FlashSales/src/EasyAbp.EShop.Plugins.FlashSales.Application/EasyAbp/EShop/Plugins/FlashSales/FlashSalePlans/ProductIsNotInThisStoreException.cs index b6f7e9f9..3733fb84 100644 --- a/plugins/FlashSales/src/EasyAbp.EShop.Plugins.FlashSales.Application/EasyAbp/EShop/Plugins/FlashSales/FlashSalePlans/ProductIsNotInThisStoreException.cs +++ b/plugins/FlashSales/src/EasyAbp.EShop.Plugins.FlashSales.Application/EasyAbp/EShop/Plugins/FlashSales/FlashSalePlans/ProductIsNotInThisStoreException.cs @@ -1,7 +1,7 @@ using System; using Volo.Abp; -namespace EasyAbp.EShop.Plugins.FlashSales.FlashSalesPlans; +namespace EasyAbp.EShop.Plugins.FlashSales.FlashSalePlans; public class ProductIsNotInThisStoreException : BusinessException { diff --git a/plugins/FlashSales/src/EasyAbp.EShop.Plugins.FlashSales.Application/EasyAbp/EShop/Plugins/FlashSales/FlashSalePlans/ProductSkuIsNotFoundException.cs b/plugins/FlashSales/src/EasyAbp.EShop.Plugins.FlashSales.Application/EasyAbp/EShop/Plugins/FlashSales/FlashSalePlans/ProductSkuIsNotFoundException.cs index f3679fe6..f1ab3263 100644 --- a/plugins/FlashSales/src/EasyAbp.EShop.Plugins.FlashSales.Application/EasyAbp/EShop/Plugins/FlashSales/FlashSalePlans/ProductSkuIsNotFoundException.cs +++ b/plugins/FlashSales/src/EasyAbp.EShop.Plugins.FlashSales.Application/EasyAbp/EShop/Plugins/FlashSales/FlashSalePlans/ProductSkuIsNotFoundException.cs @@ -1,7 +1,7 @@ using System; using Volo.Abp; -namespace EasyAbp.EShop.Plugins.FlashSales.FlashSalesPlans; +namespace EasyAbp.EShop.Plugins.FlashSales.FlashSalePlans; public class ProductSkuIsNotFoundException : BusinessException { diff --git a/plugins/FlashSales/src/EasyAbp.EShop.Plugins.FlashSales.Application/EasyAbp/EShop/Plugins/FlashSales/FlashSalePlans/RelatedFlashSaleResultsExistException.cs b/plugins/FlashSales/src/EasyAbp.EShop.Plugins.FlashSales.Application/EasyAbp/EShop/Plugins/FlashSales/FlashSalePlans/RelatedFlashSaleResultsExistException.cs index e0c9f49f..b50dfeb6 100644 --- a/plugins/FlashSales/src/EasyAbp.EShop.Plugins.FlashSales.Application/EasyAbp/EShop/Plugins/FlashSales/FlashSalePlans/RelatedFlashSaleResultsExistException.cs +++ b/plugins/FlashSales/src/EasyAbp.EShop.Plugins.FlashSales.Application/EasyAbp/EShop/Plugins/FlashSales/FlashSalePlans/RelatedFlashSaleResultsExistException.cs @@ -1,8 +1,7 @@ using System; -using System.Runtime.Serialization; using Volo.Abp; -namespace EasyAbp.EShop.Plugins.FlashSales.FlashSalesPlans; +namespace EasyAbp.EShop.Plugins.FlashSales.FlashSalePlans; [Serializable] public class RelatedFlashSaleResultsExistException : BusinessException diff --git a/plugins/FlashSales/src/EasyAbp.EShop.Plugins.FlashSales.Application/EasyAbp/EShop/Plugins/FlashSales/FlashSalePlans/UnexpectedInventoryStrategyException.cs b/plugins/FlashSales/src/EasyAbp.EShop.Plugins.FlashSales.Application/EasyAbp/EShop/Plugins/FlashSales/FlashSalePlans/UnexpectedInventoryStrategyException.cs index bb2f6508..cc9deae9 100644 --- a/plugins/FlashSales/src/EasyAbp.EShop.Plugins.FlashSales.Application/EasyAbp/EShop/Plugins/FlashSales/FlashSalePlans/UnexpectedInventoryStrategyException.cs +++ b/plugins/FlashSales/src/EasyAbp.EShop.Plugins.FlashSales.Application/EasyAbp/EShop/Plugins/FlashSales/FlashSalePlans/UnexpectedInventoryStrategyException.cs @@ -1,7 +1,8 @@ using EasyAbp.EShop.Products.Products; using Volo.Abp; -namespace EasyAbp.EShop.Plugins.FlashSales.FlashSalesPlans; +namespace EasyAbp.EShop.Plugins.FlashSales.FlashSalePlans; + public class UnexpectedInventoryStrategyException : BusinessException { public UnexpectedInventoryStrategyException(InventoryStrategy expectedInventoryStrategy) : base(FlashSalesErrorCodes.UnexpectedInventoryStrategy) diff --git a/plugins/FlashSales/src/EasyAbp.EShop.Plugins.FlashSales.Application/EasyAbp/EShop/Plugins/FlashSales/FlashSaleResults/FlashSaleResultAppService.cs b/plugins/FlashSales/src/EasyAbp.EShop.Plugins.FlashSales.Application/EasyAbp/EShop/Plugins/FlashSales/FlashSaleResults/FlashSaleResultAppService.cs index ea6e6470..7c00f09d 100644 --- a/plugins/FlashSales/src/EasyAbp.EShop.Plugins.FlashSales.Application/EasyAbp/EShop/Plugins/FlashSales/FlashSaleResults/FlashSaleResultAppService.cs +++ b/plugins/FlashSales/src/EasyAbp.EShop.Plugins.FlashSales.Application/EasyAbp/EShop/Plugins/FlashSales/FlashSaleResults/FlashSaleResultAppService.cs @@ -1,13 +1,12 @@ using System; using System.Linq; using System.Threading.Tasks; -using EasyAbp.EShop.Plugins.FlashSales.FlashSaleResults; using EasyAbp.EShop.Plugins.FlashSales.FlashSaleResults.Dtos; using EasyAbp.EShop.Plugins.FlashSales.Permissions; using EasyAbp.EShop.Stores.Stores; using Volo.Abp.Application.Dtos; -namespace EasyAbp.EShop.Plugins.FlashSales.FlashSalesResults; +namespace EasyAbp.EShop.Plugins.FlashSales.FlashSaleResults; public class FlashSaleResultAppService : MultiStoreCrudAppService, @@ -19,22 +18,22 @@ public class FlashSaleResultAppService : protected IFlashSaleResultRepository FlashSaleResultRepository { get; } - public FlashSaleResultAppService(IFlashSaleResultRepository flashSalesResultRepository) : base(flashSalesResultRepository) + public FlashSaleResultAppService(IFlashSaleResultRepository flashSaleResultRepository) : base(flashSaleResultRepository) { } public override async Task GetAsync(Guid id) { - var flashSalesResult = await GetEntityByIdAsync(id); + var flashSaleResult = await GetEntityByIdAsync(id); - await CheckMultiStorePolicyAsync(flashSalesResult.StoreId, GetPolicyName); + await CheckMultiStorePolicyAsync(flashSaleResult.StoreId, GetPolicyName); - if (flashSalesResult.UserId != CurrentUser.Id) + if (flashSaleResult.UserId != CurrentUser.Id) { - await CheckMultiStorePolicyAsync(flashSalesResult.StoreId, FlashSalesPermissions.FlashSaleResult.Manage); + await CheckMultiStorePolicyAsync(flashSaleResult.StoreId, FlashSalesPermissions.FlashSaleResult.Manage); } - return await MapToGetOutputDtoAsync(flashSalesResult); + return await MapToGetOutputDtoAsync(flashSaleResult); } public override async Task> GetListAsync(FlashSaleResultGetListInput input) diff --git a/plugins/FlashSales/src/EasyAbp.EShop.Plugins.FlashSales.Application/EasyAbp/EShop/Plugins/FlashSales/FlashSalesApplicationAutoMapperProfile.cs b/plugins/FlashSales/src/EasyAbp.EShop.Plugins.FlashSales.Application/EasyAbp/EShop/Plugins/FlashSales/FlashSalesApplicationAutoMapperProfile.cs index 51b1f941..3f2a4324 100644 --- a/plugins/FlashSales/src/EasyAbp.EShop.Plugins.FlashSales.Application/EasyAbp/EShop/Plugins/FlashSales/FlashSalesApplicationAutoMapperProfile.cs +++ b/plugins/FlashSales/src/EasyAbp.EShop.Plugins.FlashSales.Application/EasyAbp/EShop/Plugins/FlashSales/FlashSalesApplicationAutoMapperProfile.cs @@ -3,7 +3,6 @@ using EasyAbp.EShop.Plugins.FlashSales.FlashSalePlans; using EasyAbp.EShop.Plugins.FlashSales.FlashSalePlans.Dtos; using EasyAbp.EShop.Plugins.FlashSales.FlashSaleResults; using EasyAbp.EShop.Plugins.FlashSales.FlashSaleResults.Dtos; -using EasyAbp.EShop.Plugins.FlashSales.FlashSalesPlans; namespace EasyAbp.EShop.Plugins.FlashSales; diff --git a/plugins/FlashSales/src/EasyAbp.EShop.Plugins.FlashSales.Domain.Shared/EasyAbp/EShop/Plugins/FlashSales/FlashSalePlans/CreateFlashSaleOrderCompleteEto.cs b/plugins/FlashSales/src/EasyAbp.EShop.Plugins.FlashSales.Domain.Shared/EasyAbp/EShop/Plugins/FlashSales/FlashSalePlans/CreateFlashSaleOrderCompleteEto.cs index 083afbfb..b5a76b63 100644 --- a/plugins/FlashSales/src/EasyAbp.EShop.Plugins.FlashSales.Domain.Shared/EasyAbp/EShop/Plugins/FlashSales/FlashSalePlans/CreateFlashSaleOrderCompleteEto.cs +++ b/plugins/FlashSales/src/EasyAbp.EShop.Plugins.FlashSales.Domain.Shared/EasyAbp/EShop/Plugins/FlashSales/FlashSalePlans/CreateFlashSaleOrderCompleteEto.cs @@ -2,7 +2,7 @@ using Volo.Abp.MultiTenancy; using Volo.Abp.ObjectExtending; -namespace EasyAbp.EShop.Plugins.FlashSales.FlashSalesPlans; +namespace EasyAbp.EShop.Plugins.FlashSales.FlashSalePlans; public class CreateFlashSaleOrderCompleteEto : ExtensibleObject, IMultiTenant { diff --git a/plugins/FlashSales/src/EasyAbp.EShop.Plugins.FlashSales.Domain/EasyAbp/EShop/Plugins/FlashSales/FlashSaleResults/CreateFlashSaleOrderCompleteEventHandler.cs b/plugins/FlashSales/src/EasyAbp.EShop.Plugins.FlashSales.Domain/EasyAbp/EShop/Plugins/FlashSales/FlashSaleResults/CreateFlashSaleOrderCompleteEventHandler.cs index 297a1342..e4377fcd 100644 --- a/plugins/FlashSales/src/EasyAbp.EShop.Plugins.FlashSales.Domain/EasyAbp/EShop/Plugins/FlashSales/FlashSaleResults/CreateFlashSaleOrderCompleteEventHandler.cs +++ b/plugins/FlashSales/src/EasyAbp.EShop.Plugins.FlashSales.Domain/EasyAbp/EShop/Plugins/FlashSales/FlashSaleResults/CreateFlashSaleOrderCompleteEventHandler.cs @@ -1,5 +1,5 @@ using System.Threading.Tasks; -using EasyAbp.EShop.Plugins.FlashSales.FlashSalesPlans; +using EasyAbp.EShop.Plugins.FlashSales.FlashSalePlans; using Volo.Abp.DependencyInjection; using Volo.Abp.EventBus.Distributed; using Volo.Abp.Guids; @@ -9,29 +9,29 @@ namespace EasyAbp.EShop.Plugins.FlashSales.FlashSaleResults; public class CreateFlashSaleOrderCompleteEventHandler : IDistributedEventHandler, ITransientDependency { - protected IFlashSaleResultRepository FlashSalesResultRepository { get; } + protected IFlashSaleResultRepository FlashSaleResultRepository { get; } protected IGuidGenerator GuidGenerator { get; } - public CreateFlashSaleOrderCompleteEventHandler(IFlashSaleResultRepository flashSalesResultRepository, IGuidGenerator guidGenerator) + public CreateFlashSaleOrderCompleteEventHandler(IFlashSaleResultRepository flashSaleResultRepository, IGuidGenerator guidGenerator) { - FlashSalesResultRepository = flashSalesResultRepository; + FlashSaleResultRepository = flashSaleResultRepository; GuidGenerator = guidGenerator; } [UnitOfWork] public virtual async Task HandleEventAsync(CreateFlashSaleOrderCompleteEto eventData) { - var flashSalesResult = await FlashSalesResultRepository.GetAsync(eventData.PendingResultId); + var flashSaleResult = await FlashSaleResultRepository.GetAsync(eventData.PendingResultId); if (eventData.Success) { - flashSalesResult.MarkAsSuccessful(eventData.OrderId.Value); + flashSaleResult.MarkAsSuccessful(eventData.OrderId.Value); } else { - flashSalesResult.MarkAsFailed(eventData.Reason); + flashSaleResult.MarkAsFailed(eventData.Reason); } - await FlashSalesResultRepository.UpdateAsync(flashSalesResult, autoSave: true); + await FlashSaleResultRepository.UpdateAsync(flashSaleResult, autoSave: true); } } diff --git a/plugins/FlashSales/src/EasyAbp.EShop.Plugins.FlashSales.Web/Pages/EShop/Plugins/FlashSales/FlashSalePlans/FlashSalePlan/index.js b/plugins/FlashSales/src/EasyAbp.EShop.Plugins.FlashSales.Web/Pages/EShop/Plugins/FlashSales/FlashSalePlans/FlashSalePlan/index.js index e9976c18..ff9c2d89 100644 --- a/plugins/FlashSales/src/EasyAbp.EShop.Plugins.FlashSales.Web/Pages/EShop/Plugins/FlashSales/FlashSalePlans/FlashSalePlan/index.js +++ b/plugins/FlashSales/src/EasyAbp.EShop.Plugins.FlashSales.Web/Pages/EShop/Plugins/FlashSales/FlashSalePlans/FlashSalePlan/index.js @@ -35,7 +35,7 @@ $(function () { text: l('Delete'), visible: abp.auth.isGranted('EasyAbp.EShop.Plugins.FlashSales.FlashSalePlan.Delete'), confirmMessage: function (data) { - return l('FlashSalesPlanDeletionConfirmationMessage', data.record.id); + return l('FlashSalePlanDeletionConfirmationMessage', data.record.id); }, action: function (data) { service.delete(data.record.id) diff --git a/plugins/FlashSales/src/EasyAbp.EShop.Plugins.FlashSales.Web/Pages/EShop/Plugins/FlashSales/FlashSaleResults/FlashSaleResult/Index.cshtml b/plugins/FlashSales/src/EasyAbp.EShop.Plugins.FlashSales.Web/Pages/EShop/Plugins/FlashSales/FlashSaleResults/FlashSaleResult/Index.cshtml index 38c98091..88d70cfa 100644 --- a/plugins/FlashSales/src/EasyAbp.EShop.Plugins.FlashSales.Web/Pages/EShop/Plugins/FlashSales/FlashSaleResults/FlashSaleResult/Index.cshtml +++ b/plugins/FlashSales/src/EasyAbp.EShop.Plugins.FlashSales.Web/Pages/EShop/Plugins/FlashSales/FlashSaleResults/FlashSaleResult/Index.cshtml @@ -3,7 +3,7 @@ @using Microsoft.AspNetCore.Authorization @using Microsoft.AspNetCore.Mvc.Localization @using Volo.Abp.AspNetCore.Mvc.UI.Layout -@using EasyAbp.EShop.Plugins.FlashSales.Web.Pages.EShop.Plugins.FlashSales.FlashSaleResults.FlashSalesResult +@using EasyAbp.EShop.Plugins.FlashSales.Web.Pages.EShop.Plugins.FlashSales.FlashSaleResults.FlashSaleResult @using EasyAbp.EShop.Plugins.FlashSales.Localization @using EasyAbp.EShop.Plugins.FlashSales.Web.Menus diff --git a/plugins/FlashSales/src/EasyAbp.EShop.Plugins.FlashSales.Web/Pages/EShop/Plugins/FlashSales/FlashSaleResults/FlashSaleResult/Index.cshtml.cs b/plugins/FlashSales/src/EasyAbp.EShop.Plugins.FlashSales.Web/Pages/EShop/Plugins/FlashSales/FlashSaleResults/FlashSaleResult/Index.cshtml.cs index a237d092..def3ff36 100644 --- a/plugins/FlashSales/src/EasyAbp.EShop.Plugins.FlashSales.Web/Pages/EShop/Plugins/FlashSales/FlashSaleResults/FlashSaleResult/Index.cshtml.cs +++ b/plugins/FlashSales/src/EasyAbp.EShop.Plugins.FlashSales.Web/Pages/EShop/Plugins/FlashSales/FlashSaleResults/FlashSaleResult/Index.cshtml.cs @@ -1,7 +1,7 @@ using Microsoft.AspNetCore.Mvc; using Microsoft.AspNetCore.Mvc.RazorPages; -namespace EasyAbp.EShop.Plugins.FlashSales.Web.Pages.EShop.Plugins.FlashSales.FlashSaleResults.FlashSalesResult; +namespace EasyAbp.EShop.Plugins.FlashSales.Web.Pages.EShop.Plugins.FlashSales.FlashSaleResults.FlashSaleResult; public class IndexModel : PageModel { diff --git a/plugins/FlashSales/src/EasyAbp.EShop.Products.Plugins.FlashSales.Application/EasyAbp/EShop/Products/Products/FlashSaleReduceInventoryEventHandler.cs b/plugins/FlashSales/src/EasyAbp.EShop.Products.Plugins.FlashSales.Application/EasyAbp/EShop/Products/Products/FlashSaleReduceInventoryEventHandler.cs index f4b1092a..45f6da3c 100644 --- a/plugins/FlashSales/src/EasyAbp.EShop.Products.Plugins.FlashSales.Application/EasyAbp/EShop/Products/Products/FlashSaleReduceInventoryEventHandler.cs +++ b/plugins/FlashSales/src/EasyAbp.EShop.Products.Plugins.FlashSales.Application/EasyAbp/EShop/Products/Products/FlashSaleReduceInventoryEventHandler.cs @@ -2,7 +2,6 @@ using System.Threading.Tasks; using EasyAbp.EShop.Plugins.FlashSales.FlashSalePlans; using EasyAbp.EShop.Plugins.FlashSales.FlashSaleResults; -using EasyAbp.EShop.Plugins.FlashSales.FlashSalesPlans; using EasyAbp.EShop.Products.ProductDetails; using Volo.Abp.DependencyInjection; using Volo.Abp.EventBus.Distributed;