From 1ddc25c9e3862e3c3cc2e5f51918b119ed4b2e94 Mon Sep 17 00:00:00 2001 From: gdlcf88 Date: Wed, 6 May 2020 10:44:42 +0800 Subject: [PATCH] Close #19: Move purchasable check function to order module --- .../Orders/Orders/Dtos/CreateOrderDto.cs | 8 +++ .../Orders/BasicPurchasableCheckProvider.cs | 52 +++++++++++++++++++ .../Orders/Orders/IPurchasableCheckManager.cs | 13 +++++ .../Orders/IPurchasableCheckProvider.cs | 13 +++++ .../Orders/Orders/NotPurchasableException.cs | 13 +++++ .../EShop/Orders/Orders/OrderAppService.cs | 9 ++-- .../Orders/Orders/PurchasableCheckManager.cs | 30 +++++++++++ .../Products/Products/IProductAppService.cs | 3 -- .../Products/Products/ProductAppService.cs | 10 ---- .../Products/CheckProductPurchasableResult.cs | 17 ------ .../BasicProductPurchasableCheckHandler.cs | 51 ------------------ .../Products/Products/IProductManager.cs | 7 --- .../IProductPurchasableCheckHandler.cs | 12 ----- .../ProductIsNotPurchasableException.cs | 13 ----- .../EShop/Products/Products/ProductManager.cs | 29 ----------- ...bleCheckHandlerMissingPropertyException.cs | 13 ----- 16 files changed, 134 insertions(+), 159 deletions(-) create mode 100644 modules/EasyAbp.EShop.Orders/src/EasyAbp.EShop.Orders.Application/EasyAbp/EShop/Orders/Orders/BasicPurchasableCheckProvider.cs create mode 100644 modules/EasyAbp.EShop.Orders/src/EasyAbp.EShop.Orders.Application/EasyAbp/EShop/Orders/Orders/IPurchasableCheckManager.cs create mode 100644 modules/EasyAbp.EShop.Orders/src/EasyAbp.EShop.Orders.Application/EasyAbp/EShop/Orders/Orders/IPurchasableCheckProvider.cs create mode 100644 modules/EasyAbp.EShop.Orders/src/EasyAbp.EShop.Orders.Application/EasyAbp/EShop/Orders/Orders/NotPurchasableException.cs create mode 100644 modules/EasyAbp.EShop.Orders/src/EasyAbp.EShop.Orders.Application/EasyAbp/EShop/Orders/Orders/PurchasableCheckManager.cs delete mode 100644 modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Domain.Shared/EasyAbp/EShop/Products/Products/CheckProductPurchasableResult.cs delete mode 100644 modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Domain/EasyAbp/EShop/Products/Products/BasicProductPurchasableCheckHandler.cs delete mode 100644 modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Domain/EasyAbp/EShop/Products/Products/IProductPurchasableCheckHandler.cs delete mode 100644 modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Domain/EasyAbp/EShop/Products/Products/ProductIsNotPurchasableException.cs delete mode 100644 modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Domain/EasyAbp/EShop/Products/Products/ProductPurchasableCheckHandlerMissingPropertyException.cs diff --git a/modules/EasyAbp.EShop.Orders/src/EasyAbp.EShop.Orders.Application.Contracts/EasyAbp/EShop/Orders/Orders/Dtos/CreateOrderDto.cs b/modules/EasyAbp.EShop.Orders/src/EasyAbp.EShop.Orders.Application.Contracts/EasyAbp/EShop/Orders/Orders/Dtos/CreateOrderDto.cs index 1c842875..675d514d 100644 --- a/modules/EasyAbp.EShop.Orders/src/EasyAbp.EShop.Orders.Application.Contracts/EasyAbp/EShop/Orders/Orders/Dtos/CreateOrderDto.cs +++ b/modules/EasyAbp.EShop.Orders/src/EasyAbp.EShop.Orders.Application.Contracts/EasyAbp/EShop/Orders/Orders/Dtos/CreateOrderDto.cs @@ -22,6 +22,14 @@ namespace EasyAbp.EShop.Orders.Orders.Dtos public IEnumerable Validate(ValidationContext validationContext) { + if (OrderLines.Any(orderLine => orderLine.Quantity <= 0)) + { + yield return new ValidationResult( + "Quantity should be greater than 0.", + new[] { "OrderLines" } + ); + } + if (OrderLines.Select(orderLine => orderLine.Quantity).Sum() <= 0) { yield return new ValidationResult( diff --git a/modules/EasyAbp.EShop.Orders/src/EasyAbp.EShop.Orders.Application/EasyAbp/EShop/Orders/Orders/BasicPurchasableCheckProvider.cs b/modules/EasyAbp.EShop.Orders/src/EasyAbp.EShop.Orders.Application/EasyAbp/EShop/Orders/Orders/BasicPurchasableCheckProvider.cs new file mode 100644 index 00000000..cd481ed3 --- /dev/null +++ b/modules/EasyAbp.EShop.Orders/src/EasyAbp.EShop.Orders.Application/EasyAbp/EShop/Orders/Orders/BasicPurchasableCheckProvider.cs @@ -0,0 +1,52 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Threading.Tasks; +using EasyAbp.EShop.Orders.Orders.Dtos; +using EasyAbp.EShop.Products.Products.Dtos; +using Volo.Abp.DependencyInjection; + +namespace EasyAbp.EShop.Orders.Orders +{ + public class BasicPurchasableCheckProvider : IPurchasableCheckProvider, ITransientDependency + { + public async Task CheckAsync(CreateOrderDto input, Dictionary productDict) + { + await CheckProductsPublishedAsync(input, productDict); + + await CheckInventoriesSufficientAsync(input, productDict); + } + + protected virtual Task CheckProductsPublishedAsync(CreateOrderDto input, + Dictionary productDict) + { + foreach (var productId in input.OrderLines.Select(dto => dto.ProductId).Distinct().ToArray()) + { + if (!productDict[productId].IsPublished) + { + throw new NotPurchasableException(productId, null, "Unpublished project"); + } + } + + return Task.CompletedTask; + } + + protected virtual Task CheckInventoriesSufficientAsync(CreateOrderDto input, + Dictionary productDict) + { + foreach (var orderLine in input.OrderLines) + { + var inventory = productDict[orderLine.ProductId].ProductSkus + .Single(sku => sku.Id == orderLine.ProductSkuId).Inventory; + + if (inventory < orderLine.Quantity) + { + throw new NotPurchasableException(orderLine.ProductId, orderLine.ProductSkuId, + "Insufficient inventory"); + } + } + + return Task.CompletedTask; + } + } +} \ No newline at end of file diff --git a/modules/EasyAbp.EShop.Orders/src/EasyAbp.EShop.Orders.Application/EasyAbp/EShop/Orders/Orders/IPurchasableCheckManager.cs b/modules/EasyAbp.EShop.Orders/src/EasyAbp.EShop.Orders.Application/EasyAbp/EShop/Orders/Orders/IPurchasableCheckManager.cs new file mode 100644 index 00000000..3062f4cc --- /dev/null +++ b/modules/EasyAbp.EShop.Orders/src/EasyAbp.EShop.Orders.Application/EasyAbp/EShop/Orders/Orders/IPurchasableCheckManager.cs @@ -0,0 +1,13 @@ +using System; +using System.Collections.Generic; +using System.Threading.Tasks; +using EasyAbp.EShop.Orders.Orders.Dtos; +using EasyAbp.EShop.Products.Products.Dtos; + +namespace EasyAbp.EShop.Orders.Orders +{ + public interface IPurchasableCheckManager + { + Task CheckAsync(CreateOrderDto input, Dictionary productDict); + } +} \ No newline at end of file diff --git a/modules/EasyAbp.EShop.Orders/src/EasyAbp.EShop.Orders.Application/EasyAbp/EShop/Orders/Orders/IPurchasableCheckProvider.cs b/modules/EasyAbp.EShop.Orders/src/EasyAbp.EShop.Orders.Application/EasyAbp/EShop/Orders/Orders/IPurchasableCheckProvider.cs new file mode 100644 index 00000000..3bdf79d9 --- /dev/null +++ b/modules/EasyAbp.EShop.Orders/src/EasyAbp.EShop.Orders.Application/EasyAbp/EShop/Orders/Orders/IPurchasableCheckProvider.cs @@ -0,0 +1,13 @@ +using System; +using System.Collections.Generic; +using System.Threading.Tasks; +using EasyAbp.EShop.Orders.Orders.Dtos; +using EasyAbp.EShop.Products.Products.Dtos; + +namespace EasyAbp.EShop.Orders.Orders +{ + public interface IPurchasableCheckProvider + { + Task CheckAsync(CreateOrderDto input, Dictionary productDict); + } +} \ No newline at end of file diff --git a/modules/EasyAbp.EShop.Orders/src/EasyAbp.EShop.Orders.Application/EasyAbp/EShop/Orders/Orders/NotPurchasableException.cs b/modules/EasyAbp.EShop.Orders/src/EasyAbp.EShop.Orders.Application/EasyAbp/EShop/Orders/Orders/NotPurchasableException.cs new file mode 100644 index 00000000..31536c98 --- /dev/null +++ b/modules/EasyAbp.EShop.Orders/src/EasyAbp.EShop.Orders.Application/EasyAbp/EShop/Orders/Orders/NotPurchasableException.cs @@ -0,0 +1,13 @@ +using System; +using Volo.Abp; + +namespace EasyAbp.EShop.Orders.Orders +{ + public class NotPurchasableException : BusinessException + { + public NotPurchasableException(Guid productId, Guid? productSkuId, string reason) : base( + message: $"Product {productId} (SKU: {productSkuId}) cannot be purchased, the reason is: {reason}") + { + } + } +} \ No newline at end of file diff --git a/modules/EasyAbp.EShop.Orders/src/EasyAbp.EShop.Orders.Application/EasyAbp/EShop/Orders/Orders/OrderAppService.cs b/modules/EasyAbp.EShop.Orders/src/EasyAbp.EShop.Orders.Application/EasyAbp/EShop/Orders/Orders/OrderAppService.cs index 13c8ce9d..2989f497 100644 --- a/modules/EasyAbp.EShop.Orders/src/EasyAbp.EShop.Orders.Application/EasyAbp/EShop/Orders/Orders/OrderAppService.cs +++ b/modules/EasyAbp.EShop.Orders/src/EasyAbp.EShop.Orders.Application/EasyAbp/EShop/Orders/Orders/OrderAppService.cs @@ -1,6 +1,5 @@ using System; using System.Collections.Generic; -using System.Collections.ObjectModel; using System.Linq; using System.Threading.Tasks; using EasyAbp.EShop.Orders.Authorization; @@ -11,7 +10,6 @@ using Microsoft.AspNetCore.Authorization; using Volo.Abp; using Volo.Abp.Application.Dtos; using Volo.Abp.Application.Services; -using Volo.Abp.Json; using Volo.Abp.Users; namespace EasyAbp.EShop.Orders.Orders @@ -26,17 +24,20 @@ namespace EasyAbp.EShop.Orders.Orders private readonly INewOrderGenerator _newOrderGenerator; private readonly IProductAppService _productAppService; + private readonly IPurchasableCheckManager _purchasableCheckManager; private readonly IOrderDiscountManager _orderDiscountManager; private readonly IOrderRepository _repository; public OrderAppService( INewOrderGenerator newOrderGenerator, IProductAppService productAppService, + IPurchasableCheckManager purchasableCheckManager, IOrderDiscountManager orderDiscountManager, IOrderRepository repository) : base(repository) { _newOrderGenerator = newOrderGenerator; _productAppService = productAppService; + _purchasableCheckManager = purchasableCheckManager; _orderDiscountManager = orderDiscountManager; _repository = repository; } @@ -101,8 +102,8 @@ namespace EasyAbp.EShop.Orders.Orders var productDict = await GetProductDictionaryAsync(input.OrderLines.Select(dto => dto.ProductId).ToList(), input.StoreId); - - // Todo: Check if the product is purchasable. + + await _purchasableCheckManager.CheckAsync(input, productDict); var order = await _newOrderGenerator.GenerateAsync(input, productDict); diff --git a/modules/EasyAbp.EShop.Orders/src/EasyAbp.EShop.Orders.Application/EasyAbp/EShop/Orders/Orders/PurchasableCheckManager.cs b/modules/EasyAbp.EShop.Orders/src/EasyAbp.EShop.Orders.Application/EasyAbp/EShop/Orders/Orders/PurchasableCheckManager.cs new file mode 100644 index 00000000..9c574d83 --- /dev/null +++ b/modules/EasyAbp.EShop.Orders/src/EasyAbp.EShop.Orders.Application/EasyAbp/EShop/Orders/Orders/PurchasableCheckManager.cs @@ -0,0 +1,30 @@ +using System; +using System.Collections.Generic; +using System.Threading.Tasks; +using EasyAbp.EShop.Orders.Orders.Dtos; +using EasyAbp.EShop.Products.Products.Dtos; +using Microsoft.Extensions.DependencyInjection; +using Volo.Abp.DependencyInjection; + +namespace EasyAbp.EShop.Orders.Orders +{ + public class PurchasableCheckManager : IPurchasableCheckManager, ITransientDependency + { + private readonly IServiceProvider _serviceProvider; + + public PurchasableCheckManager(IServiceProvider serviceProvider) + { + _serviceProvider = serviceProvider; + } + + public async Task CheckAsync(CreateOrderDto input, Dictionary productDict) + { + var providers = _serviceProvider.GetServices(); + + foreach (var provider in providers) + { + await provider.CheckAsync(input, productDict); + } + } + } +} \ No newline at end of file diff --git a/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Application.Contracts/EasyAbp/EShop/Products/Products/IProductAppService.cs b/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Application.Contracts/EasyAbp/EShop/Products/Products/IProductAppService.cs index d912fd40..54a0fe83 100644 --- a/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Application.Contracts/EasyAbp/EShop/Products/Products/IProductAppService.cs +++ b/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Application.Contracts/EasyAbp/EShop/Products/Products/IProductAppService.cs @@ -23,8 +23,5 @@ namespace EasyAbp.EShop.Products.Products Task GetAsync(Guid id, Guid storeId); Task DeleteSkuAsync(Guid productId, Guid productSkuId, Guid storeId); - - Task CheckPurchasableAsync(Guid productId, Guid productSkuId, Guid storeId, - Dictionary extraProperties); } } \ No newline at end of file diff --git a/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Application/EasyAbp/EShop/Products/Products/ProductAppService.cs b/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Application/EasyAbp/EShop/Products/Products/ProductAppService.cs index 55c10412..9a090964 100644 --- a/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Application/EasyAbp/EShop/Products/Products/ProductAppService.cs +++ b/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Application/EasyAbp/EShop/Products/Products/ProductAppService.cs @@ -358,16 +358,6 @@ namespace EasyAbp.EShop.Products.Products return ObjectMapper.Map(product); } - public async Task CheckPurchasableAsync(Guid productId, Guid productSkuId, - Guid storeId, Dictionary extraProperties) - { - var product = await _repository.GetAsync(productId); - - var productSku = product.ProductSkus.Single(sku => sku.Id == productSkuId); - - return await _productManager.GetPurchasableStatusAsync(product, productSku, storeId, extraProperties); - } - protected virtual async Task UpdateProductCategoriesAsync(Guid productId, IEnumerable categoryIds) { await _productCategoryRepository.DeleteAsync(x => x.ProductId.Equals(productId)); diff --git a/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Domain.Shared/EasyAbp/EShop/Products/Products/CheckProductPurchasableResult.cs b/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Domain.Shared/EasyAbp/EShop/Products/Products/CheckProductPurchasableResult.cs deleted file mode 100644 index c0e9d6ac..00000000 --- a/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Domain.Shared/EasyAbp/EShop/Products/Products/CheckProductPurchasableResult.cs +++ /dev/null @@ -1,17 +0,0 @@ -namespace EasyAbp.EShop.Products.Products -{ - public class CheckProductPurchasableResult - { - public bool IsPurchasable { get; set; } - - public string Reason { get; set; } - - public CheckProductPurchasableResult( - bool isPurchasable, - string reason = null) - { - IsPurchasable = isPurchasable; - Reason = reason; - } - } -} \ No newline at end of file diff --git a/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Domain/EasyAbp/EShop/Products/Products/BasicProductPurchasableCheckHandler.cs b/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Domain/EasyAbp/EShop/Products/Products/BasicProductPurchasableCheckHandler.cs deleted file mode 100644 index 5999c393..00000000 --- a/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Domain/EasyAbp/EShop/Products/Products/BasicProductPurchasableCheckHandler.cs +++ /dev/null @@ -1,51 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Threading.Tasks; -using Volo.Abp.DependencyInjection; - -namespace EasyAbp.EShop.Products.Products -{ - public class BasicProductPurchasableCheckHandler : IProductPurchasableCheckHandler, ITransientDependency - { - private readonly IProductInventoryProvider _productInventoryProvider; - - public BasicProductPurchasableCheckHandler( - IProductInventoryProvider productInventoryProvider) - { - _productInventoryProvider = productInventoryProvider; - } - - public async Task CheckAsync(Product product, ProductSku productSku, Guid storeId, - Dictionary extraProperties) - { - if (!await IsProductPublishedAsync(product)) - { - return new CheckProductPurchasableResult(false, "Unpublished project"); - } - - if (!await IsInventorySufficientAsync(product, productSku, storeId, extraProperties)) - { - return new CheckProductPurchasableResult(false, "Insufficient inventory"); - } - - return new CheckProductPurchasableResult(true); - } - - protected virtual Task IsProductPublishedAsync(Product product) - { - return Task.FromResult(product.IsPublished); - } - - protected virtual async Task IsInventorySufficientAsync(Product product, ProductSku productSku, Guid storeId, Dictionary extraProperties) - { - if (!extraProperties.TryGetValue("Quantity", out var quantity)) - { - throw new ProductPurchasableCheckHandlerMissingPropertyException( - nameof(BasicProductPurchasableCheckHandler), "Quantity"); - } - - return await _productInventoryProvider.IsInventorySufficientAsync(product, productSku, storeId, - Convert.ToInt32(quantity)); - } - } -} \ No newline at end of file diff --git a/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Domain/EasyAbp/EShop/Products/Products/IProductManager.cs b/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Domain/EasyAbp/EShop/Products/Products/IProductManager.cs index 6c1debd1..2277c166 100644 --- a/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Domain/EasyAbp/EShop/Products/Products/IProductManager.cs +++ b/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Domain/EasyAbp/EShop/Products/Products/IProductManager.cs @@ -1,5 +1,4 @@ using System; -using System.Collections.Generic; using System.Threading.Tasks; using Volo.Abp.Domain.Services; @@ -7,12 +6,6 @@ namespace EasyAbp.EShop.Products.Products { public interface IProductManager : IDomainService { - Task CheckPurchasableAsync(Product product, ProductSku productSku, Guid storeId, - Dictionary extraProperties); - - Task GetPurchasableStatusAsync(Product product, ProductSku productSku, - Guid storeId, Dictionary extraProperties); - Task IsInventorySufficientAsync(Product product, ProductSku productSku, Guid storeId, int quantity); Task GetInventoryAsync(Product product, ProductSku productSku, Guid storeId); diff --git a/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Domain/EasyAbp/EShop/Products/Products/IProductPurchasableCheckHandler.cs b/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Domain/EasyAbp/EShop/Products/Products/IProductPurchasableCheckHandler.cs deleted file mode 100644 index c671cf80..00000000 --- a/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Domain/EasyAbp/EShop/Products/Products/IProductPurchasableCheckHandler.cs +++ /dev/null @@ -1,12 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Threading.Tasks; - -namespace EasyAbp.EShop.Products.Products -{ - public interface IProductPurchasableCheckHandler - { - Task CheckAsync(Product product, ProductSku productSku, Guid storeId, - Dictionary extraProperties); - } -} \ No newline at end of file diff --git a/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Domain/EasyAbp/EShop/Products/Products/ProductIsNotPurchasableException.cs b/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Domain/EasyAbp/EShop/Products/Products/ProductIsNotPurchasableException.cs deleted file mode 100644 index 2a3ce54f..00000000 --- a/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Domain/EasyAbp/EShop/Products/Products/ProductIsNotPurchasableException.cs +++ /dev/null @@ -1,13 +0,0 @@ -using System; -using Volo.Abp; - -namespace EasyAbp.EShop.Products.Products -{ - public class ProductIsNotPurchasableException : BusinessException - { - public ProductIsNotPurchasableException(Guid id, string reason) : base( - message: $"Product {id} cannot be purchased, the reason is: {reason}") - { - } - } -} \ No newline at end of file diff --git a/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Domain/EasyAbp/EShop/Products/Products/ProductManager.cs b/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Domain/EasyAbp/EShop/Products/Products/ProductManager.cs index 460dc9aa..f082c3e2 100644 --- a/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Domain/EasyAbp/EShop/Products/Products/ProductManager.cs +++ b/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Domain/EasyAbp/EShop/Products/Products/ProductManager.cs @@ -16,35 +16,6 @@ namespace EasyAbp.EShop.Products.Products _productInventoryProvider = productInventoryProvider; } - public async Task CheckPurchasableAsync(Product product, ProductSku productSku, Guid storeId, - Dictionary extraProperties) - { - var result = await GetPurchasableStatusAsync(product, productSku, storeId, extraProperties); - - if (!result.IsPurchasable) - { - throw new ProductIsNotPurchasableException(product.Id, result.Reason); - } - } - - public async Task GetPurchasableStatusAsync(Product product, - ProductSku productSku, Guid storeId, Dictionary extraProperties) - { - var handlers = ServiceProvider.GetServices(); - - foreach (var handler in handlers) - { - var result = await handler.CheckAsync(product, productSku, storeId, extraProperties); - - if (!result.IsPurchasable) - { - return result; - } - } - - return new CheckProductPurchasableResult(true); - } - public async Task IsInventorySufficientAsync(Product product, ProductSku productSku, Guid storeId, int quantity) { return await _productInventoryProvider.IsInventorySufficientAsync(product, productSku, storeId, quantity); diff --git a/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Domain/EasyAbp/EShop/Products/Products/ProductPurchasableCheckHandlerMissingPropertyException.cs b/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Domain/EasyAbp/EShop/Products/Products/ProductPurchasableCheckHandlerMissingPropertyException.cs deleted file mode 100644 index 978cf2de..00000000 --- a/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Domain/EasyAbp/EShop/Products/Products/ProductPurchasableCheckHandlerMissingPropertyException.cs +++ /dev/null @@ -1,13 +0,0 @@ -using System; -using Volo.Abp; - -namespace EasyAbp.EShop.Products.Products -{ - public class ProductPurchasableCheckHandlerMissingPropertyException : BusinessException - { - public ProductPurchasableCheckHandlerMissingPropertyException(string handlerName, string propertyKey) : base( - message: $"The {handlerName} is missing extra property: {propertyKey}") - { - } - } -} \ No newline at end of file