Browse Source

Rename to `FlashSalePlan` and `FlashSaleResult`

pull/184/head
Jadyn 4 years ago
parent
commit
4820c9358c
  1. 13
      plugins/FlashSales/src/EasyAbp.EShop.Orders.Plugins.FlashSales.Application/EasyAbp/EShop/Orders/Orders/CreateFlashSaleOrderEventHandler.cs
  2. 12
      plugins/FlashSales/src/EasyAbp.EShop.Orders.Plugins.FlashSales.Application/EasyAbp/EShop/Orders/Plugins/FlashSales/EShopOrdersPluginsFlashSalesApplicationAutoMapperProfile.cs
  3. 5
      plugins/FlashSales/src/EasyAbp.EShop.Orders.Plugins.FlashSales.Application/EasyAbp/EShop/Orders/Plugins/FlashSales/EShopOrdersPluginsFlashSalesApplicationModule.cs
  4. 8
      plugins/FlashSales/src/EasyAbp.EShop.Plugins.FlashSales.Application.Contracts/EasyAbp/EShop/Plugins/FlashSales/FlashSalePlans/Dtos/CreateOrderInput.cs
  5. 4
      plugins/FlashSales/src/EasyAbp.EShop.Plugins.FlashSales.Application.Contracts/EasyAbp/EShop/Plugins/FlashSales/FlashSalePlans/Dtos/FlashSalePlanCreateDto.cs
  6. 6
      plugins/FlashSales/src/EasyAbp.EShop.Plugins.FlashSales.Application.Contracts/EasyAbp/EShop/Plugins/FlashSales/FlashSalePlans/Dtos/FlashSalePlanDto.cs
  7. 4
      plugins/FlashSales/src/EasyAbp.EShop.Plugins.FlashSales.Application.Contracts/EasyAbp/EShop/Plugins/FlashSales/FlashSalePlans/Dtos/FlashSalePlanGetListInput.cs
  8. 4
      plugins/FlashSales/src/EasyAbp.EShop.Plugins.FlashSales.Application.Contracts/EasyAbp/EShop/Plugins/FlashSales/FlashSalePlans/Dtos/FlashSalePlanUpdateDto.cs
  9. 21
      plugins/FlashSales/src/EasyAbp.EShop.Plugins.FlashSales.Application.Contracts/EasyAbp/EShop/Plugins/FlashSales/FlashSalePlans/IFlashSalePlanAppService.cs
  10. 6
      plugins/FlashSales/src/EasyAbp.EShop.Plugins.FlashSales.Application.Contracts/EasyAbp/EShop/Plugins/FlashSales/FlashSaleResults/Dtos/FlashSaleResultDto.cs
  11. 6
      plugins/FlashSales/src/EasyAbp.EShop.Plugins.FlashSales.Application.Contracts/EasyAbp/EShop/Plugins/FlashSales/FlashSaleResults/Dtos/FlashSaleResultGetListInput.cs
  12. 14
      plugins/FlashSales/src/EasyAbp.EShop.Plugins.FlashSales.Application.Contracts/EasyAbp/EShop/Plugins/FlashSales/FlashSaleResults/IFlashSaleResultAppService.cs
  13. 9
      plugins/FlashSales/src/EasyAbp.EShop.Plugins.FlashSales.Application.Contracts/EasyAbp/EShop/Plugins/FlashSales/FlashSalesPlans/Dtos/CreateOrderInput.cs
  14. 21
      plugins/FlashSales/src/EasyAbp.EShop.Plugins.FlashSales.Application.Contracts/EasyAbp/EShop/Plugins/FlashSales/FlashSalesPlans/IFlashSalesPlanAppService.cs
  15. 14
      plugins/FlashSales/src/EasyAbp.EShop.Plugins.FlashSales.Application.Contracts/EasyAbp/EShop/Plugins/FlashSales/FlashSalesResults/IFlashSalesResultAppService.cs
  16. 16
      plugins/FlashSales/src/EasyAbp.EShop.Plugins.FlashSales.Application.Contracts/EasyAbp/EShop/Plugins/FlashSales/Permissions/FlashSalesPermissionDefinitionProvider.cs
  17. 8
      plugins/FlashSales/src/EasyAbp.EShop.Plugins.FlashSales.Application.Contracts/EasyAbp/EShop/Plugins/FlashSales/Permissions/FlashSalesPermissions.cs
  18. 145
      plugins/FlashSales/src/EasyAbp.EShop.Plugins.FlashSales.Application/EasyAbp/EShop/Plugins/FlashSales/FlashSalePlans/FlashSalePlanAppService.cs
  19. 11
      plugins/FlashSales/src/EasyAbp.EShop.Plugins.FlashSales.Application/EasyAbp/EShop/Plugins/FlashSales/FlashSalePlans/FlashSalePlanCacheInvalidator.cs
  20. 4
      plugins/FlashSales/src/EasyAbp.EShop.Plugins.FlashSales.Application/EasyAbp/EShop/Plugins/FlashSales/FlashSalePlans/FlashSalePlanCacheItem.cs
  21. 0
      plugins/FlashSales/src/EasyAbp.EShop.Plugins.FlashSales.Application/EasyAbp/EShop/Plugins/FlashSales/FlashSalePlans/ProductIsNotInThisStoreException.cs
  22. 0
      plugins/FlashSales/src/EasyAbp.EShop.Plugins.FlashSales.Application/EasyAbp/EShop/Plugins/FlashSales/FlashSalePlans/ProductSkuIsNotFoundException.cs
  23. 4
      plugins/FlashSales/src/EasyAbp.EShop.Plugins.FlashSales.Application/EasyAbp/EShop/Plugins/FlashSales/FlashSalePlans/RelatedFlashSaleResultsExistException.cs
  24. 0
      plugins/FlashSales/src/EasyAbp.EShop.Plugins.FlashSales.Application/EasyAbp/EShop/Plugins/FlashSales/FlashSalePlans/UnexpectedInventoryStrategyException.cs
  25. 21
      plugins/FlashSales/src/EasyAbp.EShop.Plugins.FlashSales.Application/EasyAbp/EShop/Plugins/FlashSales/FlashSaleResults/FlashSaleResultAppService.cs
  26. 19
      plugins/FlashSales/src/EasyAbp.EShop.Plugins.FlashSales.Application/EasyAbp/EShop/Plugins/FlashSales/FlashSalesApplicationAutoMapperProfile.cs
  27. 2
      plugins/FlashSales/src/EasyAbp.EShop.Plugins.FlashSales.Domain.Shared/EasyAbp/EShop/Plugins/FlashSales/FlashSalePlans/CreateFlashSaleOrderCompleteEto.cs
  28. 11
      plugins/FlashSales/src/EasyAbp.EShop.Plugins.FlashSales.Domain.Shared/EasyAbp/EShop/Plugins/FlashSales/FlashSalePlans/CreateFlashSaleOrderEto.cs
  29. 4
      plugins/FlashSales/src/EasyAbp.EShop.Plugins.FlashSales.Domain.Shared/EasyAbp/EShop/Plugins/FlashSales/FlashSalePlans/FlashSalePlanEto.cs
  30. 4
      plugins/FlashSales/src/EasyAbp.EShop.Plugins.FlashSales.Domain.Shared/EasyAbp/EShop/Plugins/FlashSales/FlashSalePlans/FlashSalePlanHasher.cs
  31. 6
      plugins/FlashSales/src/EasyAbp.EShop.Plugins.FlashSales.Domain.Shared/EasyAbp/EShop/Plugins/FlashSales/FlashSalePlans/FlashSaleProductAttributeEto.cs
  32. 4
      plugins/FlashSales/src/EasyAbp.EShop.Plugins.FlashSales.Domain.Shared/EasyAbp/EShop/Plugins/FlashSales/FlashSalePlans/FlashSaleProductAttributeOptionEto.cs
  33. 4
      plugins/FlashSales/src/EasyAbp.EShop.Plugins.FlashSales.Domain.Shared/EasyAbp/EShop/Plugins/FlashSales/FlashSalePlans/FlashSaleProductDetailEto.cs
  34. 8
      plugins/FlashSales/src/EasyAbp.EShop.Plugins.FlashSales.Domain.Shared/EasyAbp/EShop/Plugins/FlashSales/FlashSalePlans/FlashSaleProductEto.cs
  35. 4
      plugins/FlashSales/src/EasyAbp.EShop.Plugins.FlashSales.Domain.Shared/EasyAbp/EShop/Plugins/FlashSales/FlashSalePlans/FlashSaleProductSkuEto.cs
  36. 6
      plugins/FlashSales/src/EasyAbp.EShop.Plugins.FlashSales.Domain.Shared/EasyAbp/EShop/Plugins/FlashSales/FlashSalePlans/FlashSaleReduceInventoryEto.cs
  37. 4
      plugins/FlashSales/src/EasyAbp.EShop.Plugins.FlashSales.Domain.Shared/EasyAbp/EShop/Plugins/FlashSales/FlashSalePlans/IFlashSalePlanHasher.cs
  38. 4
      plugins/FlashSales/src/EasyAbp.EShop.Plugins.FlashSales.Domain.Shared/EasyAbp/EShop/Plugins/FlashSales/FlashSaleResults/FlashSaleResultFailedReason.cs
  39. 8
      plugins/FlashSales/src/EasyAbp.EShop.Plugins.FlashSales.Domain.Shared/EasyAbp/EShop/Plugins/FlashSales/FlashSaleResults/FlashSaleResultStatus.cs
  40. 2
      plugins/FlashSales/src/EasyAbp.EShop.Plugins.FlashSales.Domain.Shared/EasyAbp/EShop/Plugins/FlashSales/FlashSalesErrorCodes.cs
  41. 8
      plugins/FlashSales/src/EasyAbp.EShop.Plugins.FlashSales.Domain.Shared/EasyAbp/EShop/Plugins/FlashSales/FlashSalesResults/FlashSalesResultStatus.cs
  42. 64
      plugins/FlashSales/src/EasyAbp.EShop.Plugins.FlashSales.Domain.Shared/EasyAbp/EShop/Plugins/FlashSales/Localization/en.json
  43. 62
      plugins/FlashSales/src/EasyAbp.EShop.Plugins.FlashSales.Domain.Shared/EasyAbp/EShop/Plugins/FlashSales/Localization/zh-Hans.json
  44. 62
      plugins/FlashSales/src/EasyAbp.EShop.Plugins.FlashSales.Domain.Shared/EasyAbp/EShop/Plugins/FlashSales/Localization/zh-Hant.json
  45. 4
      plugins/FlashSales/src/EasyAbp.EShop.Plugins.FlashSales.Domain/EasyAbp/EShop/Plugins/FlashSales/EShopPluginsFlashSalesDomainAutoMapperProfile.cs
  46. 6
      plugins/FlashSales/src/EasyAbp.EShop.Plugins.FlashSales.Domain/EasyAbp/EShop/Plugins/FlashSales/EShopPluginsFlashSalesDomainModule.cs
  47. 8
      plugins/FlashSales/src/EasyAbp.EShop.Plugins.FlashSales.Domain/EasyAbp/EShop/Plugins/FlashSales/FlashSalePlans/FlashSalePlan.cs
  48. 8
      plugins/FlashSales/src/EasyAbp.EShop.Plugins.FlashSales.Domain/EasyAbp/EShop/Plugins/FlashSales/FlashSalePlans/IFlashSalePlanRepository.cs
  49. 2
      plugins/FlashSales/src/EasyAbp.EShop.Plugins.FlashSales.Domain/EasyAbp/EShop/Plugins/FlashSales/FlashSalePlans/InvalidEndTimeException.cs
  50. 10
      plugins/FlashSales/src/EasyAbp.EShop.Plugins.FlashSales.Domain/EasyAbp/EShop/Plugins/FlashSales/FlashSaleResults/CreateFlashSaleOrderCompleteEventHandler.cs
  51. 14
      plugins/FlashSales/src/EasyAbp.EShop.Plugins.FlashSales.Domain/EasyAbp/EShop/Plugins/FlashSales/FlashSaleResults/FlashSaleResult.cs
  52. 9
      plugins/FlashSales/src/EasyAbp.EShop.Plugins.FlashSales.Domain/EasyAbp/EShop/Plugins/FlashSales/FlashSaleResults/IFlashSaleResultRepository.cs
  53. 8
      plugins/FlashSales/src/EasyAbp.EShop.Plugins.FlashSales.Domain/EasyAbp/EShop/Plugins/FlashSales/FlashSalesPlans/IFlashSalesPlanRepository.cs
  54. 9
      plugins/FlashSales/src/EasyAbp.EShop.Plugins.FlashSales.Domain/EasyAbp/EShop/Plugins/FlashSales/FlashSalesResults/IFlashSalesResultRepository.cs
  55. 8
      plugins/FlashSales/src/EasyAbp.EShop.Plugins.FlashSales.EntityFrameworkCore/EasyAbp/EShop/Plugins/FlashSales/EntityFrameworkCore/EShopPluginsFlashSalesEntityFrameworkCoreModule.cs
  56. 8
      plugins/FlashSales/src/EasyAbp.EShop.Plugins.FlashSales.EntityFrameworkCore/EasyAbp/EShop/Plugins/FlashSales/EntityFrameworkCore/FlashSalesDbContext.cs
  57. 12
      plugins/FlashSales/src/EasyAbp.EShop.Plugins.FlashSales.EntityFrameworkCore/EasyAbp/EShop/Plugins/FlashSales/EntityFrameworkCore/FlashSalesDbContextModelCreatingExtensions.cs
  58. 8
      plugins/FlashSales/src/EasyAbp.EShop.Plugins.FlashSales.EntityFrameworkCore/EasyAbp/EShop/Plugins/FlashSales/EntityFrameworkCore/IFlashSalesDbContext.cs
  59. 21
      plugins/FlashSales/src/EasyAbp.EShop.Plugins.FlashSales.EntityFrameworkCore/EasyAbp/EShop/Plugins/FlashSales/FlashSalePlans/EfCoreFlashSalePlanRepository.cs
  60. 18
      plugins/FlashSales/src/EasyAbp.EShop.Plugins.FlashSales.EntityFrameworkCore/EasyAbp/EShop/Plugins/FlashSales/FlashSalePlans/FlashSalePlanEfCoreQuerableExtensions.cs
  61. 20
      plugins/FlashSales/src/EasyAbp.EShop.Plugins.FlashSales.EntityFrameworkCore/EasyAbp/EShop/Plugins/FlashSales/FlashSaleResults/EfCoreFlashSaleResultRepository.cs
  62. 16
      plugins/FlashSales/src/EasyAbp.EShop.Plugins.FlashSales.EntityFrameworkCore/EasyAbp/EShop/Plugins/FlashSales/FlashSaleResults/FlashSaleResultEfCoreQuerableExtensions.cs
  63. 21
      plugins/FlashSales/src/EasyAbp.EShop.Plugins.FlashSales.EntityFrameworkCore/EasyAbp/EShop/Plugins/FlashSales/FlashSalesPlans/EfCoreFlashSalesPlanRepository.cs
  64. 18
      plugins/FlashSales/src/EasyAbp.EShop.Plugins.FlashSales.EntityFrameworkCore/EasyAbp/EShop/Plugins/FlashSales/FlashSalesPlans/FlashSalesPlanEfCoreQuerableExtensions.cs
  65. 20
      plugins/FlashSales/src/EasyAbp.EShop.Plugins.FlashSales.EntityFrameworkCore/EasyAbp/EShop/Plugins/FlashSales/FlashSalesResults/EfCoreFlashSalesResultRepository.cs
  66. 16
      plugins/FlashSales/src/EasyAbp.EShop.Plugins.FlashSales.EntityFrameworkCore/EasyAbp/EShop/Plugins/FlashSales/FlashSalesResults/FlashSalesResultEfCoreQuerableExtensions.cs
  67. 24
      plugins/FlashSales/src/EasyAbp.EShop.Plugins.FlashSales.HttpApi/EasyAbp/EShop/Plugins/FlashSales/FlashSalePlans/FlashSalePlanController.cs
  68. 33
      plugins/FlashSales/src/EasyAbp.EShop.Plugins.FlashSales.HttpApi/EasyAbp/EShop/Plugins/FlashSales/FlashSaleResults/FlashSaleResultController.cs
  69. 33
      plugins/FlashSales/src/EasyAbp.EShop.Plugins.FlashSales.HttpApi/EasyAbp/EShop/Plugins/FlashSales/FlashSalesResults/FlashSalesResultController.cs
  70. 13
      plugins/FlashSales/src/EasyAbp.EShop.Plugins.FlashSales.MongoDB/EasyAbp/EShop/Plugins/FlashSales/FlashSalePlans/MongoFlashSalePlanRepository.cs
  71. 13
      plugins/FlashSales/src/EasyAbp.EShop.Plugins.FlashSales.MongoDB/EasyAbp/EShop/Plugins/FlashSales/FlashSaleResults/MongoFlashSaleResultRepository.cs
  72. 13
      plugins/FlashSales/src/EasyAbp.EShop.Plugins.FlashSales.MongoDB/EasyAbp/EShop/Plugins/FlashSales/FlashSalesPlans/MongoFlashSalesPlanRepository.cs
  73. 13
      plugins/FlashSales/src/EasyAbp.EShop.Plugins.FlashSales.MongoDB/EasyAbp/EShop/Plugins/FlashSales/FlashSalesResults/MongoFlashSalesResultRepository.cs
  74. 8
      plugins/FlashSales/src/EasyAbp.EShop.Plugins.FlashSales.MongoDB/EasyAbp/EShop/Plugins/FlashSales/MongoDB/EShopPluginsFlashSalesMongoDbModule.cs
  75. 8
      plugins/FlashSales/src/EasyAbp.EShop.Plugins.FlashSales.MongoDB/EasyAbp/EShop/Plugins/FlashSales/MongoDB/FlashSalesMongoDbContext.cs
  76. 8
      plugins/FlashSales/src/EasyAbp.EShop.Plugins.FlashSales.MongoDB/EasyAbp/EShop/Plugins/FlashSales/MongoDB/FlashSalesMongoDbContextExtensions.cs
  77. 8
      plugins/FlashSales/src/EasyAbp.EShop.Plugins.FlashSales.MongoDB/EasyAbp/EShop/Plugins/FlashSales/MongoDB/IFlashSalesMongoDbContext.cs
  78. 16
      plugins/FlashSales/src/EasyAbp.EShop.Plugins.FlashSales.Web/EShopPluginsFlashSalesWebAutoMapperProfile.cs
  79. 5
      plugins/FlashSales/src/EasyAbp.EShop.Plugins.FlashSales.Web/EasyAbp.EShop.Plugins.FlashSales.Web.csproj
  80. 16
      plugins/FlashSales/src/EasyAbp.EShop.Plugins.FlashSales.Web/Menus/FlashSalesMenuContributor.cs
  81. 4
      plugins/FlashSales/src/EasyAbp.EShop.Plugins.FlashSales.Web/Menus/FlashSalesMenus.cs
  82. 4
      plugins/FlashSales/src/EasyAbp.EShop.Plugins.FlashSales.Web/Pages/EShop/Plugins/FlashSales/FlashSalePlans/FlashSalePlan/CreateModal.cshtml
  83. 27
      plugins/FlashSales/src/EasyAbp.EShop.Plugins.FlashSales.Web/Pages/EShop/Plugins/FlashSales/FlashSalePlans/FlashSalePlan/CreateModal.cshtml.cs
  84. 4
      plugins/FlashSales/src/EasyAbp.EShop.Plugins.FlashSales.Web/Pages/EShop/Plugins/FlashSales/FlashSalePlans/FlashSalePlan/EditModal.cshtml
  85. 18
      plugins/FlashSales/src/EasyAbp.EShop.Plugins.FlashSales.Web/Pages/EShop/Plugins/FlashSales/FlashSalePlans/FlashSalePlan/EditModal.cshtml.cs
  86. 22
      plugins/FlashSales/src/EasyAbp.EShop.Plugins.FlashSales.Web/Pages/EShop/Plugins/FlashSales/FlashSalePlans/FlashSalePlan/Index.cshtml
  87. 2
      plugins/FlashSales/src/EasyAbp.EShop.Plugins.FlashSales.Web/Pages/EShop/Plugins/FlashSales/FlashSalePlans/FlashSalePlan/Index.cshtml.cs
  88. 25
      plugins/FlashSales/src/EasyAbp.EShop.Plugins.FlashSales.Web/Pages/EShop/Plugins/FlashSales/FlashSalePlans/FlashSalePlan/ViewModels/CreateFlashSalePlanViewModel.cs
  89. 16
      plugins/FlashSales/src/EasyAbp.EShop.Plugins.FlashSales.Web/Pages/EShop/Plugins/FlashSales/FlashSalePlans/FlashSalePlan/ViewModels/EditFlashSalePlanViewModel.cs
  90. 0
      plugins/FlashSales/src/EasyAbp.EShop.Plugins.FlashSales.Web/Pages/EShop/Plugins/FlashSales/FlashSalePlans/FlashSalePlan/index.css
  91. 28
      plugins/FlashSales/src/EasyAbp.EShop.Plugins.FlashSales.Web/Pages/EShop/Plugins/FlashSales/FlashSalePlans/FlashSalePlan/index.js
  92. 16
      plugins/FlashSales/src/EasyAbp.EShop.Plugins.FlashSales.Web/Pages/EShop/Plugins/FlashSales/FlashSaleResults/FlashSaleResult/Index.cshtml
  93. 2
      plugins/FlashSales/src/EasyAbp.EShop.Plugins.FlashSales.Web/Pages/EShop/Plugins/FlashSales/FlashSaleResults/FlashSaleResult/Index.cshtml.cs
  94. 4
      plugins/FlashSales/src/EasyAbp.EShop.Plugins.FlashSales.Web/Pages/EShop/Plugins/FlashSales/FlashSaleResults/FlashSaleResult/ViewModal.cshtml
  95. 16
      plugins/FlashSales/src/EasyAbp.EShop.Plugins.FlashSales.Web/Pages/EShop/Plugins/FlashSales/FlashSaleResults/FlashSaleResult/ViewModal.cshtml.cs
  96. 26
      plugins/FlashSales/src/EasyAbp.EShop.Plugins.FlashSales.Web/Pages/EShop/Plugins/FlashSales/FlashSaleResults/FlashSaleResult/ViewModels/ViewFlashSaleResultViewModel.cs
  97. 0
      plugins/FlashSales/src/EasyAbp.EShop.Plugins.FlashSales.Web/Pages/EShop/Plugins/FlashSales/FlashSaleResults/FlashSaleResult/index.css
  98. 24
      plugins/FlashSales/src/EasyAbp.EShop.Plugins.FlashSales.Web/Pages/EShop/Plugins/FlashSales/FlashSaleResults/FlashSaleResult/index.js
  99. 27
      plugins/FlashSales/src/EasyAbp.EShop.Plugins.FlashSales.Web/Pages/EShop/Plugins/FlashSales/FlashSalesPlans/FlashSalesPlan/CreateModal.cshtml.cs
  100. 25
      plugins/FlashSales/src/EasyAbp.EShop.Plugins.FlashSales.Web/Pages/EShop/Plugins/FlashSales/FlashSalesPlans/FlashSalesPlan/ViewModels/CreateFlashSalesPlanViewModel.cs

