diff --git a/modules/EasyAbp.EShop.Orders/src/EasyAbp.EShop.Orders.Application/EasyAbp/EShop/Orders/Orders/CurrencyIsLimitException.cs b/modules/EasyAbp.EShop.Orders/src/EasyAbp.EShop.Orders.Application/EasyAbp/EShop/Orders/Orders/CurrencyIsLimitException.cs deleted file mode 100644 index 98a54742..00000000 --- a/modules/EasyAbp.EShop.Orders/src/EasyAbp.EShop.Orders.Application/EasyAbp/EShop/Orders/Orders/CurrencyIsLimitException.cs +++ /dev/null @@ -1,14 +0,0 @@ -using System; -using Volo.Abp; - -namespace EasyAbp.EShop.Orders.Orders -{ - public class CurrencyIsLimitException : BusinessException - { - public CurrencyIsLimitException(string expectedCurrency) : base( - "CurrencyIsLimit", - $"Only the specified currency {expectedCurrency} is allowed.") - { - } - } -} \ No newline at end of file diff --git a/modules/EasyAbp.EShop.Orders/src/EasyAbp.EShop.Orders.Application/EasyAbp/EShop/Orders/Orders/NewOrderGenerator.cs b/modules/EasyAbp.EShop.Orders/src/EasyAbp.EShop.Orders.Application/EasyAbp/EShop/Orders/Orders/NewOrderGenerator.cs index 76bf2630..1ca98639 100644 --- a/modules/EasyAbp.EShop.Orders/src/EasyAbp.EShop.Orders.Application/EasyAbp/EShop/Orders/Orders/NewOrderGenerator.cs +++ b/modules/EasyAbp.EShop.Orders/src/EasyAbp.EShop.Orders.Application/EasyAbp/EShop/Orders/Orders/NewOrderGenerator.cs @@ -53,7 +53,7 @@ namespace EasyAbp.EShop.Orders.Orders if (orderLines.Any(x => x.Currency != storeCurrency)) { - throw new CurrencyIsLimitException(storeCurrency); + throw new UnexpectedCurrencyException(storeCurrency); } var productTotalPrice = orderLines.Select(x => x.TotalPrice).Sum(); diff --git a/modules/EasyAbp.EShop.Orders/src/EasyAbp.EShop.Orders.Application/EasyAbp/EShop/Orders/Orders/OrderLineInvalidQuantityException.cs b/modules/EasyAbp.EShop.Orders/src/EasyAbp.EShop.Orders.Application/EasyAbp/EShop/Orders/Orders/OrderLineInvalidQuantityException.cs index a67027c0..1d187d7e 100644 --- a/modules/EasyAbp.EShop.Orders/src/EasyAbp.EShop.Orders.Application/EasyAbp/EShop/Orders/Orders/OrderLineInvalidQuantityException.cs +++ b/modules/EasyAbp.EShop.Orders/src/EasyAbp.EShop.Orders.Application/EasyAbp/EShop/Orders/Orders/OrderLineInvalidQuantityException.cs @@ -5,9 +5,11 @@ namespace EasyAbp.EShop.Orders.Orders { public class OrderLineInvalidQuantityException : BusinessException { - public OrderLineInvalidQuantityException(Guid productId, Guid? productSkuId, int quantity) : base( - message: $"Invalid quantity {quantity} for product {productId} (SKU: {productSkuId}).") + public OrderLineInvalidQuantityException(Guid productId, Guid? productSkuId, int quantity) : base(OrdersErrorCodes.OrderLineInvalidQuantity) { + WithData(nameof(productId), productId); + WithData(nameof(productSkuId), productSkuId); + WithData(nameof(quantity), quantity); } } } \ No newline at end of file diff --git a/modules/EasyAbp.EShop.Orders/src/EasyAbp.EShop.Orders.Application/EasyAbp/EShop/Orders/Orders/UnexpectedCurrencyException.cs b/modules/EasyAbp.EShop.Orders/src/EasyAbp.EShop.Orders.Application/EasyAbp/EShop/Orders/Orders/UnexpectedCurrencyException.cs new file mode 100644 index 00000000..cf4d8247 --- /dev/null +++ b/modules/EasyAbp.EShop.Orders/src/EasyAbp.EShop.Orders.Application/EasyAbp/EShop/Orders/Orders/UnexpectedCurrencyException.cs @@ -0,0 +1,13 @@ +using System; +using Volo.Abp; + +namespace EasyAbp.EShop.Orders.Orders +{ + public class UnexpectedCurrencyException : BusinessException + { + public UnexpectedCurrencyException(string expectedCurrency) : base(OrdersErrorCodes.UnexpectedCurrency) + { + WithData(nameof(expectedCurrency), expectedCurrency); + } + } +} \ No newline at end of file diff --git a/modules/EasyAbp.EShop.Orders/src/EasyAbp.EShop.Orders.Domain.Shared/EasyAbp/EShop/Orders/Localization/Orders/cs.json b/modules/EasyAbp.EShop.Orders/src/EasyAbp.EShop.Orders.Domain.Shared/EasyAbp/EShop/Orders/Localization/Orders/cs.json index 2963eece..9b750849 100644 --- a/modules/EasyAbp.EShop.Orders/src/EasyAbp.EShop.Orders.Domain.Shared/EasyAbp/EShop/Orders/Localization/Orders/cs.json +++ b/modules/EasyAbp.EShop.Orders/src/EasyAbp.EShop.Orders.Domain.Shared/EasyAbp/EShop/Orders/Localization/Orders/cs.json @@ -39,6 +39,15 @@ "OrderLineTotalPrice": "Total price", "OrderLineTotalDiscount": "Total discount", "OrderLineActualTotalPrice": "Actual total price", - "OrderLineQuantity": "Quantity" + "OrderLineQuantity": "Quantity", + "EasyAbp.EShop.Orders:UnexpectedCurrency": "Only the specified currency {expectedCurrency} is allowed.", + "EasyAbp.EShop.Orders:OrderLineInvalidQuantity": "Invalid quantity {quantity} for product {productId} (SKU: {productSkuId}).", + "EasyAbp.EShop.Orders:DiscountAmountOverflow": "The discount amount overflow.", + "EasyAbp.EShop.Orders:DuplicateOrderExtraFee": "The extra fee {extraFeeName} (key: {extraFeeKey}) is existed.", + "EasyAbp.EShop.Orders:InvalidOrderExtraFee": "The extra fee {extraFee} is invalid.", + "EasyAbp.EShop.Orders:InvalidPayment": "The payment {paymentId} has invalid configurations for the order {orderId}.", + "EasyAbp.EShop.Orders:InvalidRefundAmount": "The refund amount ({amount}) is invalid.", + "EasyAbp.EShop.Orders:InvalidRefundQuantity": "The refund quantity ({quantity}) is invalid.", + "EasyAbp.EShop.Orders:OrderIsInWrongStage": "The order {orderId} is in the wrong stage." } } \ No newline at end of file diff --git a/modules/EasyAbp.EShop.Orders/src/EasyAbp.EShop.Orders.Domain.Shared/EasyAbp/EShop/Orders/Localization/Orders/en.json b/modules/EasyAbp.EShop.Orders/src/EasyAbp.EShop.Orders.Domain.Shared/EasyAbp/EShop/Orders/Localization/Orders/en.json index 903f1103..201bb4a9 100644 --- a/modules/EasyAbp.EShop.Orders/src/EasyAbp.EShop.Orders.Domain.Shared/EasyAbp/EShop/Orders/Localization/Orders/en.json +++ b/modules/EasyAbp.EShop.Orders/src/EasyAbp.EShop.Orders.Domain.Shared/EasyAbp/EShop/Orders/Localization/Orders/en.json @@ -40,6 +40,15 @@ "OrderLineTotalPrice": "Total price", "OrderLineTotalDiscount": "Total discount", "OrderLineActualTotalPrice": "Actual total price", - "OrderLineQuantity": "Quantity" + "OrderLineQuantity": "Quantity", + "EasyAbp.EShop.Orders:UnexpectedCurrency": "Only the specified currency {expectedCurrency} is allowed.", + "EasyAbp.EShop.Orders:OrderLineInvalidQuantity": "Invalid quantity {quantity} for product {productId} (SKU: {productSkuId}).", + "EasyAbp.EShop.Orders:DiscountAmountOverflow": "The discount amount overflow.", + "EasyAbp.EShop.Orders:DuplicateOrderExtraFee": "The extra fee {extraFeeName} (key: {extraFeeKey}) is existed.", + "EasyAbp.EShop.Orders:InvalidOrderExtraFee": "The extra fee {extraFee} is invalid.", + "EasyAbp.EShop.Orders:InvalidPayment": "The payment {paymentId} has invalid configurations for the order {orderId}.", + "EasyAbp.EShop.Orders:InvalidRefundAmount": "The refund amount ({amount}) is invalid.", + "EasyAbp.EShop.Orders:InvalidRefundQuantity": "The refund quantity ({quantity}) is invalid.", + "EasyAbp.EShop.Orders:OrderIsInWrongStage": "The order {orderId} is in the wrong stage." } } \ No newline at end of file diff --git a/modules/EasyAbp.EShop.Orders/src/EasyAbp.EShop.Orders.Domain.Shared/EasyAbp/EShop/Orders/Localization/Orders/pl.json b/modules/EasyAbp.EShop.Orders/src/EasyAbp.EShop.Orders.Domain.Shared/EasyAbp/EShop/Orders/Localization/Orders/pl.json index c1707290..7294c67d 100644 --- a/modules/EasyAbp.EShop.Orders/src/EasyAbp.EShop.Orders.Domain.Shared/EasyAbp/EShop/Orders/Localization/Orders/pl.json +++ b/modules/EasyAbp.EShop.Orders/src/EasyAbp.EShop.Orders.Domain.Shared/EasyAbp/EShop/Orders/Localization/Orders/pl.json @@ -39,6 +39,15 @@ "OrderLineTotalPrice": "Total price", "OrderLineTotalDiscount": "Total discount", "OrderLineActualTotalPrice": "Actual total price", - "OrderLineQuantity": "Quantity" + "OrderLineQuantity": "Quantity", + "EasyAbp.EShop.Orders:UnexpectedCurrency": "Only the specified currency {expectedCurrency} is allowed.", + "EasyAbp.EShop.Orders:OrderLineInvalidQuantity": "Invalid quantity {quantity} for product {productId} (SKU: {productSkuId}).", + "EasyAbp.EShop.Orders:DiscountAmountOverflow": "The discount amount overflow.", + "EasyAbp.EShop.Orders:DuplicateOrderExtraFee": "The extra fee {extraFeeName} (key: {extraFeeKey}) is existed.", + "EasyAbp.EShop.Orders:InvalidOrderExtraFee": "The extra fee {extraFee} is invalid.", + "EasyAbp.EShop.Orders:InvalidPayment": "The payment {paymentId} has invalid configurations for the order {orderId}.", + "EasyAbp.EShop.Orders:InvalidRefundAmount": "The refund amount ({amount}) is invalid.", + "EasyAbp.EShop.Orders:InvalidRefundQuantity": "The refund quantity ({quantity}) is invalid.", + "EasyAbp.EShop.Orders:OrderIsInWrongStage": "The order {orderId} is in the wrong stage." } } \ No newline at end of file diff --git a/modules/EasyAbp.EShop.Orders/src/EasyAbp.EShop.Orders.Domain.Shared/EasyAbp/EShop/Orders/Localization/Orders/pt-BR.json b/modules/EasyAbp.EShop.Orders/src/EasyAbp.EShop.Orders.Domain.Shared/EasyAbp/EShop/Orders/Localization/Orders/pt-BR.json index 0ca6364a..95619934 100644 --- a/modules/EasyAbp.EShop.Orders/src/EasyAbp.EShop.Orders.Domain.Shared/EasyAbp/EShop/Orders/Localization/Orders/pt-BR.json +++ b/modules/EasyAbp.EShop.Orders/src/EasyAbp.EShop.Orders.Domain.Shared/EasyAbp/EShop/Orders/Localization/Orders/pt-BR.json @@ -39,6 +39,15 @@ "OrderLineTotalPrice": "Total price", "OrderLineTotalDiscount": "Total discount", "OrderLineActualTotalPrice": "Actual total price", - "OrderLineQuantity": "Quantity" + "OrderLineQuantity": "Quantity", + "EasyAbp.EShop.Orders:UnexpectedCurrency": "Only the specified currency {expectedCurrency} is allowed.", + "EasyAbp.EShop.Orders:OrderLineInvalidQuantity": "Invalid quantity {quantity} for product {productId} (SKU: {productSkuId}).", + "EasyAbp.EShop.Orders:DiscountAmountOverflow": "The discount amount overflow.", + "EasyAbp.EShop.Orders:DuplicateOrderExtraFee": "The extra fee {extraFeeName} (key: {extraFeeKey}) is existed.", + "EasyAbp.EShop.Orders:InvalidOrderExtraFee": "The extra fee {extraFee} is invalid.", + "EasyAbp.EShop.Orders:InvalidPayment": "The payment {paymentId} has invalid configurations for the order {orderId}.", + "EasyAbp.EShop.Orders:InvalidRefundAmount": "The refund amount ({amount}) is invalid.", + "EasyAbp.EShop.Orders:InvalidRefundQuantity": "The refund quantity ({quantity}) is invalid.", + "EasyAbp.EShop.Orders:OrderIsInWrongStage": "The order {orderId} is in the wrong stage." } } \ No newline at end of file diff --git a/modules/EasyAbp.EShop.Orders/src/EasyAbp.EShop.Orders.Domain.Shared/EasyAbp/EShop/Orders/Localization/Orders/sl.json b/modules/EasyAbp.EShop.Orders/src/EasyAbp.EShop.Orders.Domain.Shared/EasyAbp/EShop/Orders/Localization/Orders/sl.json index b8b2df61..8bcfdbba 100644 --- a/modules/EasyAbp.EShop.Orders/src/EasyAbp.EShop.Orders.Domain.Shared/EasyAbp/EShop/Orders/Localization/Orders/sl.json +++ b/modules/EasyAbp.EShop.Orders/src/EasyAbp.EShop.Orders.Domain.Shared/EasyAbp/EShop/Orders/Localization/Orders/sl.json @@ -40,6 +40,15 @@ "OrderLineTotalPrice": "Total price", "OrderLineTotalDiscount": "Total discount", "OrderLineActualTotalPrice": "Actual total price", - "OrderLineQuantity": "Quantity" + "OrderLineQuantity": "Quantity", + "EasyAbp.EShop.Orders:UnexpectedCurrency": "Only the specified currency {expectedCurrency} is allowed.", + "EasyAbp.EShop.Orders:OrderLineInvalidQuantity": "Invalid quantity {quantity} for product {productId} (SKU: {productSkuId}).", + "EasyAbp.EShop.Orders:DiscountAmountOverflow": "The discount amount overflow.", + "EasyAbp.EShop.Orders:DuplicateOrderExtraFee": "The extra fee {extraFeeName} (key: {extraFeeKey}) is existed.", + "EasyAbp.EShop.Orders:InvalidOrderExtraFee": "The extra fee {extraFee} is invalid.", + "EasyAbp.EShop.Orders:InvalidPayment": "The payment {paymentId} has invalid configurations for the order {orderId}.", + "EasyAbp.EShop.Orders:InvalidRefundAmount": "The refund amount ({amount}) is invalid.", + "EasyAbp.EShop.Orders:InvalidRefundQuantity": "The refund quantity ({quantity}) is invalid.", + "EasyAbp.EShop.Orders:OrderIsInWrongStage": "The order {orderId} is in the wrong stage." } } \ No newline at end of file diff --git a/modules/EasyAbp.EShop.Orders/src/EasyAbp.EShop.Orders.Domain.Shared/EasyAbp/EShop/Orders/Localization/Orders/tr.json b/modules/EasyAbp.EShop.Orders/src/EasyAbp.EShop.Orders.Domain.Shared/EasyAbp/EShop/Orders/Localization/Orders/tr.json index ae394612..5d4c6d9a 100644 --- a/modules/EasyAbp.EShop.Orders/src/EasyAbp.EShop.Orders.Domain.Shared/EasyAbp/EShop/Orders/Localization/Orders/tr.json +++ b/modules/EasyAbp.EShop.Orders/src/EasyAbp.EShop.Orders.Domain.Shared/EasyAbp/EShop/Orders/Localization/Orders/tr.json @@ -40,6 +40,15 @@ "OrderLineTotalPrice": "Total price", "OrderLineTotalDiscount": "Total discount", "OrderLineActualTotalPrice": "Actual total price", - "OrderLineQuantity": "Quantity" + "OrderLineQuantity": "Quantity", + "EasyAbp.EShop.Orders:UnexpectedCurrency": "Only the specified currency {expectedCurrency} is allowed.", + "EasyAbp.EShop.Orders:OrderLineInvalidQuantity": "Invalid quantity {quantity} for product {productId} (SKU: {productSkuId}).", + "EasyAbp.EShop.Orders:DiscountAmountOverflow": "The discount amount overflow.", + "EasyAbp.EShop.Orders:DuplicateOrderExtraFee": "The extra fee {extraFeeName} (key: {extraFeeKey}) is existed.", + "EasyAbp.EShop.Orders:InvalidOrderExtraFee": "The extra fee {extraFee} is invalid.", + "EasyAbp.EShop.Orders:InvalidPayment": "The payment {paymentId} has invalid configurations for the order {orderId}.", + "EasyAbp.EShop.Orders:InvalidRefundAmount": "The refund amount ({amount}) is invalid.", + "EasyAbp.EShop.Orders:InvalidRefundQuantity": "The refund quantity ({quantity}) is invalid.", + "EasyAbp.EShop.Orders:OrderIsInWrongStage": "The order {orderId} is in the wrong stage." } } \ No newline at end of file diff --git a/modules/EasyAbp.EShop.Orders/src/EasyAbp.EShop.Orders.Domain.Shared/EasyAbp/EShop/Orders/Localization/Orders/vi.json b/modules/EasyAbp.EShop.Orders/src/EasyAbp.EShop.Orders.Domain.Shared/EasyAbp/EShop/Orders/Localization/Orders/vi.json index 008c93c6..4fc7ff3e 100644 --- a/modules/EasyAbp.EShop.Orders/src/EasyAbp.EShop.Orders.Domain.Shared/EasyAbp/EShop/Orders/Localization/Orders/vi.json +++ b/modules/EasyAbp.EShop.Orders/src/EasyAbp.EShop.Orders.Domain.Shared/EasyAbp/EShop/Orders/Localization/Orders/vi.json @@ -39,6 +39,15 @@ "OrderLineTotalPrice": "Total price", "OrderLineTotalDiscount": "Total discount", "OrderLineActualTotalPrice": "Actual total price", - "OrderLineQuantity": "Quantity" + "OrderLineQuantity": "Quantity", + "EasyAbp.EShop.Orders:UnexpectedCurrency": "Only the specified currency {expectedCurrency} is allowed.", + "EasyAbp.EShop.Orders:OrderLineInvalidQuantity": "Invalid quantity {quantity} for product {productId} (SKU: {productSkuId}).", + "EasyAbp.EShop.Orders:DiscountAmountOverflow": "The discount amount overflow.", + "EasyAbp.EShop.Orders:DuplicateOrderExtraFee": "The extra fee {extraFeeName} (key: {extraFeeKey}) is existed.", + "EasyAbp.EShop.Orders:InvalidOrderExtraFee": "The extra fee {extraFee} is invalid.", + "EasyAbp.EShop.Orders:InvalidPayment": "The payment {paymentId} has invalid configurations for the order {orderId}.", + "EasyAbp.EShop.Orders:InvalidRefundAmount": "The refund amount ({amount}) is invalid.", + "EasyAbp.EShop.Orders:InvalidRefundQuantity": "The refund quantity ({quantity}) is invalid.", + "EasyAbp.EShop.Orders:OrderIsInWrongStage": "The order {orderId} is in the wrong stage." } } \ No newline at end of file diff --git a/modules/EasyAbp.EShop.Orders/src/EasyAbp.EShop.Orders.Domain.Shared/EasyAbp/EShop/Orders/Localization/Orders/zh-Hans.json b/modules/EasyAbp.EShop.Orders/src/EasyAbp.EShop.Orders.Domain.Shared/EasyAbp/EShop/Orders/Localization/Orders/zh-Hans.json index b1804fb1..e5834c7b 100644 --- a/modules/EasyAbp.EShop.Orders/src/EasyAbp.EShop.Orders.Domain.Shared/EasyAbp/EShop/Orders/Localization/Orders/zh-Hans.json +++ b/modules/EasyAbp.EShop.Orders/src/EasyAbp.EShop.Orders.Domain.Shared/EasyAbp/EShop/Orders/Localization/Orders/zh-Hans.json @@ -40,6 +40,15 @@ "OrderLineTotalPrice": "总价", "OrderLineTotalDiscount": "总折扣", "OrderLineActualTotalPrice": "折后总价", - "OrderLineQuantity": "数量" + "OrderLineQuantity": "数量", + "EasyAbp.EShop.Orders:UnexpectedCurrency": "只允许指定的{expectedCurrency}货币", + "EasyAbp.EShop.Orders:OrderLineInvalidQuantity": "产品{productId}(SKU: {productSkuId})的{quantity}数量无效", + "EasyAbp.EShop.Orders:DiscountAmountOverflow": "折扣金额溢出", + "EasyAbp.EShop.Orders:DuplicateOrderExtraFee": "额外费用{extraFeeName}(key: {extraFeeKey})已经存在", + "EasyAbp.EShop.Orders:InvalidOrderExtraFee": "额外费用{extraFee}无效", + "EasyAbp.EShop.Orders:InvalidPayment": "付款{paymentId}有无效的订单配置{orderId}", + "EasyAbp.EShop.Orders:InvalidRefundAmount": "退款金额({amount})无效", + "EasyAbp.EShop.Orders:InvalidRefundQuantity": "退款数量({quantity})无效", + "EasyAbp.EShop.Orders:OrderIsInWrongStage": "订单{orderId}处于错误的阶段" } } \ No newline at end of file diff --git a/modules/EasyAbp.EShop.Orders/src/EasyAbp.EShop.Orders.Domain.Shared/EasyAbp/EShop/Orders/Localization/Orders/zh-Hant.json b/modules/EasyAbp.EShop.Orders/src/EasyAbp.EShop.Orders.Domain.Shared/EasyAbp/EShop/Orders/Localization/Orders/zh-Hant.json index bd06c2a5..72c277f7 100644 --- a/modules/EasyAbp.EShop.Orders/src/EasyAbp.EShop.Orders.Domain.Shared/EasyAbp/EShop/Orders/Localization/Orders/zh-Hant.json +++ b/modules/EasyAbp.EShop.Orders/src/EasyAbp.EShop.Orders.Domain.Shared/EasyAbp/EShop/Orders/Localization/Orders/zh-Hant.json @@ -40,6 +40,15 @@ "OrderLineTotalPrice": "總價", "OrderLineTotalDiscount": "總折扣", "OrderLineActualTotalPrice": "折後總價", - "OrderLineQuantity": "數量" + "OrderLineQuantity": "數量", + "EasyAbp.EShop.Orders:UnexpectedCurrency": "只允許指定的{expectedCurrency}貨幣", + "EasyAbp.EShop.Orders:OrderLineInvalidQuantity": "產品{productId}(SKU: {productSkuId})的{quantity}數量無效", + "EasyAbp.EShop.Orders:DiscountAmountOverflow": "折扣金額溢出", + "EasyAbp.EShop.Orders:DuplicateOrderExtraFee": "額外費用{extraFeeName}(key: {extraFeeKey})已經存在", + "EasyAbp.EShop.Orders:InvalidOrderExtraFee": "額外費用{extraFee}無效", + "EasyAbp.EShop.Orders:InvalidPayment": "付款{paymentId}有無效的訂單配置{orderId}", + "EasyAbp.EShop.Orders:InvalidRefundAmount": "退款金額({amount})無效", + "EasyAbp.EShop.Orders:InvalidRefundQuantity": "退款數量({quantity})無效", + "EasyAbp.EShop.Orders:OrderIsInWrongStage": "訂單{orderId}處於錯誤的階段" } } \ No newline at end of file diff --git a/modules/EasyAbp.EShop.Orders/src/EasyAbp.EShop.Orders.Domain.Shared/EasyAbp/EShop/Orders/OrdersErrorCodes.cs b/modules/EasyAbp.EShop.Orders/src/EasyAbp.EShop.Orders.Domain.Shared/EasyAbp/EShop/Orders/OrdersErrorCodes.cs index aed7958d..8a1af850 100644 --- a/modules/EasyAbp.EShop.Orders/src/EasyAbp.EShop.Orders.Domain.Shared/EasyAbp/EShop/Orders/OrdersErrorCodes.cs +++ b/modules/EasyAbp.EShop.Orders/src/EasyAbp.EShop.Orders.Domain.Shared/EasyAbp/EShop/Orders/OrdersErrorCodes.cs @@ -2,6 +2,14 @@ { public static class OrdersErrorCodes { - //Add your business exception error codes here... + public const string UnexpectedCurrency = "EasyAbp.EShop.Orders:UnexpectedCurrency"; + public const string OrderLineInvalidQuantity = "EasyAbp.EShop.Orders:OrderLineInvalidQuantity"; + public const string DiscountAmountOverflow = "EasyAbp.EShop.Orders:DiscountAmountOverflow"; + public const string DuplicateOrderExtraFee = "EasyAbp.EShop.Orders:DuplicateOrderExtraFee"; + public const string InvalidOrderExtraFee = "EasyAbp.EShop.Orders:InvalidOrderExtraFee"; + public const string InvalidPayment = "EasyAbp.EShop.Orders:InvalidPayment"; + public const string InvalidRefundAmount = "EasyAbp.EShop.Orders:InvalidRefundAmount"; + public const string InvalidRefundQuantity = "EasyAbp.EShop.Orders:InvalidRefundQuantity"; + public const string OrderIsInWrongStage = "EasyAbp.EShop.Orders:OrderIsInWrongStage"; } } diff --git a/modules/EasyAbp.EShop.Orders/src/EasyAbp.EShop.Orders.Domain/EasyAbp/EShop/Orders/Orders/DiscountAmountOverflowException.cs b/modules/EasyAbp.EShop.Orders/src/EasyAbp.EShop.Orders.Domain/EasyAbp/EShop/Orders/Orders/DiscountAmountOverflowException.cs index 69c0dce4..f1b59db1 100644 --- a/modules/EasyAbp.EShop.Orders/src/EasyAbp.EShop.Orders.Domain/EasyAbp/EShop/Orders/Orders/DiscountAmountOverflowException.cs +++ b/modules/EasyAbp.EShop.Orders/src/EasyAbp.EShop.Orders.Domain/EasyAbp/EShop/Orders/Orders/DiscountAmountOverflowException.cs @@ -4,8 +4,7 @@ namespace EasyAbp.EShop.Orders.Orders { public class DiscountAmountOverflowException : BusinessException { - public DiscountAmountOverflowException() - : base("DiscountAmountOverflow", $"The discount amount overflow.") + public DiscountAmountOverflowException() : base(OrdersErrorCodes.DiscountAmountOverflow) { } } diff --git a/modules/EasyAbp.EShop.Orders/src/EasyAbp.EShop.Orders.Domain/EasyAbp/EShop/Orders/Orders/DuplicateOrderExtraFeeException.cs b/modules/EasyAbp.EShop.Orders/src/EasyAbp.EShop.Orders.Domain/EasyAbp/EShop/Orders/Orders/DuplicateOrderExtraFeeException.cs index 15414045..f6071ab1 100644 --- a/modules/EasyAbp.EShop.Orders/src/EasyAbp.EShop.Orders.Domain/EasyAbp/EShop/Orders/Orders/DuplicateOrderExtraFeeException.cs +++ b/modules/EasyAbp.EShop.Orders/src/EasyAbp.EShop.Orders.Domain/EasyAbp/EShop/Orders/Orders/DuplicateOrderExtraFeeException.cs @@ -4,9 +4,10 @@ namespace EasyAbp.EShop.Orders.Orders { public class DuplicateOrderExtraFeeException : BusinessException { - public DuplicateOrderExtraFeeException(string extraFeeName, string extraFeeKey) - : base("DuplicateOrderExtraFee", $"The extra fee {extraFeeName} (key: {extraFeeKey}) is existed.") + public DuplicateOrderExtraFeeException(string extraFeeName, string extraFeeKey) : base(OrdersErrorCodes.DuplicateOrderExtraFee) { + WithData(nameof(extraFeeName), extraFeeName); + WithData(nameof(extraFeeKey), extraFeeKey); } } } \ No newline at end of file diff --git a/modules/EasyAbp.EShop.Orders/src/EasyAbp.EShop.Orders.Domain/EasyAbp/EShop/Orders/Orders/InvalidOrderExtraFeeException.cs b/modules/EasyAbp.EShop.Orders/src/EasyAbp.EShop.Orders.Domain/EasyAbp/EShop/Orders/Orders/InvalidOrderExtraFeeException.cs index 7c53fb0a..567b93df 100644 --- a/modules/EasyAbp.EShop.Orders/src/EasyAbp.EShop.Orders.Domain/EasyAbp/EShop/Orders/Orders/InvalidOrderExtraFeeException.cs +++ b/modules/EasyAbp.EShop.Orders/src/EasyAbp.EShop.Orders.Domain/EasyAbp/EShop/Orders/Orders/InvalidOrderExtraFeeException.cs @@ -4,9 +4,9 @@ namespace EasyAbp.EShop.Orders.Orders { public class InvalidOrderExtraFeeException : BusinessException { - public InvalidOrderExtraFeeException(decimal extraFee) - : base("InvalidExtraFee", $"The extra fee {extraFee} is invalid.") + public InvalidOrderExtraFeeException(decimal extraFee) : base(OrdersErrorCodes.InvalidOrderExtraFee) { + WithData(nameof(extraFee), extraFee); } } } \ No newline at end of file diff --git a/modules/EasyAbp.EShop.Orders/src/EasyAbp.EShop.Orders.Domain/EasyAbp/EShop/Orders/Orders/InvalidPaymentException.cs b/modules/EasyAbp.EShop.Orders/src/EasyAbp.EShop.Orders.Domain/EasyAbp/EShop/Orders/Orders/InvalidPaymentException.cs index 923db2fd..ed1cde96 100644 --- a/modules/EasyAbp.EShop.Orders/src/EasyAbp.EShop.Orders.Domain/EasyAbp/EShop/Orders/Orders/InvalidPaymentException.cs +++ b/modules/EasyAbp.EShop.Orders/src/EasyAbp.EShop.Orders.Domain/EasyAbp/EShop/Orders/Orders/InvalidPaymentException.cs @@ -5,9 +5,10 @@ namespace EasyAbp.EShop.Orders.Orders { public class InvalidPaymentException : BusinessException { - public InvalidPaymentException(Guid paymentId, Guid orderId) - : base(message: $"The payment {paymentId} has invalid configurations for the order {orderId}.") + public InvalidPaymentException(Guid paymentId, Guid orderId) : base(OrdersErrorCodes.InvalidPayment) { + WithData(nameof(paymentId), paymentId); + WithData(nameof(orderId), orderId); } } } \ No newline at end of file diff --git a/modules/EasyAbp.EShop.Orders/src/EasyAbp.EShop.Orders.Domain/EasyAbp/EShop/Orders/Orders/InvalidRefundAmountException.cs b/modules/EasyAbp.EShop.Orders/src/EasyAbp.EShop.Orders.Domain/EasyAbp/EShop/Orders/Orders/InvalidRefundAmountException.cs index d440f931..17027959 100644 --- a/modules/EasyAbp.EShop.Orders/src/EasyAbp.EShop.Orders.Domain/EasyAbp/EShop/Orders/Orders/InvalidRefundAmountException.cs +++ b/modules/EasyAbp.EShop.Orders/src/EasyAbp.EShop.Orders.Domain/EasyAbp/EShop/Orders/Orders/InvalidRefundAmountException.cs @@ -4,9 +4,9 @@ namespace EasyAbp.EShop.Orders.Orders { public class InvalidRefundAmountException : BusinessException { - public InvalidRefundAmountException(decimal amount) - : base("InvalidRefundAmount", $"The refund amount ({amount}) is invalid.") + public InvalidRefundAmountException(decimal amount) : base(OrdersErrorCodes.InvalidRefundAmount) { + WithData(nameof(amount), amount); } } } \ No newline at end of file diff --git a/modules/EasyAbp.EShop.Orders/src/EasyAbp.EShop.Orders.Domain/EasyAbp/EShop/Orders/Orders/InvalidRefundQuantityException.cs b/modules/EasyAbp.EShop.Orders/src/EasyAbp.EShop.Orders.Domain/EasyAbp/EShop/Orders/Orders/InvalidRefundQuantityException.cs index 75179e70..43e09603 100644 --- a/modules/EasyAbp.EShop.Orders/src/EasyAbp.EShop.Orders.Domain/EasyAbp/EShop/Orders/Orders/InvalidRefundQuantityException.cs +++ b/modules/EasyAbp.EShop.Orders/src/EasyAbp.EShop.Orders.Domain/EasyAbp/EShop/Orders/Orders/InvalidRefundQuantityException.cs @@ -4,9 +4,9 @@ namespace EasyAbp.EShop.Orders.Orders { public class InvalidRefundQuantityException : BusinessException { - public InvalidRefundQuantityException(int quantity) - : base("InvalidRefundQuantity", $"The refund quantity ({quantity}) is invalid.") + public InvalidRefundQuantityException(int quantity) : base(OrdersErrorCodes.InvalidRefundQuantity) { + WithData(nameof(quantity), quantity); } } } \ No newline at end of file diff --git a/modules/EasyAbp.EShop.Orders/src/EasyAbp.EShop.Orders.Domain/EasyAbp/EShop/Orders/Orders/OrderIsInWrongStageException.cs b/modules/EasyAbp.EShop.Orders/src/EasyAbp.EShop.Orders.Domain/EasyAbp/EShop/Orders/Orders/OrderIsInWrongStageException.cs index 825faf53..05807797 100644 --- a/modules/EasyAbp.EShop.Orders/src/EasyAbp.EShop.Orders.Domain/EasyAbp/EShop/Orders/Orders/OrderIsInWrongStageException.cs +++ b/modules/EasyAbp.EShop.Orders/src/EasyAbp.EShop.Orders.Domain/EasyAbp/EShop/Orders/Orders/OrderIsInWrongStageException.cs @@ -5,8 +5,9 @@ namespace EasyAbp.EShop.Orders.Orders { public class OrderIsInWrongStageException : BusinessException { - public OrderIsInWrongStageException(Guid orderId) : base(message: $"The order {orderId} is in the wrong stage.") + public OrderIsInWrongStageException(Guid orderId) : base(OrdersErrorCodes.OrderIsInWrongStage) { + WithData(nameof(orderId), orderId); } } } \ No newline at end of file diff --git a/modules/EasyAbp.EShop.Payments/src/EasyAbp.EShop.Payments.Application/EasyAbp/EShop/Payments/Payments/MultiStorePaymentNotSupportedException.cs b/modules/EasyAbp.EShop.Payments/src/EasyAbp.EShop.Payments.Application/EasyAbp/EShop/Payments/Payments/MultiStorePaymentNotSupportedException.cs index 9b3e7ed7..d4acc4a8 100644 --- a/modules/EasyAbp.EShop.Payments/src/EasyAbp.EShop.Payments.Application/EasyAbp/EShop/Payments/Payments/MultiStorePaymentNotSupportedException.cs +++ b/modules/EasyAbp.EShop.Payments/src/EasyAbp.EShop.Payments.Application/EasyAbp/EShop/Payments/Payments/MultiStorePaymentNotSupportedException.cs @@ -4,9 +4,8 @@ namespace EasyAbp.EShop.Payments.Payments { public class MultiStorePaymentNotSupportedException : BusinessException { - public MultiStorePaymentNotSupportedException() : base(message: $"Should create payments for each store.") + public MultiStorePaymentNotSupportedException() : base(PaymentsErrorCodes.MultiStorePaymentNotSupported) { - } } } \ No newline at end of file diff --git a/modules/EasyAbp.EShop.Payments/src/EasyAbp.EShop.Payments.Application/EasyAbp/EShop/Payments/Refunds/InvalidRefundQuantityException.cs b/modules/EasyAbp.EShop.Payments/src/EasyAbp.EShop.Payments.Application/EasyAbp/EShop/Payments/Refunds/InvalidRefundQuantityException.cs index 958520fb..9c6a6ef5 100644 --- a/modules/EasyAbp.EShop.Payments/src/EasyAbp.EShop.Payments.Application/EasyAbp/EShop/Payments/Refunds/InvalidRefundQuantityException.cs +++ b/modules/EasyAbp.EShop.Payments/src/EasyAbp.EShop.Payments.Application/EasyAbp/EShop/Payments/Refunds/InvalidRefundQuantityException.cs @@ -4,9 +4,9 @@ namespace EasyAbp.EShop.Payments.Refunds { public class InvalidRefundQuantityException : BusinessException { - public InvalidRefundQuantityException(int quantity) - : base("InvalidRefundQuantity", $"The refund quantity ({quantity}) is invalid.") + public InvalidRefundQuantityException(int quantity) : base(PaymentsErrorCodes.InvalidRefundQuantity) { + WithData(nameof(quantity), quantity); } } } \ No newline at end of file diff --git a/modules/EasyAbp.EShop.Payments/src/EasyAbp.EShop.Payments.Application/EasyAbp/EShop/Payments/Refunds/OrderIsNotInSpecifiedPaymentException.cs b/modules/EasyAbp.EShop.Payments/src/EasyAbp.EShop.Payments.Application/EasyAbp/EShop/Payments/Refunds/OrderIsNotInSpecifiedPaymentException.cs index 659c9974..80a82e73 100644 --- a/modules/EasyAbp.EShop.Payments/src/EasyAbp.EShop.Payments.Application/EasyAbp/EShop/Payments/Refunds/OrderIsNotInSpecifiedPaymentException.cs +++ b/modules/EasyAbp.EShop.Payments/src/EasyAbp.EShop.Payments.Application/EasyAbp/EShop/Payments/Refunds/OrderIsNotInSpecifiedPaymentException.cs @@ -5,9 +5,10 @@ namespace EasyAbp.EShop.Payments.Refunds { public class OrderIsNotInSpecifiedPaymentException : BusinessException { - public OrderIsNotInSpecifiedPaymentException(Guid orderId, Guid paymentId) - : base("OrderIsNotInSpecifiedPayment", $"The order ({orderId}) is not in the specified payment ({paymentId}).") + public OrderIsNotInSpecifiedPaymentException(Guid orderId, Guid paymentId) : base(PaymentsErrorCodes.OrderIsNotInSpecifiedPayment) { + WithData(nameof(orderId), orderId); + WithData(nameof(paymentId), paymentId); } } } \ No newline at end of file diff --git a/modules/EasyAbp.EShop.Payments/src/EasyAbp.EShop.Payments.Domain.Shared/EasyAbp/EShop/Payments/Localization/Payments/cs.json b/modules/EasyAbp.EShop.Payments/src/EasyAbp.EShop.Payments.Domain.Shared/EasyAbp/EShop/Payments/Localization/Payments/cs.json index fb88da50..a6968e9b 100644 --- a/modules/EasyAbp.EShop.Payments/src/EasyAbp.EShop.Payments.Domain.Shared/EasyAbp/EShop/Payments/Localization/Payments/cs.json +++ b/modules/EasyAbp.EShop.Payments/src/EasyAbp.EShop.Payments.Domain.Shared/EasyAbp/EShop/Payments/Localization/Payments/cs.json @@ -6,6 +6,11 @@ "Permission:Payments": "Payment", "PaymentItemStoreId": "Store ID", "Permission:Refunds": "Refund", - "RefundItemStoreId": "Store ID" + "RefundItemStoreId": "Store ID", + "EasyAbp.EShop.Payments:MultiStorePaymentNotSupported": "Should create payments for each store.", + "EasyAbp.EShop.Payments:InvalidRefundQuantity": "The refund quantity ({quantity}) is invalid.", + "EasyAbp.EShop.Payments:OrderIsNotInSpecifiedPayment": "The order ({orderId}) is not in the specified payment ({paymentId}).", + "EasyAbp.EShop.Payments:OrderIdNotFound": "Cannot get valid OrderId from ExtraProperties.", + "EasyAbp.EShop.Payments:StoreIdNotFound": "Cannot get valid StoreId from ExtraProperties." } } \ No newline at end of file diff --git a/modules/EasyAbp.EShop.Payments/src/EasyAbp.EShop.Payments.Domain.Shared/EasyAbp/EShop/Payments/Localization/Payments/en.json b/modules/EasyAbp.EShop.Payments/src/EasyAbp.EShop.Payments.Domain.Shared/EasyAbp/EShop/Payments/Localization/Payments/en.json index 044b4ca1..1bc21dbe 100644 --- a/modules/EasyAbp.EShop.Payments/src/EasyAbp.EShop.Payments.Domain.Shared/EasyAbp/EShop/Payments/Localization/Payments/en.json +++ b/modules/EasyAbp.EShop.Payments/src/EasyAbp.EShop.Payments.Domain.Shared/EasyAbp/EShop/Payments/Localization/Payments/en.json @@ -7,6 +7,11 @@ "Permission:Payments": "Payment", "PaymentItemStoreId": "Store ID", "Permission:Refunds": "Refund", - "RefundItemStoreId": "Store ID" + "RefundItemStoreId": "Store ID", + "EasyAbp.EShop.Payments:MultiStorePaymentNotSupported": "Should create payments for each store.", + "EasyAbp.EShop.Payments:InvalidRefundQuantity": "The refund quantity ({quantity}) is invalid.", + "EasyAbp.EShop.Payments:OrderIsNotInSpecifiedPayment": "The order ({orderId}) is not in the specified payment ({paymentId}).", + "EasyAbp.EShop.Payments:OrderIdNotFound": "Cannot get valid OrderId from ExtraProperties.", + "EasyAbp.EShop.Payments:StoreIdNotFound": "Cannot get valid StoreId from ExtraProperties." } } \ No newline at end of file diff --git a/modules/EasyAbp.EShop.Payments/src/EasyAbp.EShop.Payments.Domain.Shared/EasyAbp/EShop/Payments/Localization/Payments/pl.json b/modules/EasyAbp.EShop.Payments/src/EasyAbp.EShop.Payments.Domain.Shared/EasyAbp/EShop/Payments/Localization/Payments/pl.json index 848cf2f5..283301ae 100644 --- a/modules/EasyAbp.EShop.Payments/src/EasyAbp.EShop.Payments.Domain.Shared/EasyAbp/EShop/Payments/Localization/Payments/pl.json +++ b/modules/EasyAbp.EShop.Payments/src/EasyAbp.EShop.Payments.Domain.Shared/EasyAbp/EShop/Payments/Localization/Payments/pl.json @@ -6,6 +6,11 @@ "Permission:Payments": "Payment", "PaymentItemStoreId": "Store ID", "Permission:Refunds": "Refund", - "RefundItemStoreId": "Store ID" + "RefundItemStoreId": "Store ID", + "EasyAbp.EShop.Payments:MultiStorePaymentNotSupported": "Should create payments for each store.", + "EasyAbp.EShop.Payments:InvalidRefundQuantity": "The refund quantity ({quantity}) is invalid.", + "EasyAbp.EShop.Payments:OrderIsNotInSpecifiedPayment": "The order ({orderId}) is not in the specified payment ({paymentId}).", + "EasyAbp.EShop.Payments:OrderIdNotFound": "Cannot get valid OrderId from ExtraProperties.", + "EasyAbp.EShop.Payments:StoreIdNotFound": "Cannot get valid StoreId from ExtraProperties." } } \ No newline at end of file diff --git a/modules/EasyAbp.EShop.Payments/src/EasyAbp.EShop.Payments.Domain.Shared/EasyAbp/EShop/Payments/Localization/Payments/pt-BR.json b/modules/EasyAbp.EShop.Payments/src/EasyAbp.EShop.Payments.Domain.Shared/EasyAbp/EShop/Payments/Localization/Payments/pt-BR.json index 8c51663d..bef301d1 100644 --- a/modules/EasyAbp.EShop.Payments/src/EasyAbp.EShop.Payments.Domain.Shared/EasyAbp/EShop/Payments/Localization/Payments/pt-BR.json +++ b/modules/EasyAbp.EShop.Payments/src/EasyAbp.EShop.Payments.Domain.Shared/EasyAbp/EShop/Payments/Localization/Payments/pt-BR.json @@ -6,6 +6,11 @@ "Permission:Payments": "Payment", "PaymentItemStoreId": "Store ID", "Permission:Refunds": "Refund", - "RefundItemStoreId": "Store ID" + "RefundItemStoreId": "Store ID", + "EasyAbp.EShop.Payments:MultiStorePaymentNotSupported": "Should create payments for each store.", + "EasyAbp.EShop.Payments:InvalidRefundQuantity": "The refund quantity ({quantity}) is invalid.", + "EasyAbp.EShop.Payments:OrderIsNotInSpecifiedPayment": "The order ({orderId}) is not in the specified payment ({paymentId}).", + "EasyAbp.EShop.Payments:OrderIdNotFound": "Cannot get valid OrderId from ExtraProperties.", + "EasyAbp.EShop.Payments:StoreIdNotFound": "Cannot get valid StoreId from ExtraProperties." } } \ No newline at end of file diff --git a/modules/EasyAbp.EShop.Payments/src/EasyAbp.EShop.Payments.Domain.Shared/EasyAbp/EShop/Payments/Localization/Payments/sl.json b/modules/EasyAbp.EShop.Payments/src/EasyAbp.EShop.Payments.Domain.Shared/EasyAbp/EShop/Payments/Localization/Payments/sl.json index 9c5ce82f..a447e1c6 100644 --- a/modules/EasyAbp.EShop.Payments/src/EasyAbp.EShop.Payments.Domain.Shared/EasyAbp/EShop/Payments/Localization/Payments/sl.json +++ b/modules/EasyAbp.EShop.Payments/src/EasyAbp.EShop.Payments.Domain.Shared/EasyAbp/EShop/Payments/Localization/Payments/sl.json @@ -7,6 +7,11 @@ "Permission:Payments": "Payment", "PaymentItemStoreId": "Store ID", "Permission:Refunds": "Refund", - "RefundItemStoreId": "Store ID" + "RefundItemStoreId": "Store ID", + "EasyAbp.EShop.Payments:MultiStorePaymentNotSupported": "Should create payments for each store.", + "EasyAbp.EShop.Payments:InvalidRefundQuantity": "The refund quantity ({quantity}) is invalid.", + "EasyAbp.EShop.Payments:OrderIsNotInSpecifiedPayment": "The order ({orderId}) is not in the specified payment ({paymentId}).", + "EasyAbp.EShop.Payments:OrderIdNotFound": "Cannot get valid OrderId from ExtraProperties.", + "EasyAbp.EShop.Payments:StoreIdNotFound": "Cannot get valid StoreId from ExtraProperties." } } \ No newline at end of file diff --git a/modules/EasyAbp.EShop.Payments/src/EasyAbp.EShop.Payments.Domain.Shared/EasyAbp/EShop/Payments/Localization/Payments/tr.json b/modules/EasyAbp.EShop.Payments/src/EasyAbp.EShop.Payments.Domain.Shared/EasyAbp/EShop/Payments/Localization/Payments/tr.json index f483fa62..ec1c0532 100644 --- a/modules/EasyAbp.EShop.Payments/src/EasyAbp.EShop.Payments.Domain.Shared/EasyAbp/EShop/Payments/Localization/Payments/tr.json +++ b/modules/EasyAbp.EShop.Payments/src/EasyAbp.EShop.Payments.Domain.Shared/EasyAbp/EShop/Payments/Localization/Payments/tr.json @@ -7,6 +7,11 @@ "Permission:Payments": "Payment", "PaymentItemStoreId": "Store ID", "Permission:Refunds": "Refund", - "RefundItemStoreId": "Store ID" + "RefundItemStoreId": "Store ID", + "EasyAbp.EShop.Payments:MultiStorePaymentNotSupported": "Should create payments for each store.", + "EasyAbp.EShop.Payments:InvalidRefundQuantity": "The refund quantity ({quantity}) is invalid.", + "EasyAbp.EShop.Payments:OrderIsNotInSpecifiedPayment": "The order ({orderId}) is not in the specified payment ({paymentId}).", + "EasyAbp.EShop.Payments:OrderIdNotFound": "Cannot get valid OrderId from ExtraProperties.", + "EasyAbp.EShop.Payments:StoreIdNotFound": "Cannot get valid StoreId from ExtraProperties." } } \ No newline at end of file diff --git a/modules/EasyAbp.EShop.Payments/src/EasyAbp.EShop.Payments.Domain.Shared/EasyAbp/EShop/Payments/Localization/Payments/vi.json b/modules/EasyAbp.EShop.Payments/src/EasyAbp.EShop.Payments.Domain.Shared/EasyAbp/EShop/Payments/Localization/Payments/vi.json index 7ec1843c..fdc51ba2 100644 --- a/modules/EasyAbp.EShop.Payments/src/EasyAbp.EShop.Payments.Domain.Shared/EasyAbp/EShop/Payments/Localization/Payments/vi.json +++ b/modules/EasyAbp.EShop.Payments/src/EasyAbp.EShop.Payments.Domain.Shared/EasyAbp/EShop/Payments/Localization/Payments/vi.json @@ -6,6 +6,11 @@ "Permission:Payments": "Payment", "PaymentItemStoreId": "Store ID", "Permission:Refunds": "Refund", - "RefundItemStoreId": "Store ID" + "RefundItemStoreId": "Store ID", + "EasyAbp.EShop.Payments:MultiStorePaymentNotSupported": "Should create payments for each store.", + "EasyAbp.EShop.Payments:InvalidRefundQuantity": "The refund quantity ({quantity}) is invalid.", + "EasyAbp.EShop.Payments:OrderIsNotInSpecifiedPayment": "The order ({orderId}) is not in the specified payment ({paymentId}).", + "EasyAbp.EShop.Payments:OrderIdNotFound": "Cannot get valid OrderId from ExtraProperties.", + "EasyAbp.EShop.Payments:StoreIdNotFound": "Cannot get valid StoreId from ExtraProperties." } } \ No newline at end of file diff --git a/modules/EasyAbp.EShop.Payments/src/EasyAbp.EShop.Payments.Domain.Shared/EasyAbp/EShop/Payments/Localization/Payments/zh-Hans.json b/modules/EasyAbp.EShop.Payments/src/EasyAbp.EShop.Payments.Domain.Shared/EasyAbp/EShop/Payments/Localization/Payments/zh-Hans.json index c95ab518..51aea86e 100644 --- a/modules/EasyAbp.EShop.Payments/src/EasyAbp.EShop.Payments.Domain.Shared/EasyAbp/EShop/Payments/Localization/Payments/zh-Hans.json +++ b/modules/EasyAbp.EShop.Payments/src/EasyAbp.EShop.Payments.Domain.Shared/EasyAbp/EShop/Payments/Localization/Payments/zh-Hans.json @@ -7,6 +7,11 @@ "Permission:Payments": "支付", "PaymentItemStoreId": "店铺 ID", "Permission:Refunds": "退款", - "RefundItemStoreId": "店铺 ID" + "RefundItemStoreId": "店铺 ID", + "EasyAbp.EShop.Payments:MultiStorePaymentNotSupported": "应该为每个商店创建支付", + "EasyAbp.EShop.Payments:InvalidRefundQuantity": "退款数量({quantity})无效", + "EasyAbp.EShop.Payments:OrderIsNotInSpecifiedPayment": "订单({orderId})不在指定的支付({paymentId})中", + "EasyAbp.EShop.Payments:OrderIdNotFound": "无法从ExtraProperties获得有效的OrderId", + "EasyAbp.EShop.Payments:StoreIdNotFound": "无法从ExtraProperties获得有效的StoreId" } } \ No newline at end of file diff --git a/modules/EasyAbp.EShop.Payments/src/EasyAbp.EShop.Payments.Domain.Shared/EasyAbp/EShop/Payments/Localization/Payments/zh-Hant.json b/modules/EasyAbp.EShop.Payments/src/EasyAbp.EShop.Payments.Domain.Shared/EasyAbp/EShop/Payments/Localization/Payments/zh-Hant.json index e5a545cc..a2f2eef6 100644 --- a/modules/EasyAbp.EShop.Payments/src/EasyAbp.EShop.Payments.Domain.Shared/EasyAbp/EShop/Payments/Localization/Payments/zh-Hant.json +++ b/modules/EasyAbp.EShop.Payments/src/EasyAbp.EShop.Payments.Domain.Shared/EasyAbp/EShop/Payments/Localization/Payments/zh-Hant.json @@ -7,6 +7,11 @@ "Permission:Payments": "支付", "PaymentItemStoreId": "店鋪 ID", "Permission:Refunds": "退款", - "RefundItemStoreId": "店鋪 ID" + "RefundItemStoreId": "店鋪 ID", + "EasyAbp.EShop.Payments:MultiStorePaymentNotSupported": "應該為每個商店創建支付", + "EasyAbp.EShop.Payments:InvalidRefundQuantity": "退款數量({quantity})無效", + "EasyAbp.EShop.Payments:OrderIsNotInSpecifiedPayment": "訂單({orderId})不在指定的支付({paymentId})中", + "EasyAbp.EShop.Payments:OrderIdNotFound": "無法從ExtraProperties獲得有效的OrderId", + "EasyAbp.EShop.Payments:StoreIdNotFound": "無法從ExtraProperties獲得有效的StoreId" } } \ No newline at end of file diff --git a/modules/EasyAbp.EShop.Payments/src/EasyAbp.EShop.Payments.Domain.Shared/EasyAbp/EShop/Payments/PaymentsErrorCodes.cs b/modules/EasyAbp.EShop.Payments/src/EasyAbp.EShop.Payments.Domain.Shared/EasyAbp/EShop/Payments/PaymentsErrorCodes.cs index 005cbaf8..6a07234d 100644 --- a/modules/EasyAbp.EShop.Payments/src/EasyAbp.EShop.Payments.Domain.Shared/EasyAbp/EShop/Payments/PaymentsErrorCodes.cs +++ b/modules/EasyAbp.EShop.Payments/src/EasyAbp.EShop.Payments.Domain.Shared/EasyAbp/EShop/Payments/PaymentsErrorCodes.cs @@ -2,6 +2,10 @@ { public static class PaymentsErrorCodes { - //Add your business exception error codes here... + public const string MultiStorePaymentNotSupported = "EasyAbp.EShop.Payments:MultiStorePaymentNotSupported"; + public const string InvalidRefundQuantity = "EasyAbp.EShop.Payments:InvalidRefundQuantity"; + public const string OrderIsNotInSpecifiedPayment = "EasyAbp.EShop.Payments:OrderIsNotInSpecifiedPayment"; + public const string OrderIdNotFound = "EasyAbp.EShop.Payments:OrderIdNotFound"; + public const string StoreIdNotFound = "EasyAbp.EShop.Payments:StoreIdNotFound"; } } diff --git a/modules/EasyAbp.EShop.Payments/src/EasyAbp.EShop.Payments.Domain/EasyAbp/EShop/Payments/OrderIdNotFoundException.cs b/modules/EasyAbp.EShop.Payments/src/EasyAbp.EShop.Payments.Domain/EasyAbp/EShop/Payments/OrderIdNotFoundException.cs index 4cd08f43..ed971d6a 100644 --- a/modules/EasyAbp.EShop.Payments/src/EasyAbp.EShop.Payments.Domain/EasyAbp/EShop/Payments/OrderIdNotFoundException.cs +++ b/modules/EasyAbp.EShop.Payments/src/EasyAbp.EShop.Payments.Domain/EasyAbp/EShop/Payments/OrderIdNotFoundException.cs @@ -4,7 +4,7 @@ namespace EasyAbp.EShop.Payments { public class OrderIdNotFoundException : BusinessException { - public OrderIdNotFoundException() : base(message: $"Cannot get valid OrderId from ExtraProperties.") + public OrderIdNotFoundException() : base(PaymentsErrorCodes.OrderIdNotFound) { } } diff --git a/modules/EasyAbp.EShop.Payments/src/EasyAbp.EShop.Payments.Domain/EasyAbp/EShop/Payments/StoreIdNotFoundException.cs b/modules/EasyAbp.EShop.Payments/src/EasyAbp.EShop.Payments.Domain/EasyAbp/EShop/Payments/StoreIdNotFoundException.cs index e2490b51..1a1bad62 100644 --- a/modules/EasyAbp.EShop.Payments/src/EasyAbp.EShop.Payments.Domain/EasyAbp/EShop/Payments/StoreIdNotFoundException.cs +++ b/modules/EasyAbp.EShop.Payments/src/EasyAbp.EShop.Payments.Domain/EasyAbp/EShop/Payments/StoreIdNotFoundException.cs @@ -4,7 +4,7 @@ namespace EasyAbp.EShop.Payments { public class StoreIdNotFoundException : BusinessException { - public StoreIdNotFoundException() : base(message: $"Cannot get valid StoreId from ExtraProperties.") + public StoreIdNotFoundException() : base(PaymentsErrorCodes.StoreIdNotFound) { } } diff --git a/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Application.Contracts/EasyAbp/EShop/Products/Products/NotAllowedToGetProductListWithShowHiddenException.cs b/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Application.Contracts/EasyAbp/EShop/Products/Products/NotAllowedToGetProductListWithShowHiddenException.cs index 44fdb291..dde19a57 100644 --- a/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Application.Contracts/EasyAbp/EShop/Products/Products/NotAllowedToGetProductListWithShowHiddenException.cs +++ b/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Application.Contracts/EasyAbp/EShop/Products/Products/NotAllowedToGetProductListWithShowHiddenException.cs @@ -5,8 +5,7 @@ namespace EasyAbp.EShop.Products.Products { public class NotAllowedToGetProductListWithShowHiddenException : BusinessException { - public NotAllowedToGetProductListWithShowHiddenException() : base( - message: $"You have no permission to get product list with hidden products.") + public NotAllowedToGetProductListWithShowHiddenException() : base(ProductsErrorCodes.NotAllowedToGetProductListWithShowHidden) { } } diff --git a/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Application.Contracts/EasyAbp/EShop/Products/Products/ProductAttributeOptionsDeletionFailedException.cs b/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Application.Contracts/EasyAbp/EShop/Products/Products/ProductAttributeOptionsDeletionFailedException.cs index fc5e70b3..4f27844b 100644 --- a/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Application.Contracts/EasyAbp/EShop/Products/Products/ProductAttributeOptionsDeletionFailedException.cs +++ b/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Application.Contracts/EasyAbp/EShop/Products/Products/ProductAttributeOptionsDeletionFailedException.cs @@ -5,8 +5,7 @@ namespace EasyAbp.EShop.Products.Products { public class ProductAttributeOptionsDeletionFailedException : BusinessException { - public ProductAttributeOptionsDeletionFailedException() : base( - message: "Should ensure there are no SKUs using the attribute option which you want to delete.") + public ProductAttributeOptionsDeletionFailedException() : base(ProductsErrorCodes.ProductAttributeOptionsDeletionFailed) { } } diff --git a/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Application.Contracts/EasyAbp/EShop/Products/Products/ProductAttributesModificationFailedException.cs b/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Application.Contracts/EasyAbp/EShop/Products/Products/ProductAttributesModificationFailedException.cs index 0cf909df..d3ec9138 100644 --- a/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Application.Contracts/EasyAbp/EShop/Products/Products/ProductAttributesModificationFailedException.cs +++ b/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Application.Contracts/EasyAbp/EShop/Products/Products/ProductAttributesModificationFailedException.cs @@ -5,8 +5,7 @@ namespace EasyAbp.EShop.Products.Products { public class ProductAttributesModificationFailedException : BusinessException { - public ProductAttributesModificationFailedException() : base( - message: "Should ensure SKUs are empty if you want to modify attributes of a product.") + public ProductAttributesModificationFailedException() : base(ProductsErrorCodes.ProductAttributesModificationFailed) { } } diff --git a/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Application.Contracts/EasyAbp/EShop/Products/Products/StaticProductCannotBeModifiedException.cs b/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Application.Contracts/EasyAbp/EShop/Products/Products/StaticProductCannotBeModifiedException.cs index 869011c1..c6f5ae17 100644 --- a/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Application.Contracts/EasyAbp/EShop/Products/Products/StaticProductCannotBeModifiedException.cs +++ b/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Application.Contracts/EasyAbp/EShop/Products/Products/StaticProductCannotBeModifiedException.cs @@ -5,9 +5,9 @@ namespace EasyAbp.EShop.Products.Products { public class StaticProductCannotBeModifiedException : BusinessException { - public StaticProductCannotBeModifiedException(Guid productId) : base( - message: $"Cannot modify the static product: {productId}") + public StaticProductCannotBeModifiedException(Guid productId) : base(ProductsErrorCodes.StaticProductCannotBeModified) { + WithData(nameof(productId), productId); } } } \ No newline at end of file diff --git a/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Application.Contracts/EasyAbp/EShop/Products/Products/StoreIsNotProductOwnerException.cs b/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Application.Contracts/EasyAbp/EShop/Products/Products/StoreIsNotProductOwnerException.cs index 22ca2765..2fb2a9e0 100644 --- a/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Application.Contracts/EasyAbp/EShop/Products/Products/StoreIsNotProductOwnerException.cs +++ b/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Application.Contracts/EasyAbp/EShop/Products/Products/StoreIsNotProductOwnerException.cs @@ -5,9 +5,10 @@ namespace EasyAbp.EShop.Products.Products { public class StoreIsNotProductOwnerException : BusinessException { - public StoreIsNotProductOwnerException(Guid productId, Guid storeId) : base( - message: $"Store {storeId} is not a owner of the product {productId}") + public StoreIsNotProductOwnerException(Guid productId, Guid storeId) : base(ProductsErrorCodes.StoreIsNotProductOwner) { + WithData(nameof(productId), productId); + WithData(nameof(storeId), storeId); } } } \ No newline at end of file diff --git a/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Application/EasyAbp/EShop/Products/Categories/NotAllowedToGetCategoryListWithShowHiddenException.cs b/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Application/EasyAbp/EShop/Products/Categories/NotAllowedToGetCategoryListWithShowHiddenException.cs index 780fb99d..26e3093e 100644 --- a/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Application/EasyAbp/EShop/Products/Categories/NotAllowedToGetCategoryListWithShowHiddenException.cs +++ b/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Application/EasyAbp/EShop/Products/Categories/NotAllowedToGetCategoryListWithShowHiddenException.cs @@ -4,8 +4,7 @@ namespace EasyAbp.EShop.Products.Categories { public class NotAllowedToGetCategoryListWithShowHiddenException : BusinessException { - public NotAllowedToGetCategoryListWithShowHiddenException() : base( - message: $"You have no permission to get category list with hidden categories.") + public NotAllowedToGetCategoryListWithShowHiddenException() : base(ProductsErrorCodes.NotAllowedToGetCategoryListWithShowHidden) { } } diff --git a/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Domain.Shared/EasyAbp/EShop/Products/Localization/Products/cs.json b/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Domain.Shared/EasyAbp/EShop/Products/Localization/Products/cs.json index 4f611c6f..fd02bf2d 100644 --- a/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Domain.Shared/EasyAbp/EShop/Products/Localization/Products/cs.json +++ b/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Domain.Shared/EasyAbp/EShop/Products/Localization/Products/cs.json @@ -64,7 +64,7 @@ "CouponType.Custom": "Custom", "Menu:Category": "Category", "Category": "Category", - "Subcategory" : "Subcategory", + "Subcategory": "Subcategory", "CategoryParentId": "Parent ID", "CategoryUniqueName": "Unique name", "CategoryDisplayName": "Display name", @@ -81,6 +81,20 @@ "IncreaseInventory": "Increase", "DecreaseInventory": "Decrease", "ProductInventoryInventory": "Inventory", - "ChangeProductInventory": "Change inventory" + "ChangeProductInventory": "Change inventory", + "EasyAbp.EShop.Products:DuplicateCategoryUniqueName": "The category unique name '{uniqueName}' is duplicated.", + "EasyAbp.EShop.Products:DuplicatedProductUniqueName": "The product unique name '{uniqueName}' is duplicated.", + "EasyAbp.EShop.Products:InventoryChangeFailed": "Inventory of product {productId} (SKU: {productSkuId}) cannot be changed by {changedInventory} from {originalInventory}", + "EasyAbp.EShop.Products:NonexistentProductGroup": "The specified product group ({productGroupName}) is nonexistent.", + "EasyAbp.EShop.Products:ProductDetailHasBeenUsed": "ProductDetail {productDetailId} has been used.", + "EasyAbp.EShop.Products:ProductSkuCodeDuplicated": "Sku code {code} is duplicate for the product {productId}", + "EasyAbp.EShop.Products:ProductSkuDuplicated": "Sku {serializedAttributeOptionIds} is duplicate for the product {productId}", + "EasyAbp.EShop.Products:NotAllowedToGetCategoryListWithShowHidden": "You have no permission to get category list with hidden categories.", + "EasyAbp.EShop.Products:NotAllowedToGetProductListWithShowHidden": "You have no permission to get product list with hidden products.", + "EasyAbp.EShop.Products:ProductAttributeOptionsDeletionFailed": "Should ensure there are no SKUs using the attribute option which you want to delete.", + "EasyAbp.EShop.Products:ProductAttributesModificationFailed": "Should ensure SKUs are empty if you want to modify attributes of a product.", + "EasyAbp.EShop.Products:StaticProductCannotBeModified": "Cannot modify the static product: {productId}", + "EasyAbp.EShop.Products:StoreIsNotProductOwner": "Store {storeId} is not a owner of the product {productId}", + "EasyAbp.EShop.Products:InventoryInsufficient": "The inventory of the product {productId} (SKU: {productSkuId}) is insufficient, {quantity} are needed, but only {inventory}." } } \ No newline at end of file diff --git a/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Domain.Shared/EasyAbp/EShop/Products/Localization/Products/en.json b/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Domain.Shared/EasyAbp/EShop/Products/Localization/Products/en.json index 15cea56f..c02f1fe9 100644 --- a/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Domain.Shared/EasyAbp/EShop/Products/Localization/Products/en.json +++ b/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Domain.Shared/EasyAbp/EShop/Products/Localization/Products/en.json @@ -65,7 +65,7 @@ "CouponType.Custom": "Custom", "Menu:Category": "Category", "Category": "Category", - "Subcategory" : "Subcategory", + "Subcategory": "Subcategory", "CategoryParentId": "Parent ID", "CategoryUniqueName": "Unique name", "CategoryDisplayName": "Display name", @@ -82,6 +82,20 @@ "IncreaseInventory": "Increase", "DecreaseInventory": "Decrease", "ProductInventoryInventory": "Inventory", - "ChangeProductInventory": "Change inventory" + "ChangeProductInventory": "Change inventory", + "EasyAbp.EShop.Products:DuplicateCategoryUniqueName": "The category unique name '{uniqueName}' is duplicated.", + "EasyAbp.EShop.Products:DuplicatedProductUniqueName": "The product unique name '{uniqueName}' is duplicated.", + "EasyAbp.EShop.Products:InventoryChangeFailed": "Inventory of product {productId} (SKU: {productSkuId}) cannot be changed by {changedInventory} from {originalInventory}", + "EasyAbp.EShop.Products:NonexistentProductGroup": "The specified product group ({productGroupName}) is nonexistent.", + "EasyAbp.EShop.Products:ProductDetailHasBeenUsed": "ProductDetail {productDetailId} has been used.", + "EasyAbp.EShop.Products:ProductSkuCodeDuplicated": "Sku code {code} is duplicate for the product {productId}", + "EasyAbp.EShop.Products:ProductSkuDuplicated": "Sku {serializedAttributeOptionIds} is duplicate for the product {productId}", + "EasyAbp.EShop.Products:NotAllowedToGetCategoryListWithShowHidden": "You have no permission to get category list with hidden categories.", + "EasyAbp.EShop.Products:NotAllowedToGetProductListWithShowHidden": "You have no permission to get product list with hidden products.", + "EasyAbp.EShop.Products:ProductAttributeOptionsDeletionFailed": "Should ensure there are no SKUs using the attribute option which you want to delete.", + "EasyAbp.EShop.Products:ProductAttributesModificationFailed": "Should ensure SKUs are empty if you want to modify attributes of a product.", + "EasyAbp.EShop.Products:StaticProductCannotBeModified": "Cannot modify the static product: {productId}", + "EasyAbp.EShop.Products:StoreIsNotProductOwner": "Store {storeId} is not a owner of the product {productId}", + "EasyAbp.EShop.Products:InventoryInsufficient": "The inventory of the product {productId} (SKU: {productSkuId}) is insufficient, {quantity} are needed, but only {inventory}." } } \ No newline at end of file diff --git a/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Domain.Shared/EasyAbp/EShop/Products/Localization/Products/pl.json b/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Domain.Shared/EasyAbp/EShop/Products/Localization/Products/pl.json index ffa0b183..421c21cb 100644 --- a/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Domain.Shared/EasyAbp/EShop/Products/Localization/Products/pl.json +++ b/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Domain.Shared/EasyAbp/EShop/Products/Localization/Products/pl.json @@ -64,7 +64,7 @@ "CouponType.Custom": "Custom", "Menu:Category": "Category", "Category": "Category", - "Subcategory" : "Subcategory", + "Subcategory": "Subcategory", "CategoryParentId": "Parent ID", "CategoryUniqueName": "Unique name", "CategoryDisplayName": "Display name", @@ -81,6 +81,20 @@ "IncreaseInventory": "Increase", "DecreaseInventory": "Decrease", "ProductInventoryInventory": "Inventory", - "ChangeProductInventory": "Change inventory" + "ChangeProductInventory": "Change inventory", + "EasyAbp.EShop.Products:DuplicateCategoryUniqueName": "The category unique name '{uniqueName}' is duplicated.", + "EasyAbp.EShop.Products:DuplicatedProductUniqueName": "The product unique name '{uniqueName}' is duplicated.", + "EasyAbp.EShop.Products:InventoryChangeFailed": "Inventory of product {productId} (SKU: {productSkuId}) cannot be changed by {changedInventory} from {originalInventory}", + "EasyAbp.EShop.Products:NonexistentProductGroup": "The specified product group ({productGroupName}) is nonexistent.", + "EasyAbp.EShop.Products:ProductDetailHasBeenUsed": "ProductDetail {productDetailId} has been used.", + "EasyAbp.EShop.Products:ProductSkuCodeDuplicated": "Sku code {code} is duplicate for the product {productId}", + "EasyAbp.EShop.Products:ProductSkuDuplicated": "Sku {serializedAttributeOptionIds} is duplicate for the product {productId}", + "EasyAbp.EShop.Products:NotAllowedToGetCategoryListWithShowHidden": "You have no permission to get category list with hidden categories.", + "EasyAbp.EShop.Products:NotAllowedToGetProductListWithShowHidden": "You have no permission to get product list with hidden products.", + "EasyAbp.EShop.Products:ProductAttributeOptionsDeletionFailed": "Should ensure there are no SKUs using the attribute option which you want to delete.", + "EasyAbp.EShop.Products:ProductAttributesModificationFailed": "Should ensure SKUs are empty if you want to modify attributes of a product.", + "EasyAbp.EShop.Products:StaticProductCannotBeModified": "Cannot modify the static product: {productId}", + "EasyAbp.EShop.Products:StoreIsNotProductOwner": "Store {storeId} is not a owner of the product {productId}", + "EasyAbp.EShop.Products:InventoryInsufficient": "The inventory of the product {productId} (SKU: {productSkuId}) is insufficient, {quantity} are needed, but only {inventory}." } } \ No newline at end of file diff --git a/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Domain.Shared/EasyAbp/EShop/Products/Localization/Products/pt-BR.json b/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Domain.Shared/EasyAbp/EShop/Products/Localization/Products/pt-BR.json index 3b56292d..0ec35a5c 100644 --- a/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Domain.Shared/EasyAbp/EShop/Products/Localization/Products/pt-BR.json +++ b/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Domain.Shared/EasyAbp/EShop/Products/Localization/Products/pt-BR.json @@ -64,7 +64,7 @@ "CouponType.Custom": "Custom", "Menu:Category": "Category", "Category": "Category", - "Subcategory" : "Subcategory", + "Subcategory": "Subcategory", "CategoryParentId": "Parent ID", "CategoryUniqueName": "Unique name", "CategoryDisplayName": "Display name", @@ -81,6 +81,20 @@ "IncreaseInventory": "Increase", "DecreaseInventory": "Decrease", "ProductInventoryInventory": "Inventory", - "ChangeProductInventory": "Change inventory" + "ChangeProductInventory": "Change inventory", + "EasyAbp.EShop.Products:DuplicateCategoryUniqueName": "The category unique name '{uniqueName}' is duplicated.", + "EasyAbp.EShop.Products:DuplicatedProductUniqueName": "The product unique name '{uniqueName}' is duplicated.", + "EasyAbp.EShop.Products:InventoryChangeFailed": "Inventory of product {productId} (SKU: {productSkuId}) cannot be changed by {changedInventory} from {originalInventory}", + "EasyAbp.EShop.Products:NonexistentProductGroup": "The specified product group ({productGroupName}) is nonexistent.", + "EasyAbp.EShop.Products:ProductDetailHasBeenUsed": "ProductDetail {productDetailId} has been used.", + "EasyAbp.EShop.Products:ProductSkuCodeDuplicated": "Sku code {code} is duplicate for the product {productId}", + "EasyAbp.EShop.Products:ProductSkuDuplicated": "Sku {serializedAttributeOptionIds} is duplicate for the product {productId}", + "EasyAbp.EShop.Products:NotAllowedToGetCategoryListWithShowHidden": "You have no permission to get category list with hidden categories.", + "EasyAbp.EShop.Products:NotAllowedToGetProductListWithShowHidden": "You have no permission to get product list with hidden products.", + "EasyAbp.EShop.Products:ProductAttributeOptionsDeletionFailed": "Should ensure there are no SKUs using the attribute option which you want to delete.", + "EasyAbp.EShop.Products:ProductAttributesModificationFailed": "Should ensure SKUs are empty if you want to modify attributes of a product.", + "EasyAbp.EShop.Products:StaticProductCannotBeModified": "Cannot modify the static product: {productId}", + "EasyAbp.EShop.Products:StoreIsNotProductOwner": "Store {storeId} is not a owner of the product {productId}", + "EasyAbp.EShop.Products:InventoryInsufficient": "The inventory of the product {productId} (SKU: {productSkuId}) is insufficient, {quantity} are needed, but only {inventory}." } } \ No newline at end of file diff --git a/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Domain.Shared/EasyAbp/EShop/Products/Localization/Products/sl.json b/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Domain.Shared/EasyAbp/EShop/Products/Localization/Products/sl.json index 669813a0..c9479b89 100644 --- a/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Domain.Shared/EasyAbp/EShop/Products/Localization/Products/sl.json +++ b/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Domain.Shared/EasyAbp/EShop/Products/Localization/Products/sl.json @@ -65,7 +65,7 @@ "CouponType.Custom": "Custom", "Menu:Category": "Category", "Category": "Category", - "Subcategory" : "Subcategory", + "Subcategory": "Subcategory", "CategoryParentId": "Parent ID", "CategoryUniqueName": "Unique name", "CategoryDisplayName": "Display name", @@ -82,6 +82,20 @@ "IncreaseInventory": "Increase", "DecreaseInventory": "Decrease", "ProductInventoryInventory": "Inventory", - "ChangeProductInventory": "Change inventory" + "ChangeProductInventory": "Change inventory", + "EasyAbp.EShop.Products:DuplicateCategoryUniqueName": "The category unique name '{uniqueName}' is duplicated.", + "EasyAbp.EShop.Products:DuplicatedProductUniqueName": "The product unique name '{uniqueName}' is duplicated.", + "EasyAbp.EShop.Products:InventoryChangeFailed": "Inventory of product {productId} (SKU: {productSkuId}) cannot be changed by {changedInventory} from {originalInventory}", + "EasyAbp.EShop.Products:NonexistentProductGroup": "The specified product group ({productGroupName}) is nonexistent.", + "EasyAbp.EShop.Products:ProductDetailHasBeenUsed": "ProductDetail {productDetailId} has been used.", + "EasyAbp.EShop.Products:ProductSkuCodeDuplicated": "Sku code {code} is duplicate for the product {productId}", + "EasyAbp.EShop.Products:ProductSkuDuplicated": "Sku {serializedAttributeOptionIds} is duplicate for the product {productId}", + "EasyAbp.EShop.Products:NotAllowedToGetCategoryListWithShowHidden": "You have no permission to get category list with hidden categories.", + "EasyAbp.EShop.Products:NotAllowedToGetProductListWithShowHidden": "You have no permission to get product list with hidden products.", + "EasyAbp.EShop.Products:ProductAttributeOptionsDeletionFailed": "Should ensure there are no SKUs using the attribute option which you want to delete.", + "EasyAbp.EShop.Products:ProductAttributesModificationFailed": "Should ensure SKUs are empty if you want to modify attributes of a product.", + "EasyAbp.EShop.Products:StaticProductCannotBeModified": "Cannot modify the static product: {productId}", + "EasyAbp.EShop.Products:StoreIsNotProductOwner": "Store {storeId} is not a owner of the product {productId}", + "EasyAbp.EShop.Products:InventoryInsufficient": "The inventory of the product {productId} (SKU: {productSkuId}) is insufficient, {quantity} are needed, but only {inventory}." } } \ No newline at end of file diff --git a/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Domain.Shared/EasyAbp/EShop/Products/Localization/Products/tr.json b/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Domain.Shared/EasyAbp/EShop/Products/Localization/Products/tr.json index c1a943cc..f5779af8 100644 --- a/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Domain.Shared/EasyAbp/EShop/Products/Localization/Products/tr.json +++ b/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Domain.Shared/EasyAbp/EShop/Products/Localization/Products/tr.json @@ -65,7 +65,7 @@ "CouponType.Custom": "Custom", "Menu:Category": "Category", "Category": "Category", - "Subcategory" : "Subcategory", + "Subcategory": "Subcategory", "CategoryParentId": "Parent ID", "CategoryUniqueName": "Unique name", "CategoryDisplayName": "Display name", @@ -82,6 +82,20 @@ "IncreaseInventory": "Increase", "DecreaseInventory": "Decrease", "ProductInventoryInventory": "Inventory", - "ChangeProductInventory": "Change inventory" + "ChangeProductInventory": "Change inventory", + "EasyAbp.EShop.Products:DuplicateCategoryUniqueName": "The category unique name '{uniqueName}' is duplicated.", + "EasyAbp.EShop.Products:DuplicatedProductUniqueName": "The product unique name '{uniqueName}' is duplicated.", + "EasyAbp.EShop.Products:InventoryChangeFailed": "Inventory of product {productId} (SKU: {productSkuId}) cannot be changed by {changedInventory} from {originalInventory}", + "EasyAbp.EShop.Products:NonexistentProductGroup": "The specified product group ({productGroupName}) is nonexistent.", + "EasyAbp.EShop.Products:ProductDetailHasBeenUsed": "ProductDetail {productDetailId} has been used.", + "EasyAbp.EShop.Products:ProductSkuCodeDuplicated": "Sku code {code} is duplicate for the product {productId}", + "EasyAbp.EShop.Products:ProductSkuDuplicated": "Sku {serializedAttributeOptionIds} is duplicate for the product {productId}", + "EasyAbp.EShop.Products:NotAllowedToGetCategoryListWithShowHidden": "You have no permission to get category list with hidden categories.", + "EasyAbp.EShop.Products:NotAllowedToGetProductListWithShowHidden": "You have no permission to get product list with hidden products.", + "EasyAbp.EShop.Products:ProductAttributeOptionsDeletionFailed": "Should ensure there are no SKUs using the attribute option which you want to delete.", + "EasyAbp.EShop.Products:ProductAttributesModificationFailed": "Should ensure SKUs are empty if you want to modify attributes of a product.", + "EasyAbp.EShop.Products:StaticProductCannotBeModified": "Cannot modify the static product: {productId}", + "EasyAbp.EShop.Products:StoreIsNotProductOwner": "Store {storeId} is not a owner of the product {productId}", + "EasyAbp.EShop.Products:InventoryInsufficient": "The inventory of the product {productId} (SKU: {productSkuId}) is insufficient, {quantity} are needed, but only {inventory}." } } \ No newline at end of file diff --git a/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Domain.Shared/EasyAbp/EShop/Products/Localization/Products/vi.json b/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Domain.Shared/EasyAbp/EShop/Products/Localization/Products/vi.json index bbd06f35..d3f480c8 100644 --- a/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Domain.Shared/EasyAbp/EShop/Products/Localization/Products/vi.json +++ b/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Domain.Shared/EasyAbp/EShop/Products/Localization/Products/vi.json @@ -64,7 +64,7 @@ "CouponType.Custom": "Custom", "Menu:Category": "Category", "Category": "Category", - "Subcategory" : "Subcategory", + "Subcategory": "Subcategory", "CategoryParentId": "Parent ID", "CategoryUniqueName": "Unique name", "CategoryDisplayName": "Display name", @@ -81,6 +81,20 @@ "IncreaseInventory": "Increase", "DecreaseInventory": "Decrease", "ProductInventoryInventory": "Inventory", - "ChangeProductInventory": "Change inventory" + "ChangeProductInventory": "Change inventory", + "EasyAbp.EShop.Products:DuplicateCategoryUniqueName": "The category unique name '{uniqueName}' is duplicated.", + "EasyAbp.EShop.Products:DuplicatedProductUniqueName": "The product unique name '{uniqueName}' is duplicated.", + "EasyAbp.EShop.Products:InventoryChangeFailed": "Inventory of product {productId} (SKU: {productSkuId}) cannot be changed by {changedInventory} from {originalInventory}", + "EasyAbp.EShop.Products:NonexistentProductGroup": "The specified product group ({productGroupName}) is nonexistent.", + "EasyAbp.EShop.Products:ProductDetailHasBeenUsed": "ProductDetail {productDetailId} has been used.", + "EasyAbp.EShop.Products:ProductSkuCodeDuplicated": "Sku code {code} is duplicate for the product {productId}", + "EasyAbp.EShop.Products:ProductSkuDuplicated": "Sku {serializedAttributeOptionIds} is duplicate for the product {productId}", + "EasyAbp.EShop.Products:NotAllowedToGetCategoryListWithShowHidden": "You have no permission to get category list with hidden categories.", + "EasyAbp.EShop.Products:NotAllowedToGetProductListWithShowHidden": "You have no permission to get product list with hidden products.", + "EasyAbp.EShop.Products:ProductAttributeOptionsDeletionFailed": "Should ensure there are no SKUs using the attribute option which you want to delete.", + "EasyAbp.EShop.Products:ProductAttributesModificationFailed": "Should ensure SKUs are empty if you want to modify attributes of a product.", + "EasyAbp.EShop.Products:StaticProductCannotBeModified": "Cannot modify the static product: {productId}", + "EasyAbp.EShop.Products:StoreIsNotProductOwner": "Store {storeId} is not a owner of the product {productId}", + "EasyAbp.EShop.Products:InventoryInsufficient": "The inventory of the product {productId} (SKU: {productSkuId}) is insufficient, {quantity} are needed, but only {inventory}." } } \ No newline at end of file diff --git a/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Domain.Shared/EasyAbp/EShop/Products/Localization/Products/zh-Hans.json b/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Domain.Shared/EasyAbp/EShop/Products/Localization/Products/zh-Hans.json index a33bea2c..2da0a0b5 100644 --- a/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Domain.Shared/EasyAbp/EShop/Products/Localization/Products/zh-Hans.json +++ b/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Domain.Shared/EasyAbp/EShop/Products/Localization/Products/zh-Hans.json @@ -62,7 +62,7 @@ "SuccessfullyDeleted": "删除成功", "Menu:Category": "商品类目", "Category": "商品类目", - "Subcategory" : "子类目", + "Subcategory": "子类目", "CategoryParentId": "父类目 ID", "CategoryUniqueName": "类目编号", "CategoryDisplayName": "类目名称", @@ -79,6 +79,20 @@ "IncreaseInventory": "加库存", "DecreaseInventory": "减库存", "ProductInventoryInventory": "库存数", - "ChangeProductInventory": "调整库存数" + "ChangeProductInventory": "调整库存数", + "EasyAbp.EShop.Products:DuplicateCategoryUniqueName": "唯一的类别名称'{uniqueName}'重复", + "EasyAbp.EShop.Products:DuplicatedProductUniqueName": "唯一的产品名称'{uniqueName}'重复", + "EasyAbp.EShop.Products:InventoryChangeFailed": "产品{productId} (SKU: {productSkuId})的库存不能由{originalInventory}中的{changedInventory}更改", + "EasyAbp.EShop.Products:NonexistentProductGroup": "指定的产品组({productGroupName})不存在", + "EasyAbp.EShop.Products:ProductDetailHasBeenUsed": "商品详情{productDetailId}已被使用", + "EasyAbp.EShop.Products:ProductSkuCodeDuplicated": "商品{productId}的Sku代码{code}重复", + "EasyAbp.EShop.Products:ProductSkuDuplicated": "商品{productId}的Sku{serializedAttributeOptionIds}重复", + "EasyAbp.EShop.Products:NotAllowedToGetCategoryListWithShowHidden": "您没有权限获取带有隐藏类别的类别列表", + "EasyAbp.EShop.Products:NotAllowedToGetProductListWithShowHidden": "您没有权限获取包含隐藏产品的产品列表", + "EasyAbp.EShop.Products:ProductAttributeOptionsDeletionFailed": "请确保没有使用您想要删除的属性选项的sku", + "EasyAbp.EShop.Products:ProductAttributesModificationFailed": "请先确保Sku为空再修改商品的属性", + "EasyAbp.EShop.Products:StaticProductCannotBeModified": "不能修改静态商品{productId}", + "EasyAbp.EShop.Products:StoreIsNotProductOwner": "商店{storeId}不是商品{productId}的所有者 ", + "EasyAbp.EShop.Products:InventoryInsufficient": "产品{productId} (SKU: {productSkuId})的库存不足,需要数量{quantity},但是只有数量{inventory}" } } \ No newline at end of file diff --git a/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Domain.Shared/EasyAbp/EShop/Products/Localization/Products/zh-Hant.json b/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Domain.Shared/EasyAbp/EShop/Products/Localization/Products/zh-Hant.json index d82673a7..70c08e07 100644 --- a/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Domain.Shared/EasyAbp/EShop/Products/Localization/Products/zh-Hant.json +++ b/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Domain.Shared/EasyAbp/EShop/Products/Localization/Products/zh-Hant.json @@ -62,7 +62,7 @@ "SuccessfullyDeleted": "刪除成功", "Menu:Category": "商品類目", "Category": "商品類目", - "Subcategory" : "子類目", + "Subcategory": "子類目", "CategoryParentId": "父類目 ID", "CategoryUniqueName": "類目編號", "CategoryDisplayName": "類目名稱", @@ -79,6 +79,20 @@ "IncreaseInventory": "加庫存", "DecreaseInventory": "減庫存", "ProductInventoryInventory": "庫存數", - "ChangeProductInventory": "調整庫存數" + "ChangeProductInventory": "調整庫存數", + "EasyAbp.EShop.Products:DuplicateCategoryUniqueName": "唯一的類別名稱'{uniqueName}'重復", + "EasyAbp.EShop.Products:DuplicatedProductUniqueName": "唯一的產品名稱'{uniqueName}'重復", + "EasyAbp.EShop.Products:InventoryChangeFailed": "產品{productId} (SKU: {productSkuId})的庫存不能由{originalInventory}中的{changedInventory}更改", + "EasyAbp.EShop.Products:NonexistentProductGroup": "指定的產品組({productGroupName})不存在", + "EasyAbp.EShop.Products:ProductDetailHasBeenUsed": "商品詳情{productDetailId}已被使用", + "EasyAbp.EShop.Products:ProductSkuCodeDuplicated": "商品{productId}的Sku代碼{code}重復", + "EasyAbp.EShop.Products:ProductSkuDuplicated": "商品{productId}的Sku{serializedAttributeOptionIds}重復", + "EasyAbp.EShop.Products:NotAllowedToGetCategoryListWithShowHidden": "您沒有權限獲取帶有隱藏類別的類別列表", + "EasyAbp.EShop.Products:NotAllowedToGetProductListWithShowHidden": "您沒有權限獲取包含隱藏產品的產品列表", + "EasyAbp.EShop.Products:ProductAttributeOptionsDeletionFailed": "請確保沒有使用您想要刪除的屬性選項的sku", + "EasyAbp.EShop.Products:ProductAttributesModificationFailed": "請先確保Sku為空再修改商品的屬性", + "EasyAbp.EShop.Products:StaticProductCannotBeModified": "不能修改靜態商品{productId}", + "EasyAbp.EShop.Products:StoreIsNotProductOwner": "商店{storeId}不是商品{productId}的所有者 ", + "EasyAbp.EShop.Products:InventoryInsufficient": "產品{productId} (SKU: {productSkuId})的庫存不足,需要數量{quantity},但是只有數量{inventory}" } } \ No newline at end of file diff --git a/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Domain.Shared/EasyAbp/EShop/Products/ProductInventories/InventoryInsufficientException.cs b/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Domain.Shared/EasyAbp/EShop/Products/ProductInventories/InventoryInsufficientException.cs index 16c8041d..e5002395 100644 --- a/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Domain.Shared/EasyAbp/EShop/Products/ProductInventories/InventoryInsufficientException.cs +++ b/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Domain.Shared/EasyAbp/EShop/Products/ProductInventories/InventoryInsufficientException.cs @@ -5,9 +5,12 @@ namespace EasyAbp.EShop.Products.ProductInventories { public class InventoryInsufficientException : BusinessException { - public InventoryInsufficientException(Guid productId, Guid productSkuId, int quantity, int inventory) : base( - message: $"The inventory of the product {productId} (SKU: {productSkuId}) is insufficient, {quantity} are needed, but only {inventory}.") + public InventoryInsufficientException(Guid productId, Guid productSkuId, int quantity, int inventory) : base(ProductsErrorCodes.InventoryInsufficient) { + WithData(nameof(productId), productId); + WithData(nameof(productSkuId), productSkuId); + WithData(nameof(quantity), quantity); + WithData(nameof(inventory), inventory); } } } \ No newline at end of file diff --git a/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Domain.Shared/EasyAbp/EShop/Products/ProductsErrorCodes.cs b/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Domain.Shared/EasyAbp/EShop/Products/ProductsErrorCodes.cs index cacdebe3..714cbc0a 100644 --- a/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Domain.Shared/EasyAbp/EShop/Products/ProductsErrorCodes.cs +++ b/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Domain.Shared/EasyAbp/EShop/Products/ProductsErrorCodes.cs @@ -2,6 +2,19 @@ { public static class ProductsErrorCodes { - //Add your business exception error codes here... + public const string DuplicateCategoryUniqueName = "EasyAbp.EShop.Products:DuplicateCategoryUniqueName"; + public const string DuplicatedProductUniqueName = "EasyAbp.EShop.Products:DuplicatedProductUniqueName"; + public const string InventoryChangeFailed = "EasyAbp.EShop.Products:InventoryChangeFailed"; + public const string NonexistentProductGroup = "EasyAbp.EShop.Products:NonexistentProductGroup"; + public const string ProductDetailHasBeenUsed = "EasyAbp.EShop.Products:ProductDetailHasBeenUsed"; + public const string ProductSkuCodeDuplicated = "EasyAbp.EShop.Products:ProductSkuCodeDuplicated"; + public const string ProductSkuDuplicated = "EasyAbp.EShop.Products:ProductSkuDuplicated"; + public const string NotAllowedToGetCategoryListWithShowHidden = "EasyAbp.EShop.Products:NotAllowedToGetCategoryListWithShowHidden"; + public const string NotAllowedToGetProductListWithShowHidden = "EasyAbp.EShop.Products:NotAllowedToGetProductListWithShowHidden"; + public const string ProductAttributeOptionsDeletionFailed = "EasyAbp.EShop.Products:ProductAttributeOptionsDeletionFailed"; + public const string ProductAttributesModificationFailed = "EasyAbp.EShop.Products:ProductAttributesModificationFailed"; + public const string StaticProductCannotBeModified = "EasyAbp.EShop.Products:StaticProductCannotBeModified"; + public const string StoreIsNotProductOwner = "EasyAbp.EShop.Products:StoreIsNotProductOwner"; + public const string InventoryInsufficient = "EasyAbp.EShop.Products:InventoryInsufficient"; } } diff --git a/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Domain/EasyAbp/EShop/Products/Categories/CategoryManager.cs b/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Domain/EasyAbp/EShop/Products/Categories/CategoryManager.cs index 6ef6a7ed..f9b28df6 100644 --- a/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Domain/EasyAbp/EShop/Products/Categories/CategoryManager.cs +++ b/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Domain/EasyAbp/EShop/Products/Categories/CategoryManager.cs @@ -19,7 +19,7 @@ namespace EasyAbp.EShop.Products.Categories { if (await _repository.AnyAsync(x => x.UniqueName == uniqueName)) { - throw new DuplicateCategoryUniqueNameException(); + throw new DuplicateCategoryUniqueNameException(uniqueName); } return new Category(GuidGenerator.Create(), CurrentTenant.Id, parentId, uniqueName, displayName, @@ -31,7 +31,7 @@ namespace EasyAbp.EShop.Products.Categories { if (await _repository.AnyAsync(x => x.UniqueName == uniqueName && x.Id != entity.Id)) { - throw new DuplicateCategoryUniqueNameException(); + throw new DuplicateCategoryUniqueNameException(uniqueName); } entity.Update(parentId, uniqueName, displayName, description, mediaResources, isHidden); diff --git a/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Domain/EasyAbp/EShop/Products/Categories/DuplicateCategoryUniqueNameException.cs b/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Domain/EasyAbp/EShop/Products/Categories/DuplicateCategoryUniqueNameException.cs index b93e7c9c..71cf9d44 100644 --- a/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Domain/EasyAbp/EShop/Products/Categories/DuplicateCategoryUniqueNameException.cs +++ b/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Domain/EasyAbp/EShop/Products/Categories/DuplicateCategoryUniqueNameException.cs @@ -4,9 +4,9 @@ namespace EasyAbp.EShop.Products.Categories { public class DuplicateCategoryUniqueNameException : BusinessException { - public DuplicateCategoryUniqueNameException() : base("DuplicateCategoryUniqueName") + public DuplicateCategoryUniqueNameException(string uniqueName) : base(ProductsErrorCodes.DuplicateCategoryUniqueName) { - + WithData(nameof(uniqueName), uniqueName); } } } \ No newline at end of file diff --git a/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Domain/EasyAbp/EShop/Products/Products/DuplicatedProductUniqueNameException.cs b/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Domain/EasyAbp/EShop/Products/Products/DuplicatedProductUniqueNameException.cs index fbc1cece..e9dff59a 100644 --- a/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Domain/EasyAbp/EShop/Products/Products/DuplicatedProductUniqueNameException.cs +++ b/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Domain/EasyAbp/EShop/Products/Products/DuplicatedProductUniqueNameException.cs @@ -4,10 +4,10 @@ namespace EasyAbp.EShop.Products.Products { public class DuplicatedProductUniqueNameException : BusinessException { - public DuplicatedProductUniqueNameException(string uniqueName) : base("DuplicatedProductUniqueName", - $"The product unique name \"{uniqueName}\" is duplicated.") + public DuplicatedProductUniqueNameException(string uniqueName) + : base(ProductsErrorCodes.DuplicatedProductUniqueName) { - + WithData(nameof(uniqueName), uniqueName); } } } \ No newline at end of file diff --git a/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Domain/EasyAbp/EShop/Products/Products/InventoryChangeFailedException.cs b/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Domain/EasyAbp/EShop/Products/Products/InventoryChangeFailedException.cs index d81764e2..bcf82a04 100644 --- a/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Domain/EasyAbp/EShop/Products/Products/InventoryChangeFailedException.cs +++ b/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Domain/EasyAbp/EShop/Products/Products/InventoryChangeFailedException.cs @@ -5,11 +5,14 @@ namespace EasyAbp.EShop.Products.Products { public class InventoryChangeFailedException : BusinessException { - public InventoryChangeFailedException(Guid productId, Guid productSkuId, int originalInventory, - int changedInventory) : base( - message: - $"Inventory of product {productId} (SKU: {productSkuId}) cannot be changed by {changedInventory} from {originalInventory}") + public InventoryChangeFailedException( + Guid productId, Guid productSkuId, + int originalInventory, int changedInventory) : base(ProductsErrorCodes.InventoryChangeFailed) { + WithData(nameof(productId), productId); + WithData(nameof(productSkuId), productSkuId); + WithData(nameof(originalInventory), originalInventory); + WithData(nameof(changedInventory), changedInventory); } } } \ No newline at end of file diff --git a/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Domain/EasyAbp/EShop/Products/Products/NonexistentProductGroupException.cs b/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Domain/EasyAbp/EShop/Products/Products/NonexistentProductGroupException.cs index aa698577..8d40ff96 100644 --- a/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Domain/EasyAbp/EShop/Products/Products/NonexistentProductGroupException.cs +++ b/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Domain/EasyAbp/EShop/Products/Products/NonexistentProductGroupException.cs @@ -5,10 +5,9 @@ namespace EasyAbp.EShop.Products.Products { public class NonexistentProductGroupException : BusinessException { - public NonexistentProductGroupException(string productGroupName) : base( - "NonexistentProductGroup", - $"The specified product group ({productGroupName}) is nonexistent.") + public NonexistentProductGroupException(string productGroupName) : base(ProductsErrorCodes.NonexistentProductGroup) { + WithData(nameof(productGroupName), productGroupName); } } } \ No newline at end of file diff --git a/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Domain/EasyAbp/EShop/Products/Products/ProductDetailHasBeenUsedException.cs b/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Domain/EasyAbp/EShop/Products/Products/ProductDetailHasBeenUsedException.cs index c8d67d4b..c2ce6046 100644 --- a/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Domain/EasyAbp/EShop/Products/Products/ProductDetailHasBeenUsedException.cs +++ b/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Domain/EasyAbp/EShop/Products/Products/ProductDetailHasBeenUsedException.cs @@ -5,9 +5,9 @@ namespace EasyAbp.EShop.Products.Products { public class ProductDetailHasBeenUsedException : BusinessException { - public ProductDetailHasBeenUsedException(Guid productDetailId) : base( - message: $"ProductDetail {productDetailId} has been used.") + public ProductDetailHasBeenUsedException(Guid productDetailId) : base(ProductsErrorCodes.ProductDetailHasBeenUsed) { + WithData(nameof(productDetailId), productDetailId); } } } \ No newline at end of file diff --git a/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Domain/EasyAbp/EShop/Products/Products/ProductSkuCodeDuplicatedException.cs b/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Domain/EasyAbp/EShop/Products/Products/ProductSkuCodeDuplicatedException.cs index bc5beee2..451766e3 100644 --- a/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Domain/EasyAbp/EShop/Products/Products/ProductSkuCodeDuplicatedException.cs +++ b/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Domain/EasyAbp/EShop/Products/Products/ProductSkuCodeDuplicatedException.cs @@ -5,9 +5,10 @@ namespace EasyAbp.EShop.Products.Products { public class ProductSkuCodeDuplicatedException : BusinessException { - public ProductSkuCodeDuplicatedException(Guid productId, string code) : base( - message: $"Sku code {code} is duplicate for the product {productId}") + public ProductSkuCodeDuplicatedException(Guid productId, string code) : base(ProductsErrorCodes.ProductSkuCodeDuplicated) { + WithData(nameof(productId), productId); + WithData(nameof(code), code); } } } \ No newline at end of file diff --git a/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Domain/EasyAbp/EShop/Products/Products/ProductSkuDuplicatedException.cs b/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Domain/EasyAbp/EShop/Products/Products/ProductSkuDuplicatedException.cs index d13b68ad..729fe655 100644 --- a/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Domain/EasyAbp/EShop/Products/Products/ProductSkuDuplicatedException.cs +++ b/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Domain/EasyAbp/EShop/Products/Products/ProductSkuDuplicatedException.cs @@ -5,9 +5,10 @@ namespace EasyAbp.EShop.Products.Products { public class ProductSkuDuplicatedException : BusinessException { - public ProductSkuDuplicatedException(Guid productId, string serializedAttributeOptionIds) : base( - message: $"Sku {serializedAttributeOptionIds} is duplicate for the product {productId}") + public ProductSkuDuplicatedException(Guid productId, string serializedAttributeOptionIds) : base(ProductsErrorCodes.ProductSkuDuplicated) { + WithData(nameof(productId), productId); + WithData(nameof(serializedAttributeOptionIds), serializedAttributeOptionIds); } } } \ No newline at end of file diff --git a/modules/EasyAbp.EShop.Stores/src/EasyAbp.EShop.Stores.Application.Contracts/EasyAbp/EShop/Stores/StoreOwners/StoreOwnerDuplicatedException.cs b/modules/EasyAbp.EShop.Stores/src/EasyAbp.EShop.Stores.Application.Contracts/EasyAbp/EShop/Stores/StoreOwners/StoreOwnerDuplicatedException.cs index 0dca6466..8fd49165 100644 --- a/modules/EasyAbp.EShop.Stores/src/EasyAbp.EShop.Stores.Application.Contracts/EasyAbp/EShop/Stores/StoreOwners/StoreOwnerDuplicatedException.cs +++ b/modules/EasyAbp.EShop.Stores/src/EasyAbp.EShop.Stores.Application.Contracts/EasyAbp/EShop/Stores/StoreOwners/StoreOwnerDuplicatedException.cs @@ -5,9 +5,10 @@ namespace EasyAbp.EShop.Stores.StoreOwners { public class StoreOwnerDuplicatedException : BusinessException { - public StoreOwnerDuplicatedException(Guid storeId, Guid ownerUserId) : base( - message: $"Owner {ownerUserId} is duplicate for the store {storeId}") + public StoreOwnerDuplicatedException(Guid storeId, Guid ownerUserId) : base(StoresErrorCodes.StoreOwnerDuplicated) { + WithData(nameof(storeId), storeId); + WithData(nameof(ownerUserId), ownerUserId); } } } \ No newline at end of file diff --git a/modules/EasyAbp.EShop.Stores/src/EasyAbp.EShop.Stores.Domain.Shared/EasyAbp/EShop/Stores/Localization/Stores/cs.json b/modules/EasyAbp.EShop.Stores/src/EasyAbp.EShop.Stores.Domain.Shared/EasyAbp/EShop/Stores/Localization/Stores/cs.json index 74ad23fe..e642917f 100644 --- a/modules/EasyAbp.EShop.Stores/src/EasyAbp.EShop.Stores.Domain.Shared/EasyAbp/EShop/Stores/Localization/Stores/cs.json +++ b/modules/EasyAbp.EShop.Stores/src/EasyAbp.EShop.Stores.Domain.Shared/EasyAbp/EShop/Stores/Localization/Stores/cs.json @@ -33,6 +33,7 @@ "TransactionAmount": "Amount", "CreateTransaction": "New", "EditTransaction": "Edit", - "TransactionDeletionConfirmationMessage": "Are you sure to delete the transaction {0}?" + "TransactionDeletionConfirmationMessage": "Are you sure to delete the transaction {0}?", + "EasyAbp.EShop.Stores:StoreOwnerDuplicated": "Owner {ownerUserId} is duplicate for the store {storeId}." } } \ No newline at end of file diff --git a/modules/EasyAbp.EShop.Stores/src/EasyAbp.EShop.Stores.Domain.Shared/EasyAbp/EShop/Stores/Localization/Stores/en.json b/modules/EasyAbp.EShop.Stores/src/EasyAbp.EShop.Stores.Domain.Shared/EasyAbp/EShop/Stores/Localization/Stores/en.json index 668a23ce..3657b4ec 100644 --- a/modules/EasyAbp.EShop.Stores/src/EasyAbp.EShop.Stores.Domain.Shared/EasyAbp/EShop/Stores/Localization/Stores/en.json +++ b/modules/EasyAbp.EShop.Stores/src/EasyAbp.EShop.Stores.Domain.Shared/EasyAbp/EShop/Stores/Localization/Stores/en.json @@ -34,6 +34,7 @@ "TransactionAmount": "Amount", "CreateTransaction": "New", "EditTransaction": "Edit", - "TransactionDeletionConfirmationMessage": "Are you sure to delete the transaction {0}?" + "TransactionDeletionConfirmationMessage": "Are you sure to delete the transaction {0}?", + "EasyAbp.EShop.Stores:StoreOwnerDuplicated": "Owner {ownerUserId} is duplicate for the store {storeId}." } } \ No newline at end of file diff --git a/modules/EasyAbp.EShop.Stores/src/EasyAbp.EShop.Stores.Domain.Shared/EasyAbp/EShop/Stores/Localization/Stores/pl.json b/modules/EasyAbp.EShop.Stores/src/EasyAbp.EShop.Stores.Domain.Shared/EasyAbp/EShop/Stores/Localization/Stores/pl.json index 94ec8ed3..9d994cb9 100644 --- a/modules/EasyAbp.EShop.Stores/src/EasyAbp.EShop.Stores.Domain.Shared/EasyAbp/EShop/Stores/Localization/Stores/pl.json +++ b/modules/EasyAbp.EShop.Stores/src/EasyAbp.EShop.Stores.Domain.Shared/EasyAbp/EShop/Stores/Localization/Stores/pl.json @@ -33,6 +33,7 @@ "TransactionAmount": "Amount", "CreateTransaction": "New", "EditTransaction": "Edit", - "TransactionDeletionConfirmationMessage": "Are you sure to delete the transaction {0}?" + "TransactionDeletionConfirmationMessage": "Are you sure to delete the transaction {0}?", + "EasyAbp.EShop.Stores:StoreOwnerDuplicated": "Owner {ownerUserId} is duplicate for the store {storeId}." } } \ No newline at end of file diff --git a/modules/EasyAbp.EShop.Stores/src/EasyAbp.EShop.Stores.Domain.Shared/EasyAbp/EShop/Stores/Localization/Stores/pt-BR.json b/modules/EasyAbp.EShop.Stores/src/EasyAbp.EShop.Stores.Domain.Shared/EasyAbp/EShop/Stores/Localization/Stores/pt-BR.json index 526a4c9b..d693f391 100644 --- a/modules/EasyAbp.EShop.Stores/src/EasyAbp.EShop.Stores.Domain.Shared/EasyAbp/EShop/Stores/Localization/Stores/pt-BR.json +++ b/modules/EasyAbp.EShop.Stores/src/EasyAbp.EShop.Stores.Domain.Shared/EasyAbp/EShop/Stores/Localization/Stores/pt-BR.json @@ -33,6 +33,7 @@ "TransactionAmount": "Amount", "CreateTransaction": "New", "EditTransaction": "Edit", - "TransactionDeletionConfirmationMessage": "Are you sure to delete the transaction {0}?" + "TransactionDeletionConfirmationMessage": "Are you sure to delete the transaction {0}?", + "EasyAbp.EShop.Stores:StoreOwnerDuplicated": "Owner {ownerUserId} is duplicate for the store {storeId}." } } \ No newline at end of file diff --git a/modules/EasyAbp.EShop.Stores/src/EasyAbp.EShop.Stores.Domain.Shared/EasyAbp/EShop/Stores/Localization/Stores/sl.json b/modules/EasyAbp.EShop.Stores/src/EasyAbp.EShop.Stores.Domain.Shared/EasyAbp/EShop/Stores/Localization/Stores/sl.json index d01e0aa9..6baa416e 100644 --- a/modules/EasyAbp.EShop.Stores/src/EasyAbp.EShop.Stores.Domain.Shared/EasyAbp/EShop/Stores/Localization/Stores/sl.json +++ b/modules/EasyAbp.EShop.Stores/src/EasyAbp.EShop.Stores.Domain.Shared/EasyAbp/EShop/Stores/Localization/Stores/sl.json @@ -34,6 +34,7 @@ "TransactionAmount": "Amount", "CreateTransaction": "New", "EditTransaction": "Edit", - "TransactionDeletionConfirmationMessage": "Are you sure to delete the transaction {0}?" + "TransactionDeletionConfirmationMessage": "Are you sure to delete the transaction {0}?", + "EasyAbp.EShop.Stores:StoreOwnerDuplicated": "Owner {ownerUserId} is duplicate for the store {storeId}." } } \ No newline at end of file diff --git a/modules/EasyAbp.EShop.Stores/src/EasyAbp.EShop.Stores.Domain.Shared/EasyAbp/EShop/Stores/Localization/Stores/tr.json b/modules/EasyAbp.EShop.Stores/src/EasyAbp.EShop.Stores.Domain.Shared/EasyAbp/EShop/Stores/Localization/Stores/tr.json index eb71f510..35c0b87b 100644 --- a/modules/EasyAbp.EShop.Stores/src/EasyAbp.EShop.Stores.Domain.Shared/EasyAbp/EShop/Stores/Localization/Stores/tr.json +++ b/modules/EasyAbp.EShop.Stores/src/EasyAbp.EShop.Stores.Domain.Shared/EasyAbp/EShop/Stores/Localization/Stores/tr.json @@ -34,6 +34,7 @@ "TransactionAmount": "Amount", "CreateTransaction": "New", "EditTransaction": "Edit", - "TransactionDeletionConfirmationMessage": "Are you sure to delete the transaction {0}?" + "TransactionDeletionConfirmationMessage": "Are you sure to delete the transaction {0}?", + "EasyAbp.EShop.Stores:StoreOwnerDuplicated": "Owner {ownerUserId} is duplicate for the store {storeId}." } } \ No newline at end of file diff --git a/modules/EasyAbp.EShop.Stores/src/EasyAbp.EShop.Stores.Domain.Shared/EasyAbp/EShop/Stores/Localization/Stores/vi.json b/modules/EasyAbp.EShop.Stores/src/EasyAbp.EShop.Stores.Domain.Shared/EasyAbp/EShop/Stores/Localization/Stores/vi.json index b81dbb76..c546a397 100644 --- a/modules/EasyAbp.EShop.Stores/src/EasyAbp.EShop.Stores.Domain.Shared/EasyAbp/EShop/Stores/Localization/Stores/vi.json +++ b/modules/EasyAbp.EShop.Stores/src/EasyAbp.EShop.Stores.Domain.Shared/EasyAbp/EShop/Stores/Localization/Stores/vi.json @@ -33,6 +33,7 @@ "TransactionAmount": "Amount", "CreateTransaction": "New", "EditTransaction": "Edit", - "TransactionDeletionConfirmationMessage": "Are you sure to delete the transaction {0}?" + "TransactionDeletionConfirmationMessage": "Are you sure to delete the transaction {0}?", + "EasyAbp.EShop.Stores:StoreOwnerDuplicated": "Owner {ownerUserId} is duplicate for the store {storeId}." } } \ No newline at end of file diff --git a/modules/EasyAbp.EShop.Stores/src/EasyAbp.EShop.Stores.Domain.Shared/EasyAbp/EShop/Stores/Localization/Stores/zh-Hans.json b/modules/EasyAbp.EShop.Stores/src/EasyAbp.EShop.Stores.Domain.Shared/EasyAbp/EShop/Stores/Localization/Stores/zh-Hans.json index 0ca2c022..1954d4ac 100644 --- a/modules/EasyAbp.EShop.Stores/src/EasyAbp.EShop.Stores.Domain.Shared/EasyAbp/EShop/Stores/Localization/Stores/zh-Hans.json +++ b/modules/EasyAbp.EShop.Stores/src/EasyAbp.EShop.Stores.Domain.Shared/EasyAbp/EShop/Stores/Localization/Stores/zh-Hans.json @@ -31,6 +31,7 @@ "TransactionAmount": "金额", "CreateTransaction": "新建", "EditTransaction": "编辑", - "TransactionDeletionConfirmationMessage": "确认删除交易记录 {0}?" + "TransactionDeletionConfirmationMessage": "确认删除交易记录 {0}?", + "EasyAbp.EShop.Stores:StoreOwnerDuplicated": "商店{storeId}的所有者{ownerUserId}重复" } } \ No newline at end of file diff --git a/modules/EasyAbp.EShop.Stores/src/EasyAbp.EShop.Stores.Domain.Shared/EasyAbp/EShop/Stores/Localization/Stores/zh-Hant.json b/modules/EasyAbp.EShop.Stores/src/EasyAbp.EShop.Stores.Domain.Shared/EasyAbp/EShop/Stores/Localization/Stores/zh-Hant.json index 96d5b5da..75b9a190 100644 --- a/modules/EasyAbp.EShop.Stores/src/EasyAbp.EShop.Stores.Domain.Shared/EasyAbp/EShop/Stores/Localization/Stores/zh-Hant.json +++ b/modules/EasyAbp.EShop.Stores/src/EasyAbp.EShop.Stores.Domain.Shared/EasyAbp/EShop/Stores/Localization/Stores/zh-Hant.json @@ -31,6 +31,7 @@ "TransactionAmount": "金額", "CreateTransaction": "新建", "EditTransaction": "編輯", - "TransactionDeletionConfirmationMessage": "確認刪除交易記錄 {0}?" + "TransactionDeletionConfirmationMessage": "確認刪除交易記錄 {0}?", + "EasyAbp.EShop.Stores:StoreOwnerDuplicated": "商店{storeId}的所有者{ownerUserId}重復" } } \ No newline at end of file diff --git a/modules/EasyAbp.EShop.Stores/src/EasyAbp.EShop.Stores.Domain.Shared/EasyAbp/EShop/Stores/StoresErrorCodes.cs b/modules/EasyAbp.EShop.Stores/src/EasyAbp.EShop.Stores.Domain.Shared/EasyAbp/EShop/Stores/StoresErrorCodes.cs index fbe78da7..83548d9b 100644 --- a/modules/EasyAbp.EShop.Stores/src/EasyAbp.EShop.Stores.Domain.Shared/EasyAbp/EShop/Stores/StoresErrorCodes.cs +++ b/modules/EasyAbp.EShop.Stores/src/EasyAbp.EShop.Stores.Domain.Shared/EasyAbp/EShop/Stores/StoresErrorCodes.cs @@ -2,6 +2,6 @@ { public static class StoresErrorCodes { - //Add your business exception error codes here... + public const string StoreOwnerDuplicated = "EasyAbp.EShop.Stores:StoreOwnerDuplicated"; } } diff --git a/plugins/Baskets/src/EasyAbp.EShop.Plugins.Baskets.Application/EasyAbp/EShop/Plugins/Baskets/BasketItems/ProductSkuNotFoundException.cs b/plugins/Baskets/src/EasyAbp.EShop.Plugins.Baskets.Application/EasyAbp/EShop/Plugins/Baskets/BasketItems/ProductSkuNotFoundException.cs index 045ee7c9..b361b9a6 100644 --- a/plugins/Baskets/src/EasyAbp.EShop.Plugins.Baskets.Application/EasyAbp/EShop/Plugins/Baskets/BasketItems/ProductSkuNotFoundException.cs +++ b/plugins/Baskets/src/EasyAbp.EShop.Plugins.Baskets.Application/EasyAbp/EShop/Plugins/Baskets/BasketItems/ProductSkuNotFoundException.cs @@ -5,9 +5,10 @@ namespace EasyAbp.EShop.Plugins.Baskets.BasketItems { public class ProductSkuNotFoundException : BusinessException { - public ProductSkuNotFoundException(Guid productId, Guid productSkuId) : base( - message: $"Product {productId} (SKU: {productSkuId}) not found.") + public ProductSkuNotFoundException(Guid productId, Guid productSkuId) : base(BasketsErrorCodes.ProductSkuNotFound) { + WithData(nameof(productId), productId); + WithData(nameof(productSkuId), productSkuId); } } } \ No newline at end of file diff --git a/plugins/Baskets/src/EasyAbp.EShop.Plugins.Baskets.Domain.Shared/EasyAbp/EShop/Plugins/Baskets/BasketsErrorCodes.cs b/plugins/Baskets/src/EasyAbp.EShop.Plugins.Baskets.Domain.Shared/EasyAbp/EShop/Plugins/Baskets/BasketsErrorCodes.cs index b69a5e16..6bdd1cc5 100644 --- a/plugins/Baskets/src/EasyAbp.EShop.Plugins.Baskets.Domain.Shared/EasyAbp/EShop/Plugins/Baskets/BasketsErrorCodes.cs +++ b/plugins/Baskets/src/EasyAbp.EShop.Plugins.Baskets.Domain.Shared/EasyAbp/EShop/Plugins/Baskets/BasketsErrorCodes.cs @@ -2,6 +2,6 @@ { public static class BasketsErrorCodes { - //Add your business exception error codes here... + public const string ProductSkuNotFound = "EasyAbp.EShop.Plugins.Baskets:ProductSkuNotFound"; } } diff --git a/plugins/Baskets/src/EasyAbp.EShop.Plugins.Baskets.Domain.Shared/EasyAbp/EShop/Plugins/Baskets/Localization/cs.json b/plugins/Baskets/src/EasyAbp.EShop.Plugins.Baskets.Domain.Shared/EasyAbp/EShop/Plugins/Baskets/Localization/cs.json index 1d51d00a..329af5d4 100644 --- a/plugins/Baskets/src/EasyAbp.EShop.Plugins.Baskets.Domain.Shared/EasyAbp/EShop/Plugins/Baskets/Localization/cs.json +++ b/plugins/Baskets/src/EasyAbp.EShop.Plugins.Baskets.Domain.Shared/EasyAbp/EShop/Plugins/Baskets/Localization/cs.json @@ -27,6 +27,7 @@ "CreateBasketItem": "New", "EditBasketItem": "Edit", "BasketItemDeletionConfirmationMessage": "Are you sure to delete the basket item {0}?", - "SuccessfullyDeleted": "Successfully deleted" + "SuccessfullyDeleted": "Successfully deleted", + "EasyAbp.EShop.Plugins.Baskets:ProductSkuNotFound": "Product {productId} (SKU: {productSkuId}) not found." } } \ No newline at end of file diff --git a/plugins/Baskets/src/EasyAbp.EShop.Plugins.Baskets.Domain.Shared/EasyAbp/EShop/Plugins/Baskets/Localization/en.json b/plugins/Baskets/src/EasyAbp.EShop.Plugins.Baskets.Domain.Shared/EasyAbp/EShop/Plugins/Baskets/Localization/en.json index 8af054f4..7bdc4712 100644 --- a/plugins/Baskets/src/EasyAbp.EShop.Plugins.Baskets.Domain.Shared/EasyAbp/EShop/Plugins/Baskets/Localization/en.json +++ b/plugins/Baskets/src/EasyAbp.EShop.Plugins.Baskets.Domain.Shared/EasyAbp/EShop/Plugins/Baskets/Localization/en.json @@ -27,6 +27,7 @@ "CreateBasketItem": "New", "EditBasketItem": "Edit", "BasketItemDeletionConfirmationMessage": "Are you sure to delete the basket item {0}?", - "SuccessfullyDeleted": "Successfully deleted" + "SuccessfullyDeleted": "Successfully deleted", + "EasyAbp.EShop.Plugins.Baskets:ProductSkuNotFound": "Product {productId} (SKU: {productSkuId}) not found." } } \ No newline at end of file diff --git a/plugins/Baskets/src/EasyAbp.EShop.Plugins.Baskets.Domain.Shared/EasyAbp/EShop/Plugins/Baskets/Localization/pl-PL.json b/plugins/Baskets/src/EasyAbp.EShop.Plugins.Baskets.Domain.Shared/EasyAbp/EShop/Plugins/Baskets/Localization/pl-PL.json index 4b8b74bb..56b1e7db 100644 --- a/plugins/Baskets/src/EasyAbp.EShop.Plugins.Baskets.Domain.Shared/EasyAbp/EShop/Plugins/Baskets/Localization/pl-PL.json +++ b/plugins/Baskets/src/EasyAbp.EShop.Plugins.Baskets.Domain.Shared/EasyAbp/EShop/Plugins/Baskets/Localization/pl-PL.json @@ -26,6 +26,7 @@ "CreateBasketItem": "New", "EditBasketItem": "Edit", "BasketItemDeletionConfirmationMessage": "Are you sure to delete the basket item {0}?", - "SuccessfullyDeleted": "Successfully deleted" + "SuccessfullyDeleted": "Successfully deleted", + "EasyAbp.EShop.Plugins.Baskets:ProductSkuNotFound": "Product {productId} (SKU: {productSkuId}) not found." } } \ No newline at end of file diff --git a/plugins/Baskets/src/EasyAbp.EShop.Plugins.Baskets.Domain.Shared/EasyAbp/EShop/Plugins/Baskets/Localization/pt-BR.json b/plugins/Baskets/src/EasyAbp.EShop.Plugins.Baskets.Domain.Shared/EasyAbp/EShop/Plugins/Baskets/Localization/pt-BR.json index a18d79b7..580aa88f 100644 --- a/plugins/Baskets/src/EasyAbp.EShop.Plugins.Baskets.Domain.Shared/EasyAbp/EShop/Plugins/Baskets/Localization/pt-BR.json +++ b/plugins/Baskets/src/EasyAbp.EShop.Plugins.Baskets.Domain.Shared/EasyAbp/EShop/Plugins/Baskets/Localization/pt-BR.json @@ -26,6 +26,7 @@ "CreateBasketItem": "New", "EditBasketItem": "Edit", "BasketItemDeletionConfirmationMessage": "Are you sure to delete the basket item {0}?", - "SuccessfullyDeleted": "Successfully deleted" + "SuccessfullyDeleted": "Successfully deleted", + "EasyAbp.EShop.Plugins.Baskets:ProductSkuNotFound": "Product {productId} (SKU: {productSkuId}) not found." } } \ No newline at end of file diff --git a/plugins/Baskets/src/EasyAbp.EShop.Plugins.Baskets.Domain.Shared/EasyAbp/EShop/Plugins/Baskets/Localization/sl.json b/plugins/Baskets/src/EasyAbp.EShop.Plugins.Baskets.Domain.Shared/EasyAbp/EShop/Plugins/Baskets/Localization/sl.json index 6873f31f..f09cb13f 100644 --- a/plugins/Baskets/src/EasyAbp.EShop.Plugins.Baskets.Domain.Shared/EasyAbp/EShop/Plugins/Baskets/Localization/sl.json +++ b/plugins/Baskets/src/EasyAbp.EShop.Plugins.Baskets.Domain.Shared/EasyAbp/EShop/Plugins/Baskets/Localization/sl.json @@ -27,6 +27,7 @@ "CreateBasketItem": "New", "EditBasketItem": "Edit", "BasketItemDeletionConfirmationMessage": "Are you sure to delete the basket item {0}?", - "SuccessfullyDeleted": "Successfully deleted" + "SuccessfullyDeleted": "Successfully deleted", + "EasyAbp.EShop.Plugins.Baskets:ProductSkuNotFound": "Product {productId} (SKU: {productSkuId}) not found." } } \ No newline at end of file diff --git a/plugins/Baskets/src/EasyAbp.EShop.Plugins.Baskets.Domain.Shared/EasyAbp/EShop/Plugins/Baskets/Localization/tr.json b/plugins/Baskets/src/EasyAbp.EShop.Plugins.Baskets.Domain.Shared/EasyAbp/EShop/Plugins/Baskets/Localization/tr.json index c8fb2cb1..71209c87 100644 --- a/plugins/Baskets/src/EasyAbp.EShop.Plugins.Baskets.Domain.Shared/EasyAbp/EShop/Plugins/Baskets/Localization/tr.json +++ b/plugins/Baskets/src/EasyAbp.EShop.Plugins.Baskets.Domain.Shared/EasyAbp/EShop/Plugins/Baskets/Localization/tr.json @@ -28,6 +28,7 @@ "CreateBasketItem": "New", "EditBasketItem": "Edit", "BasketItemDeletionConfirmationMessage": "Are you sure to delete the basket item {0}?", - "SuccessfullyDeleted": "Successfully deleted" + "SuccessfullyDeleted": "Successfully deleted", + "EasyAbp.EShop.Plugins.Baskets:ProductSkuNotFound": "Product {productId} (SKU: {productSkuId}) not found." } } \ No newline at end of file diff --git a/plugins/Baskets/src/EasyAbp.EShop.Plugins.Baskets.Domain.Shared/EasyAbp/EShop/Plugins/Baskets/Localization/vi.json b/plugins/Baskets/src/EasyAbp.EShop.Plugins.Baskets.Domain.Shared/EasyAbp/EShop/Plugins/Baskets/Localization/vi.json index 4f8f8552..3f46938f 100644 --- a/plugins/Baskets/src/EasyAbp.EShop.Plugins.Baskets.Domain.Shared/EasyAbp/EShop/Plugins/Baskets/Localization/vi.json +++ b/plugins/Baskets/src/EasyAbp.EShop.Plugins.Baskets.Domain.Shared/EasyAbp/EShop/Plugins/Baskets/Localization/vi.json @@ -26,6 +26,7 @@ "CreateBasketItem": "New", "EditBasketItem": "Edit", "BasketItemDeletionConfirmationMessage": "Are you sure to delete the basket item {0}?", - "SuccessfullyDeleted": "Successfully deleted" + "SuccessfullyDeleted": "Successfully deleted", + "EasyAbp.EShop.Plugins.Baskets:ProductSkuNotFound": "Product {productId} (SKU: {productSkuId}) not found." } } \ No newline at end of file diff --git a/plugins/Baskets/src/EasyAbp.EShop.Plugins.Baskets.Domain.Shared/EasyAbp/EShop/Plugins/Baskets/Localization/zh-Hans.json b/plugins/Baskets/src/EasyAbp.EShop.Plugins.Baskets.Domain.Shared/EasyAbp/EShop/Plugins/Baskets/Localization/zh-Hans.json index d21263df..c592b7e8 100644 --- a/plugins/Baskets/src/EasyAbp.EShop.Plugins.Baskets.Domain.Shared/EasyAbp/EShop/Plugins/Baskets/Localization/zh-Hans.json +++ b/plugins/Baskets/src/EasyAbp.EShop.Plugins.Baskets.Domain.Shared/EasyAbp/EShop/Plugins/Baskets/Localization/zh-Hans.json @@ -27,6 +27,7 @@ "CreateBasketItem": "新建", "EditBasketItem": "编辑", "BasketItemDeletionConfirmationMessage": "确认删除购物车项 {0}?", - "SuccessfullyDeleted": "删除成功" + "SuccessfullyDeleted": "删除成功", + "EasyAbp.EShop.Plugins.Baskets:ProductSkuNotFound": "商品{productId}(SKU: {productSkuId})未找到" } } \ No newline at end of file diff --git a/plugins/Baskets/src/EasyAbp.EShop.Plugins.Baskets.Domain.Shared/EasyAbp/EShop/Plugins/Baskets/Localization/zh-Hant.json b/plugins/Baskets/src/EasyAbp.EShop.Plugins.Baskets.Domain.Shared/EasyAbp/EShop/Plugins/Baskets/Localization/zh-Hant.json index 883893bf..573079a8 100644 --- a/plugins/Baskets/src/EasyAbp.EShop.Plugins.Baskets.Domain.Shared/EasyAbp/EShop/Plugins/Baskets/Localization/zh-Hant.json +++ b/plugins/Baskets/src/EasyAbp.EShop.Plugins.Baskets.Domain.Shared/EasyAbp/EShop/Plugins/Baskets/Localization/zh-Hant.json @@ -27,6 +27,7 @@ "CreateBasketItem": "新建", "EditBasketItem": "編輯", "BasketItemDeletionConfirmationMessage": "確認刪除購物車項 {0}?", - "SuccessfullyDeleted": "刪除成功" + "SuccessfullyDeleted": "刪除成功", + "EasyAbp.EShop.Plugins.Baskets:ProductSkuNotFound": "商品{productId}(SKU: {productSkuId})未找到" } } \ No newline at end of file diff --git a/plugins/Coupons/src/EasyAbp.EShop.Orders.Plugins.Coupons/EasyAbp/EShop/Orders/Plugins/Coupons/OrderDiscount/CouponNotFoundOrHasExpiredException.cs b/plugins/Coupons/src/EasyAbp.EShop.Orders.Plugins.Coupons/EasyAbp/EShop/Orders/Plugins/Coupons/OrderDiscount/CouponNotFoundOrHasExpiredException.cs index d59921d6..9a72709f 100644 --- a/plugins/Coupons/src/EasyAbp.EShop.Orders.Plugins.Coupons/EasyAbp/EShop/Orders/Plugins/Coupons/OrderDiscount/CouponNotFoundOrHasExpiredException.cs +++ b/plugins/Coupons/src/EasyAbp.EShop.Orders.Plugins.Coupons/EasyAbp/EShop/Orders/Plugins/Coupons/OrderDiscount/CouponNotFoundOrHasExpiredException.cs @@ -1,11 +1,11 @@ using Volo.Abp; +using EasyAbp.EShop.Plugins.Coupons; namespace EasyAbp.EShop.Orders.Plugins.Coupons.OrderDiscount { public class CouponNotFoundOrHasExpiredException : BusinessException { - public CouponNotFoundOrHasExpiredException() : base("CouponNotFoundOrHasExpired", - "Coupon not found or has expired.") + public CouponNotFoundOrHasExpiredException() : base(CouponsErrorCodes.CouponNotFoundOrHasExpired) { } } diff --git a/plugins/Coupons/src/EasyAbp.EShop.Orders.Plugins.Coupons/EasyAbp/EShop/Orders/Plugins/Coupons/OrderDiscount/CouponTemplateNotFoundOrUnavailableException.cs b/plugins/Coupons/src/EasyAbp.EShop.Orders.Plugins.Coupons/EasyAbp/EShop/Orders/Plugins/Coupons/OrderDiscount/CouponTemplateNotFoundOrUnavailableException.cs index 22765152..048ef808 100644 --- a/plugins/Coupons/src/EasyAbp.EShop.Orders.Plugins.Coupons/EasyAbp/EShop/Orders/Plugins/Coupons/OrderDiscount/CouponTemplateNotFoundOrUnavailableException.cs +++ b/plugins/Coupons/src/EasyAbp.EShop.Orders.Plugins.Coupons/EasyAbp/EShop/Orders/Plugins/Coupons/OrderDiscount/CouponTemplateNotFoundOrUnavailableException.cs @@ -1,11 +1,11 @@ using Volo.Abp; +using EasyAbp.EShop.Plugins.Coupons; namespace EasyAbp.EShop.Orders.Plugins.Coupons.OrderDiscount { public class CouponTemplateNotFoundOrUnavailableException : BusinessException { - public CouponTemplateNotFoundOrUnavailableException() : base("CouponTemplateNotFoundOrUnavailable", - "Coupon template not found or unavailable.") + public CouponTemplateNotFoundOrUnavailableException() : base(CouponsErrorCodes.CouponTemplateNotFoundOrUnavailable) { } } diff --git a/plugins/Coupons/src/EasyAbp.EShop.Orders.Plugins.Coupons/EasyAbp/EShop/Orders/Plugins/Coupons/OrderDiscount/OrderDoesNotMeetCouponUsageConditionException.cs b/plugins/Coupons/src/EasyAbp.EShop.Orders.Plugins.Coupons/EasyAbp/EShop/Orders/Plugins/Coupons/OrderDiscount/OrderDoesNotMeetCouponUsageConditionException.cs index 6afaf0b4..a9368b7c 100644 --- a/plugins/Coupons/src/EasyAbp.EShop.Orders.Plugins.Coupons/EasyAbp/EShop/Orders/Plugins/Coupons/OrderDiscount/OrderDoesNotMeetCouponUsageConditionException.cs +++ b/plugins/Coupons/src/EasyAbp.EShop.Orders.Plugins.Coupons/EasyAbp/EShop/Orders/Plugins/Coupons/OrderDiscount/OrderDoesNotMeetCouponUsageConditionException.cs @@ -1,11 +1,11 @@ using Volo.Abp; +using EasyAbp.EShop.Plugins.Coupons; namespace EasyAbp.EShop.Orders.Plugins.Coupons.OrderDiscount { public class OrderDoesNotMeetCouponUsageConditionException : BusinessException { - public OrderDoesNotMeetCouponUsageConditionException() : base("OrderDoesNotMeetCouponUsageCondition", - "Order does not meet the coupon usage condition.") + public OrderDoesNotMeetCouponUsageConditionException() : base(CouponsErrorCodes.OrderDoesNotMeetCouponUsageCondition) { } } diff --git a/plugins/Coupons/src/EasyAbp.EShop.Plugins.Coupons.Application.Contracts/EasyAbp/EShop/Plugins/Coupons/Coupons/CouponHasBeenOccupiedException.cs b/plugins/Coupons/src/EasyAbp.EShop.Plugins.Coupons.Application.Contracts/EasyAbp/EShop/Plugins/Coupons/Coupons/CouponHasBeenOccupiedException.cs index 939b7887..d9c217d3 100644 --- a/plugins/Coupons/src/EasyAbp.EShop.Plugins.Coupons.Application.Contracts/EasyAbp/EShop/Plugins/Coupons/Coupons/CouponHasBeenOccupiedException.cs +++ b/plugins/Coupons/src/EasyAbp.EShop.Plugins.Coupons.Application.Contracts/EasyAbp/EShop/Plugins/Coupons/Coupons/CouponHasBeenOccupiedException.cs @@ -4,7 +4,7 @@ namespace EasyAbp.EShop.Plugins.Coupons.Coupons { public class CouponHasBeenOccupiedException : BusinessException { - public CouponHasBeenOccupiedException() : base("CouponHasBeenOccupied", "Coupon has been occupied.") + public CouponHasBeenOccupiedException() : base(CouponsErrorCodes.CouponHasBeenOccupied) { } } diff --git a/plugins/Coupons/src/EasyAbp.EShop.Plugins.Coupons.Domain.Shared/EasyAbp/EShop/Plugins/Coupons/CouponsErrorCodes.cs b/plugins/Coupons/src/EasyAbp.EShop.Plugins.Coupons.Domain.Shared/EasyAbp/EShop/Plugins/Coupons/CouponsErrorCodes.cs index b7b0d167..d64abe67 100644 --- a/plugins/Coupons/src/EasyAbp.EShop.Plugins.Coupons.Domain.Shared/EasyAbp/EShop/Plugins/Coupons/CouponsErrorCodes.cs +++ b/plugins/Coupons/src/EasyAbp.EShop.Plugins.Coupons.Domain.Shared/EasyAbp/EShop/Plugins/Coupons/CouponsErrorCodes.cs @@ -2,6 +2,11 @@ { public static class CouponsErrorCodes { - //Add your business exception error codes here... + public const string CouponNotFoundOrHasExpired = "EasyAbp.EShop.Plugins.Coupons:CouponNotFoundOrHasExpired"; + public const string CouponTemplateNotFoundOrUnavailable = "EasyAbp.EShop.Plugins.Coupons:CouponTemplateNotFoundOrUnavailable"; + public const string OrderDoesNotMeetCouponUsageCondition = "EasyAbp.EShop.Plugins.Coupons:OrderDoesNotMeetCouponUsageCondition"; + public const string CouponHasBeenOccupied = "EasyAbp.EShop.Plugins.Coupons:CouponHasBeenOccupied"; + public const string InvalidCouponOrderId = "EasyAbp.EShop.Plugins.Coupons:InvalidCouponOrderId"; + public const string UserCouponQuantityExceedsLimit = "EasyAbp.EShop.Plugins.Coupons:UserCouponQuantityExceedsLimit"; } } diff --git a/plugins/Coupons/src/EasyAbp.EShop.Plugins.Coupons.Domain.Shared/EasyAbp/EShop/Plugins/Coupons/Localization/cs.json b/plugins/Coupons/src/EasyAbp.EShop.Plugins.Coupons.Domain.Shared/EasyAbp/EShop/Plugins/Coupons/Localization/cs.json index 50246262..8f2f0c1b 100644 --- a/plugins/Coupons/src/EasyAbp.EShop.Plugins.Coupons.Domain.Shared/EasyAbp/EShop/Plugins/Coupons/Localization/cs.json +++ b/plugins/Coupons/src/EasyAbp.EShop.Plugins.Coupons.Domain.Shared/EasyAbp/EShop/Plugins/Coupons/Localization/cs.json @@ -48,6 +48,12 @@ "CouponDiscountedAmount": "Discounted amount", "CreateCoupon": "New", "EditCoupon": "Edit", - "CouponDeletionConfirmationMessage": "Are you sure to delete the coupon {0}?" + "CouponDeletionConfirmationMessage": "Are you sure to delete the coupon {0}?", + "EasyAbp.EShop.Plugins.Coupons:CouponNotFoundOrHasExpired": "Coupon not found or has expired.", + "EasyAbp.EShop.Plugins.Coupons:CouponTemplateNotFoundOrUnavailable": "Coupon template not found or unavailable.", + "EasyAbp.EShop.Plugins.Coupons:OrderDoesNotMeetCouponUsageCondition": "Order does not meet the coupon usage condition.", + "EasyAbp.EShop.Plugins.Coupons:CouponHasBeenOccupied": "Coupon has been occupied.", + "EasyAbp.EShop.Plugins.Coupons:InvalidCouponOrderId": "The expected order ID is {expectedOrderId}, but the actual order ID is {actualOrderId}.", + "EasyAbp.EShop.Plugins.Coupons:UserCouponQuantityExceedsLimit": "User's coupon quantity exceeds the limit: {maxQuantity}." } } \ No newline at end of file diff --git a/plugins/Coupons/src/EasyAbp.EShop.Plugins.Coupons.Domain.Shared/EasyAbp/EShop/Plugins/Coupons/Localization/en.json b/plugins/Coupons/src/EasyAbp.EShop.Plugins.Coupons.Domain.Shared/EasyAbp/EShop/Plugins/Coupons/Localization/en.json index 1aa72c9e..1e2b5ae4 100644 --- a/plugins/Coupons/src/EasyAbp.EShop.Plugins.Coupons.Domain.Shared/EasyAbp/EShop/Plugins/Coupons/Localization/en.json +++ b/plugins/Coupons/src/EasyAbp.EShop.Plugins.Coupons.Domain.Shared/EasyAbp/EShop/Plugins/Coupons/Localization/en.json @@ -48,6 +48,12 @@ "CouponDiscountedAmount": "Discounted amount", "CreateCoupon": "New", "EditCoupon": "Edit", - "CouponDeletionConfirmationMessage": "Are you sure to delete the coupon {0}?" + "CouponDeletionConfirmationMessage": "Are you sure to delete the coupon {0}?", + "EasyAbp.EShop.Plugins.Coupons:CouponNotFoundOrHasExpired": "Coupon not found or has expired.", + "EasyAbp.EShop.Plugins.Coupons:CouponTemplateNotFoundOrUnavailable": "Coupon template not found or unavailable.", + "EasyAbp.EShop.Plugins.Coupons:OrderDoesNotMeetCouponUsageCondition": "Order does not meet the coupon usage condition.", + "EasyAbp.EShop.Plugins.Coupons:CouponHasBeenOccupied": "Coupon has been occupied.", + "EasyAbp.EShop.Plugins.Coupons:InvalidCouponOrderId": "The expected order ID is {expectedOrderId}, but the actual order ID is {actualOrderId}.", + "EasyAbp.EShop.Plugins.Coupons:UserCouponQuantityExceedsLimit": "User's coupon quantity exceeds the limit: {maxQuantity}." } } \ No newline at end of file diff --git a/plugins/Coupons/src/EasyAbp.EShop.Plugins.Coupons.Domain.Shared/EasyAbp/EShop/Plugins/Coupons/Localization/pl-PL.json b/plugins/Coupons/src/EasyAbp.EShop.Plugins.Coupons.Domain.Shared/EasyAbp/EShop/Plugins/Coupons/Localization/pl-PL.json index 9659a17a..4fe97fee 100644 --- a/plugins/Coupons/src/EasyAbp.EShop.Plugins.Coupons.Domain.Shared/EasyAbp/EShop/Plugins/Coupons/Localization/pl-PL.json +++ b/plugins/Coupons/src/EasyAbp.EShop.Plugins.Coupons.Domain.Shared/EasyAbp/EShop/Plugins/Coupons/Localization/pl-PL.json @@ -45,6 +45,12 @@ "CouponDiscountedAmount": "Discounted amount", "CreateCoupon": "New", "EditCoupon": "Edit", - "CouponDeletionConfirmationMessage": "Are you sure to delete the coupon {0}?" + "CouponDeletionConfirmationMessage": "Are you sure to delete the coupon {0}?", + "EasyAbp.EShop.Plugins.Coupons:CouponNotFoundOrHasExpired": "Coupon not found or has expired.", + "EasyAbp.EShop.Plugins.Coupons:CouponTemplateNotFoundOrUnavailable": "Coupon template not found or unavailable.", + "EasyAbp.EShop.Plugins.Coupons:OrderDoesNotMeetCouponUsageCondition": "Order does not meet the coupon usage condition.", + "EasyAbp.EShop.Plugins.Coupons:CouponHasBeenOccupied": "Coupon has been occupied.", + "EasyAbp.EShop.Plugins.Coupons:InvalidCouponOrderId": "The expected order ID is {expectedOrderId}, but the actual order ID is {actualOrderId}.", + "EasyAbp.EShop.Plugins.Coupons:UserCouponQuantityExceedsLimit": "User's coupon quantity exceeds the limit: {maxQuantity}." } } \ No newline at end of file diff --git a/plugins/Coupons/src/EasyAbp.EShop.Plugins.Coupons.Domain.Shared/EasyAbp/EShop/Plugins/Coupons/Localization/pt-BR.json b/plugins/Coupons/src/EasyAbp.EShop.Plugins.Coupons.Domain.Shared/EasyAbp/EShop/Plugins/Coupons/Localization/pt-BR.json index 37033c5f..dc507aa3 100644 --- a/plugins/Coupons/src/EasyAbp.EShop.Plugins.Coupons.Domain.Shared/EasyAbp/EShop/Plugins/Coupons/Localization/pt-BR.json +++ b/plugins/Coupons/src/EasyAbp.EShop.Plugins.Coupons.Domain.Shared/EasyAbp/EShop/Plugins/Coupons/Localization/pt-BR.json @@ -45,6 +45,12 @@ "CouponDiscountedAmount": "Discounted amount", "CreateCoupon": "New", "EditCoupon": "Edit", - "CouponDeletionConfirmationMessage": "Are you sure to delete the coupon {0}?" + "CouponDeletionConfirmationMessage": "Are you sure to delete the coupon {0}?", + "EasyAbp.EShop.Plugins.Coupons:CouponNotFoundOrHasExpired": "Coupon not found or has expired.", + "EasyAbp.EShop.Plugins.Coupons:CouponTemplateNotFoundOrUnavailable": "Coupon template not found or unavailable.", + "EasyAbp.EShop.Plugins.Coupons:OrderDoesNotMeetCouponUsageCondition": "Order does not meet the coupon usage condition.", + "EasyAbp.EShop.Plugins.Coupons:CouponHasBeenOccupied": "Coupon has been occupied.", + "EasyAbp.EShop.Plugins.Coupons:InvalidCouponOrderId": "The expected order ID is {expectedOrderId}, but the actual order ID is {actualOrderId}.", + "EasyAbp.EShop.Plugins.Coupons:UserCouponQuantityExceedsLimit": "User's coupon quantity exceeds the limit: {maxQuantity}." } } \ No newline at end of file diff --git a/plugins/Coupons/src/EasyAbp.EShop.Plugins.Coupons.Domain.Shared/EasyAbp/EShop/Plugins/Coupons/Localization/sl.json b/plugins/Coupons/src/EasyAbp.EShop.Plugins.Coupons.Domain.Shared/EasyAbp/EShop/Plugins/Coupons/Localization/sl.json index 7acc34e1..810c227a 100644 --- a/plugins/Coupons/src/EasyAbp.EShop.Plugins.Coupons.Domain.Shared/EasyAbp/EShop/Plugins/Coupons/Localization/sl.json +++ b/plugins/Coupons/src/EasyAbp.EShop.Plugins.Coupons.Domain.Shared/EasyAbp/EShop/Plugins/Coupons/Localization/sl.json @@ -47,6 +47,12 @@ "CouponDiscountedAmount": "Discounted amount", "CreateCoupon": "New", "EditCoupon": "Edit", - "CouponDeletionConfirmationMessage": "Are you sure to delete the coupon {0}?" + "CouponDeletionConfirmationMessage": "Are you sure to delete the coupon {0}?", + "EasyAbp.EShop.Plugins.Coupons:CouponNotFoundOrHasExpired": "Coupon not found or has expired.", + "EasyAbp.EShop.Plugins.Coupons:CouponTemplateNotFoundOrUnavailable": "Coupon template not found or unavailable.", + "EasyAbp.EShop.Plugins.Coupons:OrderDoesNotMeetCouponUsageCondition": "Order does not meet the coupon usage condition.", + "EasyAbp.EShop.Plugins.Coupons:CouponHasBeenOccupied": "Coupon has been occupied.", + "EasyAbp.EShop.Plugins.Coupons:InvalidCouponOrderId": "The expected order ID is {expectedOrderId}, but the actual order ID is {actualOrderId}.", + "EasyAbp.EShop.Plugins.Coupons:UserCouponQuantityExceedsLimit": "User's coupon quantity exceeds the limit: {maxQuantity}." } } \ No newline at end of file diff --git a/plugins/Coupons/src/EasyAbp.EShop.Plugins.Coupons.Domain.Shared/EasyAbp/EShop/Plugins/Coupons/Localization/tr.json b/plugins/Coupons/src/EasyAbp.EShop.Plugins.Coupons.Domain.Shared/EasyAbp/EShop/Plugins/Coupons/Localization/tr.json index 7b5767f9..27d7537f 100644 --- a/plugins/Coupons/src/EasyAbp.EShop.Plugins.Coupons.Domain.Shared/EasyAbp/EShop/Plugins/Coupons/Localization/tr.json +++ b/plugins/Coupons/src/EasyAbp.EShop.Plugins.Coupons.Domain.Shared/EasyAbp/EShop/Plugins/Coupons/Localization/tr.json @@ -48,6 +48,12 @@ "CouponDiscountedAmount": "Discounted amount", "CreateCoupon": "New", "EditCoupon": "Edit", - "CouponDeletionConfirmationMessage": "Are you sure to delete the coupon {0}?" + "CouponDeletionConfirmationMessage": "Are you sure to delete the coupon {0}?", + "EasyAbp.EShop.Plugins.Coupons:CouponNotFoundOrHasExpired": "Coupon not found or has expired.", + "EasyAbp.EShop.Plugins.Coupons:CouponTemplateNotFoundOrUnavailable": "Coupon template not found or unavailable.", + "EasyAbp.EShop.Plugins.Coupons:OrderDoesNotMeetCouponUsageCondition": "Order does not meet the coupon usage condition.", + "EasyAbp.EShop.Plugins.Coupons:CouponHasBeenOccupied": "Coupon has been occupied.", + "EasyAbp.EShop.Plugins.Coupons:InvalidCouponOrderId": "The expected order ID is {expectedOrderId}, but the actual order ID is {actualOrderId}.", + "EasyAbp.EShop.Plugins.Coupons:UserCouponQuantityExceedsLimit": "User's coupon quantity exceeds the limit: {maxQuantity}." } } \ No newline at end of file diff --git a/plugins/Coupons/src/EasyAbp.EShop.Plugins.Coupons.Domain.Shared/EasyAbp/EShop/Plugins/Coupons/Localization/vi.json b/plugins/Coupons/src/EasyAbp.EShop.Plugins.Coupons.Domain.Shared/EasyAbp/EShop/Plugins/Coupons/Localization/vi.json index e48a2413..9c5f9dc7 100644 --- a/plugins/Coupons/src/EasyAbp.EShop.Plugins.Coupons.Domain.Shared/EasyAbp/EShop/Plugins/Coupons/Localization/vi.json +++ b/plugins/Coupons/src/EasyAbp.EShop.Plugins.Coupons.Domain.Shared/EasyAbp/EShop/Plugins/Coupons/Localization/vi.json @@ -45,6 +45,12 @@ "CouponDiscountedAmount": "Discounted amount", "CreateCoupon": "New", "EditCoupon": "Edit", - "CouponDeletionConfirmationMessage": "Are you sure to delete the coupon {0}?" + "CouponDeletionConfirmationMessage": "Are you sure to delete the coupon {0}?", + "EasyAbp.EShop.Plugins.Coupons:CouponNotFoundOrHasExpired": "Coupon not found or has expired.", + "EasyAbp.EShop.Plugins.Coupons:CouponTemplateNotFoundOrUnavailable": "Coupon template not found or unavailable.", + "EasyAbp.EShop.Plugins.Coupons:OrderDoesNotMeetCouponUsageCondition": "Order does not meet the coupon usage condition.", + "EasyAbp.EShop.Plugins.Coupons:CouponHasBeenOccupied": "Coupon has been occupied.", + "EasyAbp.EShop.Plugins.Coupons:InvalidCouponOrderId": "The expected order ID is {expectedOrderId}, but the actual order ID is {actualOrderId}.", + "EasyAbp.EShop.Plugins.Coupons:UserCouponQuantityExceedsLimit": "User's coupon quantity exceeds the limit: {maxQuantity}." } } \ No newline at end of file diff --git a/plugins/Coupons/src/EasyAbp.EShop.Plugins.Coupons.Domain.Shared/EasyAbp/EShop/Plugins/Coupons/Localization/zh-Hans.json b/plugins/Coupons/src/EasyAbp.EShop.Plugins.Coupons.Domain.Shared/EasyAbp/EShop/Plugins/Coupons/Localization/zh-Hans.json index c00340a9..628e77df 100644 --- a/plugins/Coupons/src/EasyAbp.EShop.Plugins.Coupons.Domain.Shared/EasyAbp/EShop/Plugins/Coupons/Localization/zh-Hans.json +++ b/plugins/Coupons/src/EasyAbp.EShop.Plugins.Coupons.Domain.Shared/EasyAbp/EShop/Plugins/Coupons/Localization/zh-Hans.json @@ -47,6 +47,12 @@ "CouponDiscountedAmount": "实际抵扣金额", "CreateCoupon": "新建", "EditCoupon": "编辑", - "CouponDeletionConfirmationMessage": "确认删除优惠券 {0}?" + "CouponDeletionConfirmationMessage": "确认删除优惠券 {0}?", + "EasyAbp.EShop.Plugins.Coupons:CouponNotFoundOrHasExpired": "优惠券未找到或已过期", + "EasyAbp.EShop.Plugins.Coupons:CouponTemplateNotFoundOrUnavailable": "优惠券模板未找到或不可用", + "EasyAbp.EShop.Plugins.Coupons:OrderDoesNotMeetCouponUsageCondition": "订单不符合优惠券使用条件", + "EasyAbp.EShop.Plugins.Coupons:CouponHasBeenOccupied": "优惠券已被占用", + "EasyAbp.EShop.Plugins.Coupons:InvalidCouponOrderId": "预期的订单ID是{expectedOrderId},但实际的订单ID是{actualOrderId}", + "EasyAbp.EShop.Plugins.Coupons:UserCouponQuantityExceedsLimit": "用户的优惠券数量超过限制:{maxQuantity}" } } \ No newline at end of file diff --git a/plugins/Coupons/src/EasyAbp.EShop.Plugins.Coupons.Domain.Shared/EasyAbp/EShop/Plugins/Coupons/Localization/zh-Hant.json b/plugins/Coupons/src/EasyAbp.EShop.Plugins.Coupons.Domain.Shared/EasyAbp/EShop/Plugins/Coupons/Localization/zh-Hant.json index cbb22148..0b638ea5 100644 --- a/plugins/Coupons/src/EasyAbp.EShop.Plugins.Coupons.Domain.Shared/EasyAbp/EShop/Plugins/Coupons/Localization/zh-Hant.json +++ b/plugins/Coupons/src/EasyAbp.EShop.Plugins.Coupons.Domain.Shared/EasyAbp/EShop/Plugins/Coupons/Localization/zh-Hant.json @@ -47,6 +47,12 @@ "CouponDiscountedAmount": "實際抵扣金額", "CreateCoupon": "新建", "EditCoupon": "編輯", - "CouponDeletionConfirmationMessage": "確認刪除優惠券 {0}?" + "CouponDeletionConfirmationMessage": "確認刪除優惠券 {0}?", + "EasyAbp.EShop.Plugins.Coupons:CouponNotFoundOrHasExpired": "優惠券未找到或已過期", + "EasyAbp.EShop.Plugins.Coupons:CouponTemplateNotFoundOrUnavailable": "優惠券模板未找到或不可用", + "EasyAbp.EShop.Plugins.Coupons:OrderDoesNotMeetCouponUsageCondition": "訂單不符合優惠券使用條件", + "EasyAbp.EShop.Plugins.Coupons:CouponHasBeenOccupied": "優惠券已被占用", + "EasyAbp.EShop.Plugins.Coupons:InvalidCouponOrderId": "預期的訂單ID是{expectedOrderId},但實際的訂單ID是{actualOrderId}", + "EasyAbp.EShop.Plugins.Coupons:UserCouponQuantityExceedsLimit": "用戶的優惠券數量超過限製:{maxQuantity}" } } \ No newline at end of file diff --git a/plugins/Coupons/src/EasyAbp.EShop.Plugins.Coupons.Domain/EasyAbp/EShop/Plugins/Coupons/Coupons/InvalidCouponOrderIdException.cs b/plugins/Coupons/src/EasyAbp.EShop.Plugins.Coupons.Domain/EasyAbp/EShop/Plugins/Coupons/Coupons/InvalidCouponOrderIdException.cs index f607eb9f..d10aa63c 100644 --- a/plugins/Coupons/src/EasyAbp.EShop.Plugins.Coupons.Domain/EasyAbp/EShop/Plugins/Coupons/Coupons/InvalidCouponOrderIdException.cs +++ b/plugins/Coupons/src/EasyAbp.EShop.Plugins.Coupons.Domain/EasyAbp/EShop/Plugins/Coupons/Coupons/InvalidCouponOrderIdException.cs @@ -5,9 +5,10 @@ namespace EasyAbp.EShop.Plugins.Coupons.Coupons { public class InvalidCouponOrderIdException : BusinessException { - public InvalidCouponOrderIdException(Guid expectedOrderId, Guid? actualOrderId) : base("InvalidCouponOrderId", - $"The expected order ID is {expectedOrderId}, but the actual order ID is {actualOrderId}.") + public InvalidCouponOrderIdException(Guid expectedOrderId, Guid? actualOrderId) : base(CouponsErrorCodes.InvalidCouponOrderId) { + WithData(nameof(expectedOrderId), expectedOrderId); + WithData(nameof(actualOrderId), actualOrderId); } } } \ No newline at end of file diff --git a/plugins/Coupons/src/EasyAbp.EShop.Plugins.Coupons.EntityFrameworkCore/EasyAbp/EShop/Plugins/Coupons/Coupons/UserCouponQuantityExceedsLimitException.cs b/plugins/Coupons/src/EasyAbp.EShop.Plugins.Coupons.EntityFrameworkCore/EasyAbp/EShop/Plugins/Coupons/Coupons/UserCouponQuantityExceedsLimitException.cs index 2fd05cf4..672094d3 100644 --- a/plugins/Coupons/src/EasyAbp.EShop.Plugins.Coupons.EntityFrameworkCore/EasyAbp/EShop/Plugins/Coupons/Coupons/UserCouponQuantityExceedsLimitException.cs +++ b/plugins/Coupons/src/EasyAbp.EShop.Plugins.Coupons.EntityFrameworkCore/EasyAbp/EShop/Plugins/Coupons/Coupons/UserCouponQuantityExceedsLimitException.cs @@ -4,9 +4,9 @@ namespace EasyAbp.EShop.Plugins.Coupons.Coupons { public class UserCouponQuantityExceedsLimitException : BusinessException { - public UserCouponQuantityExceedsLimitException(int maxQuantity) : base("UserCouponQuantityExceedsLimit", - $"User's coupon quantity exceeds the limit: {maxQuantity}.") + public UserCouponQuantityExceedsLimitException(int maxQuantity) : base(CouponsErrorCodes.UserCouponQuantityExceedsLimit) { + WithData(nameof(maxQuantity), maxQuantity); } } } \ No newline at end of file