13
plugins/FlashSales/src/EasyAbp.EShop.Orders.Plugins.FlashSales.Application/EasyAbp/EShop/Orders/Orders/CreateFlashSalesOrderEventHandler.cs → plugins/FlashSales/src/EasyAbp.EShop.Orders.Plugins.FlashSales.Application/EasyAbp/EShop/Orders/Orders/CreateFlashSaleOrderEventHandler.cs

@ -2,6 +2,7 @@
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;
@ -12,7 +13,7 @@ using Volo.Abp.Uow;
namespace EasyAbp.EShop.Orders.Orders;
public class CreateFlashSalesOrderEventHandler : IDistributedEventHandler<CreateFlashSalesOrderEto>, ITransientDependency
public class CreateFlashSaleOrderEventHandler : IDistributedEventHandler<CreateFlashSaleOrderEto>, ITransientDependency
{
protected INewOrderGenerator NewOrderGenerator { get; }
@ -24,7 +25,7 @@ public class CreateFlashSalesOrderEventHandler : IDistributedEventHandler<Create
protected IDistributedEventBus DistributedEventBus { get; }
public CreateFlashSalesOrderEventHandler(
public CreateFlashSaleOrderEventHandler(
INewOrderGenerator newOrderGenerator,
IObjectMapper objectMapper,
IEnumerable<IOrderDiscountProvider> orderDiscountProviders,
@ -39,7 +40,7 @@ public class CreateFlashSalesOrderEventHandler : IDistributedEventHandler<Create
}
[UnitOfWork(true)]
public virtual async Task HandleEventAsync(CreateFlashSalesOrderEto eventData)
public virtual async Task HandleEventAsync(CreateFlashSaleOrderEto eventData)
{
var input = new CreateOrderDto()
{
@ -57,11 +58,11 @@ public class CreateFlashSalesOrderEventHandler : IDistributedEventHandler<Create
};
var productDict = new Dictionary<Guid, ProductDto>()
{
{eventData.Product.Id, ObjectMapper.Map<FlashSalesProductEto,ProductDto>(eventData.Product)}
{eventData.Product.Id, ObjectMapper.Map<FlashSaleProductEto,ProductDto>(eventData.Product)}
};
var productDetailDict = new Dictionary<Guid, ProductDetailDto>()
{
{eventData.ProductDetail.Id, ObjectMapper.Map<FlashSalesProductDetailEto,ProductDetailDto>(eventData.ProductDetail)}
{eventData.ProductDetail.Id, ObjectMapper.Map<FlashSaleProductDetailEto,ProductDetailDto>(eventData.ProductDetail)}
};
var order = await NewOrderGenerator.GenerateAsync(eventData.UserId, input, productDict, productDetailDict);
@ -70,7 +71,7 @@ public class CreateFlashSalesOrderEventHandler : IDistributedEventHandler<Create
await OrderRepository.InsertAsync(order, autoSave: true);
await DistributedEventBus.PublishAsync(new CreateFlashSalesOrderCompleteEto()
await DistributedEventBus.PublishAsync(new CreateFlashSaleOrderCompleteEto()
{
TenantId = eventData.TenantId,
PlanId = eventData.PlanId,

12
plugins/FlashSales/src/EasyAbp.EShop.Orders.Plugins.FlashSales.Application/EasyAbp/EShop/Orders/Plugins/FlashSales/EShopOrdersPluginsFlashSalesApplicationAutoMapperProfile.cs

@ -1,5 +1,5 @@
using AutoMapper;
using EasyAbp.EShop.Plugins.FlashSales.FlashSalesPlans;
using EasyAbp.EShop.Plugins.FlashSales.FlashSalePlans;
using EasyAbp.EShop.Products.ProductDetails.Dtos;
using EasyAbp.EShop.Products.Products.Dtos;
using Volo.Abp.AutoMapper;
@ -14,22 +14,22 @@ namespace EasyAbp.EShop.Orders.Plugins.FlashSales
/* You can configure your AutoMapper mapping configuration here.
* Alternatively, you can split your mapping configurations
* into multiple profile classes for a better organization. */
CreateMap<FlashSalesProductEto, ProductDto>(MemberList.Destination)
CreateMap<FlashSaleProductEto, ProductDto>(MemberList.Destination)
.Ignore(dto => dto.Sold)
.Ignore(dto => dto.MinimumPrice)
.Ignore(dto => dto.MaximumPrice)
.MapExtraProperties();
CreateMap<FlashSalesProductSkuEto, ProductSkuDto>(MemberList.Destination)
CreateMap<FlashSaleProductSkuEto, ProductSkuDto>(MemberList.Destination)
.ForSourceMember(entity => entity.SerializedAttributeOptionIds, opt => opt.DoNotValidate())
.Ignore(dto => dto.DiscountedPrice)
.Ignore(dto => dto.Inventory)
.Ignore(dto => dto.Sold)
.MapExtraProperties();
CreateMap<FlashSalesProductAttributeEto, ProductAttributeDto>(MemberList.Destination)
CreateMap<FlashSaleProductAttributeEto, ProductAttributeDto>(MemberList.Destination)
.MapExtraProperties();
CreateMap<FlashSalesProductAttributeOptionEto, ProductAttributeOptionDto>(MemberList.Destination)
CreateMap<FlashSaleProductAttributeOptionEto, ProductAttributeOptionDto>(MemberList.Destination)
.MapExtraProperties();
CreateMap<FlashSalesProductDetailEto, ProductDetailDto>(MemberList.Destination)
CreateMap<FlashSaleProductDetailEto, ProductDetailDto>(MemberList.Destination)
.MapExtraProperties();
}
}

5
plugins/FlashSales/src/EasyAbp.EShop.Orders.Plugins.FlashSales.Application/EasyAbp/EShop/Orders/Plugins/FlashSales/EShopOrdersPluginsFlashSalesApplicationModule.cs

@ -15,11 +15,6 @@ namespace EasyAbp.EShop.Orders.Plugins.FlashSales;
)]
public class EShopOrdersPluginsFlashSalesApplicationModule : AbpModule
{
public override void PreConfigureServices(ServiceConfigurationContext context)
{
context.Services.AddSingleton<IAuthorizationHandler, FlashSalesOrderCreationAuthorizationHandler>();
}
public override void ConfigureServices(ServiceConfigurationContext context)
{
context.Services.AddAutoMapperObjectMapper<EShopOrdersPluginsFlashSalesApplicationModule>();

8
plugins/FlashSales/src/EasyAbp.EShop.Plugins.FlashSales.Application.Contracts/EasyAbp/EShop/Plugins/FlashSales/FlashSalePlans/Dtos/CreateOrderInput.cs

@ -0,0 +1,8 @@
using Volo.Abp.Application.Dtos;
namespace EasyAbp.EShop.Plugins.FlashSales.FlashSalePlans.Dtos;
public class CreateOrderInput : ExtensibleEntityDto
{
public string CustomerRemark { get; set; }
}

4
plugins/FlashSales/src/EasyAbp.EShop.Plugins.FlashSales.Application.Contracts/EasyAbp/EShop/Plugins/FlashSales/FlashSalesPlans/Dtos/FlashSalesPlanCreateDto.cs → plugins/FlashSales/src/EasyAbp.EShop.Plugins.FlashSales.Application.Contracts/EasyAbp/EShop/Plugins/FlashSales/FlashSalePlans/Dtos/FlashSalePlanCreateDto.cs

@ -2,10 +2,10 @@ using System;
using EasyAbp.EShop.Stores.Stores;
using Volo.Abp.Application.Dtos;
namespace EasyAbp.EShop.Plugins.FlashSales.FlashSalesPlans.Dtos;
namespace EasyAbp.EShop.Plugins.FlashSales.FlashSalePlans.Dtos;
[Serializable]
public class FlashSalesPlanCreateDto : ExtensibleEntityDto<Guid>, IMultiStore
public class FlashSalePlanCreateDto : ExtensibleEntityDto, IMultiStore
{
public Guid StoreId { get; set; }

6
plugins/FlashSales/src/EasyAbp.EShop.Plugins.FlashSales.Application.Contracts/EasyAbp/EShop/Plugins/FlashSales/FlashSalesPlans/Dtos/FlashSalesPlanDto.cs → plugins/FlashSales/src/EasyAbp.EShop.Plugins.FlashSales.Application.Contracts/EasyAbp/EShop/Plugins/FlashSales/FlashSalePlans/Dtos/FlashSalePlanDto.cs

@ -2,10 +2,10 @@ using System;
using Volo.Abp.Application.Dtos;
using Volo.Abp.Domain.Entities;
namespace EasyAbp.EShop.Plugins.FlashSales.FlashSalesPlans.Dtos;
namespace EasyAbp.EShop.Plugins.FlashSales.FlashSalePlans.Dtos;
[Serializable]
public class FlashSalesPlanDto : ExtensibleFullAuditedEntityDto<Guid>, IHasConcurrencyStamp
public class FlashSalePlanDto : ExtensibleFullAuditedEntityDto<Guid>, IHasConcurrencyStamp
{
public Guid StoreId { get; set; }
@ -18,6 +18,6 @@ public class FlashSalesPlanDto : ExtensibleFullAuditedEntityDto<Guid>, IHasConcu
public Guid ProductSkuId { get; set; }
public bool IsPublished { get; set; }
public string ConcurrencyStamp { get; set; }
}

4
plugins/FlashSales/src/EasyAbp.EShop.Plugins.FlashSales.Application.Contracts/EasyAbp/EShop/Plugins/FlashSales/FlashSalesPlans/Dtos/FlashSalesPlanGetListInput.cs → plugins/FlashSales/src/EasyAbp.EShop.Plugins.FlashSales.Application.Contracts/EasyAbp/EShop/Plugins/FlashSales/FlashSalePlans/Dtos/FlashSalePlanGetListInput.cs

@ -1,10 +1,10 @@
using System;
using Volo.Abp.Application.Dtos;
namespace EasyAbp.EShop.Plugins.FlashSales.FlashSalesPlans.Dtos;
namespace EasyAbp.EShop.Plugins.FlashSales.FlashSalePlans.Dtos;
[Serializable]
public class FlashSalesPlanGetListInput : ExtensiblePagedAndSortedResultRequestDto
public class FlashSalePlanGetListInput : ExtensiblePagedAndSortedResultRequestDto
{
public Guid? StoreId { get; set; }

4
plugins/FlashSales/src/EasyAbp.EShop.Plugins.FlashSales.Application.Contracts/EasyAbp/EShop/Plugins/FlashSales/FlashSalesPlans/Dtos/FlashSalesPlanUpdateDto.cs → plugins/FlashSales/src/EasyAbp.EShop.Plugins.FlashSales.Application.Contracts/EasyAbp/EShop/Plugins/FlashSales/FlashSalePlans/Dtos/FlashSalePlanUpdateDto.cs

@ -2,10 +2,10 @@ using System;
using Volo.Abp.Application.Dtos;
using Volo.Abp.Domain.Entities;
namespace EasyAbp.EShop.Plugins.FlashSales.FlashSalesPlans.Dtos;
namespace EasyAbp.EShop.Plugins.FlashSales.FlashSalePlans.Dtos;
[Serializable]
public class FlashSalesPlanUpdateDto : ExtensibleEntityDto<Guid>, IHasConcurrencyStamp
public class FlashSalePlanUpdateDto : ExtensibleEntityDto, IHasConcurrencyStamp
{
public DateTime BeginTime { get; set; }

21
plugins/FlashSales/src/EasyAbp.EShop.Plugins.FlashSales.Application.Contracts/EasyAbp/EShop/Plugins/FlashSales/FlashSalePlans/IFlashSalePlanAppService.cs

@ -0,0 +1,21 @@
using System;
using System.Threading.Tasks;
using EasyAbp.EShop.Plugins.FlashSales.FlashSalePlans.Dtos;
using Volo.Abp.Application.Services;
namespace EasyAbp.EShop.Plugins.FlashSales.FlashSalePlans;
public interface IFlashSalePlanAppService :
ICrudAppService<
FlashSalePlanDto,
Guid,
FlashSalePlanGetListInput,
FlashSalePlanCreateDto,
FlashSalePlanUpdateDto>
{
Task PreOrderAsync(Guid id);
Task CheckPreOrderAsync(Guid id);
Task CreateOrderAsync(Guid id, CreateOrderInput input);
}

6
plugins/FlashSales/src/EasyAbp.EShop.Plugins.FlashSales.Application.Contracts/EasyAbp/EShop/Plugins/FlashSales/FlashSalesResults/Dtos/FlashSalesResultDto.cs → plugins/FlashSales/src/EasyAbp.EShop.Plugins.FlashSales.Application.Contracts/EasyAbp/EShop/Plugins/FlashSales/FlashSaleResults/Dtos/FlashSaleResultDto.cs

@ -1,15 +1,15 @@
using System;
using Volo.Abp.Application.Dtos;
namespace EasyAbp.EShop.Plugins.FlashSales.FlashSalesResults.Dtos;
namespace EasyAbp.EShop.Plugins.FlashSales.FlashSaleResults.Dtos;
public class FlashSalesResultDto : ExtensibleFullAuditedEntityDto<Guid>
public class FlashSaleResultDto : ExtensibleFullAuditedEntityDto<Guid>
{
public virtual Guid StoreId { get; set; }
public virtual Guid PlanId { get; set; }
public virtual FlashSalesResultStatus Status { get; set; }
public virtual FlashSaleResultStatus Status { get; set; }
public virtual string Reason { get; set; }

6
plugins/FlashSales/src/EasyAbp.EShop.Plugins.FlashSales.Application.Contracts/EasyAbp/EShop/Plugins/FlashSales/FlashSalesResults/Dtos/FlashSalesResultGetListInput.cs → plugins/FlashSales/src/EasyAbp.EShop.Plugins.FlashSales.Application.Contracts/EasyAbp/EShop/Plugins/FlashSales/FlashSaleResults/Dtos/FlashSaleResultGetListInput.cs

@ -1,15 +1,15 @@
using System;
using Volo.Abp.Application.Dtos;
namespace EasyAbp.EShop.Plugins.FlashSales.FlashSalesResults.Dtos;
namespace EasyAbp.EShop.Plugins.FlashSales.FlashSaleResults.Dtos;
public class FlashSalesResultGetListInput : ExtensiblePagedAndSortedResultRequestDto
public class FlashSaleResultGetListInput : ExtensiblePagedAndSortedResultRequestDto
{
public virtual Guid? StoreId { get; set; }
public virtual Guid? PlanId { get; set; }
public virtual FlashSalesResultStatus? Status { get; set; }
public virtual FlashSaleResultStatus? Status { get; set; }
public virtual Guid? UserId { get; set; }

14
plugins/FlashSales/src/EasyAbp.EShop.Plugins.FlashSales.Application.Contracts/EasyAbp/EShop/Plugins/FlashSales/FlashSaleResults/IFlashSaleResultAppService.cs

@ -0,0 +1,14 @@
using System;
using EasyAbp.EShop.Plugins.FlashSales.FlashSaleResults.Dtos;
using Volo.Abp.Application.Services;
namespace EasyAbp.EShop.Plugins.FlashSales.FlashSaleResults;
public interface IFlashSaleResultAppService :
IReadOnlyAppService<
FlashSaleResultDto,
Guid,
FlashSaleResultGetListInput>
{
}

9
plugins/FlashSales/src/EasyAbp.EShop.Plugins.FlashSales.Application.Contracts/EasyAbp/EShop/Plugins/FlashSales/FlashSalesPlans/Dtos/CreateOrderInput.cs

@ -1,9 +0,0 @@
using System.ComponentModel.DataAnnotations;
using Volo.Abp.Application.Dtos;
namespace EasyAbp.EShop.Plugins.FlashSales.FlashSalesPlans.Dtos;
public class CreateOrderInput : ExtensibleEntityDto
{
public string CustomerRemark { get; set; }
}

21
plugins/FlashSales/src/EasyAbp.EShop.Plugins.FlashSales.Application.Contracts/EasyAbp/EShop/Plugins/FlashSales/FlashSalesPlans/IFlashSalesPlanAppService.cs

@ -1,21 +0,0 @@
using System;
using System.Threading.Tasks;
using EasyAbp.EShop.Plugins.FlashSales.FlashSalesPlans.Dtos;
using Volo.Abp.Application.Services;
namespace EasyAbp.EShop.Plugins.FlashSales.FlashSalesPlans;
public interface IFlashSalesPlanAppService :
ICrudAppService<
FlashSalesPlanDto,
Guid,
FlashSalesPlanGetListInput,
FlashSalesPlanCreateDto,
FlashSalesPlanUpdateDto>
{
Task PreOrderAsync(Guid id);
Task CheckPreOrderAsync(Guid id);
Task CreateOrderAsync(Guid id, CreateOrderInput input);
}

14
plugins/FlashSales/src/EasyAbp.EShop.Plugins.FlashSales.Application.Contracts/EasyAbp/EShop/Plugins/FlashSales/FlashSalesResults/IFlashSalesResultAppService.cs

@ -1,14 +0,0 @@
using System;
using EasyAbp.EShop.Plugins.FlashSales.FlashSalesResults.Dtos;
using Volo.Abp.Application.Services;
namespace EasyAbp.EShop.Plugins.FlashSales.FlashSalesResults;
public interface IFlashSalesResultAppService :
IReadOnlyAppService<
FlashSalesResultDto,
Guid,
FlashSalesResultGetListInput>
{
}

16
plugins/FlashSales/src/EasyAbp.EShop.Plugins.FlashSales.Application.Contracts/EasyAbp/EShop/Plugins/FlashSales/Permissions/FlashSalesPermissionDefinitionProvider.cs

@ -10,15 +10,15 @@ public class FlashSalesPermissionDefinitionProvider : PermissionDefinitionProvid
{
var myGroup = context.AddGroup(FlashSalesPermissions.GroupName, L("Permission:FlashSales"));
var flashSalesPlanPermission = myGroup.AddPermission(FlashSalesPermissions.FlashSalesPlan.Default, L("Permission:FlashSalesPlan"));
flashSalesPlanPermission.AddChild(FlashSalesPermissions.FlashSalesPlan.Manage, L("Permission:Manage"));
flashSalesPlanPermission.AddChild(FlashSalesPermissions.FlashSalesPlan.CrossStore, L("Permission:CrossStore"));
flashSalesPlanPermission.AddChild(FlashSalesPermissions.FlashSalesPlan.Create, L("Permission:Create"));
flashSalesPlanPermission.AddChild(FlashSalesPermissions.FlashSalesPlan.Update, L("Permission:Update"));
flashSalesPlanPermission.AddChild(FlashSalesPermissions.FlashSalesPlan.Delete, L("Permission:Delete"));
var flashSalePlanPermission = myGroup.AddPermission(FlashSalesPermissions.FlashSalePlan.Default, L("Permission:FlashSalePlan"));
flashSalePlanPermission.AddChild(FlashSalesPermissions.FlashSalePlan.Manage, L("Permission:Manage"));
flashSalePlanPermission.AddChild(FlashSalesPermissions.FlashSalePlan.CrossStore, L("Permission:CrossStore"));
flashSalePlanPermission.AddChild(FlashSalesPermissions.FlashSalePlan.Create, L("Permission:Create"));
flashSalePlanPermission.AddChild(FlashSalesPermissions.FlashSalePlan.Update, L("Permission:Update"));
flashSalePlanPermission.AddChild(FlashSalesPermissions.FlashSalePlan.Delete, L("Permission:Delete"));
var flashSalesResultPermission = myGroup.AddPermission(FlashSalesPermissions.FlashSalesResult.Default, L("Permission:FlashSalesResult"));
flashSalesResultPermission.AddChild(FlashSalesPermissions.FlashSalesResult.Manage, L("Permission:Manage"));
var flashSaleResultPermission = myGroup.AddPermission(FlashSalesPermissions.FlashSaleResult.Default, L("Permission:FlashSaleResult"));
flashSaleResultPermission.AddChild(FlashSalesPermissions.FlashSaleResult.Manage, L("Permission:Manage"));
}
private static LocalizableString L(string name)

8
plugins/FlashSales/src/EasyAbp.EShop.Plugins.FlashSales.Application.Contracts/EasyAbp/EShop/Plugins/FlashSales/Permissions/FlashSalesPermissions.cs

@ -11,9 +11,9 @@ public class FlashSalesPermissions
return ReflectionHelper.GetPublicConstantsRecursively(typeof(FlashSalesPermissions));
}
public class FlashSalesPlan
public class FlashSalePlan
{
public const string Default = GroupName + ".FlashSalesPlan";
public const string Default = GroupName + ".FlashSalePlan";
public const string Manage = Default + ".Manage";
public const string CrossStore = Default + ".CrossStore";
public const string Update = Default + ".Update";
@ -21,9 +21,9 @@ public class FlashSalesPermissions
public const string Delete = Default + ".Delete";
}
public class FlashSalesResult
public class FlashSaleResult
{
public const string Default = GroupName + ".FlashSalesResult";
public const string Default = GroupName + ".FlashSaleResult";
public const string Manage = Default + ".Manage";
}
}

145
plugins/FlashSales/src/EasyAbp.EShop.Plugins.FlashSales.Application/EasyAbp/EShop/Plugins/FlashSales/FlashSalesPlans/FlashSalesPlanAppService.cs → plugins/FlashSales/src/EasyAbp.EShop.Plugins.FlashSales.Application/EasyAbp/EShop/Plugins/FlashSales/FlashSalePlans/FlashSalePlanAppService.cs

@ -1,8 +1,9 @@
using System;
using System.Linq;
using System.Threading.Tasks;
using EasyAbp.EShop.Plugins.FlashSales.FlashSalesPlans.Dtos;
using EasyAbp.EShop.Plugins.FlashSales.FlashSalesResults;
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;
using EasyAbp.EShop.Products.Products;
using EasyAbp.EShop.Products.Products.Dtos;
@ -21,69 +22,69 @@ using Volo.Abp.Users;
namespace EasyAbp.EShop.Plugins.FlashSales.FlashSalesPlans;
[Authorize]
public class FlashSalesPlanAppService :
MultiStoreCrudAppService<FlashSalesPlan, FlashSalesPlanDto, Guid, FlashSalesPlanGetListInput, FlashSalesPlanCreateDto, FlashSalesPlanUpdateDto>,
IFlashSalesPlanAppService
public class FlashSalePlanAppService :
MultiStoreCrudAppService<FlashSalePlan, FlashSalePlanDto, Guid, FlashSalePlanGetListInput, FlashSalePlanCreateDto, FlashSalePlanUpdateDto>,
IFlashSalePlanAppService
{
protected override string CrossStorePolicyName { get; set; } = FlashSalesPermissions.FlashSalesPlan.CrossStore;
protected override string CrossStorePolicyName { get; set; } = FlashSalesPermissions.FlashSalePlan.CrossStore;
protected override string GetPolicyName { get; set; }
protected override string GetListPolicyName { get; set; }
protected override string CreatePolicyName { get; set; } = FlashSalesPermissions.FlashSalesPlan.Create;
protected override string UpdatePolicyName { get; set; } = FlashSalesPermissions.FlashSalesPlan.Update;
protected override string DeletePolicyName { get; set; } = FlashSalesPermissions.FlashSalesPlan.Delete;
protected override string CreatePolicyName { get; set; } = FlashSalesPermissions.FlashSalePlan.Create;
protected override string UpdatePolicyName { get; set; } = FlashSalesPermissions.FlashSalePlan.Update;
protected override string DeletePolicyName { get; set; } = FlashSalesPermissions.FlashSalePlan.Delete;
protected IFlashSalesPlanRepository FlashSalesPlanRepository { get; }
protected IFlashSalePlanRepository FlashSalePlanRepository { get; }
protected IProductAppService ProductAppService { get; }
protected IDistributedCache TokenDistributedCache { get; }
protected IDistributedCache<FlashSalesPlanCacheItem, Guid> DistributedCache { get; }
protected IDistributedCache<FlashSalePlanCacheItem, Guid> DistributedCache { get; }
protected IDistributedEventBus DistributedEventBus { get; }
protected IFlashSalesResultRepository FlashSalesResultRepository { get; }
protected IFlashSaleResultRepository FlashSaleResultRepository { get; }
protected IAbpDistributedLock DistributedLock { get; }
protected IFlashSalesPlanHasher FlashSalesPlanHasher { get; }
protected IFlashSalePlanHasher FlashSalesPlanHasher { get; }
public FlashSalesPlanAppService(
IFlashSalesPlanRepository flashSalesPlanRepository,
public FlashSalePlanAppService(
IFlashSalePlanRepository flashSalePlanRepository,
IProductAppService productAppService,
IDistributedCache tokenDistributedCache,
IDistributedCache<FlashSalesPlanCacheItem, Guid> distributedCache,
IDistributedCache<FlashSalePlanCacheItem, Guid> distributedCache,
IDistributedEventBus distributedEventBus,
IFlashSalesResultRepository flashSalesResultRepository,
IFlashSaleResultRepository flashSaleResultRepository,
IAbpDistributedLock distributedLock,
IFlashSalesPlanHasher flashSalesPlanHasher)
: base(flashSalesPlanRepository)
IFlashSalePlanHasher flashSalesPlanHasher)
: base(flashSalePlanRepository)
{
FlashSalesPlanRepository = flashSalesPlanRepository;
FlashSalePlanRepository = flashSalePlanRepository;
ProductAppService = productAppService;
TokenDistributedCache = tokenDistributedCache;
DistributedCache = distributedCache;
DistributedEventBus = distributedEventBus;
FlashSalesResultRepository = flashSalesResultRepository;
FlashSaleResultRepository = flashSaleResultRepository;
DistributedLock = distributedLock;
FlashSalesPlanHasher = flashSalesPlanHasher;
}
public override async Task<FlashSalesPlanDto> GetAsync(Guid id)
public override async Task<FlashSalePlanDto> GetAsync(Guid id)
{
var flashSalesPlan = await GetEntityByIdAsync(id);
var flashSalePlan = await GetEntityByIdAsync(id);
await CheckMultiStorePolicyAsync(flashSalesPlan.StoreId, GetPolicyName);
await CheckMultiStorePolicyAsync(flashSalePlan.StoreId, GetPolicyName);
if (!flashSalesPlan.IsPublished)
if (!flashSalePlan.IsPublished)
{
await CheckMultiStorePolicyAsync(flashSalesPlan.StoreId, FlashSalesPermissions.FlashSalesPlan.Manage);
await CheckMultiStorePolicyAsync(flashSalePlan.StoreId, FlashSalesPermissions.FlashSalePlan.Manage);
}
return await MapToGetOutputDtoAsync(flashSalesPlan);
return await MapToGetOutputDtoAsync(flashSalePlan);
}
public override async Task<FlashSalesPlanDto> CreateAsync(FlashSalesPlanCreateDto input)
public override async Task<FlashSalePlanDto> CreateAsync(FlashSalePlanCreateDto input)
{
await CheckMultiStorePolicyAsync(input.StoreId, CreatePolicyName);
@ -92,7 +93,7 @@ public class FlashSalesPlanAppService :
await ValidateCreateOrUpdateProductAsync(input.ProductId, product, input.ProductSkuId, productSku, input.StoreId);
var flashSalesPlan = new FlashSalesPlan(
var flashSalePlan = new FlashSalePlan(
GuidGenerator.Create(),
CurrentTenant.Id,
input.StoreId,
@ -103,56 +104,56 @@ public class FlashSalesPlanAppService :
input.IsPublished
);
await FlashSalesPlanRepository.InsertAsync(flashSalesPlan, autoSave: true);
await FlashSalePlanRepository.InsertAsync(flashSalePlan, autoSave: true);
return await MapToGetOutputDtoAsync(flashSalesPlan);
return await MapToGetOutputDtoAsync(flashSalePlan);
}
public override async Task<FlashSalesPlanDto> UpdateAsync(Guid id, FlashSalesPlanUpdateDto input)
public override async Task<FlashSalePlanDto> UpdateAsync(Guid id, FlashSalePlanUpdateDto input)
{
var flashSalesPlan = await GetEntityByIdAsync(id);
var flashSalePlan = await GetEntityByIdAsync(id);
var product = await ProductAppService.GetAsync(input.ProductId);
var productSku = product.GetSkuById(input.ProductSkuId);
await CheckMultiStorePolicyAsync(product.StoreId, UpdatePolicyName);
await ValidateCreateOrUpdateProductAsync(input.ProductId, product, input.ProductSkuId, productSku, flashSalesPlan.StoreId);
await ValidateCreateOrUpdateProductAsync(input.ProductId, product, input.ProductSkuId, productSku, flashSalePlan.StoreId);
if (await ExistRelatedFlashSalesResultsAsync(id) && (input.ProductId != flashSalesPlan.ProductId || input.ProductSkuId != flashSalesPlan.ProductSkuId))
if (await ExistRelatedFlashSalesResultsAsync(id) && (input.ProductId != flashSalePlan.ProductId || input.ProductSkuId != flashSalePlan.ProductSkuId))
{
throw new ExistRelatedFlashSalesResultsException(id);
throw new RelatedFlashSaleResultsExistException(id);
}
flashSalesPlan.SetTimeRange(input.BeginTime, input.EndTime);
flashSalesPlan.SetProductSku(flashSalesPlan.StoreId, input.ProductId, input.ProductSkuId);
flashSalesPlan.SetPublished(input.IsPublished);
flashSalePlan.SetTimeRange(input.BeginTime, input.EndTime);
flashSalePlan.SetProductSku(flashSalePlan.StoreId, input.ProductId, input.ProductSkuId);
flashSalePlan.SetPublished(input.IsPublished);
flashSalesPlan.SetConcurrencyStampIfNotNull(input.ConcurrencyStamp);
flashSalePlan.SetConcurrencyStampIfNotNull(input.ConcurrencyStamp);
await FlashSalesPlanRepository.UpdateAsync(flashSalesPlan, autoSave: true);
await FlashSalePlanRepository.UpdateAsync(flashSalePlan, autoSave: true);
return await MapToGetOutputDtoAsync(flashSalesPlan);
return await MapToGetOutputDtoAsync(flashSalePlan);
}
public override async Task DeleteAsync(Guid id)
{
var flashSalesPlan = await GetEntityByIdAsync(id);
var flashSalePlan = await GetEntityByIdAsync(id);
await CheckMultiStorePolicyAsync(flashSalesPlan.StoreId, DeletePolicyName);
await CheckMultiStorePolicyAsync(flashSalePlan.StoreId, DeletePolicyName);
if (await ExistRelatedFlashSalesResultsAsync(id))
{
throw new ExistRelatedFlashSalesResultsException(id);
throw new RelatedFlashSaleResultsExistException(id);
}
await FlashSalesPlanRepository.DeleteAsync(flashSalesPlan);
await FlashSalePlanRepository.DeleteAsync(flashSalePlan);
}
protected override async Task<IQueryable<FlashSalesPlan>> CreateFilteredQueryAsync(FlashSalesPlanGetListInput input)
protected override async Task<IQueryable<FlashSalePlan>> CreateFilteredQueryAsync(FlashSalePlanGetListInput input)
{
if (input.IncludeUnpublished)
{
await CheckMultiStorePolicyAsync(input.StoreId, FlashSalesPermissions.FlashSalesPlan.Manage);
await CheckMultiStorePolicyAsync(input.StoreId, FlashSalesPermissions.FlashSalePlan.Manage);
}
return (await base.CreateFilteredQueryAsync(input))
@ -166,7 +167,7 @@ public class FlashSalesPlanAppService :
public virtual async Task PreOrderAsync(Guid id)
{
var plan = await GetFlashSalesPlanCacheAsync(id);
var plan = await GetFlashSalePlanCacheAsync(id);
var product = await ProductAppService.GetAsync(plan.ProductId);
var productSku = product.GetSkuById(plan.ProductSkuId);
@ -177,7 +178,7 @@ public class FlashSalesPlanAppService :
public virtual async Task CheckPreOrderAsync(Guid id)
{
var plan = await GetFlashSalesPlanCacheAsync(id);
var plan = await GetFlashSalePlanCacheAsync(id);
var cacheHashToken = await GetCacheHashTokenAsync(plan);
if (cacheHashToken.IsNullOrWhiteSpace())
@ -198,7 +199,7 @@ public class FlashSalesPlanAppService :
public virtual async Task CreateOrderAsync(Guid id, CreateOrderInput input)
{
var plan = await GetFlashSalesPlanCacheAsync(id);
var plan = await GetFlashSalePlanCacheAsync(id);
var now = Clock.Now;
if (plan.BeginTime > now)
{
@ -231,18 +232,18 @@ public class FlashSalesPlanAppService :
await DistributedEventBus.PublishAsync(flashSalesReduceInventoryEto);
}
protected virtual Task<FlashSalesReduceInventoryEto> PrepareFlashSalesReduceInventoryEtoAsync(
FlashSalesPlanCacheItem plan,
protected virtual Task<FlashSaleReduceInventoryEto> PrepareFlashSalesReduceInventoryEtoAsync(
FlashSalePlanCacheItem plan,
Guid resultId,
CreateOrderInput input,
Guid userId,
DateTime now,
string hashToken)
{
var planEto = ObjectMapper.Map<FlashSalesPlanCacheItem, FlashSalesPlanEto>(plan);
var planEto = ObjectMapper.Map<FlashSalePlanCacheItem, FlashSalePlanEto>(plan);
planEto.TenantId = CurrentTenant.Id;
var eto = new FlashSalesReduceInventoryEto()
var eto = new FlashSaleReduceInventoryEto()
{
TenantId = CurrentTenant.Id,
PlanId = plan.Id,
@ -264,31 +265,31 @@ public class FlashSalesPlanAppService :
return Task.FromResult(eto);
}
protected virtual async Task<FlashSalesPlanCacheItem> GetFlashSalesPlanCacheAsync(Guid id)
protected virtual async Task<FlashSalePlanCacheItem> GetFlashSalePlanCacheAsync(Guid id)
{
return await DistributedCache.GetOrAddAsync(id, async () =>
{
var flashSalesPlan = await FlashSalesPlanRepository.GetAsync(id);
return ObjectMapper.Map<FlashSalesPlan, FlashSalesPlanCacheItem>(flashSalesPlan);
var flashSalesPlan = await FlashSalePlanRepository.GetAsync(id);
return ObjectMapper.Map<FlashSalePlan, FlashSalePlanCacheItem>(flashSalesPlan);
});
}
protected virtual Task<string> GetCacheKeyAsync(FlashSalesPlanCacheItem plan)
protected virtual Task<string> GetCacheKeyAsync(FlashSalePlanCacheItem plan)
{
return Task.FromResult($"eshopflashsales_{CurrentTenant.Id}_{CurrentUser.Id}_{plan.ProductSkuId}");
}
protected virtual async Task<string> GetCacheHashTokenAsync(FlashSalesPlanCacheItem plan)
protected virtual async Task<string> GetCacheHashTokenAsync(FlashSalePlanCacheItem plan)
{
return await TokenDistributedCache.GetStringAsync(await GetCacheKeyAsync(plan));
}
protected virtual async Task RemoveCacheHashTokenAsync(FlashSalesPlanCacheItem plan)
protected virtual async Task RemoveCacheHashTokenAsync(FlashSalePlanCacheItem plan)
{
await TokenDistributedCache.RemoveAsync(await GetCacheKeyAsync(plan));
}
protected virtual async Task SetCacheHashTokenAsync(FlashSalesPlanCacheItem plan, ProductDto product, ProductSkuDto productSku)
protected virtual async Task SetCacheHashTokenAsync(FlashSalePlanCacheItem plan, ProductDto product, ProductSkuDto productSku)
{
var hashToken = await FlashSalesPlanHasher.HashAsync(plan.LastModificationTime, product.LastModificationTime, productSku.LastModificationTime);
@ -298,7 +299,7 @@ public class FlashSalesPlanAppService :
});
}
protected virtual async Task<bool> CompareHashTokenAsync(string cacheHashToken, FlashSalesPlanCacheItem plan, ProductDto product, ProductSkuDto productSku)
protected virtual async Task<bool> CompareHashTokenAsync(string cacheHashToken, FlashSalePlanCacheItem plan, ProductDto product, ProductSkuDto productSku)
{
if (cacheHashToken.IsNullOrWhiteSpace())
{
@ -310,7 +311,7 @@ public class FlashSalesPlanAppService :
return cacheHashToken == hashToken;
}
protected virtual async Task<FlashSalesResult> CreatePendingFlashSalesResultAsync(FlashSalesPlanCacheItem plan, Guid userId)
protected virtual async Task<FlashSaleResult> CreatePendingFlashSalesResultAsync(FlashSalePlanCacheItem plan, Guid userId)
{
var lockKey = $"create-flash-sales-order-{plan.Id}-{userId}";
@ -322,27 +323,27 @@ public class FlashSalesPlanAppService :
}
// Prevent repeat submit
if (await FlashSalesResultRepository.AnyAsync(x =>
x.PlanId == plan.Id && x.UserId == userId && (x.Status == FlashSalesResultStatus.Successful || x.Status == FlashSalesResultStatus.Pending))
if (await FlashSaleResultRepository.AnyAsync(x =>
x.PlanId == plan.Id && x.UserId == userId && (x.Status == FlashSaleResultStatus.Successful || x.Status == FlashSaleResultStatus.Pending))
)
{
throw new BusinessException(FlashSalesErrorCodes.DuplicateFlashSalesOrder);
}
var result = new FlashSalesResult(
var result = new FlashSaleResult(
id: GuidGenerator.Create(),
tenantId: CurrentTenant.Id,
storeId: plan.StoreId,
planId: plan.Id,
status: FlashSalesResultStatus.Pending,
status: FlashSaleResultStatus.Pending,
reason: null,
userId: userId,
orderId: null
);
return await FlashSalesResultRepository.InsertAsync(result, autoSave: true);
return await FlashSaleResultRepository.InsertAsync(result, autoSave: true);
}
protected virtual Task ValidatePreOrderAsync(FlashSalesPlanCacheItem plan, ProductDto product, ProductSkuDto productSku)
protected virtual Task ValidatePreOrderAsync(FlashSalePlanCacheItem plan, ProductDto product, ProductSkuDto productSku)
{
if (!product.IsPublished)
{
@ -356,7 +357,7 @@ public class FlashSalesPlanAppService :
if (!plan.IsPublished)
{
throw new EntityNotFoundException(typeof(FlashSalesPlan), plan.Id);
throw new EntityNotFoundException(typeof(FlashSalePlan), plan.Id);
}
if (Clock.Now >= plan.EndTime)
@ -374,7 +375,7 @@ public class FlashSalesPlanAppService :
protected virtual async Task<bool> ExistRelatedFlashSalesResultsAsync(Guid planId)
{
return await FlashSalesResultRepository.AnyAsync(x => x.PlanId == planId);
return await FlashSaleResultRepository.AnyAsync(x => x.PlanId == planId);
}
protected virtual Task ValidateCreateOrUpdateProductAsync(Guid productId, ProductDto product, Guid productSkuId, ProductSkuDto productSku, Guid storeId)

11
plugins/FlashSales/src/EasyAbp.EShop.Plugins.FlashSales.Application/EasyAbp/EShop/Plugins/FlashSales/FlashSalesPlans/FlashSalesPlanCacheInvalidator.cs → plugins/FlashSales/src/EasyAbp.EShop.Plugins.FlashSales.Application/EasyAbp/EShop/Plugins/FlashSales/FlashSalePlans/FlashSalePlanCacheInvalidator.cs

@ -1,5 +1,6 @@
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;
@ -8,20 +9,20 @@ using Volo.Abp.Uow;
namespace EasyAbp.EShop.Plugins.FlashSales.FlashSalesPlans;
public class FlashSalesPlanCacheInvalidator : ILocalEventHandler<EntityChangedEventData<FlashSalesPlan>>, ITransientDependency
public class FlashSalePlanCacheInvalidator : ILocalEventHandler<EntityChangedEventData<FlashSalePlan>>, ITransientDependency
{
protected IDistributedCache<FlashSalesPlanCacheItem, Guid> DistributedCache { get; }
protected IDistributedCache<FlashSalePlanCacheItem, Guid> DistributedCache { get; }
protected IUnitOfWorkManager UnitOfWorkManager { get; }
public FlashSalesPlanCacheInvalidator(
IDistributedCache<FlashSalesPlanCacheItem, Guid> distributedCache,
public FlashSalePlanCacheInvalidator(
IDistributedCache<FlashSalePlanCacheItem, Guid> distributedCache,
IUnitOfWorkManager unitOfWorkManager)
{
DistributedCache = distributedCache;
UnitOfWorkManager = unitOfWorkManager;
}
public virtual Task HandleEventAsync(EntityChangedEventData<FlashSalesPlan> eventData)
public virtual Task HandleEventAsync(EntityChangedEventData<FlashSalePlan> eventData)
{
UnitOfWorkManager.Current.OnCompleted(async () =>
{

4
plugins/FlashSales/src/EasyAbp.EShop.Plugins.FlashSales.Application/EasyAbp/EShop/Plugins/FlashSales/FlashSalesPlans/FlashSalesPlanCacheItem.cs → plugins/FlashSales/src/EasyAbp.EShop.Plugins.FlashSales.Application/EasyAbp/EShop/Plugins/FlashSales/FlashSalePlans/FlashSalePlanCacheItem.cs

@ -1,10 +1,10 @@
using System;
using EasyAbp.EShop.Plugins.FlashSales.FlashSalesPlans.Dtos;
using EasyAbp.EShop.Plugins.FlashSales.FlashSalePlans.Dtos;
namespace EasyAbp.EShop.Plugins.FlashSales.FlashSalesPlans;
[Serializable]
public class FlashSalesPlanCacheItem : FlashSalesPlanDto
public class FlashSalePlanCacheItem : FlashSalePlanDto
{
public Guid? TenantId { get; set; }
}

0
plugins/FlashSales/src/EasyAbp.EShop.Plugins.FlashSales.Application/EasyAbp/EShop/Plugins/FlashSales/FlashSalesPlans/ProductIsNotInThisStoreException.cs → plugins/FlashSales/src/EasyAbp.EShop.Plugins.FlashSales.Application/EasyAbp/EShop/Plugins/FlashSales/FlashSalePlans/ProductIsNotInThisStoreException.cs

0
plugins/FlashSales/src/EasyAbp.EShop.Plugins.FlashSales.Application/EasyAbp/EShop/Plugins/FlashSales/FlashSalesPlans/ProductSkuIsNotFoundException.cs → plugins/FlashSales/src/EasyAbp.EShop.Plugins.FlashSales.Application/EasyAbp/EShop/Plugins/FlashSales/FlashSalePlans/ProductSkuIsNotFoundException.cs

4
plugins/FlashSales/src/EasyAbp.EShop.Plugins.FlashSales.Application/EasyAbp/EShop/Plugins/FlashSales/FlashSalesPlans/ExistRelatedFlashSalesResultsException.cs → plugins/FlashSales/src/EasyAbp.EShop.Plugins.FlashSales.Application/EasyAbp/EShop/Plugins/FlashSales/FlashSalePlans/RelatedFlashSaleResultsExistException.cs

@ -5,9 +5,9 @@ using Volo.Abp;
namespace EasyAbp.EShop.Plugins.FlashSales.FlashSalesPlans;
[Serializable]
public class ExistRelatedFlashSalesResultsException : BusinessException
public class RelatedFlashSaleResultsExistException : BusinessException
{
public ExistRelatedFlashSalesResultsException(Guid planId) : base(FlashSalesErrorCodes.ExistRelatedFlashSalesResults)
public RelatedFlashSaleResultsExistException(Guid planId) : base(FlashSalesErrorCodes.RelatedFlashSaleResultsExist)
{
WithData(nameof(planId), planId);
}

0
plugins/FlashSales/src/EasyAbp.EShop.Plugins.FlashSales.Application/EasyAbp/EShop/Plugins/FlashSales/FlashSalesPlans/UnexpectedInventoryStrategyException.cs → plugins/FlashSales/src/EasyAbp.EShop.Plugins.FlashSales.Application/EasyAbp/EShop/Plugins/FlashSales/FlashSalePlans/UnexpectedInventoryStrategyException.cs

21
plugins/FlashSales/src/EasyAbp.EShop.Plugins.FlashSales.Application/EasyAbp/EShop/Plugins/FlashSales/FlashSalesResults/FlashSalesResultAppService.cs → plugins/FlashSales/src/EasyAbp.EShop.Plugins.FlashSales.Application/EasyAbp/EShop/Plugins/FlashSales/FlashSaleResults/FlashSaleResultAppService.cs

@ -1,26 +1,27 @@
using System;
using System.Linq;
using System.Threading.Tasks;
using EasyAbp.EShop.Plugins.FlashSales.FlashSalesResults.Dtos;
using EasyAbp.EShop.Plugins.FlashSales.FlashSaleResults;
using EasyAbp.EShop.Plugins.FlashSales.FlashSaleResults.Dtos;
using EasyAbp.EShop.Plugins.FlashSales.Permissions;
using Volo.Abp.Application.Services;
namespace EasyAbp.EShop.Plugins.FlashSales.FlashSalesResults;
public class FlashSalesResultAppService :
ReadOnlyAppService<FlashSalesResult, FlashSalesResultDto, Guid, FlashSalesResultGetListInput>,
IFlashSalesResultAppService
public class FlashSaleResultAppService :
ReadOnlyAppService<FlashSaleResult, FlashSaleResultDto, Guid, FlashSaleResultGetListInput>,
IFlashSaleResultAppService
{
protected override string GetPolicyName { get; set; }
protected override string GetListPolicyName { get; set; }
protected IFlashSalesResultRepository FlashSalesResultRepository { get; }
protected IFlashSaleResultRepository FlashSaleResultRepository { get; }
public FlashSalesResultAppService(IFlashSalesResultRepository flashSalesResultRepository) : base(flashSalesResultRepository)
public FlashSaleResultAppService(IFlashSaleResultRepository flashSalesResultRepository) : base(flashSalesResultRepository)
{
}
public override async Task<FlashSalesResultDto> GetAsync(Guid id)
public override async Task<FlashSaleResultDto> GetAsync(Guid id)
{
await CheckGetPolicyAsync();
@ -28,17 +29,17 @@ public class FlashSalesResultAppService :
if (flashSalesPlan.UserId != CurrentUser.Id)
{
await CheckPolicyAsync(FlashSalesPermissions.FlashSalesResult.Manage);
await CheckPolicyAsync(FlashSalesPermissions.FlashSaleResult.Manage);
}
return await MapToGetOutputDtoAsync(flashSalesPlan);
}
protected override async Task<IQueryable<FlashSalesResult>> CreateFilteredQueryAsync(FlashSalesResultGetListInput input)
protected override async Task<IQueryable<FlashSaleResult>> CreateFilteredQueryAsync(FlashSaleResultGetListInput input)
{
if (input.UserId != CurrentUser.Id)
{
await CheckPolicyAsync(FlashSalesPermissions.FlashSalesResult.Manage);
await CheckPolicyAsync(FlashSalesPermissions.FlashSaleResult.Manage);
}
return (await base.CreateFilteredQueryAsync(input))

19
plugins/FlashSales/src/EasyAbp.EShop.Plugins.FlashSales.Application/EasyAbp/EShop/Plugins/FlashSales/FlashSalesApplicationAutoMapperProfile.cs

@ -1,8 +1,9 @@
using AutoMapper;
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;
using EasyAbp.EShop.Plugins.FlashSales.FlashSalesPlans.Dtos;
using EasyAbp.EShop.Plugins.FlashSales.FlashSalesResults;
using EasyAbp.EShop.Plugins.FlashSales.FlashSalesResults.Dtos;
namespace EasyAbp.EShop.Plugins.FlashSales;
@ -13,16 +14,16 @@ public class FlashSalesApplicationAutoMapperProfile : Profile
/* You can configure your AutoMapper mapping configuration here.
* Alternatively, you can split your mapping configurations
* into multiple profile classes for a better organization. */
CreateMap<FlashSalesPlan, FlashSalesPlanDto>()
CreateMap<FlashSalePlan, FlashSalePlanDto>()
.MapExtraProperties();
CreateMap<FlashSalesPlanCreateDto, FlashSalesPlan>(MemberList.Source);
CreateMap<FlashSalesPlanUpdateDto, FlashSalesPlan>(MemberList.Source);
CreateMap<FlashSalesPlan, FlashSalesPlanCacheItem>()
CreateMap<FlashSalePlanCreateDto, FlashSalePlan>(MemberList.Source);
CreateMap<FlashSalePlanUpdateDto, FlashSalePlan>(MemberList.Source);
CreateMap<FlashSalePlan, FlashSalePlanCacheItem>()
.MapExtraProperties();
CreateMap<FlashSalesPlanCacheItem, FlashSalesPlanEto>()
CreateMap<FlashSalePlanCacheItem, FlashSalePlanEto>()
.MapExtraProperties();
CreateMap<FlashSalesResult, FlashSalesResultDto>()
CreateMap<FlashSaleResult, FlashSaleResultDto>()
.MapExtraProperties();
}
}

2
plugins/FlashSales/src/EasyAbp.EShop.Plugins.FlashSales.Domain.Shared/EasyAbp/EShop/Plugins/FlashSales/FlashSalesPlans/CreateFlashSalesOrderCompleteEto.cs → plugins/FlashSales/src/EasyAbp.EShop.Plugins.FlashSales.Domain.Shared/EasyAbp/EShop/Plugins/FlashSales/FlashSalePlans/CreateFlashSaleOrderCompleteEto.cs

@ -4,7 +4,7 @@ using Volo.Abp.ObjectExtending;
namespace EasyAbp.EShop.Plugins.FlashSales.FlashSalesPlans;
public class CreateFlashSalesOrderCompleteEto : ExtensibleObject, IMultiTenant
public class CreateFlashSaleOrderCompleteEto : ExtensibleObject, IMultiTenant
{
public Guid? TenantId { get; set; }

11
plugins/FlashSales/src/EasyAbp.EShop.Plugins.FlashSales.Domain.Shared/EasyAbp/EShop/Plugins/FlashSales/FlashSalesPlans/CreateFlashSalesOrderEto.cs → plugins/FlashSales/src/EasyAbp.EShop.Plugins.FlashSales.Domain.Shared/EasyAbp/EShop/Plugins/FlashSales/FlashSalePlans/CreateFlashSaleOrderEto.cs

@ -1,12 +1,11 @@
using System;
using EasyAbp.EShop.Products.Products;
using Volo.Abp.MultiTenancy;
using Volo.Abp.ObjectExtending;
namespace EasyAbp.EShop.Plugins.FlashSales.FlashSalesPlans;
namespace EasyAbp.EShop.Plugins.FlashSales.FlashSalePlans;
[Serializable]
public class CreateFlashSalesOrderEto : ExtensibleObject, IMultiTenant
public class CreateFlashSaleOrderEto : ExtensibleObject, IMultiTenant
{
public Guid? TenantId { get; set; }
@ -24,9 +23,9 @@ public class CreateFlashSalesOrderEto : ExtensibleObject, IMultiTenant
public int Quantity { get; set; }
public FlashSalesProductEto Product { get; set; }
public FlashSaleProductEto Product { get; set; }
public FlashSalesProductDetailEto ProductDetail { get; set; }
public FlashSaleProductDetailEto ProductDetail { get; set; }
public FlashSalesPlanEto Plan { get; set; }
public FlashSalePlanEto Plan { get; set; }
}

4
plugins/FlashSales/src/EasyAbp.EShop.Plugins.FlashSales.Domain.Shared/EasyAbp/EShop/Plugins/FlashSales/FlashSalesPlans/FlashSalesPlanEto.cs → plugins/FlashSales/src/EasyAbp.EShop.Plugins.FlashSales.Domain.Shared/EasyAbp/EShop/Plugins/FlashSales/FlashSalePlans/FlashSalePlanEto.cs

@ -2,10 +2,10 @@
using Volo.Abp.MultiTenancy;
using Volo.Abp.ObjectExtending;
namespace EasyAbp.EShop.Plugins.FlashSales.FlashSalesPlans;
namespace EasyAbp.EShop.Plugins.FlashSales.FlashSalePlans;
[Serializable]
public class FlashSalesPlanEto : FullAuditedEntityEto<Guid>, IMultiTenant
public class FlashSalePlanEto : FullAuditedEntityEto<Guid>, IMultiTenant
{
public Guid? TenantId { get; set; }

4
plugins/FlashSales/src/EasyAbp.EShop.Plugins.FlashSales.Domain.Shared/EasyAbp/EShop/Plugins/FlashSales/FlashSalesPlans/FlashSalesPlanHasher.cs → plugins/FlashSales/src/EasyAbp.EShop.Plugins.FlashSales.Domain.Shared/EasyAbp/EShop/Plugins/FlashSales/FlashSalePlans/FlashSalePlanHasher.cs

@ -4,9 +4,9 @@ using System.Text;
using System.Threading.Tasks;
using Volo.Abp.DependencyInjection;
namespace EasyAbp.EShop.Plugins.FlashSales.FlashSalesPlans;
namespace EasyAbp.EShop.Plugins.FlashSales.FlashSalePlans;
public class FlashSalesPlanHasher : IFlashSalesPlanHasher, ITransientDependency
public class FlashSalePlanHasher : IFlashSalePlanHasher, ITransientDependency
{
public virtual Task<string> HashAsync(DateTime? planLastModificationTime, DateTime? productLastModificationTime, DateTime? productSkuLastModificationTime)
{

6
plugins/FlashSales/src/EasyAbp.EShop.Plugins.FlashSales.Domain.Shared/EasyAbp/EShop/Plugins/FlashSales/FlashSalesPlans/FlashSalesProductAttributeEto.cs → plugins/FlashSales/src/EasyAbp.EShop.Plugins.FlashSales.Domain.Shared/EasyAbp/EShop/Plugins/FlashSales/FlashSalePlans/FlashSaleProductAttributeEto.cs

@ -2,10 +2,10 @@
using System.Collections.Generic;
using EasyAbp.EShop.Products.Products;
namespace EasyAbp.EShop.Plugins.FlashSales.FlashSalesPlans;
namespace EasyAbp.EShop.Plugins.FlashSales.FlashSalePlans;
[Serializable]
public class FlashSalesProductAttributeEto : FullAuditedEntityEto<Guid>, IProductAttribute
public class FlashSaleProductAttributeEto : FullAuditedEntityEto<Guid>, IProductAttribute
{
public string DisplayName { get; set; }
@ -13,5 +13,5 @@ public class FlashSalesProductAttributeEto : FullAuditedEntityEto<Guid>, IProduc
public int DisplayOrder { get; set; }
public List<FlashSalesProductAttributeOptionEto> ProductAttributeOptions { get; set; }
public List<FlashSaleProductAttributeOptionEto> ProductAttributeOptions { get; set; }
}

4
plugins/FlashSales/src/EasyAbp.EShop.Plugins.FlashSales.Domain.Shared/EasyAbp/EShop/Plugins/FlashSales/FlashSalesPlans/FlashSalesProductAttributeOptionEto.cs → plugins/FlashSales/src/EasyAbp.EShop.Plugins.FlashSales.Domain.Shared/EasyAbp/EShop/Plugins/FlashSales/FlashSalePlans/FlashSaleProductAttributeOptionEto.cs

@ -1,10 +1,10 @@
using System;
using EasyAbp.EShop.Products.Products;
namespace EasyAbp.EShop.Plugins.FlashSales.FlashSalesPlans;
namespace EasyAbp.EShop.Plugins.FlashSales.FlashSalePlans;
[Serializable]
public class FlashSalesProductAttributeOptionEto : FullAuditedEntityEto<Guid>, IProductAttributeOption
public class FlashSaleProductAttributeOptionEto : FullAuditedEntityEto<Guid>, IProductAttributeOption
{
public string DisplayName { get; set; }

4
plugins/FlashSales/src/EasyAbp.EShop.Plugins.FlashSales.Domain.Shared/EasyAbp/EShop/Plugins/FlashSales/FlashSalesPlans/ProductDetailEto.cs → plugins/FlashSales/src/EasyAbp.EShop.Plugins.FlashSales.Domain.Shared/EasyAbp/EShop/Plugins/FlashSales/FlashSalePlans/FlashSaleProductDetailEto.cs

@ -1,10 +1,10 @@
using System;
using Volo.Abp.MultiTenancy;
namespace EasyAbp.EShop.Plugins.FlashSales.FlashSalesPlans;
namespace EasyAbp.EShop.Plugins.FlashSales.FlashSalePlans;
[Serializable]
public class FlashSalesProductDetailEto : FullAuditedEntityEto<Guid>, IMultiTenant
public class FlashSaleProductDetailEto : FullAuditedEntityEto<Guid>, IMultiTenant
{
public Guid? TenantId { get; set; }

8
plugins/FlashSales/src/EasyAbp.EShop.Plugins.FlashSales.Domain.Shared/EasyAbp/EShop/Plugins/FlashSales/FlashSalesPlans/FlashSalesProductEto.cs → plugins/FlashSales/src/EasyAbp.EShop.Plugins.FlashSales.Domain.Shared/EasyAbp/EShop/Plugins/FlashSales/FlashSalePlans/FlashSaleProductEto.cs

@ -3,10 +3,10 @@ using System.Collections.Generic;
using EasyAbp.EShop.Products.Products;
using Volo.Abp.MultiTenancy;
namespace EasyAbp.EShop.Plugins.FlashSales.FlashSalesPlans;
namespace EasyAbp.EShop.Plugins.FlashSales.FlashSalePlans;
[Serializable]
public class FlashSalesProductEto : FullAuditedEntityEto<Guid>, IProduct, IMultiTenant
public class FlashSaleProductEto : FullAuditedEntityEto<Guid>, IProduct, IMultiTenant
{
public Guid? TenantId { get; set; }
@ -38,7 +38,7 @@ public class FlashSalesProductEto : FullAuditedEntityEto<Guid>, IProduct, IMulti
public TimeSpan? PaymentExpireIn { get; set; }
public List<FlashSalesProductAttributeEto> ProductAttributes { get; set; }
public List<FlashSaleProductAttributeEto> ProductAttributes { get; set; }
public List<FlashSalesProductSkuEto> ProductSkus { get; set; }
public List<FlashSaleProductSkuEto> ProductSkus { get; set; }
}

4
plugins/FlashSales/src/EasyAbp.EShop.Plugins.FlashSales.Domain.Shared/EasyAbp/EShop/Plugins/FlashSales/FlashSalesPlans/FlashSalesProductSkuEto.cs → plugins/FlashSales/src/EasyAbp.EShop.Plugins.FlashSales.Domain.Shared/EasyAbp/EShop/Plugins/FlashSales/FlashSalePlans/FlashSaleProductSkuEto.cs

@ -2,10 +2,10 @@
using System.Collections.Generic;
using EasyAbp.EShop.Products.Products;
namespace EasyAbp.EShop.Plugins.FlashSales.FlashSalesPlans;
namespace EasyAbp.EShop.Plugins.FlashSales.FlashSalePlans;
[Serializable]
public class FlashSalesProductSkuEto : FullAuditedEntityEto<Guid>, IProductSku
public class FlashSaleProductSkuEto : FullAuditedEntityEto<Guid>, IProductSku
{
public List<Guid> AttributeOptionIds { get; set; }

6
plugins/FlashSales/src/EasyAbp.EShop.Plugins.FlashSales.Domain.Shared/EasyAbp/EShop/Plugins/FlashSales/FlashSalesPlans/FlashSalesReduceInventoryEto.cs → plugins/FlashSales/src/EasyAbp.EShop.Plugins.FlashSales.Domain.Shared/EasyAbp/EShop/Plugins/FlashSales/FlashSalePlans/FlashSaleReduceInventoryEto.cs

@ -2,10 +2,10 @@
using Volo.Abp.MultiTenancy;
using Volo.Abp.ObjectExtending;
namespace EasyAbp.EShop.Plugins.FlashSales.FlashSalesPlans;
namespace EasyAbp.EShop.Plugins.FlashSales.FlashSalePlans;
[Serializable]
public class FlashSalesReduceInventoryEto : ExtensibleObject, IMultiTenant
public class FlashSaleReduceInventoryEto : ExtensibleObject, IMultiTenant
{
public Guid? TenantId { get; set; }
@ -23,7 +23,7 @@ public class FlashSalesReduceInventoryEto : ExtensibleObject, IMultiTenant
public int Quantity { get; set; }
public FlashSalesPlanEto Plan { get; set; }
public FlashSalePlanEto Plan { get; set; }
public string HashToken { get; set; }
}

4
plugins/FlashSales/src/EasyAbp.EShop.Plugins.FlashSales.Domain.Shared/EasyAbp/EShop/Plugins/FlashSales/FlashSalesPlans/IFlashSalesPlanHasher.cs → plugins/FlashSales/src/EasyAbp.EShop.Plugins.FlashSales.Domain.Shared/EasyAbp/EShop/Plugins/FlashSales/FlashSalePlans/IFlashSalePlanHasher.cs

@ -1,9 +1,9 @@
using System;
using System.Threading.Tasks;
namespace EasyAbp.EShop.Plugins.FlashSales.FlashSalesPlans;
namespace EasyAbp.EShop.Plugins.FlashSales.FlashSalePlans;
public interface IFlashSalesPlanHasher
public interface IFlashSalePlanHasher
{
Task<string> HashAsync(DateTime? planLastModificationTime, DateTime? productLastModificationTime, DateTime? productSkuLastModificationTime);
}

4
plugins/FlashSales/src/EasyAbp.EShop.Plugins.FlashSales.Domain.Shared/EasyAbp/EShop/Plugins/FlashSales/FlashSalesResults/FlashSalesResultFailedReason.cs → plugins/FlashSales/src/EasyAbp.EShop.Plugins.FlashSales.Domain.Shared/EasyAbp/EShop/Plugins/FlashSales/FlashSaleResults/FlashSaleResultFailedReason.cs

@ -1,6 +1,6 @@
namespace EasyAbp.EShop.Plugins.FlashSales.FlashSalesResults;
namespace EasyAbp.EShop.Plugins.FlashSales.FlashSaleResults;
public static class FlashSalesResultFailedReason
public static class FlashSaleResultFailedReason
{
public const string InsufficientInventory = nameof(InsufficientInventory);

8
plugins/FlashSales/src/EasyAbp.EShop.Plugins.FlashSales.Domain.Shared/EasyAbp/EShop/Plugins/FlashSales/FlashSaleResults/FlashSaleResultStatus.cs

@ -0,0 +1,8 @@
namespace EasyAbp.EShop.Plugins.FlashSales.FlashSaleResults;
public enum FlashSaleResultStatus
{
Pending = 0,
Successful = 1,
Failed = 2
}

2
plugins/FlashSales/src/EasyAbp.EShop.Plugins.FlashSales.Domain.Shared/EasyAbp/EShop/Plugins/FlashSales/FlashSalesErrorCodes.cs

@ -26,5 +26,5 @@ public static class FlashSalesErrorCodes
public const string DuplicateFlashSalesOrder = $"{Namespace}:{nameof(DuplicateFlashSalesOrder)}";
public const string ExistRelatedFlashSalesResults = $"{Namespace}:{nameof(ExistRelatedFlashSalesResults)}";
public const string RelatedFlashSaleResultsExist = $"{Namespace}:{nameof(RelatedFlashSaleResultsExist)}";
}

8
plugins/FlashSales/src/EasyAbp.EShop.Plugins.FlashSales.Domain.Shared/EasyAbp/EShop/Plugins/FlashSales/FlashSalesResults/FlashSalesResultStatus.cs

@ -1,8 +0,0 @@
namespace EasyAbp.EShop.Plugins.FlashSales.FlashSalesResults;
public enum FlashSalesResultStatus
{
Pending = 0,
Successful = 1,
Failed = 2
}

64
plugins/FlashSales/src/EasyAbp.EShop.Plugins.FlashSales.Domain.Shared/EasyAbp/EShop/Plugins/FlashSales/Localization/en.json

@ -6,47 +6,47 @@
"EasyAbp.EShop.Plugins.FlashSales:ProductSkuIsNotFound": "ProductSku '{productSkuId}' is not found",
"EasyAbp.EShop.Plugins.FlashSales:ProductIsNotPublished": "Product is not published",
"EasyAbp.EShop.Plugins.FlashSales:ProductSkuInventoryExceeded": "ProductSku inventory exceeded",
"EasyAbp.EShop.Plugins.FlashSales:UnexpectedInventoryStrategy": "Only the specified inventory strategy {expectedInventoryStrategy} is allowed.",
"EasyAbp.EShop.Plugins.FlashSales:UnexpectedInventoryStrategy": "Only the specified inventory strategy {expectedInventoryStrategy} product is allowed.",
"EasyAbp.EShop.Plugins.FlashSales:PreOrderExpired": "Pre order expired",
"EasyAbp.EShop.Plugins.FlashSales:FlashSaleNotStarted": "Flash-sale not started",
"EasyAbp.EShop.Plugins.FlashSales:FlashSaleIsOver": "Flash-sale is over",
"EasyAbp.EShop.Plugins.FlashSales:BusyToCreateFlashSaleOrder": "Busy to create flash-sale order",
"EasyAbp.EShop.Plugins.FlashSales:DuplicateFlashSalesOrder": "Duplicate flash-sales order",
"EasyAbp.EShop.Plugins.FlashSales:ExistRelatedFlashSalesResults": "Exist Related flash-sales results",
"Menu:FlashSalesManagement": "FlashSales Management",
"Permission:FlashSalesPlan": "FlashSales Plan",
"EasyAbp.EShop.Plugins.FlashSales:RelatedFlashSaleResultsExist": "Related flash-sales results exist",
"Menu:FlashSalesManagement": "Flash-Sales Management",
"Permission:FlashSalePlan": "FlashSale Plan",
"Permission:Manage": "Manage",
"Permission:Create": "Create",
"Permission:Update": "Update",
"Permission:Delete": "Delete",
"Menu:FlashSalesPlan": "FlashSales Plan",
"FlashSalesPlan": "FlashSales Plan",
"FlashSalesPlanStoreId": "Store ID",
"FlashSalesPlanBeginTime": "Begin Time",
"FlashSalesPlanEndTime": "End Time",
"FlashSalesPlanProductId": "Product ID",
"FlashSalesPlanProductSkuId": "Product SKU ID",
"FlashSalesPlanIsPublished": "Is Published",
"CreateFlashSalesPlan": "Create",
"EditFlashSalesPlan": "Edit",
"FlashSalesPlanDeletionConfirmationMessage": "Are you sure to delete the flashSalesPlan {0}?",
"Menu:FlashSalePlan": "Flash-Sale Plan",
"FlashSalePlan": "Flash-Sale Plan",
"FlashSalePlanStoreId": "Store ID",
"FlashSalePlanBeginTime": "Begin Time",
"FlashSalePlanEndTime": "End Time",
"FlashSalePlanProductId": "Product ID",
"FlashSalePlanProductSkuId": "Product SKU ID",
"FlashSalePlanIsPublished": "Is Published",
"CreateFlashSalePlan": "Create",
"EditFlashSalePlan": "Edit",
"FlashSalePlanDeletionConfirmationMessage": "Are you sure to delete the flash-sale plan {0}?",
"SuccessfullyDeleted": "Successfully deleted",
"Permission:FlashSalesResult": "FlashSales Result",
"Menu:FlashSalesResult": "FlashSales Result",
"FlashSalesResult": "FlashSales Result",
"FlashSalesResultStoreId": "Store ID",
"FlashSalesResultPlanId": "Plan ID",
"FlashSalesResultStatus": "Status",
"FlashSalesResultReason": "Reason",
"FlashSalesResultUserId": "User ID",
"FlashSalesResultOrderId": "Order ID",
"FlashSalesResultCreationTime": "Creation Time",
"ViewFlashSalesResult": "View",
"Enum:FlashSalesResultStatus.Pending": "Pending",
"Enum:FlashSalesResultStatus.Successful": "Successful",
"Enum:FlashSalesResultStatus.Failed": "Failed",
"Enum:FlashSalesResultStatus.0": "Pending",
"Enum:FlashSalesResultStatus.1": "Successful",
"Enum:FlashSalesResultStatus.2": "Failed"
"Permission:FlashSaleResult": "Flash-Sale Result",
"Menu:FlashSaleResult": "Flash-Sale Result",
"FlashSaleResult": "Flash-Sale Result",
"FlashSaleResultStoreId": "Store ID",
"FlashSaleResultPlanId": "Plan ID",
"FlashSaleResultStatus": "Status",
"FlashSaleResultReason": "Reason",
"FlashSaleResultUserId": "User ID",
"FlashSaleResultOrderId": "Order ID",
"FlashSaleResultCreationTime": "Creation Time",
"ViewFlashSaleResult": "View",
"Enum:FlashSaleResultStatus.Pending": "Pending",
"Enum:FlashSaleResultStatus.Successful": "Successful",
"Enum:FlashSaleResultStatus.Failed": "Failed",
"Enum:FlashSaleResultStatus.0": "Pending",
"Enum:FlashSaleResultStatus.1": "Successful",
"Enum:FlashSaleResultStatus.2": "Failed"
}
}

62
plugins/FlashSales/src/EasyAbp.EShop.Plugins.FlashSales.Domain.Shared/EasyAbp/EShop/Plugins/FlashSales/Localization/zh-Hans.json

@ -6,47 +6,47 @@
"EasyAbp.EShop.Plugins.FlashSales:ProductSkuIsNotFound": "产品SKU'{productSkuId}'不存在",
"EasyAbp.EShop.Plugins.FlashSales:ProductIsNotPublished": "产品尚未发布",
"EasyAbp.EShop.Plugins.FlashSales:ProductSkuInventoryExceeded": "产品SKU库存不足",
"EasyAbp.EShop.Plugins.FlashSales:UnexpectedInventoryStrategy": "只允许使用指定{expectedInventoryStrategy}库存策略",
"EasyAbp.EShop.Plugins.FlashSales:UnexpectedInventoryStrategy": "只允许使用指定{expectedInventoryStrategy}库存策略的产品",
"EasyAbp.EShop.Plugins.FlashSales:PreOrderExpired": "预下单已过期",
"EasyAbp.EShop.Plugins.FlashSales:FlashSaleNotStarted": "闪购尚未开始",
"EasyAbp.EShop.Plugins.FlashSales:FlashSaleIsOver": "闪购已经结束",
"EasyAbp.EShop.Plugins.FlashSales:BusyToCreateFlashSaleOrder": "闪购下单繁忙",
"EasyAbp.EShop.Plugins.FlashSales:DuplicateFlashSalesOrder": "重复闪购下单",
"EasyAbp.EShop.Plugins.FlashSales:ExistRelatedFlashSalesResults": "已存在关联的闪购结果",
"EasyAbp.EShop.Plugins.FlashSales:RelatedFlashSaleResultsExist": "已存在关联的闪购结果",
"Menu:FlashSalesManagement": "闪购",
"Permission:FlashSalesPlan": "闪购计划",
"Permission:FlashSalePlan": "闪购计划",
"Permission:Manage": "管理",
"Permission:Create": "新建",
"Permission:Update": "更新",
"Permission:Delete": "删除",
"Menu:FlashSalesPlan": "闪购计划",
"FlashSalesPlan": "闪购计划",
"FlashSalesPlanStoreId": "店铺 ID",
"FlashSalesPlanBeginTime": "开始时间",
"FlashSalesPlanEndTime": "结束时间",
"FlashSalesPlanProductId": "产品 ID",
"FlashSalesPlanProductSkuId": "产品SKU ID",
"FlashSalesPlanIsPublished": "发布",
"CreateFlashSalesPlan": "新建",
"EditFlashSalesPlan": "編輯",
"FlashSalesPlanDeletionConfirmationMessage": "确认删除闪购计划 {0}?",
"Menu:FlashSalePlan": "闪购计划",
"FlashSalePlan": "闪购计划",
"FlashSalePlanStoreId": "店铺 ID",
"FlashSalePlanBeginTime": "开始时间",
"FlashSalePlanEndTime": "结束时间",
"FlashSalePlanProductId": "产品 ID",
"FlashSalePlanProductSkuId": "产品SKU ID",
"FlashSalePlanIsPublished": "发布",
"CreateFlashSalePlan": "新建",
"EditFlashSalePlan": "編輯",
"FlashSalePlanDeletionConfirmationMessage": "确认删除闪购计划 {0}?",
"SuccessfullyDeleted": "删除成功",
"Permission:FlashSalesResult": "闪购结果",
"Menu:FlashSalesResult": "闪购结果",
"FlashSalesResult": "闪购结果",
"FlashSalesResultStoreId": "店铺 ID",
"FlashSalesResultPlanId": "计划 ID",
"FlashSalesResultStatus": "状态",
"FlashSalesResultReason": "原因",
"FlashSalesResultUserId": "用户 ID",
"FlashSalesResultOrderId": "订单 ID",
"FlashSalesResultCreationTime": "创建时间",
"ViewFlashSalesResult": "查看",
"Enum:FlashSalesResultStatus.Pending": "等待中",
"Enum:FlashSalesResultStatus.Successful": "成功",
"Enum:FlashSalesResultStatus.Failed": "失败",
"Enum:FlashSalesResultStatus.0": "等待中",
"Enum:FlashSalesResultStatus.1": "成功",
"Enum:FlashSalesResultStatus.2": "失败"
"Permission:FlashSaleResult": "闪购结果",
"Menu:FlashSaleResult": "闪购结果",
"FlashSaleResult": "闪购结果",
"FlashSaleResultStoreId": "店铺 ID",
"FlashSaleResultPlanId": "计划 ID",
"FlashSaleResultStatus": "状态",
"FlashSaleResultReason": "原因",
"FlashSaleResultUserId": "用户 ID",
"FlashSaleResultOrderId": "订单 ID",
"FlashSaleResultCreationTime": "创建时间",
"ViewFlashSaleResult": "查看",
"Enum:FlashSaleResultStatus.Pending": "等待中",
"Enum:FlashSaleResultStatus.Successful": "成功",
"Enum:FlashSaleResultStatus.Failed": "失败",
"Enum:FlashSaleResultStatus.0": "等待中",
"Enum:FlashSaleResultStatus.1": "成功",
"Enum:FlashSaleResultStatus.2": "失败"
}
}

62
plugins/FlashSales/src/EasyAbp.EShop.Plugins.FlashSales.Domain.Shared/EasyAbp/EShop/Plugins/FlashSales/Localization/zh-Hant.json

@ -6,47 +6,47 @@
"EasyAbp.EShop.Plugins.FlashSales:ProductSkuIsNotFound": "產品SKU'{productSkuId}'不存在",
"EasyAbp.EShop.Plugins.FlashSales:ProductIsNotPublished": "產品尚未發佈",
"EasyAbp.EShop.Plugins.FlashSales:ProductSkuInventoryExceeded": "產品SKU庫存不足",
"EasyAbp.EShop.Plugins.FlashSales:UnexpectedInventoryStrategy": "只允許使用指定的{expectedInventoryStrategy}庫存策略",
"EasyAbp.EShop.Plugins.FlashSales:UnexpectedInventoryStrategy": "只允許使用指定的{expectedInventoryStrategy}庫存策略的產品",
"EasyAbp.EShop.Plugins.FlashSales:PreOrderExpired": "預下單已過期",
"EasyAbp.EShop.Plugins.FlashSales:FlashSaleNotStarted": "閃購尚未開始",
"EasyAbp.EShop.Plugins.FlashSales:FlashSaleIsOver": "閃購已經結束",
"EasyAbp.EShop.Plugins.FlashSales:BusyToCreateFlashSaleOrder": "閃購下單繁忙",
"EasyAbp.EShop.Plugins.FlashSales:DuplicateFlashSalesOrder": "重複閃購下單",
"EasyAbp.EShop.Plugins.FlashSales:ExistRelatedFlashSalesResults": "已存在關聯的閃購結果",
"EasyAbp.EShop.Plugins.FlashSales:RelatedFlashSaleResultsExist": "已存在關聯的閃購結果",
"Menu:FlashSalesManagement": "閃購管理",
"Permission:FlashSalesPlan": "閃購計畫",
"Permission:FlashSalePlan": "閃購計畫",
"Permission:Manage": "管理",
"Permission:Create": "新建",
"Permission:Update": "更新",
"Permission:Delete": "删除",
"Menu:FlashSalesPlan": "閃購計畫",
"FlashSalesPlan": "閃購計畫",
"FlashSalesPlanStoreId": "店鋪ID",
"FlashSalesPlanBeginTime": "開始時間",
"FlashSalesPlanEndTime": "結束時間",
"FlashSalesPlanProductId": "產品ID",
"FlashSalesPlanProductSkuId": "產品SKU ID",
"FlashSalesPlanIsPublished": "發佈",
"CreateFlashSalesPlan": "新建",
"EditFlashSalesPlan": "更新",
"FlashSalesPlanDeletionConfirmationMessage": "確認删除閃購計畫 {0}?",
"Menu:FlashSalePlan": "閃購計畫",
"FlashSalePlan": "閃購計畫",
"FlashSalePlanStoreId": "店鋪ID",
"FlashSalePlanBeginTime": "開始時間",
"FlashSalePlanEndTime": "結束時間",
"FlashSalePlanProductId": "產品ID",
"FlashSalePlanProductSkuId": "產品SKU ID",
"FlashSalePlanIsPublished": "發佈",
"CreateFlashSalePlan": "新建",
"EditFlashSalePlan": "更新",
"FlashSalePlanDeletionConfirmationMessage": "確認删除閃購計畫 {0}?",
"SuccessfullyDeleted": "删除成功",
"Permission:FlashSalesResult": "閃購結果",
"Menu:FlashSalesResult": "閃購結果",
"FlashSalesResult": "閃購結果",
"FlashSalesResultStoreId": "店铺 ID",
"FlashSalesResultPlanId": "計畫 ID",
"FlashSalesResultStatus": "狀態",
"FlashSalesResultReason": "原因",
"FlashSalesResultUserId": "用戶 ID",
"FlashSalesResultOrderId": "訂單 ID",
"FlashSalesResultCreationTime": "創建時間",
"ViewFlashSalesResult": "查看",
"Enum:FlashSalesResultStatus.Pending": "等待中",
"Enum:FlashSalesResultStatus.Successful": "成功",
"Enum:FlashSalesResultStatus.Failed": "失敗",
"Enum:FlashSalesResultStatus.0": "等待中",
"Enum:FlashSalesResultStatus.1": "成功",
"Enum:FlashSalesResultStatus.2": "失敗"
"Permission:FlashSaleResult": "閃購結果",
"Menu:FlashSaleResult": "閃購結果",
"FlashSaleResult": "閃購結果",
"FlashSaleResultStoreId": "店铺 ID",
"FlashSaleResultPlanId": "計畫 ID",
"FlashSaleResultStatus": "狀態",
"FlashSaleResultReason": "原因",
"FlashSaleResultUserId": "用戶 ID",
"FlashSaleResultOrderId": "訂單 ID",
"FlashSaleResultCreationTime": "創建時間",
"ViewFlashSaleResult": "查看",
"Enum:FlashSaleResultStatus.Pending": "等待中",
"Enum:FlashSaleResultStatus.Successful": "成功",
"Enum:FlashSaleResultStatus.Failed": "失敗",
"Enum:FlashSaleResultStatus.0": "等待中",
"Enum:FlashSaleResultStatus.1": "成功",
"Enum:FlashSaleResultStatus.2": "失敗"
}
}

4
plugins/FlashSales/src/EasyAbp.EShop.Plugins.FlashSales.Domain/EasyAbp/EShop/Plugins/FlashSales/EShopPluginsFlashSalesDomainAutoMapperProfile.cs

@ -1,5 +1,5 @@
using AutoMapper;
using EasyAbp.EShop.Plugins.FlashSales.FlashSalesPlans;
using EasyAbp.EShop.Plugins.FlashSales.FlashSalePlans;
namespace EasyAbp.EShop.Plugins.FlashSales;
@ -10,7 +10,7 @@ public class EShopPluginsFlashSalesDomainAutoMapperProfile : Profile
/* You can configure your AutoMapper mapping configuration here.
* Alternatively, you can split your mapping configurations
* into multiple profile classes for a better organization. */
CreateMap<FlashSalesPlan, FlashSalesPlanEto>()
CreateMap<FlashSalePlan, FlashSalePlanEto>()
.MapExtraProperties();
}
}

6
plugins/FlashSales/src/EasyAbp.EShop.Plugins.FlashSales.Domain/EasyAbp/EShop/Plugins/FlashSales/EShopPluginsFlashSalesDomainModule.cs

@ -1,4 +1,4 @@
using EasyAbp.EShop.Plugins.FlashSales.FlashSalesPlans;
using EasyAbp.EShop.Plugins.FlashSales.FlashSalePlans;
using Microsoft.Extensions.DependencyInjection;
using Volo.Abp.AutoMapper;
using Volo.Abp.Domain;
@ -25,9 +25,9 @@ public class EShopPluginsFlashSalesDomainModule : AbpModule
Configure<AbpDistributedEntityEventOptions>(options =>
{
options.EtoMappings.Add<FlashSalesPlan, FlashSalesPlanEto>(typeof(EShopPluginsFlashSalesDomainModule));
options.EtoMappings.Add<FlashSalePlan, FlashSalePlanEto>(typeof(EShopPluginsFlashSalesDomainModule));
options.AutoEventSelectors.Add<FlashSalesPlan>();
options.AutoEventSelectors.Add<FlashSalePlan>();
});
}
}

8
plugins/FlashSales/src/EasyAbp.EShop.Plugins.FlashSales.Domain/EasyAbp/EShop/Plugins/FlashSales/FlashSalesPlans/FlashSalesPlan.cs → plugins/FlashSales/src/EasyAbp.EShop.Plugins.FlashSales.Domain/EasyAbp/EShop/Plugins/FlashSales/FlashSalePlans/FlashSalePlan.cs

@ -3,9 +3,9 @@ using EasyAbp.EShop.Stores.Stores;
using Volo.Abp.Domain.Entities.Auditing;
using Volo.Abp.MultiTenancy;
namespace EasyAbp.EShop.Plugins.FlashSales.FlashSalesPlans;
namespace EasyAbp.EShop.Plugins.FlashSales.FlashSalePlans;
public class FlashSalesPlan : FullAuditedAggregateRoot<Guid>, IMultiTenant, IMultiStore
public class FlashSalePlan : FullAuditedAggregateRoot<Guid>, IMultiTenant, IMultiStore
{
public virtual Guid? TenantId { get; protected set; }
@ -21,11 +21,11 @@ public class FlashSalesPlan : FullAuditedAggregateRoot<Guid>, IMultiTenant, IMul
public virtual bool IsPublished { get; protected set; }
protected FlashSalesPlan()
protected FlashSalePlan()
{
}
public FlashSalesPlan(Guid id, Guid? tenantId, Guid storeId, DateTime beginTime, DateTime endTime, Guid productId, Guid productSkuId, bool isPublished)
public FlashSalePlan(Guid id, Guid? tenantId, Guid storeId, DateTime beginTime, DateTime endTime, Guid productId, Guid productSkuId, bool isPublished)
: base(id)
{
TenantId = tenantId;

8
plugins/FlashSales/src/EasyAbp.EShop.Plugins.FlashSales.Domain/EasyAbp/EShop/Plugins/FlashSales/FlashSalePlans/IFlashSalePlanRepository.cs

@ -0,0 +1,8 @@
using System;
using Volo.Abp.Domain.Repositories;
namespace EasyAbp.EShop.Plugins.FlashSales.FlashSalePlans;
public interface IFlashSalePlanRepository : IRepository<FlashSalePlan, Guid>
{
}

2
plugins/FlashSales/src/EasyAbp.EShop.Plugins.FlashSales.Domain/EasyAbp/EShop/Plugins/FlashSales/FlashSalesPlans/InvalidEndTimeException.cs → plugins/FlashSales/src/EasyAbp.EShop.Plugins.FlashSales.Domain/EasyAbp/EShop/Plugins/FlashSales/FlashSalePlans/InvalidEndTimeException.cs

@ -1,6 +1,6 @@
using Volo.Abp;
namespace EasyAbp.EShop.Plugins.FlashSales.FlashSalesPlans;
namespace EasyAbp.EShop.Plugins.FlashSales.FlashSalePlans;
public class InvalidEndTimeException : BusinessException
{

10
plugins/FlashSales/src/EasyAbp.EShop.Plugins.FlashSales.Domain/EasyAbp/EShop/Plugins/FlashSales/FlashSalesResults/CreateFlashSalesOrderCompleteEventHandler.cs → plugins/FlashSales/src/EasyAbp.EShop.Plugins.FlashSales.Domain/EasyAbp/EShop/Plugins/FlashSales/FlashSaleResults/CreateFlashSaleOrderCompleteEventHandler.cs

@ -5,21 +5,21 @@ using Volo.Abp.EventBus.Distributed;
using Volo.Abp.Guids;
using Volo.Abp.Uow;
namespace EasyAbp.EShop.Plugins.FlashSales.FlashSalesResults;
namespace EasyAbp.EShop.Plugins.FlashSales.FlashSaleResults;
public class CreateFlashSalesOrderCompleteEventHandler : IDistributedEventHandler<CreateFlashSalesOrderCompleteEto>, ITransientDependency
public class CreateFlashSaleOrderCompleteEventHandler : IDistributedEventHandler<CreateFlashSaleOrderCompleteEto>, ITransientDependency
{
protected IFlashSalesResultRepository FlashSalesResultRepository { get; }
protected IFlashSaleResultRepository FlashSalesResultRepository { get; }
protected IGuidGenerator GuidGenerator { get; }
public CreateFlashSalesOrderCompleteEventHandler(IFlashSalesResultRepository flashSalesResultRepository, IGuidGenerator guidGenerator)
public CreateFlashSaleOrderCompleteEventHandler(IFlashSaleResultRepository flashSalesResultRepository, IGuidGenerator guidGenerator)
{
FlashSalesResultRepository = flashSalesResultRepository;
GuidGenerator = guidGenerator;
}
[UnitOfWork]
public virtual async Task HandleEventAsync(CreateFlashSalesOrderCompleteEto eventData)
public virtual async Task HandleEventAsync(CreateFlashSaleOrderCompleteEto eventData)
{
var flashSalesResult = await FlashSalesResultRepository.GetAsync(eventData.PendingResultId);

14
plugins/FlashSales/src/EasyAbp.EShop.Plugins.FlashSales.Domain/EasyAbp/EShop/Plugins/FlashSales/FlashSalesResults/FlashSalesResult.cs → plugins/FlashSales/src/EasyAbp.EShop.Plugins.FlashSales.Domain/EasyAbp/EShop/Plugins/FlashSales/FlashSaleResults/FlashSaleResult.cs

@ -3,9 +3,9 @@ using Volo.Abp;
using Volo.Abp.Domain.Entities.Auditing;
using Volo.Abp.MultiTenancy;
namespace EasyAbp.EShop.Plugins.FlashSales.FlashSalesResults;
namespace EasyAbp.EShop.Plugins.FlashSales.FlashSaleResults;
public class FlashSalesResult : FullAuditedAggregateRoot<Guid>, IMultiTenant
public class FlashSaleResult : FullAuditedAggregateRoot<Guid>, IMultiTenant
{
public virtual Guid? TenantId { get; protected set; }
@ -13,7 +13,7 @@ public class FlashSalesResult : FullAuditedAggregateRoot<Guid>, IMultiTenant
public virtual Guid PlanId { get; protected set; }
public virtual FlashSalesResultStatus Status { get; protected set; }
public virtual FlashSaleResultStatus Status { get; protected set; }
public virtual string Reason { get; protected set; }
@ -21,9 +21,9 @@ public class FlashSalesResult : FullAuditedAggregateRoot<Guid>, IMultiTenant
public virtual Guid? OrderId { get; protected set; }
protected FlashSalesResult() { }
protected FlashSaleResult() { }
public FlashSalesResult(Guid id, Guid? tenantId, Guid storeId, Guid planId, FlashSalesResultStatus status, string reason, Guid userId, Guid? orderId)
public FlashSaleResult(Guid id, Guid? tenantId, Guid storeId, Guid planId, FlashSaleResultStatus status, string reason, Guid userId, Guid? orderId)
: base(id)
{
TenantId = tenantId;
@ -37,13 +37,13 @@ public class FlashSalesResult : FullAuditedAggregateRoot<Guid>, IMultiTenant
public void MarkAsSuccessful(Guid orderId)
{
Status = FlashSalesResultStatus.Successful;
Status = FlashSaleResultStatus.Successful;
OrderId = orderId;
}
public void MarkAsFailed(string reason)
{
Status = FlashSalesResultStatus.Failed;
Status = FlashSaleResultStatus.Failed;
Reason = Check.NotNullOrEmpty(reason, nameof(reason));
}
}

9
plugins/FlashSales/src/EasyAbp.EShop.Plugins.FlashSales.Domain/EasyAbp/EShop/Plugins/FlashSales/FlashSaleResults/IFlashSaleResultRepository.cs

@ -0,0 +1,9 @@
using System;
using Volo.Abp.Domain.Repositories;
namespace EasyAbp.EShop.Plugins.FlashSales.FlashSaleResults;
public interface IFlashSaleResultRepository : IRepository<FlashSaleResult, Guid>
{
}

8
plugins/FlashSales/src/EasyAbp.EShop.Plugins.FlashSales.Domain/EasyAbp/EShop/Plugins/FlashSales/FlashSalesPlans/IFlashSalesPlanRepository.cs

@ -1,8 +0,0 @@
using System;
using Volo.Abp.Domain.Repositories;
namespace EasyAbp.EShop.Plugins.FlashSales.FlashSalesPlans;
public interface IFlashSalesPlanRepository : IRepository<FlashSalesPlan, Guid>
{
}

9
plugins/FlashSales/src/EasyAbp.EShop.Plugins.FlashSales.Domain/EasyAbp/EShop/Plugins/FlashSales/FlashSalesResults/IFlashSalesResultRepository.cs

@ -1,9 +0,0 @@
using System;
using Volo.Abp.Domain.Repositories;
namespace EasyAbp.EShop.Plugins.FlashSales.FlashSalesResults;
public interface IFlashSalesResultRepository : IRepository<FlashSalesResult, Guid>
{
}

8
plugins/FlashSales/src/EasyAbp.EShop.Plugins.FlashSales.EntityFrameworkCore/EasyAbp/EShop/Plugins/FlashSales/EntityFrameworkCore/EShopPluginsFlashSalesEntityFrameworkCoreModule.cs

@ -1,5 +1,5 @@
using EasyAbp.EShop.Plugins.FlashSales.FlashSalesPlans;
using EasyAbp.EShop.Plugins.FlashSales.FlashSalesResults;
using EasyAbp.EShop.Plugins.FlashSales.FlashSalePlans;
using EasyAbp.EShop.Plugins.FlashSales.FlashSaleResults;
using Microsoft.Extensions.DependencyInjection;
using Volo.Abp.EntityFrameworkCore;
using Volo.Abp.Modularity;
@ -16,8 +16,8 @@ public class EShopPluginsFlashSalesEntityFrameworkCoreModule : AbpModule
{
context.Services.AddAbpDbContext<FlashSalesDbContext>(options =>
{
options.AddRepository<FlashSalesPlan, EfCoreFlashSalesPlanRepository>();
options.AddRepository<FlashSalesResult, EfCoreFlashSalesResultRepository>();
options.AddRepository<FlashSalePlan, EfCoreFlashSalePlanRepository>();
options.AddRepository<FlashSaleResult, EfCoreFlashSaleResultRepository>();
});
}
}

8
plugins/FlashSales/src/EasyAbp.EShop.Plugins.FlashSales.EntityFrameworkCore/EasyAbp/EShop/Plugins/FlashSales/EntityFrameworkCore/FlashSalesDbContext.cs

@ -1,5 +1,5 @@
using EasyAbp.EShop.Plugins.FlashSales.FlashSalesPlans;
using EasyAbp.EShop.Plugins.FlashSales.FlashSalesResults;
using EasyAbp.EShop.Plugins.FlashSales.FlashSalePlans;
using EasyAbp.EShop.Plugins.FlashSales.FlashSaleResults;
using Microsoft.EntityFrameworkCore;
using Volo.Abp.Data;
using Volo.Abp.EntityFrameworkCore;
@ -9,9 +9,9 @@ namespace EasyAbp.EShop.Plugins.FlashSales.EntityFrameworkCore;
[ConnectionStringName(FlashSalesDbProperties.ConnectionStringName)]
public class FlashSalesDbContext : AbpDbContext<FlashSalesDbContext>, IFlashSalesDbContext
{
public DbSet<FlashSalesPlan> Plans { get; set; }
public DbSet<FlashSalePlan> FlashSalePlans { get; set; }
public DbSet<FlashSalesResult> Results { get; set; }
public DbSet<FlashSaleResult> FlashSaleResults { get; set; }
public FlashSalesDbContext(DbContextOptions<FlashSalesDbContext> options)
: base(options)

12
plugins/FlashSales/src/EasyAbp.EShop.Plugins.FlashSales.EntityFrameworkCore/EasyAbp/EShop/Plugins/FlashSales/EntityFrameworkCore/FlashSalesDbContextModelCreatingExtensions.cs

@ -1,5 +1,5 @@
using EasyAbp.EShop.Plugins.FlashSales.FlashSalesPlans;
using EasyAbp.EShop.Plugins.FlashSales.FlashSalesResults;
using EasyAbp.EShop.Plugins.FlashSales.FlashSalePlans;
using EasyAbp.EShop.Plugins.FlashSales.FlashSaleResults;
using Microsoft.EntityFrameworkCore;
using Volo.Abp;
using Volo.Abp.EntityFrameworkCore.Modeling;
@ -13,17 +13,17 @@ public static class FlashSalesDbContextModelCreatingExtensions
{
Check.NotNull(builder, nameof(builder));
builder.Entity<FlashSalesPlan>(b =>
builder.Entity<FlashSalePlan>(b =>
{
b.ToTable(FlashSalesDbProperties.DbTablePrefix + "Plans", FlashSalesDbProperties.DbSchema);
b.ToTable(FlashSalesDbProperties.DbTablePrefix + "FlashSalePlans", FlashSalesDbProperties.DbSchema);
b.ConfigureByConvention();
/* Configure more properties here */
});
builder.Entity<FlashSalesResult>(b =>
builder.Entity<FlashSaleResult>(b =>
{
b.ToTable(FlashSalesDbProperties.DbTablePrefix + "Results", FlashSalesDbProperties.DbSchema);
b.ToTable(FlashSalesDbProperties.DbTablePrefix + "FlashSaleResults", FlashSalesDbProperties.DbSchema);
b.ConfigureByConvention();
/* Configure more properties here */

8
plugins/FlashSales/src/EasyAbp.EShop.Plugins.FlashSales.EntityFrameworkCore/EasyAbp/EShop/Plugins/FlashSales/EntityFrameworkCore/IFlashSalesDbContext.cs

@ -1,5 +1,5 @@
using EasyAbp.EShop.Plugins.FlashSales.FlashSalesPlans;
using EasyAbp.EShop.Plugins.FlashSales.FlashSalesResults;
using EasyAbp.EShop.Plugins.FlashSales.FlashSalePlans;
using EasyAbp.EShop.Plugins.FlashSales.FlashSaleResults;
using Microsoft.EntityFrameworkCore;
using Volo.Abp.Data;
using Volo.Abp.EntityFrameworkCore;
@ -9,7 +9,7 @@ namespace EasyAbp.EShop.Plugins.FlashSales.EntityFrameworkCore;
[ConnectionStringName(FlashSalesDbProperties.ConnectionStringName)]
public interface IFlashSalesDbContext : IEfCoreDbContext
{
DbSet<FlashSalesPlan> Plans { get; set; }
DbSet<FlashSalePlan> FlashSalePlans { get; set; }
DbSet<FlashSalesResult> Results { get; set; }
DbSet<FlashSaleResult> FlashSaleResults { get; set; }
}

21
plugins/FlashSales/src/EasyAbp.EShop.Plugins.FlashSales.EntityFrameworkCore/EasyAbp/EShop/Plugins/FlashSales/FlashSalePlans/EfCoreFlashSalePlanRepository.cs

@ -0,0 +1,21 @@
using System;
using System.Linq;
using System.Threading.Tasks;
using EasyAbp.EShop.Plugins.FlashSales.EntityFrameworkCore;
using Volo.Abp.Domain.Repositories.EntityFrameworkCore;
using Volo.Abp.EntityFrameworkCore;
namespace EasyAbp.EShop.Plugins.FlashSales.FlashSalePlans
{
public class EfCoreFlashSalePlanRepository : EfCoreRepository<IFlashSalesDbContext, FlashSalePlan, Guid>, IFlashSalePlanRepository
{
public EfCoreFlashSalePlanRepository(IDbContextProvider<IFlashSalesDbContext> dbContextProvider) : base(dbContextProvider)
{
}
public override async Task<IQueryable<FlashSalePlan>> WithDetailsAsync()
{
return (await GetQueryableAsync()).IncludeDetails();
}
}
}

18
plugins/FlashSales/src/EasyAbp.EShop.Plugins.FlashSales.EntityFrameworkCore/EasyAbp/EShop/Plugins/FlashSales/FlashSalePlans/FlashSalePlanEfCoreQuerableExtensions.cs

@ -0,0 +1,18 @@
using System.Linq;
namespace EasyAbp.EShop.Plugins.FlashSales.FlashSalePlans;
public static class FlashSalePlanEfCoreQueryableExtensions
{
public static IQueryable<FlashSalePlan> IncludeDetails(this IQueryable<FlashSalePlan> queryable, bool include = true)
{
if (!include)
{
return queryable;
}
return queryable
// .Include(x => x.xxx) // TODO: AbpHelper generated
;
}
}

20
plugins/FlashSales/src/EasyAbp.EShop.Plugins.FlashSales.EntityFrameworkCore/EasyAbp/EShop/Plugins/FlashSales/FlashSaleResults/EfCoreFlashSaleResultRepository.cs

@ -0,0 +1,20 @@
using System;
using System.Linq;
using System.Threading.Tasks;
using EasyAbp.EShop.Plugins.FlashSales.EntityFrameworkCore;
using Volo.Abp.Domain.Repositories.EntityFrameworkCore;
using Volo.Abp.EntityFrameworkCore;
namespace EasyAbp.EShop.Plugins.FlashSales.FlashSaleResults;
public class EfCoreFlashSaleResultRepository : EfCoreRepository<IFlashSalesDbContext, FlashSaleResult, Guid>, IFlashSaleResultRepository
{
public EfCoreFlashSaleResultRepository(IDbContextProvider<IFlashSalesDbContext> dbContextProvider) : base(dbContextProvider)
{
}
public override async Task<IQueryable<FlashSaleResult>> WithDetailsAsync()
{
return (await GetQueryableAsync()).IncludeDetails();
}
}

16
plugins/FlashSales/src/EasyAbp.EShop.Plugins.FlashSales.EntityFrameworkCore/EasyAbp/EShop/Plugins/FlashSales/FlashSaleResults/FlashSaleResultEfCoreQuerableExtensions.cs

@ -0,0 +1,16 @@
using System.Linq;
namespace EasyAbp.EShop.Plugins.FlashSales.FlashSaleResults;
public static class FlashSaleResultEfCoreQuerableExtensions
{
public static IQueryable<FlashSaleResult> IncludeDetails(this IQueryable<FlashSaleResult> queryable, bool include = true)
{
if (!include)
{
return queryable;
}
return queryable;
}
}

21
plugins/FlashSales/src/EasyAbp.EShop.Plugins.FlashSales.EntityFrameworkCore/EasyAbp/EShop/Plugins/FlashSales/FlashSalesPlans/EfCoreFlashSalesPlanRepository.cs

@ -1,21 +0,0 @@
using System;
using System.Linq;
using System.Threading.Tasks;
using EasyAbp.EShop.Plugins.FlashSales.EntityFrameworkCore;
using Volo.Abp.Domain.Repositories.EntityFrameworkCore;
using Volo.Abp.EntityFrameworkCore;
namespace EasyAbp.EShop.Plugins.FlashSales.FlashSalesPlans
{
public class EfCoreFlashSalesPlanRepository : EfCoreRepository<IFlashSalesDbContext, FlashSalesPlan, Guid>, IFlashSalesPlanRepository
{
public EfCoreFlashSalesPlanRepository(IDbContextProvider<IFlashSalesDbContext> dbContextProvider) : base(dbContextProvider)
{
}
public override async Task<IQueryable<FlashSalesPlan>> WithDetailsAsync()
{
return (await GetQueryableAsync()).IncludeDetails();
}
}
}

18
plugins/FlashSales/src/EasyAbp.EShop.Plugins.FlashSales.EntityFrameworkCore/EasyAbp/EShop/Plugins/FlashSales/FlashSalesPlans/FlashSalesPlanEfCoreQuerableExtensions.cs

@ -1,18 +0,0 @@
using System.Linq;
namespace EasyAbp.EShop.Plugins.FlashSales.FlashSalesPlans;
public static class FlashSalesPlanEfCoreQueryableExtensions
{
public static IQueryable<FlashSalesPlan> IncludeDetails(this IQueryable<FlashSalesPlan> queryable, bool include = true)
{
if (!include)
{
return queryable;
}
return queryable
// .Include(x => x.xxx) // TODO: AbpHelper generated
;
}
}

20
plugins/FlashSales/src/EasyAbp.EShop.Plugins.FlashSales.EntityFrameworkCore/EasyAbp/EShop/Plugins/FlashSales/FlashSalesResults/EfCoreFlashSalesResultRepository.cs

@ -1,20 +0,0 @@
using System;
using System.Linq;
using System.Threading.Tasks;
using EasyAbp.EShop.Plugins.FlashSales.EntityFrameworkCore;
using Volo.Abp.Domain.Repositories.EntityFrameworkCore;
using Volo.Abp.EntityFrameworkCore;
namespace EasyAbp.EShop.Plugins.FlashSales.FlashSalesResults;
public class EfCoreFlashSalesResultRepository : EfCoreRepository<IFlashSalesDbContext, FlashSalesResult, Guid>, IFlashSalesResultRepository
{
public EfCoreFlashSalesResultRepository(IDbContextProvider<IFlashSalesDbContext> dbContextProvider) : base(dbContextProvider)
{
}
public override async Task<IQueryable<FlashSalesResult>> WithDetailsAsync()
{
return (await GetQueryableAsync()).IncludeDetails();
}
}

16
plugins/FlashSales/src/EasyAbp.EShop.Plugins.FlashSales.EntityFrameworkCore/EasyAbp/EShop/Plugins/FlashSales/FlashSalesResults/FlashSalesResultEfCoreQuerableExtensions.cs

@ -1,16 +0,0 @@
using System.Linq;
namespace EasyAbp.EShop.Plugins.FlashSales.FlashSalesResults;
public static class FlashSalesResultEfCoreQuerableExtensions
{
public static IQueryable<FlashSalesResult> IncludeDetails(this IQueryable<FlashSalesResult> queryable, bool include = true)
{
if (!include)
{
return queryable;
}
return queryable;
}
}

24
plugins/FlashSales/src/EasyAbp.EShop.Plugins.FlashSales.HttpApi/EasyAbp/EShop/Plugins/FlashSales/FlashSalesPlans/FlashSalesPlanController.cs → plugins/FlashSales/src/EasyAbp.EShop.Plugins.FlashSales.HttpApi/EasyAbp/EShop/Plugins/FlashSales/FlashSalePlans/FlashSalePlanController.cs

@ -1,46 +1,46 @@
using System;
using System.Threading.Tasks;
using EasyAbp.EShop.Plugins.FlashSales.FlashSalesPlans.Dtos;
using EasyAbp.EShop.Plugins.FlashSales.FlashSalePlans.Dtos;
using Microsoft.AspNetCore.Mvc;
using Volo.Abp;
using Volo.Abp.Application.Dtos;
namespace EasyAbp.EShop.Plugins.FlashSales.FlashSalesPlans;
namespace EasyAbp.EShop.Plugins.FlashSales.FlashSalePlans;
[Area(EShopPluginsFlashSalesRemoteServiceConsts.ModuleName)]
[RemoteService(Name = EShopPluginsFlashSalesRemoteServiceConsts.RemoteServiceName)]
[Route("/api/e-shop/plugins/flash-sales/flash-sales-plan")]
public class FlashSalesPlanController :
[Route("/api/e-shop/plugins/flash-sales/flash-sale-plan")]
public class FlashSalePlanController :
FlashSalesController,
IFlashSalesPlanAppService
IFlashSalePlanAppService
{
protected IFlashSalesPlanAppService Service { get; }
protected IFlashSalePlanAppService Service { get; }
public FlashSalesPlanController(IFlashSalesPlanAppService flashSalesPlanAppService)
public FlashSalePlanController(IFlashSalePlanAppService flashSalePlanAppService)
{
Service = flashSalesPlanAppService;
Service = flashSalePlanAppService;
}
[HttpGet("{id}")]
public virtual Task<FlashSalesPlanDto> GetAsync(Guid id)
public virtual Task<FlashSalePlanDto> GetAsync(Guid id)
{
return Service.GetAsync(id);
}
[HttpGet]
public virtual Task<PagedResultDto<FlashSalesPlanDto>> GetListAsync(FlashSalesPlanGetListInput input)
public virtual Task<PagedResultDto<FlashSalePlanDto>> GetListAsync(FlashSalePlanGetListInput input)
{
return Service.GetListAsync(input);
}
[HttpPost("{id}")]
public virtual Task<FlashSalesPlanDto> CreateAsync(FlashSalesPlanCreateDto input)
public virtual Task<FlashSalePlanDto> CreateAsync(FlashSalePlanCreateDto input)
{
return Service.CreateAsync(input);
}
[HttpPut("{id}")]
public virtual Task<FlashSalesPlanDto> UpdateAsync(Guid id, FlashSalesPlanUpdateDto input)
public virtual Task<FlashSalePlanDto> UpdateAsync(Guid id, FlashSalePlanUpdateDto input)
{
return Service.UpdateAsync(id, input);
}

33
plugins/FlashSales/src/EasyAbp.EShop.Plugins.FlashSales.HttpApi/EasyAbp/EShop/Plugins/FlashSales/FlashSaleResults/FlashSaleResultController.cs

@ -0,0 +1,33 @@
using System;
using System.Threading.Tasks;
using EasyAbp.EShop.Plugins.FlashSales.FlashSaleResults.Dtos;
using Microsoft.AspNetCore.Mvc;
using Volo.Abp;
using Volo.Abp.Application.Dtos;
namespace EasyAbp.EShop.Plugins.FlashSales.FlashSaleResults;
[Area(EShopPluginsFlashSalesRemoteServiceConsts.ModuleName)]
[RemoteService(Name = EShopPluginsFlashSalesRemoteServiceConsts.RemoteServiceName)]
[Route("/api/e-shop/plugins/flash-sales/flash-sale-result")]
public class FlashSaleResultController : FlashSalesController, IFlashSaleResultAppService
{
protected IFlashSaleResultAppService Service { get; }
public FlashSaleResultController(IFlashSaleResultAppService service)
{
Service = service;
}
[HttpGet("{id}")]
public virtual Task<FlashSaleResultDto> GetAsync(Guid id)
{
return Service.GetAsync(id);
}
[HttpGet]
public virtual Task<PagedResultDto<FlashSaleResultDto>> GetListAsync(FlashSaleResultGetListInput input)
{
return Service.GetListAsync(input);
}
}

33
plugins/FlashSales/src/EasyAbp.EShop.Plugins.FlashSales.HttpApi/EasyAbp/EShop/Plugins/FlashSales/FlashSalesResults/FlashSalesResultController.cs

@ -1,33 +0,0 @@
using System;
using System.Threading.Tasks;
using EasyAbp.EShop.Plugins.FlashSales.FlashSalesResults.Dtos;
using Microsoft.AspNetCore.Mvc;
using Volo.Abp;
using Volo.Abp.Application.Dtos;
namespace EasyAbp.EShop.Plugins.FlashSales.FlashSalesResults;
[Area(EShopPluginsFlashSalesRemoteServiceConsts.ModuleName)]
[RemoteService(Name = EShopPluginsFlashSalesRemoteServiceConsts.RemoteServiceName)]
[Route("/api/e-shop/plugins/flash-sales/flash-sales-result")]
public class FlashSalesResultController : FlashSalesController, IFlashSalesResultAppService
{
protected IFlashSalesResultAppService Service { get; }
public FlashSalesResultController(IFlashSalesResultAppService service)
{
Service = service;
}
[HttpGet("{id}")]
public virtual Task<FlashSalesResultDto> GetAsync(Guid id)
{
return Service.GetAsync(id);
}
[HttpGet]
public virtual Task<PagedResultDto<FlashSalesResultDto>> GetListAsync(FlashSalesResultGetListInput input)
{
return Service.GetListAsync(input);
}
}

13
plugins/FlashSales/src/EasyAbp.EShop.Plugins.FlashSales.MongoDB/EasyAbp/EShop/Plugins/FlashSales/FlashSalePlans/MongoFlashSalePlanRepository.cs

@ -0,0 +1,13 @@
using System;
using EasyAbp.EShop.Plugins.FlashSales.MongoDB;
using Volo.Abp.Domain.Repositories.MongoDB;
using Volo.Abp.MongoDB;
namespace EasyAbp.EShop.Plugins.FlashSales.FlashSalePlans;
public class MongoFlashSalePlanRepository : MongoDbRepository<IFlashSalesMongoDbContext, FlashSalePlan, Guid>, IFlashSalePlanRepository
{
public MongoFlashSalePlanRepository(IMongoDbContextProvider<IFlashSalesMongoDbContext> dbContextProvider) : base(dbContextProvider)
{
}
}

13
plugins/FlashSales/src/EasyAbp.EShop.Plugins.FlashSales.MongoDB/EasyAbp/EShop/Plugins/FlashSales/FlashSaleResults/MongoFlashSaleResultRepository.cs

@ -0,0 +1,13 @@
using System;
using EasyAbp.EShop.Plugins.FlashSales.MongoDB;
using Volo.Abp.Domain.Repositories.MongoDB;
using Volo.Abp.MongoDB;
namespace EasyAbp.EShop.Plugins.FlashSales.FlashSaleResults;
public class MongoFlashSaleResultRepository : MongoDbRepository<IFlashSalesMongoDbContext, FlashSaleResult, Guid>, IFlashSaleResultRepository
{
public MongoFlashSaleResultRepository(IMongoDbContextProvider<IFlashSalesMongoDbContext> dbContextProvider) : base(dbContextProvider)
{
}
}

13
plugins/FlashSales/src/EasyAbp.EShop.Plugins.FlashSales.MongoDB/EasyAbp/EShop/Plugins/FlashSales/FlashSalesPlans/MongoFlashSalesPlanRepository.cs

@ -1,13 +0,0 @@
using System;
using EasyAbp.EShop.Plugins.FlashSales.MongoDB;
using Volo.Abp.Domain.Repositories.MongoDB;
using Volo.Abp.MongoDB;
namespace EasyAbp.EShop.Plugins.FlashSales.FlashSalesPlans;
public class MongoFlashSalesPlanRepository : MongoDbRepository<IFlashSalesMongoDbContext, FlashSalesPlan, Guid>, IFlashSalesPlanRepository
{
public MongoFlashSalesPlanRepository(IMongoDbContextProvider<IFlashSalesMongoDbContext> dbContextProvider) : base(dbContextProvider)
{
}
}

13
plugins/FlashSales/src/EasyAbp.EShop.Plugins.FlashSales.MongoDB/EasyAbp/EShop/Plugins/FlashSales/FlashSalesResults/MongoFlashSalesResultRepository.cs

@ -1,13 +0,0 @@
using System;
using EasyAbp.EShop.Plugins.FlashSales.MongoDB;
using Volo.Abp.Domain.Repositories.MongoDB;
using Volo.Abp.MongoDB;
namespace EasyAbp.EShop.Plugins.FlashSales.FlashSalesResults;
public class MongoFlashSalesResultRepository : MongoDbRepository<IFlashSalesMongoDbContext, FlashSalesResult, Guid>, IFlashSalesResultRepository
{
public MongoFlashSalesResultRepository(IMongoDbContextProvider<IFlashSalesMongoDbContext> dbContextProvider) : base(dbContextProvider)
{
}
}

8
plugins/FlashSales/src/EasyAbp.EShop.Plugins.FlashSales.MongoDB/EasyAbp/EShop/Plugins/FlashSales/MongoDB/EShopPluginsFlashSalesMongoDbModule.cs

@ -1,5 +1,5 @@
using EasyAbp.EShop.Plugins.FlashSales.FlashSalesPlans;
using EasyAbp.EShop.Plugins.FlashSales.FlashSalesResults;
using EasyAbp.EShop.Plugins.FlashSales.FlashSalePlans;
using EasyAbp.EShop.Plugins.FlashSales.FlashSaleResults;
using Microsoft.Extensions.DependencyInjection;
using Volo.Abp.Modularity;
using Volo.Abp.MongoDB;
@ -16,8 +16,8 @@ public class EShopPluginsFlashSalesMongoDbModule : AbpModule
{
context.Services.AddMongoDbContext<FlashSalesMongoDbContext>(options =>
{
options.AddRepository<FlashSalesPlan, MongoFlashSalesPlanRepository>();
options.AddRepository<FlashSalesResult, MongoFlashSalesResultRepository>();
options.AddRepository<FlashSalePlan, MongoFlashSalePlanRepository>();
options.AddRepository<FlashSaleResult, MongoFlashSaleResultRepository>();
});
}
}

8
plugins/FlashSales/src/EasyAbp.EShop.Plugins.FlashSales.MongoDB/EasyAbp/EShop/Plugins/FlashSales/MongoDB/FlashSalesMongoDbContext.cs

@ -1,5 +1,5 @@
using EasyAbp.EShop.Plugins.FlashSales.FlashSalesPlans;
using EasyAbp.EShop.Plugins.FlashSales.FlashSalesResults;
using EasyAbp.EShop.Plugins.FlashSales.FlashSalePlans;
using EasyAbp.EShop.Plugins.FlashSales.FlashSaleResults;
using MongoDB.Driver;
using Volo.Abp.Data;
using Volo.Abp.MongoDB;
@ -9,9 +9,9 @@ namespace EasyAbp.EShop.Plugins.FlashSales.MongoDB;
[ConnectionStringName(FlashSalesDbProperties.ConnectionStringName)]
public class FlashSalesMongoDbContext : AbpMongoDbContext, IFlashSalesMongoDbContext
{
public IMongoCollection<FlashSalesPlan> Plans => Collection<FlashSalesPlan>();
public IMongoCollection<FlashSalePlan> FlashSalePlans => Collection<FlashSalePlan>();
public IMongoCollection<FlashSalesResult> Results => Collection<FlashSalesResult>();
public IMongoCollection<FlashSaleResult> FlashSaleResults => Collection<FlashSaleResult>();
protected override void CreateModel(IMongoModelBuilder modelBuilder)
{

8
plugins/FlashSales/src/EasyAbp.EShop.Plugins.FlashSales.MongoDB/EasyAbp/EShop/Plugins/FlashSales/MongoDB/FlashSalesMongoDbContextExtensions.cs

@ -1,5 +1,5 @@
using EasyAbp.EShop.Plugins.FlashSales.FlashSalesPlans;
using EasyAbp.EShop.Plugins.FlashSales.FlashSalesResults;
using EasyAbp.EShop.Plugins.FlashSales.FlashSalePlans;
using EasyAbp.EShop.Plugins.FlashSales.FlashSaleResults;
using Volo.Abp;
using Volo.Abp.MongoDB;
@ -12,8 +12,8 @@ public static class FlashSalesMongoDbContextExtensions
{
Check.NotNull(builder, nameof(builder));
builder.Entity<FlashSalesPlan>(b => b.CollectionName = FlashSalesDbProperties.DbTablePrefix + "Plans");
builder.Entity<FlashSalePlan>(b => b.CollectionName = FlashSalesDbProperties.DbTablePrefix + "FlashSalePlans");
builder.Entity<FlashSalesResult>(b => b.CollectionName = FlashSalesDbProperties.DbTablePrefix + "Results");
builder.Entity<FlashSaleResult>(b => b.CollectionName = FlashSalesDbProperties.DbTablePrefix + "FlashSaleResults");
}
}

8
plugins/FlashSales/src/EasyAbp.EShop.Plugins.FlashSales.MongoDB/EasyAbp/EShop/Plugins/FlashSales/MongoDB/IFlashSalesMongoDbContext.cs

@ -1,5 +1,5 @@
using EasyAbp.EShop.Plugins.FlashSales.FlashSalesPlans;
using EasyAbp.EShop.Plugins.FlashSales.FlashSalesResults;
using EasyAbp.EShop.Plugins.FlashSales.FlashSalePlans;
using EasyAbp.EShop.Plugins.FlashSales.FlashSaleResults;
using MongoDB.Driver;
using Volo.Abp.Data;
using Volo.Abp.MongoDB;
@ -9,7 +9,7 @@ namespace EasyAbp.EShop.Plugins.FlashSales.MongoDB;
[ConnectionStringName(FlashSalesDbProperties.ConnectionStringName)]
public interface IFlashSalesMongoDbContext : IAbpMongoDbContext
{
IMongoCollection<FlashSalesPlan> Plans { get; }
IMongoCollection<FlashSalePlan> FlashSalePlans { get; }
IMongoCollection<FlashSalesResult> Results { get; }
IMongoCollection<FlashSaleResult> FlashSaleResults { get; }
}

16
plugins/FlashSales/src/EasyAbp.EShop.Plugins.FlashSales.Web/EShopPluginsFlashSalesWebAutoMapperProfile.cs

@ -1,8 +1,8 @@
using AutoMapper;
using EasyAbp.EShop.Plugins.FlashSales.FlashSalesPlans.Dtos;
using EasyAbp.EShop.Plugins.FlashSales.FlashSalesResults.Dtos;
using EasyAbp.EShop.Plugins.FlashSales.Web.Pages.EShop.Plugins.FlashSales.FlashSalesPlans.FlashSalesPlan.ViewModels;
using EasyAbp.EShop.Plugins.FlashSales.Web.Pages.EShop.Plugins.FlashSales.FlashSalesResults.FlashSalesResult.ViewModels;
using EasyAbp.EShop.Plugins.FlashSales.FlashSalePlans.Dtos;
using EasyAbp.EShop.Plugins.FlashSales.FlashSaleResults.Dtos;
using EasyAbp.EShop.Plugins.FlashSales.Web.Pages.EShop.Plugins.FlashSales.FlashSalePlans.FlashSalePlan.ViewModels;
using EasyAbp.EShop.Plugins.FlashSales.Web.Pages.EShop.Plugins.FlashSales.FlashSaleResults.FlashSaleResult.ViewModels;
namespace EasyAbp.EShop.Plugins.FlashSales.Web;
@ -13,13 +13,13 @@ public class EShopPluginsFlashSalesWebAutoMapperProfile : Profile
/* You can configure your AutoMapper mapping configuration here.
* Alternatively, you can split your mapping configurations
* into multiple profile classes for a better organization. */
CreateMap<CreateFlashSalesPlanViewModel, FlashSalesPlanCreateDto>()
CreateMap<CreateFlashSalePlanViewModel, FlashSalePlanCreateDto>(MemberList.Destination)
.ForMember(dest => dest.ExtraProperties, opt => opt.Ignore());
CreateMap<EditFlashSalesPlanViewModel, FlashSalesPlanUpdateDto>()
CreateMap<EditFlashSalePlanViewModel, FlashSalePlanUpdateDto>(MemberList.Destination)
.ForMember(dest => dest.ExtraProperties, opt => opt.Ignore());
CreateMap<FlashSalesPlanDto, EditFlashSalesPlanViewModel>()
CreateMap<FlashSalePlanDto, EditFlashSalePlanViewModel>(MemberList.Destination)
.ForSourceMember(dest => dest.ExtraProperties, opt => opt.DoNotValidate());
CreateMap<FlashSalesResultDto, ViewFlashSalesResultViewModel>()
CreateMap<FlashSaleResultDto, ViewFlashSaleResultViewModel>(MemberList.Destination)
.ForSourceMember(dest => dest.ExtraProperties, opt => opt.DoNotValidate());
}
}

5
plugins/FlashSales/src/EasyAbp.EShop.Plugins.FlashSales.Web/EasyAbp.EShop.Plugins.FlashSales.Web.csproj

@ -37,9 +37,4 @@
<Content Remove="wwwroot\**\*.*" />
</ItemGroup>
<ItemGroup>
<None Remove="Pages\EShop\Plugins\FlashSales\FlashSalesResults\FlashSalesResult\index.css" />
<None Remove="Pages\EShop\Plugins\FlashSales\FlashSalesResults\FlashSalesResult\index.js" />
</ItemGroup>
</Project>

16
plugins/FlashSales/src/EasyAbp.EShop.Plugins.FlashSales.Web/Menus/FlashSalesMenuContributor.cs

@ -22,24 +22,24 @@ public class FlashSalesMenuContributor : IMenuContributor
//Add main menu items.
var flashSalesManagementMenuItem = new ApplicationMenuItem(FlashSalesMenus.Prefix, l["Menu:FlashSalesManagement"]);
if (await context.IsGrantedAsync(FlashSalesPermissions.FlashSalesPlan.Default))
if (await context.IsGrantedAsync(FlashSalesPermissions.FlashSalePlan.Default))
{
flashSalesManagementMenuItem.AddItem(
new ApplicationMenuItem(
FlashSalesMenus.FlashSalesPlan,
l["Menu:FlashSalesPlan"],
"/EShop/Plugins/FlashSales/FlashSalesPlans/FlashSalesPlan"
FlashSalesMenus.FlashSalePlan,
l["Menu:FlashSalePlan"],
"/EShop/Plugins/FlashSales/FlashSalePlans/FlashSalePlan"
)
);
}
if (await context.IsGrantedAsync(FlashSalesPermissions.FlashSalesResult.Default))
if (await context.IsGrantedAsync(FlashSalesPermissions.FlashSaleResult.Default))
{
flashSalesManagementMenuItem.AddItem(
new ApplicationMenuItem(
FlashSalesMenus.FlashSalesResult,
l["Menu:FlashSalesResult"],
"/EShop/Plugins/FlashSales/FlashSalesResults/FlashSalesResult"
FlashSalesMenus.FlashSaleResult,
l["Menu:FlashSaleResult"],
"/EShop/Plugins/FlashSales/FlashSaleResults/FlashSaleResult"
)
);
}

4
plugins/FlashSales/src/EasyAbp.EShop.Plugins.FlashSales.Web/Menus/FlashSalesMenus.cs

@ -6,7 +6,7 @@ public static class FlashSalesMenus
public const string Prefix = ModuleGroupPrefix + ".Plugins.FlashSales";
public const string FlashSalesPlan = Prefix + ".FlashSalesPlan";
public const string FlashSalePlan = Prefix + ".FlashSalePlan";
public const string FlashSalesResult = Prefix + ".FlashSalesResult";
public const string FlashSaleResult = Prefix + ".FlashSaleResult";
}

4
plugins/FlashSales/src/EasyAbp.EShop.Plugins.FlashSales.Web/Pages/EShop/Plugins/FlashSales/FlashSalesPlans/FlashSalesPlan/CreateModal.cshtml → plugins/FlashSales/src/EasyAbp.EShop.Plugins.FlashSales.Web/Pages/EShop/Plugins/FlashSales/FlashSalePlans/FlashSalePlan/CreateModal.cshtml

@ -2,7 +2,7 @@
@using Microsoft.AspNetCore.Mvc.Localization
@using Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.TagHelpers.Modal
@using EasyAbp.EShop.Plugins.FlashSales.Localization
@using EasyAbp.EShop.Plugins.FlashSales.Web.Pages.EShop.Plugins.FlashSales.FlashSalesPlans.FlashSalesPlan
@using EasyAbp.EShop.Plugins.FlashSales.Web.Pages.EShop.Plugins.FlashSales.FlashSalePlans.FlashSalePlan
@inject IHtmlLocalizer<FlashSalesResource> L
@model CreateModalModel
@ -12,7 +12,7 @@
<abp-dynamic-form abp-model="ViewModel" data-ajaxForm="true" asp-page="CreateModal">
<abp-modal>
<abp-modal-header title="@L["CreateFlashSalesPlan"].Value"></abp-modal-header>
<abp-modal-header title="@L["CreateFlashSalePlan"].Value"></abp-modal-header>
<abp-modal-body>
<abp-form-content />
</abp-modal-body>

27
plugins/FlashSales/src/EasyAbp.EShop.Plugins.FlashSales.Web/Pages/EShop/Plugins/FlashSales/FlashSalePlans/FlashSalePlan/CreateModal.cshtml.cs

@ -0,0 +1,27 @@
using System.Threading.Tasks;
using EasyAbp.EShop.Plugins.FlashSales.FlashSalePlans;
using EasyAbp.EShop.Plugins.FlashSales.FlashSalePlans.Dtos;
using EasyAbp.EShop.Plugins.FlashSales.Web.Pages.EShop.Plugins.FlashSales.FlashSalePlans.FlashSalePlan.ViewModels;
using Microsoft.AspNetCore.Mvc;
namespace EasyAbp.EShop.Plugins.FlashSales.Web.Pages.EShop.Plugins.FlashSales.FlashSalePlans.FlashSalePlan;
public class CreateModalModel : FlashSalesPageModel
{
[BindProperty]
public CreateFlashSalePlanViewModel ViewModel { get; set; }
protected IFlashSalePlanAppService Service { get; }
public CreateModalModel(IFlashSalePlanAppService service)
{
Service = service;
}
public virtual async Task<IActionResult> OnPostAsync()
{
var dto = ObjectMapper.Map<CreateFlashSalePlanViewModel, FlashSalePlanCreateDto>(ViewModel);
await Service.CreateAsync(dto);
return NoContent();
}
}

4
plugins/FlashSales/src/EasyAbp.EShop.Plugins.FlashSales.Web/Pages/EShop/Plugins/FlashSales/FlashSalesPlans/FlashSalesPlan/EditModal.cshtml → plugins/FlashSales/src/EasyAbp.EShop.Plugins.FlashSales.Web/Pages/EShop/Plugins/FlashSales/FlashSalePlans/FlashSalePlan/EditModal.cshtml

@ -2,7 +2,7 @@
@using EasyAbp.EShop.Plugins.FlashSales.Localization
@using Microsoft.AspNetCore.Mvc.Localization
@using Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.TagHelpers.Modal
@using EasyAbp.EShop.Plugins.FlashSales.Web.Pages.EShop.Plugins.FlashSales.FlashSalesPlans.FlashSalesPlan
@using EasyAbp.EShop.Plugins.FlashSales.Web.Pages.EShop.Plugins.FlashSales.FlashSalePlans.FlashSalePlan
@inject IHtmlLocalizer<FlashSalesResource> L
@model EditModalModel
@ -12,7 +12,7 @@
<abp-dynamic-form abp-model="ViewModel" data-ajaxForm="true" asp-page="EditModal">
<abp-modal>
<abp-modal-header title="@L["EditFlashSalesPlan"].Value"></abp-modal-header>
<abp-modal-header title="@L["EditFlashSalePlan"].Value"></abp-modal-header>
<abp-modal-body>
<abp-input asp-for="Id" />
<abp-form-content />

18
plugins/FlashSales/src/EasyAbp.EShop.Plugins.FlashSales.Web/Pages/EShop/Plugins/FlashSales/FlashSalesPlans/FlashSalesPlan/EditModal.cshtml.cs → plugins/FlashSales/src/EasyAbp.EShop.Plugins.FlashSales.Web/Pages/EShop/Plugins/FlashSales/FlashSalePlans/FlashSalePlan/EditModal.cshtml.cs

@ -1,11 +1,11 @@
using System;
using System.Threading.Tasks;
using EasyAbp.EShop.Plugins.FlashSales.FlashSalePlans;
using EasyAbp.EShop.Plugins.FlashSales.FlashSalePlans.Dtos;
using EasyAbp.EShop.Plugins.FlashSales.Web.Pages.EShop.Plugins.FlashSales.FlashSalePlans.FlashSalePlan.ViewModels;
using Microsoft.AspNetCore.Mvc;
using EasyAbp.EShop.Plugins.FlashSales.FlashSalesPlans;
using EasyAbp.EShop.Plugins.FlashSales.FlashSalesPlans.Dtos;
using EasyAbp.EShop.Plugins.FlashSales.Web.Pages.EShop.Plugins.FlashSales.FlashSalesPlans.FlashSalesPlan.ViewModels;
namespace EasyAbp.EShop.Plugins.FlashSales.Web.Pages.EShop.Plugins.FlashSales.FlashSalesPlans.FlashSalesPlan;
namespace EasyAbp.EShop.Plugins.FlashSales.Web.Pages.EShop.Plugins.FlashSales.FlashSalePlans.FlashSalePlan;
public class EditModalModel : FlashSalesPageModel
{
@ -14,11 +14,11 @@ public class EditModalModel : FlashSalesPageModel
public Guid Id { get; set; }
[BindProperty]
public EditFlashSalesPlanViewModel ViewModel { get; set; }
public EditFlashSalePlanViewModel ViewModel { get; set; }
protected IFlashSalesPlanAppService Service { get; }
protected IFlashSalePlanAppService Service { get; }
public EditModalModel(IFlashSalesPlanAppService service)
public EditModalModel(IFlashSalePlanAppService service)
{
Service = service;
}
@ -26,12 +26,12 @@ public class EditModalModel : FlashSalesPageModel
public virtual async Task OnGetAsync()
{
var dto = await Service.GetAsync(Id);
ViewModel = ObjectMapper.Map<FlashSalesPlanDto, EditFlashSalesPlanViewModel>(dto);
ViewModel = ObjectMapper.Map<FlashSalePlanDto, EditFlashSalePlanViewModel>(dto);
}
public virtual async Task<IActionResult> OnPostAsync()
{
var dto = ObjectMapper.Map<EditFlashSalesPlanViewModel, FlashSalesPlanUpdateDto>(ViewModel);
var dto = ObjectMapper.Map<EditFlashSalePlanViewModel, FlashSalePlanUpdateDto>(ViewModel);
await Service.UpdateAsync(Id, dto);
return NoContent();
}

22
plugins/FlashSales/src/EasyAbp.EShop.Plugins.FlashSales.Web/Pages/EShop/Plugins/FlashSales/FlashSalesPlans/FlashSalesPlan/Index.cshtml → plugins/FlashSales/src/EasyAbp.EShop.Plugins.FlashSales.Web/Pages/EShop/Plugins/FlashSales/FlashSalePlans/FlashSalePlan/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.FlashSalesPlans.FlashSalesPlan
@using EasyAbp.EShop.Plugins.FlashSales.Web.Pages.EShop.Plugins.FlashSales.FlashSalePlans.FlashSalePlan
@using EasyAbp.EShop.Plugins.FlashSales.Localization
@using EasyAbp.EShop.Plugins.FlashSales.Web.Menus
@ -13,31 +13,31 @@
@inject IHtmlLocalizer<FlashSalesResource> L
@inject IAuthorizationService Authorization
@{
PageLayout.Content.Title = L["FlashSalesPlan"].Value;
PageLayout.Content.BreadCrumb.Add(L["Menu:FlashSalesPlan"].Value);
PageLayout.Content.MenuItemName = FlashSalesMenus.FlashSalesPlan;
PageLayout.Content.Title = L["FlashSalePlan"].Value;
PageLayout.Content.BreadCrumb.Add(L["Menu:FlashSalePlan"].Value);
PageLayout.Content.MenuItemName = FlashSalesMenus.FlashSalePlan;
}
@section scripts
{
<abp-script src="/Pages/EShop/Plugins/FlashSales/FlashSalesPlans/FlashSalesPlan/index.js" />
<abp-script src="/Pages/EShop/Plugins/FlashSales/FlashSalePlans/FlashSalePlan/index.js" />
}
@section styles
{
<abp-style src="/Pages/EShop/Plugins/FlashSales/FlashSalesPlans/FlashSalesPlan/index.css" />
<abp-style src="/Pages/EShop/Plugins/FlashSales/FlashSalePlans/FlashSalePlan/index.css" />
}
<abp-card>
<abp-card-header>
<abp-row>
<abp-column size-md="_6">
<abp-card-title>@L["FlashSalesPlan"]</abp-card-title>
<abp-card-title>@L["FlashSalePlan"]</abp-card-title>
</abp-column>
<abp-column size-md="_6" class="text-end">
@if (await Authorization.IsGrantedAsync(FlashSalesPermissions.FlashSalesPlan.Create))
@if (await Authorization.IsGrantedAsync(FlashSalesPermissions.FlashSalePlan.Create))
{
<abp-button id="NewFlashSalesPlanButton"
text="@L["CreateFlashSalesPlan"].Value"
<abp-button id="NewFlashSalePlanButton"
text="@L["CreateFlashSalePlan"].Value"
icon="plus"
button-type="Primary" />
}
@ -45,6 +45,6 @@
</abp-row>
</abp-card-header>
<abp-card-body>
<abp-table striped-rows="true" id="FlashSalesPlanTable" class="nowrap" />
<abp-table striped-rows="true" id="FlashSalePlanTable" class="nowrap" />
</abp-card-body>
</abp-card>

2
plugins/FlashSales/src/EasyAbp.EShop.Plugins.FlashSales.Web/Pages/EShop/Plugins/FlashSales/FlashSalesPlans/FlashSalesPlan/Index.cshtml.cs → plugins/FlashSales/src/EasyAbp.EShop.Plugins.FlashSales.Web/Pages/EShop/Plugins/FlashSales/FlashSalePlans/FlashSalePlan/Index.cshtml.cs

@ -1,6 +1,6 @@
using System.Threading.Tasks;
namespace EasyAbp.EShop.Plugins.FlashSales.Web.Pages.EShop.Plugins.FlashSales.FlashSalesPlans.FlashSalesPlan;
namespace EasyAbp.EShop.Plugins.FlashSales.Web.Pages.EShop.Plugins.FlashSales.FlashSalePlans.FlashSalePlan;
public class IndexModel : FlashSalesPageModel
{

25
plugins/FlashSales/src/EasyAbp.EShop.Plugins.FlashSales.Web/Pages/EShop/Plugins/FlashSales/FlashSalePlans/FlashSalePlan/ViewModels/CreateFlashSalePlanViewModel.cs

@ -0,0 +1,25 @@
using System;
using System.ComponentModel.DataAnnotations;
namespace EasyAbp.EShop.Plugins.FlashSales.Web.Pages.EShop.Plugins.FlashSales.FlashSalePlans.FlashSalePlan.ViewModels;
public class CreateFlashSalePlanViewModel
{
[Display(Name = "FlashSalePlanStoreId")]
public Guid StoreId { get; set; }
[Display(Name = "FlashSalePlanBeginTime")]
public DateTime BeginTime { get; set; }
[Display(Name = "FlashSalePlanEndTime")]
public DateTime EndTime { get; set; }
[Display(Name = "FlashSalePlanProductId")]
public Guid ProductId { get; set; }
[Display(Name = "FlashSalePlanProductSkuId")]
public Guid ProductSkuId { get; set; }
[Display(Name = "FlashSalePlanIsPublished")]
public bool IsPublished { get; set; }
}

16
plugins/FlashSales/src/EasyAbp.EShop.Plugins.FlashSales.Web/Pages/EShop/Plugins/FlashSales/FlashSalesPlans/FlashSalesPlan/ViewModels/EditFlashSalesPlanViewModel.cs → plugins/FlashSales/src/EasyAbp.EShop.Plugins.FlashSales.Web/Pages/EShop/Plugins/FlashSales/FlashSalePlans/FlashSalePlan/ViewModels/EditFlashSalePlanViewModel.cs

@ -4,28 +4,28 @@ using Microsoft.AspNetCore.Mvc;
using Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.TagHelpers.Form;
using Volo.Abp.Domain.Entities;
namespace EasyAbp.EShop.Plugins.FlashSales.Web.Pages.EShop.Plugins.FlashSales.FlashSalesPlans.FlashSalesPlan.ViewModels;
namespace EasyAbp.EShop.Plugins.FlashSales.Web.Pages.EShop.Plugins.FlashSales.FlashSalePlans.FlashSalePlan.ViewModels;
public class EditFlashSalesPlanViewModel : IHasConcurrencyStamp
public class EditFlashSalePlanViewModel : IHasConcurrencyStamp
{
[DisabledInput]
[ReadOnlyInput]
[Display(Name = "FlashSalesPlanStoreId")]
[Display(Name = "FlashSalePlanStoreId")]
public Guid StoreId { get; set; }
[Display(Name = "FlashSalesPlanBeginTime")]
[Display(Name = "FlashSalePlanBeginTime")]
public DateTime BeginTime { get; set; }
[Display(Name = "FlashSalesPlanEndTime")]
[Display(Name = "FlashSalePlanEndTime")]
public DateTime EndTime { get; set; }
[Display(Name = "FlashSalesPlanProductId")]
[Display(Name = "FlashSalePlanProductId")]
public Guid ProductId { get; set; }
[Display(Name = "FlashSalesPlanProductSkuId")]
[Display(Name = "FlashSalePlanProductSkuId")]
public Guid ProductSkuId { get; set; }
[Display(Name = "FlashSalesPlanIsPublished")]
[Display(Name = "FlashSalePlanIsPublished")]
public bool IsPublished { get; set; }
[HiddenInput]

0
plugins/FlashSales/src/EasyAbp.EShop.Plugins.FlashSales.Web/Pages/EShop/Plugins/FlashSales/FlashSalesPlans/FlashSalesPlan/index.css → plugins/FlashSales/src/EasyAbp.EShop.Plugins.FlashSales.Web/Pages/EShop/Plugins/FlashSales/FlashSalePlans/FlashSalePlan/index.css

28
plugins/FlashSales/src/EasyAbp.EShop.Plugins.FlashSales.Web/Pages/EShop/Plugins/FlashSales/FlashSalesPlans/FlashSalesPlan/index.js → plugins/FlashSales/src/EasyAbp.EShop.Plugins.FlashSales.Web/Pages/EShop/Plugins/FlashSales/FlashSalePlans/FlashSalePlan/index.js

@ -2,11 +2,11 @@ $(function () {
var l = abp.localization.getResource('EasyAbpEShopPluginsFlashSales');
var service = easyAbp.eShop.plugins.flashSales.flashSalesPlans.flashSalesPlan;
var createModal = new abp.ModalManager(abp.appPath + 'EShop/Plugins/FlashSales/FlashSalesPlans/FlashSalesPlan/CreateModal');
var editModal = new abp.ModalManager(abp.appPath + 'EShop/Plugins/FlashSales/FlashSalesPlans/FlashSalesPlan/EditModal');
var service = easyAbp.eShop.plugins.flashSales.flashSalePlans.flashSalePlan;
var createModal = new abp.ModalManager(abp.appPath + 'EShop/Plugins/FlashSales/FlashSalePlans/FlashSalePlan/CreateModal');
var editModal = new abp.ModalManager(abp.appPath + 'EShop/Plugins/FlashSales/FlashSalePlans/FlashSalePlan/EditModal');
var dataTable = $('#FlashSalesPlanTable').DataTable(abp.libs.datatables.normalizeConfiguration({
var dataTable = $('#FlashSalePlanTable').DataTable(abp.libs.datatables.normalizeConfiguration({
processing: true,
serverSide: true,
paging: true,
@ -16,7 +16,7 @@ $(function () {
order: [[2, "asc"]],
ajax: abp.libs.datatables.createAjax(service.getList, function () {
return {
includeUnpublished: abp.auth.isGranted('EasyAbp.EShop.Plugins.FlashSales.FlashSalesPlan.Manage')
includeUnpublished: abp.auth.isGranted('EasyAbp.EShop.Plugins.FlashSales.FlashSalePlan.Manage')
};
}),
columnDefs: [
@ -26,14 +26,14 @@ $(function () {
[
{
text: l('Edit'),
visible: abp.auth.isGranted('EasyAbp.EShop.Plugins.FlashSales.FlashSalesPlan.Update'),
visible: abp.auth.isGranted('EasyAbp.EShop.Plugins.FlashSales.FlashSalePlan.Update'),
action: function (data) {
editModal.open({ id: data.record.id });
}
},
{
text: l('Delete'),
visible: abp.auth.isGranted('EasyAbp.EShop.Plugins.FlashSales.FlashSalesPlan.Delete'),
visible: abp.auth.isGranted('EasyAbp.EShop.Plugins.FlashSales.FlashSalePlan.Delete'),
confirmMessage: function (data) {
return l('FlashSalesPlanDeletionConfirmationMessage', data.record.id);
},
@ -49,29 +49,29 @@ $(function () {
}
},
{
title: l('FlashSalesPlanStoreId'),
title: l('FlashSalePlanStoreId'),
data: "storeId"
},
{
title: l('FlashSalesPlanBeginTime'),
title: l('FlashSalePlanBeginTime'),
data: "beginTime",
dataFormat: 'datetime'
},
{
title: l('FlashSalesPlanEndTime'),
title: l('FlashSalePlanEndTime'),
data: "endTime",
dataFormat: 'datetime'
},
{
title: l('FlashSalesPlanProductId'),
title: l('FlashSalePlanProductId'),
data: "productId"
},
{
title: l('FlashSalesPlanProductSkuId'),
title: l('FlashSalePlanProductSkuId'),
data: "productSkuId"
},
{
title: l('FlashSalesPlanIsPublished'),
title: l('FlashSalePlanIsPublished'),
data: "isPublished",
dataFormat: 'boolean'
},
@ -86,7 +86,7 @@ $(function () {
dataTable.ajax.reload();
});
$('#NewFlashSalesPlanButton').click(function (e) {
$('#NewFlashSalePlanButton').click(function (e) {
e.preventDefault();
createModal.open();
});

16
plugins/FlashSales/src/EasyAbp.EShop.Plugins.FlashSales.Web/Pages/EShop/Plugins/FlashSales/FlashSalesResults/FlashSalesResult/Index.cshtml → 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.FlashSalesResults.FlashSalesResult
@using EasyAbp.EShop.Plugins.FlashSales.Web.Pages.EShop.Plugins.FlashSales.FlashSaleResults.FlashSalesResult
@using EasyAbp.EShop.Plugins.FlashSales.Localization
@using EasyAbp.EShop.Plugins.FlashSales.Web.Menus
@ -13,29 +13,29 @@
@inject IHtmlLocalizer<FlashSalesResource> L
@inject IAuthorizationService Authorization
@{
PageLayout.Content.Title = L["FlashSalesResult"].Value;
PageLayout.Content.BreadCrumb.Add(L["Menu:FlashSalesResult"].Value);
PageLayout.Content.MenuItemName = FlashSalesMenus.FlashSalesResult;
PageLayout.Content.Title = L["FlashSaleResult"].Value;
PageLayout.Content.BreadCrumb.Add(L["Menu:FlashSaleResult"].Value);
PageLayout.Content.MenuItemName = FlashSalesMenus.FlashSaleResult;
}
@section scripts
{
<abp-script src="/Pages/EShop/Plugins/FlashSales/FlashSalesResults/FlashSalesResult/index.js" />
<abp-script src="/Pages/EShop/Plugins/FlashSales/FlashSaleResults/FlashSaleResult/index.js" />
}
@section styles
{
<abp-style src="/Pages/EShop/Plugins/FlashSales/FlashSalesResults/FlashSalesResult/index.css" />
<abp-style src="/Pages/EShop/Plugins/FlashSales/FlashSaleResults/FlashSaleResult/index.css" />
}
<abp-card>
<abp-card-header>
<abp-row>
<abp-column size-md="_6">
<abp-card-title>@L["FlashSalesResult"]</abp-card-title>
<abp-card-title>@L["FlashSaleResult"]</abp-card-title>
</abp-column>
</abp-row>
</abp-card-header>
<abp-card-body>
<abp-table striped-rows="true" id="FlashSalesResultTable" class="nowrap" />
<abp-table striped-rows="true" id="FlashSaleResultTable" class="nowrap" />
</abp-card-body>
</abp-card>

2
plugins/FlashSales/src/EasyAbp.EShop.Plugins.FlashSales.Web/Pages/EShop/Plugins/FlashSales/FlashSalesResults/FlashSalesResult/Index.cshtml.cs → 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.FlashSalesResults.FlashSalesResult;
namespace EasyAbp.EShop.Plugins.FlashSales.Web.Pages.EShop.Plugins.FlashSales.FlashSaleResults.FlashSalesResult;
public class IndexModel : PageModel
{

4
plugins/FlashSales/src/EasyAbp.EShop.Plugins.FlashSales.Web/Pages/EShop/Plugins/FlashSales/FlashSalesResults/FlashSalesResult/ViewModal.cshtml → plugins/FlashSales/src/EasyAbp.EShop.Plugins.FlashSales.Web/Pages/EShop/Plugins/FlashSales/FlashSaleResults/FlashSaleResult/ViewModal.cshtml

@ -2,7 +2,7 @@
@using EasyAbp.EShop.Plugins.FlashSales.Localization
@using Microsoft.AspNetCore.Mvc.Localization
@using Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.TagHelpers.Modal
@using EasyAbp.EShop.Plugins.FlashSales.Web.Pages.EShop.Plugins.FlashSales.FlashSalesResults.FlashSalesResult
@using EasyAbp.EShop.Plugins.FlashSales.Web.Pages.EShop.Plugins.FlashSales.FlashSaleResults.FlashSaleResult
@inject IHtmlLocalizer<FlashSalesResource> L
@model ViewModalModel
@ -12,7 +12,7 @@
<abp-dynamic-form abp-model="ViewModel" data-ajaxForm="true" asp-page="ViewModal">
<abp-modal>
<abp-modal-header title="@L["ViewFlashSalesResult"].Value"></abp-modal-header>
<abp-modal-header title="@L["ViewFlashSaleResult"].Value"></abp-modal-header>
<abp-modal-body>
<abp-input asp-for="Id" />
<abp-form-content />

16
plugins/FlashSales/src/EasyAbp.EShop.Plugins.FlashSales.Web/Pages/EShop/Plugins/FlashSales/FlashSalesResults/FlashSalesResult/ViewModal.cshtml.cs → plugins/FlashSales/src/EasyAbp.EShop.Plugins.FlashSales.Web/Pages/EShop/Plugins/FlashSales/FlashSaleResults/FlashSaleResult/ViewModal.cshtml.cs

@ -1,11 +1,11 @@
using System;
using System.Threading.Tasks;
using EasyAbp.EShop.Plugins.FlashSales.FlashSalesResults;
using EasyAbp.EShop.Plugins.FlashSales.FlashSalesResults.Dtos;
using EasyAbp.EShop.Plugins.FlashSales.Web.Pages.EShop.Plugins.FlashSales.FlashSalesResults.FlashSalesResult.ViewModels;
using EasyAbp.EShop.Plugins.FlashSales.FlashSaleResults;
using EasyAbp.EShop.Plugins.FlashSales.FlashSaleResults.Dtos;
using EasyAbp.EShop.Plugins.FlashSales.Web.Pages.EShop.Plugins.FlashSales.FlashSaleResults.FlashSaleResult.ViewModels;
using Microsoft.AspNetCore.Mvc;
namespace EasyAbp.EShop.Plugins.FlashSales.Web.Pages.EShop.Plugins.FlashSales.FlashSalesResults.FlashSalesResult;
namespace EasyAbp.EShop.Plugins.FlashSales.Web.Pages.EShop.Plugins.FlashSales.FlashSaleResults.FlashSaleResult;
public class ViewModalModel : FlashSalesPageModel
{
@ -14,11 +14,11 @@ public class ViewModalModel : FlashSalesPageModel
public Guid Id { get; set; }
[BindProperty]
public ViewFlashSalesResultViewModel ViewModel { get; set; }
public ViewFlashSaleResultViewModel ViewModel { get; set; }
protected IFlashSalesResultAppService Service { get; }
protected IFlashSaleResultAppService Service { get; }
public ViewModalModel(IFlashSalesResultAppService service)
public ViewModalModel(IFlashSaleResultAppService service)
{
Service = service;
}
@ -26,6 +26,6 @@ public class ViewModalModel : FlashSalesPageModel
public virtual async Task OnGetAsync()
{
var dto = await Service.GetAsync(Id);
ViewModel = ObjectMapper.Map<FlashSalesResultDto, ViewFlashSalesResultViewModel>(dto);
ViewModel = ObjectMapper.Map<FlashSaleResultDto, ViewFlashSaleResultViewModel>(dto);
}
}

26
plugins/FlashSales/src/EasyAbp.EShop.Plugins.FlashSales.Web/Pages/EShop/Plugins/FlashSales/FlashSaleResults/FlashSaleResult/ViewModels/ViewFlashSaleResultViewModel.cs

@ -0,0 +1,26 @@
using System;
using System.ComponentModel.DataAnnotations;
using EasyAbp.EShop.Plugins.FlashSales.FlashSaleResults;
namespace EasyAbp.EShop.Plugins.FlashSales.Web.Pages.EShop.Plugins.FlashSales.FlashSaleResults.FlashSaleResult.ViewModels;
public class ViewFlashSaleResultViewModel
{
[Display(Name = "FlashSaleResultStoreId")]
public Guid StoreId { get; set; }
[Display(Name = "FlashSaleResultPlanId")]
public Guid PlanId { get; set; }
[Display(Name = "FlashSaleResultStatus")]
public FlashSaleResultStatus Status { get; set; }
[Display(Name = "FlashSaleResultReason")]
public string Reason { get; set; }
[Display(Name = "FlashSaleResultUserId")]
public Guid UserId { get; set; }
[Display(Name = "FlashSaleResultOrderId")]
public Guid? OrderId { get; set; }
}

0
plugins/FlashSales/src/EasyAbp.EShop.Plugins.FlashSales.Web/Pages/EShop/Plugins/FlashSales/FlashSalesResults/FlashSalesResult/index.css → plugins/FlashSales/src/EasyAbp.EShop.Plugins.FlashSales.Web/Pages/EShop/Plugins/FlashSales/FlashSaleResults/FlashSaleResult/index.css

24
plugins/FlashSales/src/EasyAbp.EShop.Plugins.FlashSales.Web/Pages/EShop/Plugins/FlashSales/FlashSalesResults/FlashSalesResult/index.js → plugins/FlashSales/src/EasyAbp.EShop.Plugins.FlashSales.Web/Pages/EShop/Plugins/FlashSales/FlashSaleResults/FlashSaleResult/index.js

@ -2,10 +2,10 @@ $(function () {
var l = abp.localization.getResource('EasyAbpEShopPluginsFlashSales');
var service = easyAbp.eShop.plugins.flashSales.flashSalesResults.flashSalesResult;
var viewModal = new abp.ModalManager(abp.appPath + 'EShop/Plugins/FlashSales/FlashSalesResults/FlashSalesResult/ViewModal');
var service = easyAbp.eShop.plugins.flashSales.flashSaleResults.flashSaleResult;
var viewModal = new abp.ModalManager(abp.appPath + 'EShop/Plugins/FlashSales/FlashSaleResults/FlashSaleResult/ViewModal');
var dataTable = $('#FlashSalesResultTable').DataTable(abp.libs.datatables.normalizeConfiguration({
var dataTable = $('#FlashSaleResultTable').DataTable(abp.libs.datatables.normalizeConfiguration({
processing: true,
serverSide: true,
paging: true,
@ -20,7 +20,7 @@ $(function () {
items:
[
{
text: l('ViewFlashSalesResult'),
text: l('ViewFlashSaleResult'),
action: function (data) {
viewModal.open({ id: data.record.id });
}
@ -29,34 +29,34 @@ $(function () {
}
},
{
title: l('FlashSalesResultStoreId'),
title: l('FlashSaleResultStoreId'),
data: "storeId"
},
{
title: l('FlashSalesResultPlanId'),
title: l('FlashSaleResultPlanId'),
data: "planId"
},
{
title: l('FlashSalesResultStatus'),
title: l('FlashSaleResultStatus'),
data: "status",
render: function (data) {
return l('Enum:FlashSalesResultStatus.' + data);
return l('Enum:FlashSaleResultStatus.' + data);
}
},
{
title: l('FlashSalesResultReason'),
title: l('FlashSaleResultReason'),
data: "reason"
},
{
title: l('FlashSalesResultUserId'),
title: l('FlashSaleResultUserId'),
data: "userId"
},
{
title: l('FlashSalesResultOrderId'),
title: l('FlashSaleResultOrderId'),
data: "orderId"
},
{
title: l('FlashSalesResultCreationTime'),
title: l('FlashSaleResultCreationTime'),
data: "creationTime",
dataFormat: 'datetime'
},

27
plugins/FlashSales/src/EasyAbp.EShop.Plugins.FlashSales.Web/Pages/EShop/Plugins/FlashSales/FlashSalesPlans/FlashSalesPlan/CreateModal.cshtml.cs

@ -1,27 +0,0 @@
using System.Threading.Tasks;
using EasyAbp.EShop.Plugins.FlashSales.FlashSalesPlans;
using EasyAbp.EShop.Plugins.FlashSales.FlashSalesPlans.Dtos;
using EasyAbp.EShop.Plugins.FlashSales.Web.Pages.EShop.Plugins.FlashSales.FlashSalesPlans.FlashSalesPlan.ViewModels;
using Microsoft.AspNetCore.Mvc;
namespace EasyAbp.EShop.Plugins.FlashSales.Web.Pages.EShop.Plugins.FlashSales.FlashSalesPlans.FlashSalesPlan;
public class CreateModalModel : FlashSalesPageModel
{
[BindProperty]
public CreateFlashSalesPlanViewModel ViewModel { get; set; }
protected IFlashSalesPlanAppService Service { get; }
public CreateModalModel(IFlashSalesPlanAppService service)
{
Service = service;
}
public virtual async Task<IActionResult> OnPostAsync()
{
var dto = ObjectMapper.Map<CreateFlashSalesPlanViewModel, FlashSalesPlanCreateDto>(ViewModel);
await Service.CreateAsync(dto);
return NoContent();
}
}

25
plugins/FlashSales/src/EasyAbp.EShop.Plugins.FlashSales.Web/Pages/EShop/Plugins/FlashSales/FlashSalesPlans/FlashSalesPlan/ViewModels/CreateFlashSalesPlanViewModel.cs

@ -1,25 +0,0 @@
using System;
using System.ComponentModel.DataAnnotations;
namespace EasyAbp.EShop.Plugins.FlashSales.Web.Pages.EShop.Plugins.FlashSales.FlashSalesPlans.FlashSalesPlan.ViewModels;
public class CreateFlashSalesPlanViewModel
{
[Display(Name = "FlashSalesPlanStoreId")]
public Guid StoreId { get; set; }
[Display(Name = "FlashSalesPlanBeginTime")]
public DateTime BeginTime { get; set; }
[Display(Name = "FlashSalesPlanEndTime")]
public DateTime EndTime { get; set; }
[Display(Name = "FlashSalesPlanProductId")]
public Guid ProductId { get; set; }
[Display(Name = "FlashSalesPlanProductSkuId")]
public Guid ProductSkuId { get; set; }
[Display(Name = "FlashSalesPlanIsPublished")]
public bool IsPublished { get; set; }
}

Some files were not shown because too many files changed in this diff

Loading…
Cancel
Save