Browse Source

Merge branch 'dev' into booking-plugin

pull/173/head
Super 4 years ago
committed by GitHub
parent
commit
d04f12bfd1
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      Directory.Build.props
  2. 7
      integration/EasyAbp.EShop/src/EasyAbp.EShop.Domain.Shared/EasyAbp/EShop/Localization/EShop/cs.json
  3. 3
      integration/EasyAbp.EShop/src/EasyAbp.EShop.Domain.Shared/EasyAbp/EShop/Localization/EShop/en.json
  4. 7
      integration/EasyAbp.EShop/src/EasyAbp.EShop.Domain.Shared/EasyAbp/EShop/Localization/EShop/pl-PL.json
  5. 7
      integration/EasyAbp.EShop/src/EasyAbp.EShop.Domain.Shared/EasyAbp/EShop/Localization/EShop/pt-BR.json
  6. 7
      integration/EasyAbp.EShop/src/EasyAbp.EShop.Domain.Shared/EasyAbp/EShop/Localization/EShop/sl.json
  7. 7
      integration/EasyAbp.EShop/src/EasyAbp.EShop.Domain.Shared/EasyAbp/EShop/Localization/EShop/tr.json
  8. 7
      integration/EasyAbp.EShop/src/EasyAbp.EShop.Domain.Shared/EasyAbp/EShop/Localization/EShop/vi.json
  9. 3
      integration/EasyAbp.EShop/src/EasyAbp.EShop.Domain.Shared/EasyAbp/EShop/Localization/EShop/zh-Hans.json
  10. 3
      integration/EasyAbp.EShop/src/EasyAbp.EShop.Domain.Shared/EasyAbp/EShop/Localization/EShop/zh-Hant.json
  11. 12
      modules/EasyAbp.EShop.Orders/src/EasyAbp.EShop.Orders.Application/EasyAbp/EShop/Orders/Orders/OrderAppService.cs
  12. 53
      modules/EasyAbp.EShop.Orders/src/EasyAbp.EShop.Orders.Domain.Shared/EasyAbp/EShop/Orders/Localization/Orders/cs.json
  13. 4
      modules/EasyAbp.EShop.Orders/src/EasyAbp.EShop.Orders.Domain.Shared/EasyAbp/EShop/Orders/Localization/Orders/en.json
  14. 53
      modules/EasyAbp.EShop.Orders/src/EasyAbp.EShop.Orders.Domain.Shared/EasyAbp/EShop/Orders/Localization/Orders/pl.json
  15. 53
      modules/EasyAbp.EShop.Orders/src/EasyAbp.EShop.Orders.Domain.Shared/EasyAbp/EShop/Orders/Localization/Orders/pt-BR.json
  16. 54
      modules/EasyAbp.EShop.Orders/src/EasyAbp.EShop.Orders.Domain.Shared/EasyAbp/EShop/Orders/Localization/Orders/sl.json
  17. 54
      modules/EasyAbp.EShop.Orders/src/EasyAbp.EShop.Orders.Domain.Shared/EasyAbp/EShop/Orders/Localization/Orders/tr.json
  18. 53
      modules/EasyAbp.EShop.Orders/src/EasyAbp.EShop.Orders.Domain.Shared/EasyAbp/EShop/Orders/Localization/Orders/vi.json
  19. 4
      modules/EasyAbp.EShop.Orders/src/EasyAbp.EShop.Orders.Domain.Shared/EasyAbp/EShop/Orders/Localization/Orders/zh-Hans.json
  20. 4
      modules/EasyAbp.EShop.Orders/src/EasyAbp.EShop.Orders.Domain.Shared/EasyAbp/EShop/Orders/Localization/Orders/zh-Hant.json
  21. 1
      modules/EasyAbp.EShop.Orders/src/EasyAbp.EShop.Orders.Domain.Shared/EasyAbp/EShop/Orders/OrdersErrorCodes.cs
  22. 2
      modules/EasyAbp.EShop.Orders/src/EasyAbp.EShop.Orders.Web/Menus/OrdersMenuContributor.cs
  23. 65
      modules/EasyAbp.EShop.Orders/test/EasyAbp.EShop.Orders.Application.Tests/Orders/OrderAppServiceTests.cs
  24. 20
      modules/EasyAbp.EShop.Payments/src/EasyAbp.EShop.Payments.Domain.Shared/EasyAbp/EShop/Payments/Localization/Payments/cs.json
  25. 1
      modules/EasyAbp.EShop.Payments/src/EasyAbp.EShop.Payments.Domain.Shared/EasyAbp/EShop/Payments/Localization/Payments/en.json
  26. 20
      modules/EasyAbp.EShop.Payments/src/EasyAbp.EShop.Payments.Domain.Shared/EasyAbp/EShop/Payments/Localization/Payments/pl.json
  27. 20
      modules/EasyAbp.EShop.Payments/src/EasyAbp.EShop.Payments.Domain.Shared/EasyAbp/EShop/Payments/Localization/Payments/pt-BR.json
  28. 21
      modules/EasyAbp.EShop.Payments/src/EasyAbp.EShop.Payments.Domain.Shared/EasyAbp/EShop/Payments/Localization/Payments/sl.json
  29. 21
      modules/EasyAbp.EShop.Payments/src/EasyAbp.EShop.Payments.Domain.Shared/EasyAbp/EShop/Payments/Localization/Payments/tr.json
  30. 20
      modules/EasyAbp.EShop.Payments/src/EasyAbp.EShop.Payments.Domain.Shared/EasyAbp/EShop/Payments/Localization/Payments/vi.json
  31. 1
      modules/EasyAbp.EShop.Payments/src/EasyAbp.EShop.Payments.Domain.Shared/EasyAbp/EShop/Payments/Localization/Payments/zh-Hans.json
  32. 1
      modules/EasyAbp.EShop.Payments/src/EasyAbp.EShop.Payments.Domain.Shared/EasyAbp/EShop/Payments/Localization/Payments/zh-Hant.json
  33. 2
      modules/EasyAbp.EShop.Payments/src/EasyAbp.EShop.Payments.Web/Menus/PaymentsMenuContributor.cs
  34. 13
      modules/EasyAbp.EShop.Plugins/src/EasyAbp.EShop.Plugins.Domain.Shared/EasyAbp.EShop.Plugins.Domain.Shared.csproj
  35. 7
      modules/EasyAbp.EShop.Plugins/src/EasyAbp.EShop.Plugins.Domain.Shared/EasyAbp/EShop/Plugins/Localization/Plugins/cs.json
  36. 3
      modules/EasyAbp.EShop.Plugins/src/EasyAbp.EShop.Plugins.Domain.Shared/EasyAbp/EShop/Plugins/Localization/Plugins/en.json
  37. 7
      modules/EasyAbp.EShop.Plugins/src/EasyAbp.EShop.Plugins.Domain.Shared/EasyAbp/EShop/Plugins/Localization/Plugins/pl.json
  38. 7
      modules/EasyAbp.EShop.Plugins/src/EasyAbp.EShop.Plugins.Domain.Shared/EasyAbp/EShop/Plugins/Localization/Plugins/pt-BR.json
  39. 7
      modules/EasyAbp.EShop.Plugins/src/EasyAbp.EShop.Plugins.Domain.Shared/EasyAbp/EShop/Plugins/Localization/Plugins/sl.json
  40. 7
      modules/EasyAbp.EShop.Plugins/src/EasyAbp.EShop.Plugins.Domain.Shared/EasyAbp/EShop/Plugins/Localization/Plugins/tr.json
  41. 7
      modules/EasyAbp.EShop.Plugins/src/EasyAbp.EShop.Plugins.Domain.Shared/EasyAbp/EShop/Plugins/Localization/Plugins/vi.json
  42. 3
      modules/EasyAbp.EShop.Plugins/src/EasyAbp.EShop.Plugins.Domain.Shared/EasyAbp/EShop/Plugins/Localization/Plugins/zh-Hans.json
  43. 3
      modules/EasyAbp.EShop.Plugins/src/EasyAbp.EShop.Plugins.Domain.Shared/EasyAbp/EShop/Plugins/Localization/Plugins/zh-Hant.json
  44. 16
      modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Application/EasyAbp/EShop/Products/ProductCategories/ProductCategoryAppService.cs
  45. 17
      modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Application/EasyAbp/EShop/Products/Products/ProductAppService.cs
  46. 27
      modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Application/EasyAbp/EShop/Products/Products/ProductViewAppService.cs
  47. 101
      modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Domain.Shared/EasyAbp/EShop/Products/Localization/Products/cs.json
  48. 1
      modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Domain.Shared/EasyAbp/EShop/Products/Localization/Products/en.json
  49. 101
      modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Domain.Shared/EasyAbp/EShop/Products/Localization/Products/pl.json
  50. 101
      modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Domain.Shared/EasyAbp/EShop/Products/Localization/Products/pt-BR.json
  51. 102
      modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Domain.Shared/EasyAbp/EShop/Products/Localization/Products/sl.json
  52. 102
      modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Domain.Shared/EasyAbp/EShop/Products/Localization/Products/tr.json
  53. 101
      modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Domain.Shared/EasyAbp/EShop/Products/Localization/Products/vi.json
  54. 1
      modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Domain.Shared/EasyAbp/EShop/Products/Localization/Products/zh-Hans.json
  55. 1
      modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Domain.Shared/EasyAbp/EShop/Products/Localization/Products/zh-Hant.json
  56. 3
      modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Domain.Shared/EasyAbp/EShop/Products/Products/InventoryStrategy.cs
  57. 2
      modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Web/Menus/ProductsMenuContributor.cs
  58. 39
      modules/EasyAbp.EShop.Stores/src/EasyAbp.EShop.Stores.Domain.Shared/EasyAbp/EShop/Stores/Localization/Stores/cs.json
  59. 1
      modules/EasyAbp.EShop.Stores/src/EasyAbp.EShop.Stores.Domain.Shared/EasyAbp/EShop/Stores/Localization/Stores/en.json
  60. 39
      modules/EasyAbp.EShop.Stores/src/EasyAbp.EShop.Stores.Domain.Shared/EasyAbp/EShop/Stores/Localization/Stores/pl.json
  61. 39
      modules/EasyAbp.EShop.Stores/src/EasyAbp.EShop.Stores.Domain.Shared/EasyAbp/EShop/Stores/Localization/Stores/pt-BR.json
  62. 40
      modules/EasyAbp.EShop.Stores/src/EasyAbp.EShop.Stores.Domain.Shared/EasyAbp/EShop/Stores/Localization/Stores/sl.json
  63. 40
      modules/EasyAbp.EShop.Stores/src/EasyAbp.EShop.Stores.Domain.Shared/EasyAbp/EShop/Stores/Localization/Stores/tr.json
  64. 39
      modules/EasyAbp.EShop.Stores/src/EasyAbp.EShop.Stores.Domain.Shared/EasyAbp/EShop/Stores/Localization/Stores/vi.json
  65. 1
      modules/EasyAbp.EShop.Stores/src/EasyAbp.EShop.Stores.Domain.Shared/EasyAbp/EShop/Stores/Localization/Stores/zh-Hans.json
  66. 1
      modules/EasyAbp.EShop.Stores/src/EasyAbp.EShop.Stores.Domain.Shared/EasyAbp/EShop/Stores/Localization/Stores/zh-Hant.json
  67. 4
      modules/EasyAbp.EShop.Stores/src/EasyAbp.EShop.Stores.Domain/EasyAbp/EShop/Stores/StoresDataSeedContributor.cs
  68. 2
      modules/EasyAbp.EShop.Stores/src/EasyAbp.EShop.Stores.Web/Menus/StoresMenuContributor.cs
  69. 33
      plugins/Baskets/src/EasyAbp.EShop.Plugins.Baskets.Domain.Shared/EasyAbp/EShop/Plugins/Baskets/Localization/cs.json
  70. 1
      plugins/Baskets/src/EasyAbp.EShop.Plugins.Baskets.Domain.Shared/EasyAbp/EShop/Plugins/Baskets/Localization/en.json
  71. 32
      plugins/Baskets/src/EasyAbp.EShop.Plugins.Baskets.Domain.Shared/EasyAbp/EShop/Plugins/Baskets/Localization/pl-PL.json
  72. 32
      plugins/Baskets/src/EasyAbp.EShop.Plugins.Baskets.Domain.Shared/EasyAbp/EShop/Plugins/Baskets/Localization/pt-BR.json
  73. 33
      plugins/Baskets/src/EasyAbp.EShop.Plugins.Baskets.Domain.Shared/EasyAbp/EShop/Plugins/Baskets/Localization/sl.json
  74. 34
      plugins/Baskets/src/EasyAbp.EShop.Plugins.Baskets.Domain.Shared/EasyAbp/EShop/Plugins/Baskets/Localization/tr.json
  75. 32
      plugins/Baskets/src/EasyAbp.EShop.Plugins.Baskets.Domain.Shared/EasyAbp/EShop/Plugins/Baskets/Localization/vi.json
  76. 1
      plugins/Baskets/src/EasyAbp.EShop.Plugins.Baskets.Domain.Shared/EasyAbp/EShop/Plugins/Baskets/Localization/zh-Hans.json
  77. 1
      plugins/Baskets/src/EasyAbp.EShop.Plugins.Baskets.Domain.Shared/EasyAbp/EShop/Plugins/Baskets/Localization/zh-Hant.json
  78. 2
      plugins/Baskets/src/EasyAbp.EShop.Plugins.Baskets.Web/Menus/BasketsMenuContributor.cs
  79. 59
      plugins/Coupons/src/EasyAbp.EShop.Plugins.Coupons.Domain.Shared/EasyAbp/EShop/Plugins/Coupons/Localization/cs.json
  80. 2
      plugins/Coupons/src/EasyAbp.EShop.Plugins.Coupons.Domain.Shared/EasyAbp/EShop/Plugins/Coupons/Localization/en.json
  81. 56
      plugins/Coupons/src/EasyAbp.EShop.Plugins.Coupons.Domain.Shared/EasyAbp/EShop/Plugins/Coupons/Localization/pl-PL.json
  82. 56
      plugins/Coupons/src/EasyAbp.EShop.Plugins.Coupons.Domain.Shared/EasyAbp/EShop/Plugins/Coupons/Localization/pt-BR.json
  83. 58
      plugins/Coupons/src/EasyAbp.EShop.Plugins.Coupons.Domain.Shared/EasyAbp/EShop/Plugins/Coupons/Localization/sl.json
  84. 59
      plugins/Coupons/src/EasyAbp.EShop.Plugins.Coupons.Domain.Shared/EasyAbp/EShop/Plugins/Coupons/Localization/tr.json
  85. 56
      plugins/Coupons/src/EasyAbp.EShop.Plugins.Coupons.Domain.Shared/EasyAbp/EShop/Plugins/Coupons/Localization/vi.json
  86. 1
      plugins/Coupons/src/EasyAbp.EShop.Plugins.Coupons.Domain.Shared/EasyAbp/EShop/Plugins/Coupons/Localization/zh-Hans.json
  87. 1
      plugins/Coupons/src/EasyAbp.EShop.Plugins.Coupons.Domain.Shared/EasyAbp/EShop/Plugins/Coupons/Localization/zh-Hant.json
  88. 2
      plugins/Coupons/src/EasyAbp.EShop.Plugins.Coupons.Web/Menus/CouponsMenuContributor.cs
  89. 12
      plugins/Inventories/DaprActors/src/EasyAbp.EShop.Products.DaprActorsInventory.Domain/EasyAbp/EShop/Products/DaprActorsInventory/DaprActorsProductInventoryProvider.cs
  90. 10
      plugins/Inventories/DaprActors/src/EasyAbp.EShop.Products.DaprActorsInventory.Domain/EasyAbp/EShop/Products/DaprActorsInventory/IInventoryActorProvider.cs
  91. 17
      plugins/Inventories/DaprActors/src/EasyAbp.EShop.Products.DaprActorsInventory.Domain/EasyAbp/EShop/Products/DaprActorsInventory/InventoryActorProvider.cs
  92. 50
      plugins/Inventories/DaprActors/test/EasyAbp.EShop.Products.DaprActorsInventory.Domain.Tests/TestActorProxyFactory.cs
  93. 26
      plugins/Inventories/DaprActors/test/EasyAbp.EShop.Products.DaprActorsInventory.Domain.Tests/TestInventoryActorProvider.cs
  94. 9
      plugins/Inventories/OrleansGrains/src/EasyAbp.EShop.Products.OrleansGrainsInventory.Domain/EasyAbp/EShop/Products/OrleansGrainsInventory/IInventoryGrainProvider.cs
  95. 21
      plugins/Inventories/OrleansGrains/src/EasyAbp.EShop.Products.OrleansGrainsInventory.Domain/EasyAbp/EShop/Products/OrleansGrainsInventory/InventoryGrainProvider.cs
  96. 11
      plugins/Inventories/OrleansGrains/src/EasyAbp.EShop.Products.OrleansGrainsInventory.Domain/EasyAbp/EShop/Products/OrleansGrainsInventory/OrleansGrainsProductInventoryProvider.cs
  97. 136
      plugins/Inventories/OrleansGrains/test/EasyAbp.EShop.Products.OrleansGrainsInventory.Domain.Tests/TestGrainFactory.cs
  98. 25
      plugins/Inventories/OrleansGrains/test/EasyAbp.EShop.Products.OrleansGrainsInventory.Domain.Tests/TestInventoryGrainProvider.cs
  99. 62
      samples/EShopSample/aspnet-core/src/EShopSample.DbMigrator/DbMigratorHostedService.cs
  100. 69
      samples/EShopSample/aspnet-core/src/EShopSample.DbMigrator/EShopSample.DbMigrator.csproj

2
Directory.Build.props

@ -3,7 +3,7 @@
<AbpVersion>5.1.3</AbpVersion>
<EasyAbpAbpTreesModuleVersion>2.5.3</EasyAbpAbpTreesModuleVersion>
<EasyAbpPaymentServiceModuleVersion>2.0.11</EasyAbpPaymentServiceModuleVersion>
<EasyAbpPaymentServiceModuleVersion>2.0.12</EasyAbpPaymentServiceModuleVersion>
<EasyAbpAbpTagHelperPlusModuleVersion>1.0.0</EasyAbpAbpTagHelperPlusModuleVersion>
<DaprSdkVersion>1.7.0</DaprSdkVersion>
<OrleansVersion>3.6.2</OrleansVersion>

7
integration/EasyAbp.EShop/src/EasyAbp.EShop.Domain.Shared/EasyAbp/EShop/Localization/EShop/cs.json

@ -1,7 +0,0 @@
{
"culture": "cs",
"texts": {
"Menu:EasyAbpEShop": "EShop",
}
}

3
integration/EasyAbp.EShop/src/EasyAbp.EShop.Domain.Shared/EasyAbp/EShop/Localization/EShop/en.json

@ -1,7 +1,6 @@
{
"culture": "en",
"texts": {
"Menu:EasyAbpEShop": "EShop",
"ManageYourProfile": "Manage your profile"
"Menu:EasyAbpEShop": "EShop"
}
}

7
integration/EasyAbp.EShop/src/EasyAbp.EShop.Domain.Shared/EasyAbp/EShop/Localization/EShop/pl-PL.json

@ -1,7 +0,0 @@
{
"culture": "pl-PL",
"texts": {
"Menu:EasyAbpEShop": "EShop",
}
}

7
integration/EasyAbp.EShop/src/EasyAbp.EShop.Domain.Shared/EasyAbp/EShop/Localization/EShop/pt-BR.json

@ -1,7 +0,0 @@
{
"culture": "pt-BR",
"texts": {
"Menu:EasyAbpEShop": "EShop",
}
}

7
integration/EasyAbp.EShop/src/EasyAbp.EShop.Domain.Shared/EasyAbp/EShop/Localization/EShop/sl.json

@ -1,7 +0,0 @@
{
"culture": "sl",
"texts": {
"Menu:EasyAbpEShop": "EShop",
"ManageYourProfile": "Upravljajte svojim profilom"
}
}

7
integration/EasyAbp.EShop/src/EasyAbp.EShop.Domain.Shared/EasyAbp/EShop/Localization/EShop/tr.json

@ -1,7 +0,0 @@
{
"culture": "tr",
"texts": {
"Menu:EasyAbpEShop": "EShop",
"ManageYourProfile": "Profil y�netimi"
}
}

7
integration/EasyAbp.EShop/src/EasyAbp.EShop.Domain.Shared/EasyAbp/EShop/Localization/EShop/vi.json

@ -1,7 +0,0 @@
{
"culture": "vi",
"texts": {
"Menu:EasyAbpEShop": "EShop",
}
}

3
integration/EasyAbp.EShop/src/EasyAbp.EShop.Domain.Shared/EasyAbp/EShop/Localization/EShop/zh-Hans.json

@ -1,7 +1,6 @@
{
"culture": "zh-Hans",
"texts": {
"Menu:EasyAbpEShop": "EShop 商城",
"ManageYourProfile": "管理个人资料"
"Menu:EasyAbpEShop": "EShop 商城"
}
}

3
integration/EasyAbp.EShop/src/EasyAbp.EShop.Domain.Shared/EasyAbp/EShop/Localization/EShop/zh-Hant.json

@ -1,7 +1,6 @@
{
"culture": "zh-Hant",
"texts": {
"Menu:EasyAbpEShop": "EShop 商城",
"ManageYourProfile": "管理個人資料"
"Menu:EasyAbpEShop": "EShop 商城"
}
}

12
modules/EasyAbp.EShop.Orders/src/EasyAbp.EShop.Orders.Application/EasyAbp/EShop/Orders/Orders/OrderAppService.cs

@ -90,6 +90,8 @@ namespace EasyAbp.EShop.Orders.Orders
var productDict = await GetProductDictionaryAsync(input.OrderLines.Select(dto => dto.ProductId).ToList());
ThrowIfExistFlashSalesProduct(productDict);
await AuthorizationService.CheckAsync(
new OrderCreationResource
{
@ -118,7 +120,15 @@ namespace EasyAbp.EShop.Orders.Orders
return await MapToGetOutputDtoAsync(order);
}
protected virtual void ThrowIfExistFlashSalesProduct(Dictionary<Guid, ProductDto> productDict)
{
if (productDict.Any(x => x.Value.InventoryStrategy is InventoryStrategy.FlashSales))
{
throw new BusinessException(OrdersErrorCodes.ExistFlashSalesProduct);
}
}
protected virtual async Task DiscountOrderAsync(Order order, Dictionary<Guid, ProductDto> productDict)
{
foreach (var provider in LazyServiceProvider.LazyGetService<IEnumerable<IOrderDiscountProvider>>())

53
modules/EasyAbp.EShop.Orders/src/EasyAbp.EShop.Orders.Domain.Shared/EasyAbp/EShop/Orders/Localization/Orders/cs.json

@ -1,53 +0,0 @@
{
"culture": "cs",
"texts": {
"Menu:EasyAbpEShop": "EShop",
"Menu:OrderManagement": "Orders",
"Menu:Order": "Order",
"Order": "Order",
"OrderStoreId": "Store ID",
"OrderOrderNumber": "Order number",
"OrderCustomerUserId": "Customer user ID",
"OrderOrderStatus": "Status",
"OrderCurrency": "Currency",
"OrderProductTotalPrice": "Product total price",
"OrderTotalDiscount": "Total discount",
"OrderTotalPrice": "Total price",
"OrderActualTotalPrice": "Actual total price",
"OrderRefundAmount": "Refund amount",
"OrderCustomerRemark": "Customer remark",
"OrderStaffRemark": "Staff remark",
"OrderPaidTime": "Paid time",
"OrderCompletionTime": "Completion time",
"OrderCanceledTime": "Canceled time",
"OrderReducedInventoryAfterPlacingTime": "Time of inventory reduced after placing",
"OrderReducedInventoryAfterPaymentTime": "Time of inventory reduced after payment",
"OrderLine": "Order line",
"OrderLineProductId": "Product ID",
"OrderLineProductSkuId": "Product SKU ID",
"OrderLineProductModificationTime": "Product modification time",
"OrderLineProductDetailModificationTime": "Product detail modification time",
"OrderLineProductGroupName": "Product group name",
"OrderLineProductGroupDisplayName": "Product group",
"OrderLineProductUniqueName": "Product unique name",
"OrderLineProductDisplayName": "Product display name",
"OrderLineSkuName": "SKU name",
"OrderLineSkuDescription": "SKU description",
"OrderLineMediaResources": "Media resources",
"OrderLineCurrency": "Currency",
"OrderLineUnitPrice": "Unit price",
"OrderLineTotalPrice": "Total price",
"OrderLineTotalDiscount": "Total discount",
"OrderLineActualTotalPrice": "Actual total price",
"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."
}
}

4
modules/EasyAbp.EShop.Orders/src/EasyAbp.EShop.Orders.Domain.Shared/EasyAbp/EShop/Orders/Localization/Orders/en.json

@ -3,7 +3,6 @@
"texts": {
"Menu:EasyAbpEShop": "EShop",
"Menu:OrderManagement": "Orders",
"ManageYourProfile": "Manage your profile",
"Menu:Order": "Order",
"Order": "Order",
"OrderStoreId": "Store ID",
@ -49,6 +48,7 @@
"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."
"EasyAbp.EShop.Orders:OrderIsInWrongStage": "The order {orderId} is in the wrong stage.",
"EasyAbp.EShop.Orders:ExistFlashSalesProduct": "Exist unexpected flash-sales product"
}
}

53
modules/EasyAbp.EShop.Orders/src/EasyAbp.EShop.Orders.Domain.Shared/EasyAbp/EShop/Orders/Localization/Orders/pl.json

@ -1,53 +0,0 @@
{
"culture": "pl",
"texts": {
"Menu:EasyAbpEShop": "EShop",
"Menu:OrderManagement": "Orders",
"Menu:Order": "Order",
"Order": "Order",
"OrderStoreId": "Store ID",
"OrderOrderNumber": "Order number",
"OrderCustomerUserId": "Customer user ID",
"OrderOrderStatus": "Status",
"OrderCurrency": "Currency",
"OrderProductTotalPrice": "Product total price",
"OrderTotalDiscount": "Total discount",
"OrderTotalPrice": "Total price",
"OrderActualTotalPrice": "Actual total price",
"OrderRefundAmount": "Refund amount",
"OrderCustomerRemark": "Customer remark",
"OrderStaffRemark": "Staff remark",
"OrderPaidTime": "Paid time",
"OrderCompletionTime": "Completion time",
"OrderCanceledTime": "Canceled time",
"OrderReducedInventoryAfterPlacingTime": "Time of inventory reduced after placing",
"OrderReducedInventoryAfterPaymentTime": "Time of inventory reduced after payment",
"OrderLine": "Order line",
"OrderLineProductId": "Product ID",
"OrderLineProductSkuId": "Product SKU ID",
"OrderLineProductModificationTime": "Product modification time",
"OrderLineProductDetailModificationTime": "Product detail modification time",
"OrderLineProductGroupName": "Product group name",
"OrderLineProductGroupDisplayName": "Product group",
"OrderLineProductUniqueName": "Product unique name",
"OrderLineProductDisplayName": "Product display name",
"OrderLineSkuName": "SKU name",
"OrderLineSkuDescription": "SKU description",
"OrderLineMediaResources": "Media resources",
"OrderLineCurrency": "Currency",
"OrderLineUnitPrice": "Unit price",
"OrderLineTotalPrice": "Total price",
"OrderLineTotalDiscount": "Total discount",
"OrderLineActualTotalPrice": "Actual total price",
"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."
}
}

53
modules/EasyAbp.EShop.Orders/src/EasyAbp.EShop.Orders.Domain.Shared/EasyAbp/EShop/Orders/Localization/Orders/pt-BR.json

@ -1,53 +0,0 @@
{
"culture": "pt-BR",
"texts": {
"Menu:EasyAbpEShop": "EShop",
"Menu:OrderManagement": "Orders",
"Menu:Order": "Order",
"Order": "Order",
"OrderStoreId": "Store ID",
"OrderOrderNumber": "Order number",
"OrderCustomerUserId": "Customer user ID",
"OrderOrderStatus": "Status",
"OrderCurrency": "Currency",
"OrderProductTotalPrice": "Product total price",
"OrderTotalDiscount": "Total discount",
"OrderTotalPrice": "Total price",
"OrderActualTotalPrice": "Actual total price",
"OrderRefundAmount": "Refund amount",
"OrderCustomerRemark": "Customer remark",
"OrderStaffRemark": "Staff remark",
"OrderPaidTime": "Paid time",
"OrderCompletionTime": "Completion time",
"OrderCanceledTime": "Canceled time",
"OrderReducedInventoryAfterPlacingTime": "Time of inventory reduced after placing",
"OrderReducedInventoryAfterPaymentTime": "Time of inventory reduced after payment",
"OrderLine": "Order line",
"OrderLineProductId": "Product ID",
"OrderLineProductSkuId": "Product SKU ID",
"OrderLineProductModificationTime": "Product modification time",
"OrderLineProductDetailModificationTime": "Product detail modification time",
"OrderLineProductGroupName": "Product group name",
"OrderLineProductGroupDisplayName": "Product group",
"OrderLineProductUniqueName": "Product unique name",
"OrderLineProductDisplayName": "Product display name",
"OrderLineSkuName": "SKU name",
"OrderLineSkuDescription": "SKU description",
"OrderLineMediaResources": "Media resources",
"OrderLineCurrency": "Currency",
"OrderLineUnitPrice": "Unit price",
"OrderLineTotalPrice": "Total price",
"OrderLineTotalDiscount": "Total discount",
"OrderLineActualTotalPrice": "Actual total price",
"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."
}
}

54
modules/EasyAbp.EShop.Orders/src/EasyAbp.EShop.Orders.Domain.Shared/EasyAbp/EShop/Orders/Localization/Orders/sl.json

@ -1,54 +0,0 @@
{
"culture": "sl",
"texts": {
"Menu:EasyAbpEShop": "EShop",
"Menu:OrderManagement": "Orders",
"ManageYourProfile": "Upravljajte svojim profilom",
"Menu:Order": "Order",
"Order": "Order",
"OrderStoreId": "Store ID",
"OrderOrderNumber": "Order number",
"OrderCustomerUserId": "Customer user ID",
"OrderOrderStatus": "Status",
"OrderCurrency": "Currency",
"OrderProductTotalPrice": "Product total price",
"OrderTotalDiscount": "Total discount",
"OrderTotalPrice": "Total price",
"OrderActualTotalPrice": "Actual total price",
"OrderRefundAmount": "Refund amount",
"OrderCustomerRemark": "Customer remark",
"OrderStaffRemark": "Staff remark",
"OrderPaidTime": "Paid time",
"OrderCompletionTime": "Completion time",
"OrderCanceledTime": "Canceled time",
"OrderReducedInventoryAfterPlacingTime": "Time of inventory reduced after placing",
"OrderReducedInventoryAfterPaymentTime": "Time of inventory reduced after payment",
"OrderLine": "Order line",
"OrderLineProductId": "Product ID",
"OrderLineProductSkuId": "Product SKU ID",
"OrderLineProductModificationTime": "Product modification time",
"OrderLineProductDetailModificationTime": "Product detail modification time",
"OrderLineProductGroupName": "Product group name",
"OrderLineProductGroupDisplayName": "Product group",
"OrderLineProductUniqueName": "Product unique name",
"OrderLineProductDisplayName": "Product display name",
"OrderLineSkuName": "SKU name",
"OrderLineSkuDescription": "SKU description",
"OrderLineMediaResources": "Media resources",
"OrderLineCurrency": "Currency",
"OrderLineUnitPrice": "Unit price",
"OrderLineTotalPrice": "Total price",
"OrderLineTotalDiscount": "Total discount",
"OrderLineActualTotalPrice": "Actual total price",
"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."
}
}

54
modules/EasyAbp.EShop.Orders/src/EasyAbp.EShop.Orders.Domain.Shared/EasyAbp/EShop/Orders/Localization/Orders/tr.json

@ -1,54 +0,0 @@
{
"culture": "tr",
"texts": {
"Menu:EasyAbpEShop": "EShop",
"Menu:OrderManagement": "Orders",
"ManageYourProfile": "Profil y�netimi",
"Menu:Order": "Order",
"Order": "Order",
"OrderStoreId": "Store ID",
"OrderOrderNumber": "Order number",
"OrderCustomerUserId": "Customer user ID",
"OrderOrderStatus": "Status",
"OrderCurrency": "Currency",
"OrderProductTotalPrice": "Product total price",
"OrderTotalDiscount": "Total discount",
"OrderTotalPrice": "Total price",
"OrderActualTotalPrice": "Actual total price",
"OrderRefundAmount": "Refund amount",
"OrderCustomerRemark": "Customer remark",
"OrderStaffRemark": "Staff remark",
"OrderPaidTime": "Paid time",
"OrderCompletionTime": "Completion time",
"OrderCanceledTime": "Canceled time",
"OrderReducedInventoryAfterPlacingTime": "Time of inventory reduced after placing",
"OrderReducedInventoryAfterPaymentTime": "Time of inventory reduced after payment",
"OrderLine": "Order line",
"OrderLineProductId": "Product ID",
"OrderLineProductSkuId": "Product SKU ID",
"OrderLineProductModificationTime": "Product modification time",
"OrderLineProductDetailModificationTime": "Product detail modification time",
"OrderLineProductGroupName": "Product group name",
"OrderLineProductGroupDisplayName": "Product group",
"OrderLineProductUniqueName": "Product unique name",
"OrderLineProductDisplayName": "Product display name",
"OrderLineSkuName": "SKU name",
"OrderLineSkuDescription": "SKU description",
"OrderLineMediaResources": "Media resources",
"OrderLineCurrency": "Currency",
"OrderLineUnitPrice": "Unit price",
"OrderLineTotalPrice": "Total price",
"OrderLineTotalDiscount": "Total discount",
"OrderLineActualTotalPrice": "Actual total price",
"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."
}
}

53
modules/EasyAbp.EShop.Orders/src/EasyAbp.EShop.Orders.Domain.Shared/EasyAbp/EShop/Orders/Localization/Orders/vi.json

@ -1,53 +0,0 @@
{
"culture": "vi",
"texts": {
"Menu:EasyAbpEShop": "EShop",
"Menu:OrderManagement": "Orders",
"Menu:Order": "Order",
"Order": "Order",
"OrderStoreId": "Store ID",
"OrderOrderNumber": "Order number",
"OrderCustomerUserId": "Customer user ID",
"OrderOrderStatus": "Status",
"OrderCurrency": "Currency",
"OrderProductTotalPrice": "Product total price",
"OrderTotalDiscount": "Total discount",
"OrderTotalPrice": "Total price",
"OrderActualTotalPrice": "Actual total price",
"OrderRefundAmount": "Refund amount",
"OrderCustomerRemark": "Customer remark",
"OrderStaffRemark": "Staff remark",
"OrderPaidTime": "Paid time",
"OrderCompletionTime": "Completion time",
"OrderCanceledTime": "Canceled time",
"OrderReducedInventoryAfterPlacingTime": "Time of inventory reduced after placing",
"OrderReducedInventoryAfterPaymentTime": "Time of inventory reduced after payment",
"OrderLine": "Order line",
"OrderLineProductId": "Product ID",
"OrderLineProductSkuId": "Product SKU ID",
"OrderLineProductModificationTime": "Product modification time",
"OrderLineProductDetailModificationTime": "Product detail modification time",
"OrderLineProductGroupName": "Product group name",
"OrderLineProductGroupDisplayName": "Product group",
"OrderLineProductUniqueName": "Product unique name",
"OrderLineProductDisplayName": "Product display name",
"OrderLineSkuName": "SKU name",
"OrderLineSkuDescription": "SKU description",
"OrderLineMediaResources": "Media resources",
"OrderLineCurrency": "Currency",
"OrderLineUnitPrice": "Unit price",
"OrderLineTotalPrice": "Total price",
"OrderLineTotalDiscount": "Total discount",
"OrderLineActualTotalPrice": "Actual total price",
"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."
}
}

4
modules/EasyAbp.EShop.Orders/src/EasyAbp.EShop.Orders.Domain.Shared/EasyAbp/EShop/Orders/Localization/Orders/zh-Hans.json

@ -3,7 +3,6 @@
"texts": {
"Menu:EasyAbpEShop": "EShop 商城",
"Menu:OrderManagement": "订单",
"ManageYourProfile": "管理个人资料",
"Menu:Order": "订单",
"Order": "订单",
"OrderStoreId": "店铺 ID",
@ -49,6 +48,7 @@
"EasyAbp.EShop.Orders:InvalidPayment": "付款{paymentId}有无效的订单配置{orderId}",
"EasyAbp.EShop.Orders:InvalidRefundAmount": "退款金额({amount})无效",
"EasyAbp.EShop.Orders:InvalidRefundQuantity": "退款数量({quantity})无效",
"EasyAbp.EShop.Orders:OrderIsInWrongStage": "订单{orderId}处于错误的阶段"
"EasyAbp.EShop.Orders:OrderIsInWrongStage": "订单{orderId}处于错误的阶段",
"EasyAbp.EShop.Orders:ExistFlashSalesProduct": "清单中不允许存在闪购产品"
}
}

4
modules/EasyAbp.EShop.Orders/src/EasyAbp.EShop.Orders.Domain.Shared/EasyAbp/EShop/Orders/Localization/Orders/zh-Hant.json

@ -3,7 +3,6 @@
"texts": {
"Menu:EasyAbpEShop": "EShop 商城",
"Menu:OrderManagement": "訂單",
"ManageYourProfile": "管理個人資料",
"Menu:Order": "訂單",
"Order": "訂單",
"OrderStoreId": "店鋪 ID",
@ -49,6 +48,7 @@
"EasyAbp.EShop.Orders:InvalidPayment": "付款{paymentId}有無效的訂單配置{orderId}",
"EasyAbp.EShop.Orders:InvalidRefundAmount": "退款金額({amount})無效",
"EasyAbp.EShop.Orders:InvalidRefundQuantity": "退款數量({quantity})無效",
"EasyAbp.EShop.Orders:OrderIsInWrongStage": "訂單{orderId}處於錯誤的階段"
"EasyAbp.EShop.Orders:OrderIsInWrongStage": "訂單{orderId}處於錯誤的階段",
"EasyAbp.EShop.Orders:ExistFlashSalesProduct": "清單中不允許存在閃購產品"
}
}

1
modules/EasyAbp.EShop.Orders/src/EasyAbp.EShop.Orders.Domain.Shared/EasyAbp/EShop/Orders/OrdersErrorCodes.cs

@ -11,5 +11,6 @@
public const string InvalidRefundAmount = "EasyAbp.EShop.Orders:InvalidRefundAmount";
public const string InvalidRefundQuantity = "EasyAbp.EShop.Orders:InvalidRefundQuantity";
public const string OrderIsInWrongStage = "EasyAbp.EShop.Orders:OrderIsInWrongStage";
public const string ExistFlashSalesProduct = "EasyAbp.EShop.Orders:ExistFlashSalesProduct";
}
}

2
modules/EasyAbp.EShop.Orders/src/EasyAbp.EShop.Orders.Web/Menus/OrdersMenuContributor.cs

@ -38,7 +38,7 @@ namespace EasyAbp.EShop.Orders.Web.Menus
if (!orderManagementMenuItem.Items.IsNullOrEmpty())
{
var eShopMenuItem = context.Menu.Items.GetOrAdd(i => i.Name == OrdersMenus.ModuleGroupPrefix,
() => new ApplicationMenuItem(OrdersMenus.ModuleGroupPrefix, l["Menu:EasyAbpEShop"]));
() => new ApplicationMenuItem(OrdersMenus.ModuleGroupPrefix, l["Menu:EasyAbpEShop"], icon: "fa fa-shopping-bag"));
eShopMenuItem.Items.Add(orderManagementMenuItem);
}

65
modules/EasyAbp.EShop.Orders/test/EasyAbp.EShop.Orders.Application.Tests/Orders/OrderAppServiceTests.cs

@ -11,6 +11,7 @@ using Microsoft.EntityFrameworkCore;
using Microsoft.Extensions.DependencyInjection;
using NSubstitute;
using Shouldly;
using Volo.Abp;
using Volo.Abp.Timing;
using Xunit;
@ -21,6 +22,8 @@ namespace EasyAbp.EShop.Orders.Orders
private readonly IClock _clock;
private readonly IOrderAppService _orderAppService;
private ProductDto Product1 { get; set; }
public OrderAppServiceTests()
{
_clock = GetRequiredService<IClock>();
@ -29,8 +32,7 @@ namespace EasyAbp.EShop.Orders.Orders
protected override void AfterAddApplication(IServiceCollection services)
{
var productAppService = Substitute.For<IProductAppService>();
productAppService.GetAsync(OrderTestData.Product1Id).Returns(Task.FromResult(new ProductDto
Product1 = new ProductDto
{
CreationTime = DateTime.Now,
IsPublished = true,
@ -79,10 +81,13 @@ namespace EasyAbp.EShop.Orders.Orders
},
InventoryStrategy = InventoryStrategy.NoNeed,
LastModificationTime = OrderTestData.ProductLastModificationTime
}));
};
var productAppService = Substitute.For<IProductAppService>();
productAppService.GetAsync(OrderTestData.Product1Id).Returns(Task.FromResult(Product1));
services.AddTransient(_ => productAppService);
var productDetailAppService = Substitute.For<IProductDetailAppService>();
productDetailAppService.GetAsync(OrderTestData.ProductDetail1Id).Returns(Task.FromResult(
@ -186,7 +191,7 @@ namespace EasyAbp.EShop.Orders.Orders
orderLine1.ProductDetailModificationTime.ShouldBe(OrderTestData.ProductDetailLastModificationTime);
orderLine1.RefundAmount.ShouldBe(0m);
orderLine1.RefundedQuantity.ShouldBe(0);
var orderLine2 = response.OrderLines.Single(x => x.ProductSkuId == OrderTestData.ProductSku2Id);
orderLine2.ProductDetailId.ShouldBe(OrderTestData.ProductDetail2Id);
});
@ -245,7 +250,7 @@ namespace EasyAbp.EShop.Orders.Orders
response.OrderStatus.ShouldBe(OrderStatus.Canceled);
response.CanceledTime.ShouldNotBeNull();
response.CancellationReason.ShouldBe("Repeat orders.");
UsingDbContext(db =>
{
var order = db.Orders.FirstOrDefault(o => o.Id == orderId);
@ -280,7 +285,7 @@ namespace EasyAbp.EShop.Orders.Orders
order.SetPaymentId(null);
await orderRepository.UpdateAsync(order, true);
});
var response = await _orderAppService.GetAsync(orderId);
// Assert
@ -290,7 +295,7 @@ namespace EasyAbp.EShop.Orders.Orders
response.OrderStatus.ShouldBe(OrderStatus.Canceled);
response.CanceledTime.ShouldNotBeNull();
response.CancellationReason.ShouldBe(OrdersConsts.UnpaidAutoCancellationReason);
UsingDbContext(db =>
{
var order = db.Orders.FirstOrDefault(o => o.Id == orderId);
@ -349,7 +354,7 @@ namespace EasyAbp.EShop.Orders.Orders
response.OrderStatus.ShouldBe(OrderStatus.Processing);
response.CanceledTime.ShouldBeNull();
response.CancellationReason.ShouldBeNull();
UsingDbContext(db =>
{
var order = db.Orders.FirstOrDefault(o => o.Id == orderId);
@ -361,7 +366,7 @@ namespace EasyAbp.EShop.Orders.Orders
order.CancellationReason.ShouldBeNull();
});
}
[Fact]
public async Task Unpaid_Order_Should_Be_Auto_Canceled_When_Payment_Overtime()
{
@ -404,7 +409,7 @@ namespace EasyAbp.EShop.Orders.Orders
response.OrderStatus.ShouldBe(OrderStatus.Canceled);
response.CanceledTime.ShouldNotBeNull();
response.CancellationReason.ShouldBe(OrdersConsts.UnpaidAutoCancellationReason);
UsingDbContext(db =>
{
var order = db.Orders.FirstOrDefault(o => o.Id == orderId);
@ -416,7 +421,7 @@ namespace EasyAbp.EShop.Orders.Orders
order.CancellationReason.ShouldBe(OrdersConsts.UnpaidAutoCancellationReason);
});
}
[Fact]
public async Task Payment_Pending_Order_Should_Be_Auto_Canceled_When_Payment_Overtime()
{
@ -461,7 +466,7 @@ namespace EasyAbp.EShop.Orders.Orders
response.OrderStatus.ShouldBe(OrderStatus.Canceled);
response.CanceledTime.ShouldNotBeNull();
response.CancellationReason.ShouldBe(OrdersConsts.UnpaidAutoCancellationReason);
UsingDbContext(db =>
{
var order = db.Orders.FirstOrDefault(o => o.Id == orderId);
@ -497,17 +502,47 @@ namespace EasyAbp.EShop.Orders.Orders
}
}
};
await WithUnitOfWorkAsync(async () =>
{
var order = await _orderAppService.CreateAsync(createOrderDto);
var orderLine = order.OrderLines.Find(x => x.ProductSkuId == OrderTestData.ProductSku3Id);
order.ProductTotalPrice.ShouldBe(10 * 1m + 2 * TestOrderLinePriceOverrider.Sku3UnitPrice);
orderLine.ShouldNotBeNull();
orderLine.UnitPrice.ShouldBe(TestOrderLinePriceOverrider.Sku3UnitPrice);
orderLine.TotalPrice.ShouldBe(orderLine.Quantity * orderLine.UnitPrice);
});
}
[Fact]
public async Task Should_Not_Create_Order_With_Flash_Sales_Products()
{
var createOrderDto = new CreateOrderDto
{
StoreId = OrderTestData.Store1Id,
OrderLines = new List<CreateOrderLineDto>
{
new()
{
ProductId = OrderTestData.Product1Id,
ProductSkuId = OrderTestData.ProductSku1Id,
Quantity = 1
}
}
};
Product1.InventoryStrategy = InventoryStrategy.FlashSales;
await WithUnitOfWorkAsync(async () =>
{
var exception =
await Should.ThrowAsync<BusinessException>(() => _orderAppService.CreateAsync(createOrderDto));
exception.Code.ShouldBe(OrdersErrorCodes.ExistFlashSalesProduct);
});
Product1.InventoryStrategy = InventoryStrategy.NoNeed;
}
}
}

20
modules/EasyAbp.EShop.Payments/src/EasyAbp.EShop.Payments.Domain.Shared/EasyAbp/EShop/Payments/Localization/Payments/cs.json

@ -1,20 +0,0 @@
{
"culture": "cs",
"texts": {
"Menu:EasyAbpEShop": "EShop",
"Menu:PaymentManagement": "Payments",
"Permission:Payments": "Payment",
"PaymentItemStoreId": "Store ID",
"Permission:Refunds": "Refund",
"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:AnotherRefundTaskIsOnGoing": "Payment ({id}) has another ongoing refund task.",
"EasyAbp.EShop.Payments:InvalidRefundAmount": "Refund amount ({refundAmount}) is invalid for the payment (id: {paymentId}, item id: {paymentItemId}).",
"EasyAbp.EShop.Payments:OrderIdNotFound": "Cannot get valid OrderId from ExtraProperties.",
"EasyAbp.EShop.Payments:StoreIdNotFound": "Cannot get valid StoreId from ExtraProperties.",
"EasyAbp.EShop.Payments:OrderLineNotFound": "There is no such an order line. (order ID: {orderId}, order line ID: {orderLineId})",
"EasyAbp.EShop.Payments:OrderExtraFeeNotFound": "There is no such an order extra fee. (order ID: {orderId}, name: {name}, key: {key})"
}
}

1
modules/EasyAbp.EShop.Payments/src/EasyAbp.EShop.Payments.Domain.Shared/EasyAbp/EShop/Payments/Localization/Payments/en.json

@ -3,7 +3,6 @@
"texts": {
"Menu:EasyAbpEShop": "EShop",
"Menu:PaymentManagement": "Payments",
"ManageYourProfile": "Manage your profile",
"Permission:Payments": "Payment",
"PaymentItemStoreId": "Store ID",
"Permission:Refunds": "Refund",

20
modules/EasyAbp.EShop.Payments/src/EasyAbp.EShop.Payments.Domain.Shared/EasyAbp/EShop/Payments/Localization/Payments/pl.json

@ -1,20 +0,0 @@
{
"culture": "pl",
"texts": {
"Menu:EasyAbpEShop": "EShop",
"Menu:PaymentManagement": "Payments",
"Permission:Payments": "Payment",
"PaymentItemStoreId": "Store ID",
"Permission:Refunds": "Refund",
"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:AnotherRefundTaskIsOnGoing": "Payment ({id}) has another ongoing refund task.",
"EasyAbp.EShop.Payments:InvalidRefundAmount": "Refund amount ({refundAmount}) is invalid for the payment (id: {paymentId}, item id: {paymentItemId}).",
"EasyAbp.EShop.Payments:OrderIdNotFound": "Cannot get valid OrderId from ExtraProperties.",
"EasyAbp.EShop.Payments:StoreIdNotFound": "Cannot get valid StoreId from ExtraProperties.",
"EasyAbp.EShop.Payments:OrderLineNotFound": "There is no such an order line. (order ID: {orderId}, order line ID: {orderLineId})",
"EasyAbp.EShop.Payments:OrderExtraFeeNotFound": "There is no such an order extra fee. (order ID: {orderId}, name: {name}, key: {key})"
}
}

20
modules/EasyAbp.EShop.Payments/src/EasyAbp.EShop.Payments.Domain.Shared/EasyAbp/EShop/Payments/Localization/Payments/pt-BR.json

@ -1,20 +0,0 @@
{
"culture": "pt-BR",
"texts": {
"Menu:EasyAbpEShop": "EShop",
"Menu:PaymentManagement": "Payments",
"Permission:Payments": "Payment",
"PaymentItemStoreId": "Store ID",
"Permission:Refunds": "Refund",
"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:AnotherRefundTaskIsOnGoing": "Payment ({id}) has another ongoing refund task.",
"EasyAbp.EShop.Payments:InvalidRefundAmount": "Refund amount ({refundAmount}) is invalid for the payment (id: {paymentId}, item id: {paymentItemId}).",
"EasyAbp.EShop.Payments:OrderIdNotFound": "Cannot get valid OrderId from ExtraProperties.",
"EasyAbp.EShop.Payments:StoreIdNotFound": "Cannot get valid StoreId from ExtraProperties.",
"EasyAbp.EShop.Payments:OrderLineNotFound": "There is no such an order line. (order ID: {orderId}, order line ID: {orderLineId})",
"EasyAbp.EShop.Payments:OrderExtraFeeNotFound": "There is no such an order extra fee. (order ID: {orderId}, name: {name}, key: {key})"
}
}

21
modules/EasyAbp.EShop.Payments/src/EasyAbp.EShop.Payments.Domain.Shared/EasyAbp/EShop/Payments/Localization/Payments/sl.json

@ -1,21 +0,0 @@
{
"culture": "sl",
"texts": {
"Menu:EasyAbpEShop": "EShop",
"Menu:PaymentManagement": "Payments",
"ManageYourProfile": "Upravljajte svojim profilom",
"Permission:Payments": "Payment",
"PaymentItemStoreId": "Store ID",
"Permission:Refunds": "Refund",
"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:AnotherRefundTaskIsOnGoing": "Payment ({id}) has another ongoing refund task.",
"EasyAbp.EShop.Payments:InvalidRefundAmount": "Refund amount ({refundAmount}) is invalid for the payment (id: {paymentId}, item id: {paymentItemId}).",
"EasyAbp.EShop.Payments:OrderIdNotFound": "Cannot get valid OrderId from ExtraProperties.",
"EasyAbp.EShop.Payments:StoreIdNotFound": "Cannot get valid StoreId from ExtraProperties.",
"EasyAbp.EShop.Payments:OrderLineNotFound": "There is no such an order line. (order ID: {orderId}, order line ID: {orderLineId})",
"EasyAbp.EShop.Payments:OrderExtraFeeNotFound": "There is no such an order extra fee. (order ID: {orderId}, name: {name}, key: {key})"
}
}

21
modules/EasyAbp.EShop.Payments/src/EasyAbp.EShop.Payments.Domain.Shared/EasyAbp/EShop/Payments/Localization/Payments/tr.json

@ -1,21 +0,0 @@
{
"culture": "tr",
"texts": {
"Menu:EasyAbpEShop": "EShop",
"Menu:PaymentManagement": "Payments",
"ManageYourProfile": "Profil y�netimi",
"Permission:Payments": "Payment",
"PaymentItemStoreId": "Store ID",
"Permission:Refunds": "Refund",
"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:AnotherRefundTaskIsOnGoing": "Payment ({id}) has another ongoing refund task.",
"EasyAbp.EShop.Payments:InvalidRefundAmount": "Refund amount ({refundAmount}) is invalid for the payment (id: {paymentId}, item id: {paymentItemId}).",
"EasyAbp.EShop.Payments:OrderIdNotFound": "Cannot get valid OrderId from ExtraProperties.",
"EasyAbp.EShop.Payments:StoreIdNotFound": "Cannot get valid StoreId from ExtraProperties.",
"EasyAbp.EShop.Payments:OrderLineNotFound": "There is no such an order line. (order ID: {orderId}, order line ID: {orderLineId})",
"EasyAbp.EShop.Payments:OrderExtraFeeNotFound": "There is no such an order extra fee. (order ID: {orderId}, name: {name}, key: {key})"
}
}

20
modules/EasyAbp.EShop.Payments/src/EasyAbp.EShop.Payments.Domain.Shared/EasyAbp/EShop/Payments/Localization/Payments/vi.json

@ -1,20 +0,0 @@
{
"culture": "vi",
"texts": {
"Menu:EasyAbpEShop": "EShop",
"Menu:PaymentManagement": "Payments",
"Permission:Payments": "Payment",
"PaymentItemStoreId": "Store ID",
"Permission:Refunds": "Refund",
"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:AnotherRefundTaskIsOnGoing": "Payment ({id}) has another ongoing refund task.",
"EasyAbp.EShop.Payments:InvalidRefundAmount": "Refund amount ({refundAmount}) is invalid for the payment (id: {paymentId}, item id: {paymentItemId}).",
"EasyAbp.EShop.Payments:OrderIdNotFound": "Cannot get valid OrderId from ExtraProperties.",
"EasyAbp.EShop.Payments:StoreIdNotFound": "Cannot get valid StoreId from ExtraProperties.",
"EasyAbp.EShop.Payments:OrderLineNotFound": "There is no such an order line. (order ID: {orderId}, order line ID: {orderLineId})",
"EasyAbp.EShop.Payments:OrderExtraFeeNotFound": "There is no such an order extra fee. (order ID: {orderId}, name: {name}, key: {key})"
}
}

1
modules/EasyAbp.EShop.Payments/src/EasyAbp.EShop.Payments.Domain.Shared/EasyAbp/EShop/Payments/Localization/Payments/zh-Hans.json

@ -3,7 +3,6 @@
"texts": {
"Menu:EasyAbpEShop": "EShop 商城",
"Menu:PaymentManagement": "支付",
"ManageYourProfile": "管理个人资料",
"Permission:Payments": "支付",
"PaymentItemStoreId": "店铺 ID",
"Permission:Refunds": "退款",

1
modules/EasyAbp.EShop.Payments/src/EasyAbp.EShop.Payments.Domain.Shared/EasyAbp/EShop/Payments/Localization/Payments/zh-Hant.json

@ -3,7 +3,6 @@
"texts": {
"Menu:EasyAbpEShop": "EShop 商城",
"Menu:PaymentManagement": "支付",
"ManageYourProfile": "管理個人資料",
"Permission:Payments": "支付",
"PaymentItemStoreId": "店鋪 ID",
"Permission:Refunds": "退款",

2
modules/EasyAbp.EShop.Payments/src/EasyAbp.EShop.Payments.Web/Menus/PaymentsMenuContributor.cs

@ -44,7 +44,7 @@ namespace EasyAbp.EShop.Payments.Web.Menus
if (!paymentManagementMenuItem.Items.IsNullOrEmpty())
{
var eShopMenuItem = context.Menu.Items.GetOrAdd(i => i.Name == PaymentsMenus.ModuleGroupPrefix,
() => new ApplicationMenuItem(PaymentsMenus.ModuleGroupPrefix, l["Menu:EasyAbpEShop"]));
() => new ApplicationMenuItem(PaymentsMenus.ModuleGroupPrefix, l["Menu:EasyAbpEShop"], icon: "fa fa-shopping-bag"));
eShopMenuItem.Items.Add(paymentManagementMenuItem);
}

13
modules/EasyAbp.EShop.Plugins/src/EasyAbp.EShop.Plugins.Domain.Shared/EasyAbp.EShop.Plugins.Domain.Shared.csproj

@ -13,17 +13,8 @@
</ItemGroup>
<ItemGroup>
<EmbeddedResource Include="EasyAbp\EShop\Plugins\Localization\Plugins\cs.json" />
<EmbeddedResource Include="EasyAbp\EShop\Plugins\Localization\Plugins\en.json" />
<EmbeddedResource Include="EasyAbp\EShop\Plugins\Localization\Plugins\pl.json" />
<EmbeddedResource Include="EasyAbp\EShop\Plugins\Localization\Plugins\pt-BR.json" />
<EmbeddedResource Include="EasyAbp\EShop\Plugins\Localization\Plugins\sl.json" />
<EmbeddedResource Include="EasyAbp\EShop\Plugins\Localization\Plugins\tr.json" />
<EmbeddedResource Include="EasyAbp\EShop\Plugins\Localization\Plugins\vi.json" />
<EmbeddedResource Include="EasyAbp\EShop\Plugins\Localization\Plugins\zh-Hans.json" />
<EmbeddedResource Include="EasyAbp\EShop\Plugins\Localization\Plugins\zh-Hant.json" />
<EmbeddedResource Include="Localization\Plugins\*.json" />
<Content Remove="Localization\Plugins\*.json" />
<EmbeddedResource Include="EasyAbp\EShop\Plugins\Localization\Plugins\*.json" />
<Content Remove="EasyAbp\EShop\Plugins\Localization\Plugins\*.json" />
</ItemGroup>
<ItemGroup>

7
modules/EasyAbp.EShop.Plugins/src/EasyAbp.EShop.Plugins.Domain.Shared/EasyAbp/EShop/Plugins/Localization/Plugins/cs.json

@ -1,7 +0,0 @@
{
"culture": "cs",
"texts": {
"Menu:EasyAbpEShop": "EShop",
}
}

3
modules/EasyAbp.EShop.Plugins/src/EasyAbp.EShop.Plugins.Domain.Shared/EasyAbp/EShop/Plugins/Localization/Plugins/en.json

@ -1,7 +1,6 @@
{
"culture": "en",
"texts": {
"Menu:EasyAbpEShop": "EShop",
"ManageYourProfile": "Manage your profile"
"Menu:EasyAbpEShop": "EShop"
}
}

7
modules/EasyAbp.EShop.Plugins/src/EasyAbp.EShop.Plugins.Domain.Shared/EasyAbp/EShop/Plugins/Localization/Plugins/pl.json

@ -1,7 +0,0 @@
{
"culture": "pl",
"texts": {
"Menu:EasyAbpEShop": "EShop",
}
}

7
modules/EasyAbp.EShop.Plugins/src/EasyAbp.EShop.Plugins.Domain.Shared/EasyAbp/EShop/Plugins/Localization/Plugins/pt-BR.json

@ -1,7 +0,0 @@
{
"culture": "pt-BR",
"texts": {
"Menu:EasyAbpEShop": "EShop",
}
}

7
modules/EasyAbp.EShop.Plugins/src/EasyAbp.EShop.Plugins.Domain.Shared/EasyAbp/EShop/Plugins/Localization/Plugins/sl.json

@ -1,7 +0,0 @@
{
"culture": "sl",
"texts": {
"Menu:EasyAbpEShop": "EShop",
"ManageYourProfile": "Upravljajte svojim profilom"
}
}

7
modules/EasyAbp.EShop.Plugins/src/EasyAbp.EShop.Plugins.Domain.Shared/EasyAbp/EShop/Plugins/Localization/Plugins/tr.json

@ -1,7 +0,0 @@
{
"culture": "tr",
"texts": {
"Menu:EasyAbpEShop": "EShop",
"ManageYourProfile": "Profil y�netimi"
}
}

7
modules/EasyAbp.EShop.Plugins/src/EasyAbp.EShop.Plugins.Domain.Shared/EasyAbp/EShop/Plugins/Localization/Plugins/vi.json

@ -1,7 +0,0 @@
{
"culture": "vi",
"texts": {
"Menu:EasyAbpEShop": "EShop",
}
}

3
modules/EasyAbp.EShop.Plugins/src/EasyAbp.EShop.Plugins.Domain.Shared/EasyAbp/EShop/Plugins/Localization/Plugins/zh-Hans.json

@ -1,7 +1,6 @@
{
"culture": "zh-Hans",
"texts": {
"Menu:EasyAbpEShop": "EShop 商城",
"ManageYourProfile": "管理个人资料"
"Menu:EasyAbpEShop": "EShop 商城"
}
}

3
modules/EasyAbp.EShop.Plugins/src/EasyAbp.EShop.Plugins.Domain.Shared/EasyAbp/EShop/Plugins/Localization/Plugins/zh-Hant.json

@ -1,7 +1,6 @@
{
"culture": "zh-Hant",
"texts": {
"Menu:EasyAbpEShop": "EShop 商城",
"ManageYourProfile": "管理個人資料"
"Menu:EasyAbpEShop": "EShop 商城"
}
}

16
modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Application/EasyAbp/EShop/Products/ProductCategories/ProductCategoryAppService.cs

@ -8,11 +8,12 @@ using Volo.Abp.Application.Services;
namespace EasyAbp.EShop.Products.ProductCategories
{
public class ProductCategoryAppService : ReadOnlyAppService<ProductCategory, ProductCategoryDto, Guid, GetProductCategoryListDto>,
public class ProductCategoryAppService :
ReadOnlyAppService<ProductCategory, ProductCategoryDto, Guid, GetProductCategoryListDto>,
IProductCategoryAppService
{
protected override string GetListPolicyName { get; set; } = ProductsPermissions.Products.Manage;
private readonly IProductCategoryRepository _repository;
public ProductCategoryAppService(IProductCategoryRepository repository) : base(repository)
@ -20,10 +21,11 @@ namespace EasyAbp.EShop.Products.ProductCategories
_repository = repository;
}
protected override async Task<IQueryable<ProductCategory>> CreateFilteredQueryAsync(GetProductCategoryListDto input)
protected override async Task<IQueryable<ProductCategory>> CreateFilteredQueryAsync(
GetProductCategoryListDto input)
{
var queryable = await Repository.GetQueryableAsync();
if (input.CategoryId.HasValue)
{
queryable = queryable.Where(x => x.CategoryId == input.CategoryId);
@ -37,6 +39,12 @@ namespace EasyAbp.EShop.Products.ProductCategories
return queryable;
}
protected override IQueryable<ProductCategory> ApplyDefaultSorting(IQueryable<ProductCategory> query)
{
return query.OrderBy(x => x.DisplayOrder)
.ThenBy(x => x.Id);
}
[RemoteService(false)]
public override Task<ProductCategoryDto> GetAsync(Guid id)
{

17
modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Application/EasyAbp/EShop/Products/Products/ProductAppService.cs

@ -64,6 +64,19 @@ namespace EasyAbp.EShop.Products.Products
.WhereIf(!input.ShowUnpublished, x => x.IsPublished);
}
protected override IQueryable<Product> ApplyDefaultSorting(IQueryable<Product> query)
{
return query.OrderBy(x => x.DisplayOrder)
.ThenBy(x => x.Id);
}
protected override Product MapToEntity(CreateUpdateProductDto createInput)
{
var product = base.MapToEntity(createInput);
return product;
}
public override async Task<ProductDto> CreateAsync(CreateUpdateProductDto input)
{
var product = await MapToEntityAsync(input);
@ -474,12 +487,12 @@ namespace EasyAbp.EShop.Products.Products
protected virtual ProductDto SortAttributesAndOptions(ProductDto productDto)
{
productDto.ProductAttributes = productDto.ProductAttributes.OrderByDescending(x => x.DisplayOrder).ToList();
productDto.ProductAttributes = productDto.ProductAttributes.OrderBy(x => x.DisplayOrder).ToList();
foreach (var productAttributeDto in productDto.ProductAttributes)
{
productAttributeDto.ProductAttributeOptions = productAttributeDto.ProductAttributeOptions
.OrderByDescending(x => x.DisplayOrder).ToList();
.OrderBy(x => x.DisplayOrder).ToList();
}
return productDto;

27
modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Application/EasyAbp/EShop/Products/Products/ProductViewAppService.cs

@ -15,7 +15,8 @@ using Volo.Abp.Uow;
namespace EasyAbp.EShop.Products.Products
{
public class ProductViewAppService : MultiStoreReadOnlyAppService<ProductView, ProductViewDto, Guid, GetProductListInput>,
public class ProductViewAppService :
MultiStoreReadOnlyAppService<ProductView, ProductViewDto, Guid, GetProductListInput>,
IProductViewAppService
{
protected override string GetPolicyName { get; set; } = null;
@ -27,7 +28,7 @@ namespace EasyAbp.EShop.Products.Products
private readonly IProductManager _productManager;
private readonly IProductRepository _productRepository;
private readonly IProductViewRepository _repository;
public ProductViewAppService(
IProductViewCacheKeyProvider productViewCacheKeyProvider,
IDistributedCache<ProductViewCacheItem> cache,
@ -41,7 +42,7 @@ namespace EasyAbp.EShop.Products.Products
_productRepository = productRepository;
_repository = repository;
}
protected override async Task<IQueryable<ProductView>> CreateFilteredQueryAsync(GetProductListInput input)
{
var query = input.CategoryId.HasValue
@ -54,10 +55,16 @@ namespace EasyAbp.EShop.Products.Products
.WhereIf(!input.ShowUnpublished, x => x.IsPublished);
}
protected override IQueryable<ProductView> ApplyDefaultSorting(IQueryable<ProductView> query)
{
return query.OrderBy(x => x.DisplayOrder)
.ThenBy(x => x.Id);
}
public override async Task<PagedResultDto<ProductViewDto>> GetListAsync(GetProductListInput input)
{
await CheckGetListPolicyAsync();
if (input.ShowHidden || input.ShowUnpublished)
{
await CheckMultiStorePolicyAsync(input.StoreId, ProductsPermissions.Products.Manage);
@ -67,7 +74,7 @@ namespace EasyAbp.EShop.Products.Products
{
await BuildStoreProductViewsAsync(input.StoreId);
}
var query = await CreateFilteredQueryAsync(input);
var totalCount = await AsyncExecuter.CountAsync(query);
@ -103,7 +110,7 @@ namespace EasyAbp.EShop.Products.Products
await BuildStoreProductViewsAsync(productView.StoreId);
productView = await GetEntityByIdAsync(id);
return await MapToGetOutputDtoAsync(productView);
}
@ -120,7 +127,7 @@ namespace EasyAbp.EShop.Products.Products
var productView = ObjectMapper.Map<Product, ProductView>(product);
await FillPriceInfoWithRealPriceAsync(product, productView);
await _repository.InsertAsync(productView);
}
@ -134,7 +141,7 @@ namespace EasyAbp.EShop.Products.Products
await SettingProvider.GetOrNullAsync(ProductsSettings.ProductView.CacheDurationSeconds)))
});
}
protected virtual async Task FillPriceInfoWithRealPriceAsync(Product product, ProductView productView)
{
if (product.ProductSkus.IsNullOrEmpty())
@ -143,7 +150,7 @@ namespace EasyAbp.EShop.Products.Products
}
decimal? min = null, max = null;
foreach (var productSku in product.ProductSkus)
{
var priceDataModel = await _productManager.GetRealPriceAsync(product, productSku);
@ -162,4 +169,4 @@ namespace EasyAbp.EShop.Products.Products
productView.SetPrices(min, max);
}
}
}
}

101
modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Domain.Shared/EasyAbp/EShop/Products/Localization/Products/cs.json

@ -1,101 +0,0 @@
{
"culture": "cs",
"texts": {
"Menu:EasyAbpEShop": "EShop",
"Menu:ProductManagement": "Products",
"Menu:Product": "Product",
"Product": "Product",
"ProductStoreId": "Store ID",
"ProductCategoryId": "Category ID",
"ProductProductGroupName": "Product group name",
"ProductProductGroupDisplayName": "Product group",
"ProductDetailId": "Product detail ID",
"ProductUniqueName": "Unique name",
"ProductDisplayName": "Display name",
"ProductDisplayOrder": "Display order",
"ProductSold": "Sold",
"ProductDetailDescription": "Description",
"ProductCategory": "Categories",
"ProductAttribute": "Attribute",
"ProductAttributeNames": "Attribute names",
"ProductAttributeNamesPlaceholder": "e.g. Color,Size",
"ProductAttributeOption": "Attribute option",
"ProductAttributeOptionNames": "Attribute option names",
"ProductAttributeOptionNamesPlaceholder": "e.g.\nRed,Green,Blue\nS,M,L,XL",
"ProductSku": "Product SKU",
"ProductSkuAttributeOptionIds": "Attribute option IDs",
"ProductSkuName": "SKU name",
"ProductSkuCurrency": "Currency",
"ProductSkuOriginalPrice": "Original price",
"ProductSkuPrice": "Price",
"ProductSkuInventory": "Inventory",
"ProductSkuSold": "Sold",
"ProductSkuOrderMinQuantity": "Minimum quantity per purchase",
"ProductSkuOrderMaxQuantity": "Maximum quantity per purchase",
"ProductSkuPaymentExpireIn": "Payment expire in",
"ProductSkuMediaResources": "Media resources",
"ProductSkuContentDescription": "SKU content",
"ProductSkuProductDetailDescriptionPlaceholder": "Fallback to details of the product if you keep null here.",
"CreateProductSku": "New",
"EditProductSku": "Edit",
"ProductSkuDeletionConfirmationMessage": "Are you sure to delete the product SKU {0}?",
"ProductInventoryStrategy": "Inventory strategy",
"ProductInventoryProviderName": "Inventory provider",
"ProductInventoryProviderNamePlaceholder": "Keep it empty if you don't understand",
"InventoryStrategy.NoNeed": "No need",
"InventoryStrategy.ReduceAfterPlacing": "Reduce inventory after placing",
"InventoryStrategy.ReduceAfterPayment": "Reduce inventory after payment",
"ProductIsPublished": "Published",
"ProductIsStatic": "Static",
"ProductIsHidden": "Hidden",
"ProductPaymentExpireIn": "Payment expire in",
"ProductMediaResources": "Media resources",
"ProductAttributeDisplayName": "Display name",
"ProductAttributeDescription": "Description",
"ProductAttributeDisplayOrder": "Display order",
"ProductAttributeOptionDisplayName": "Display name",
"ProductAttributeOptionDescription": "Description",
"ProductAttributeOptionDisplayOrder": "Display order",
"CreateProduct": "New",
"EditProduct": "Edit",
"ProductDeletionConfirmationMessage": "Are you sure to delete the product {0}?",
"SuccessfullyDeleted": "Successfully deleted",
"CouponType.Normal": "Normal (X discount)",
"CouponType.PerMeet": "PerMeet (X discount for every Y)",
"CouponType.Custom": "Custom",
"Menu:Category": "Category",
"Category": "Category",
"Subcategory": "Subcategory",
"CategoryParentId": "Parent ID",
"CategoryUniqueName": "Unique name",
"CategoryDisplayName": "Display name",
"CategoryDescription": "Description",
"CategoryMediaResources": "Media resources",
"CategoryIsHidden": "Hidden",
"CreateCategory": "New",
"EditCategory": "Edit",
"CategoryDeletionConfirmationMessage": "Are you sure to delete the category {0}?",
"Permission:ProductInventory": "Product inventory",
"ProductInventory": "Product inventory",
"ProductInventoryChangedInventory": "Changed inventory",
"ProductInventoryChangeType": "Change type",
"IncreaseInventory": "Increase",
"DecreaseInventory": "Decrease",
"ProductInventoryInventory": "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:NonexistentInventoryProvider": "The specified inventory provider ({inventoryProviderName}) is nonexistent.",
"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:ProductSkuIncorrectAttributeOptions": "Sku {serializedAttributeOptionIds} is incorrect for the product {productId}",
"EasyAbp.EShop.Products:NotAllowedToGetCategoryListWithShowHidden": "You have no permission to get category list with hidden categories.",
"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}."
}
}

1
modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Domain.Shared/EasyAbp/EShop/Products/Localization/Products/en.json

@ -3,7 +3,6 @@
"texts": {
"Menu:EasyAbpEShop": "EShop",
"Menu:ProductManagement": "Products",
"ManageYourProfile": "Manage your profile",
"Menu:Product": "Product",
"Product": "Product",
"ProductStoreId": "Store ID",

101
modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Domain.Shared/EasyAbp/EShop/Products/Localization/Products/pl.json

@ -1,101 +0,0 @@
{
"culture": "pl",
"texts": {
"Menu:EasyAbpEShop": "EShop",
"Menu:ProductManagement": "Products",
"Menu:Product": "Product",
"Product": "Product",
"ProductStoreId": "Store ID",
"ProductCategoryId": "Category ID",
"ProductProductGroupName": "Product group name",
"ProductProductGroupDisplayName": "Product group",
"ProductDetailId": "Product detail ID",
"ProductUniqueName": "Unique name",
"ProductDisplayName": "Display name",
"ProductDisplayOrder": "Display order",
"ProductSold": "Sold",
"ProductDetailDescription": "Description",
"ProductCategory": "Categories",
"ProductAttribute": "Attribute",
"ProductAttributeNames": "Attribute names",
"ProductAttributeNamesPlaceholder": "e.g. Color,Size",
"ProductAttributeOption": "Attribute option",
"ProductAttributeOptionNames": "Attribute option names",
"ProductAttributeOptionNamesPlaceholder": "e.g.\nRed,Green,Blue\nS,M,L,XL",
"ProductSku": "Product SKU",
"ProductSkuAttributeOptionIds": "Attribute option IDs",
"ProductSkuName": "SKU name",
"ProductSkuCurrency": "Currency",
"ProductSkuOriginalPrice": "Original price",
"ProductSkuPrice": "Price",
"ProductSkuInventory": "Inventory",
"ProductSkuSold": "Sold",
"ProductSkuOrderMinQuantity": "Minimum quantity per purchase",
"ProductSkuOrderMaxQuantity": "Maximum quantity per purchase",
"ProductSkuPaymentExpireIn": "Payment expire in",
"ProductSkuMediaResources": "Media resources",
"ProductSkuContentDescription": "SKU content",
"ProductSkuProductDetailDescriptionPlaceholder": "Fallback to details of the product if you keep null here.",
"CreateProductSku": "New",
"EditProductSku": "Edit",
"ProductSkuDeletionConfirmationMessage": "Are you sure to delete the product SKU {0}?",
"ProductInventoryStrategy": "Inventory strategy",
"ProductInventoryProviderName": "Inventory provider",
"ProductInventoryProviderNamePlaceholder": "Keep it empty if you don't understand",
"InventoryStrategy.NoNeed": "No need",
"InventoryStrategy.ReduceAfterPlacing": "Reduce inventory after placing",
"InventoryStrategy.ReduceAfterPayment": "Reduce inventory after payment",
"ProductIsPublished": "Published",
"ProductIsStatic": "Static",
"ProductIsHidden": "Hidden",
"ProductPaymentExpireIn": "Payment expire in",
"ProductMediaResources": "Media resources",
"ProductAttributeDisplayName": "Display name",
"ProductAttributeDescription": "Description",
"ProductAttributeDisplayOrder": "Display order",
"ProductAttributeOptionDisplayName": "Display name",
"ProductAttributeOptionDescription": "Description",
"ProductAttributeOptionDisplayOrder": "Display order",
"CreateProduct": "New",
"EditProduct": "Edit",
"ProductDeletionConfirmationMessage": "Are you sure to delete the product {0}?",
"SuccessfullyDeleted": "Successfully deleted",
"CouponType.Normal": "Normal (X discount)",
"CouponType.PerMeet": "PerMeet (X discount for every Y)",
"CouponType.Custom": "Custom",
"Menu:Category": "Category",
"Category": "Category",
"Subcategory": "Subcategory",
"CategoryParentId": "Parent ID",
"CategoryUniqueName": "Unique name",
"CategoryDisplayName": "Display name",
"CategoryDescription": "Description",
"CategoryMediaResources": "Media resources",
"CategoryIsHidden": "Hidden",
"CreateCategory": "New",
"EditCategory": "Edit",
"CategoryDeletionConfirmationMessage": "Are you sure to delete the category {0}?",
"Permission:ProductInventory": "Product inventory",
"ProductInventory": "Product inventory",
"ProductInventoryChangedInventory": "Changed inventory",
"ProductInventoryChangeType": "Change type",
"IncreaseInventory": "Increase",
"DecreaseInventory": "Decrease",
"ProductInventoryInventory": "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:NonexistentInventoryProvider": "The specified inventory provider ({inventoryProviderName}) is nonexistent.",
"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:ProductSkuIncorrectAttributeOptions": "Sku {serializedAttributeOptionIds} is incorrect for the product {productId}",
"EasyAbp.EShop.Products:NotAllowedToGetCategoryListWithShowHidden": "You have no permission to get category list with hidden categories.",
"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}."
}
}

101
modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Domain.Shared/EasyAbp/EShop/Products/Localization/Products/pt-BR.json

@ -1,101 +0,0 @@
{
"culture": "pt-BR",
"texts": {
"Menu:EasyAbpEShop": "EShop",
"Menu:ProductManagement": "Products",
"Menu:Product": "Product",
"Product": "Product",
"ProductStoreId": "Store ID",
"ProductCategoryId": "Category ID",
"ProductProductGroupName": "Product group name",
"ProductProductGroupDisplayName": "Product group",
"ProductDetailId": "Product detail ID",
"ProductUniqueName": "Unique name",
"ProductDisplayName": "Display name",
"ProductDisplayOrder": "Display order",
"ProductSold": "Sold",
"ProductDetailDescription": "Description",
"ProductCategory": "Categories",
"ProductAttribute": "Attribute",
"ProductAttributeNames": "Attribute names",
"ProductAttributeNamesPlaceholder": "e.g. Color,Size",
"ProductAttributeOption": "Attribute option",
"ProductAttributeOptionNames": "Attribute option names",
"ProductAttributeOptionNamesPlaceholder": "e.g.\nRed,Green,Blue\nS,M,L,XL",
"ProductSku": "Product SKU",
"ProductSkuAttributeOptionIds": "Attribute option IDs",
"ProductSkuName": "SKU name",
"ProductSkuCurrency": "Currency",
"ProductSkuOriginalPrice": "Original price",
"ProductSkuPrice": "Price",
"ProductSkuInventory": "Inventory",
"ProductSkuSold": "Sold",
"ProductSkuOrderMinQuantity": "Minimum quantity per purchase",
"ProductSkuOrderMaxQuantity": "Maximum quantity per purchase",
"ProductSkuPaymentExpireIn": "Payment expire in",
"ProductSkuMediaResources": "Media resources",
"ProductSkuContentDescription": "SKU content",
"ProductSkuProductDetailDescriptionPlaceholder": "Fallback to details of the product if you keep null here.",
"CreateProductSku": "New",
"EditProductSku": "Edit",
"ProductSkuDeletionConfirmationMessage": "Are you sure to delete the product SKU {0}?",
"ProductInventoryStrategy": "Inventory strategy",
"ProductInventoryProviderName": "Inventory provider",
"ProductInventoryProviderNamePlaceholder": "Keep it empty if you don't understand",
"InventoryStrategy.NoNeed": "No need",
"InventoryStrategy.ReduceAfterPlacing": "Reduce inventory after placing",
"InventoryStrategy.ReduceAfterPayment": "Reduce inventory after payment",
"ProductIsPublished": "Published",
"ProductIsStatic": "Static",
"ProductIsHidden": "Hidden",
"ProductPaymentExpireIn": "Payment expire in",
"ProductMediaResources": "Media resources",
"ProductAttributeDisplayName": "Display name",
"ProductAttributeDescription": "Description",
"ProductAttributeDisplayOrder": "Display order",
"ProductAttributeOptionDisplayName": "Display name",
"ProductAttributeOptionDescription": "Description",
"ProductAttributeOptionDisplayOrder": "Display order",
"CreateProduct": "New",
"EditProduct": "Edit",
"ProductDeletionConfirmationMessage": "Are you sure to delete the product {0}?",
"SuccessfullyDeleted": "Successfully deleted",
"CouponType.Normal": "Normal (X discount)",
"CouponType.PerMeet": "PerMeet (X discount for every Y)",
"CouponType.Custom": "Custom",
"Menu:Category": "Category",
"Category": "Category",
"Subcategory": "Subcategory",
"CategoryParentId": "Parent ID",
"CategoryUniqueName": "Unique name",
"CategoryDisplayName": "Display name",
"CategoryDescription": "Description",
"CategoryMediaResources": "Media resources",
"CategoryIsHidden": "Hidden",
"CreateCategory": "New",
"EditCategory": "Edit",
"CategoryDeletionConfirmationMessage": "Are you sure to delete the category {0}?",
"Permission:ProductInventory": "Product inventory",
"ProductInventory": "Product inventory",
"ProductInventoryChangedInventory": "Changed inventory",
"ProductInventoryChangeType": "Change type",
"IncreaseInventory": "Increase",
"DecreaseInventory": "Decrease",
"ProductInventoryInventory": "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:NonexistentInventoryProvider": "The specified inventory provider ({inventoryProviderName}) is nonexistent.",
"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:ProductSkuIncorrectAttributeOptions": "Sku {serializedAttributeOptionIds} is incorrect for the product {productId}",
"EasyAbp.EShop.Products:NotAllowedToGetCategoryListWithShowHidden": "You have no permission to get category list with hidden categories.",
"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}."
}
}

102
modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Domain.Shared/EasyAbp/EShop/Products/Localization/Products/sl.json

@ -1,102 +0,0 @@
{
"culture": "sl",
"texts": {
"Menu:EasyAbpEShop": "EShop",
"Menu:ProductManagement": "Products",
"ManageYourProfile": "Upravljajte svojim profilom",
"Menu:Product": "Product",
"Product": "Product",
"ProductStoreId": "Store ID",
"ProductCategoryId": "Category ID",
"ProductProductGroupName": "Product group name",
"ProductProductGroupDisplayName": "Product group",
"ProductDetailId": "Product detail ID",
"ProductUniqueName": "Unique name",
"ProductDisplayName": "Display name",
"ProductDisplayOrder": "Display order",
"ProductSold": "Sold",
"ProductDetailDescription": "Description",
"ProductCategory": "Categories",
"ProductAttribute": "Attribute",
"ProductAttributeNames": "Attribute names",
"ProductAttributeNamesPlaceholder": "e.g. Color,Size",
"ProductAttributeOption": "Attribute option",
"ProductAttributeOptionNames": "Attribute option names",
"ProductAttributeOptionNamesPlaceholder": "e.g.\nRed,Green,Blue\nS,M,L,XL",
"ProductSku": "Product SKU",
"ProductSkuAttributeOptionIds": "Attribute option IDs",
"ProductSkuName": "SKU name",
"ProductSkuCurrency": "Currency",
"ProductSkuOriginalPrice": "Original price",
"ProductSkuPrice": "Price",
"ProductSkuInventory": "Inventory",
"ProductSkuSold": "Sold",
"ProductSkuOrderMinQuantity": "Minimum quantity per purchase",
"ProductSkuOrderMaxQuantity": "Maximum quantity per purchase",
"ProductSkuPaymentExpireIn": "Payment expire in",
"ProductSkuMediaResources": "Media resources",
"ProductSkuContentDescription": "SKU content",
"ProductSkuProductDetailDescriptionPlaceholder": "Fallback to details of the product if you keep null here.",
"CreateProductSku": "New",
"EditProductSku": "Edit",
"ProductSkuDeletionConfirmationMessage": "Are you sure to delete the product SKU {0}?",
"ProductInventoryStrategy": "Inventory strategy",
"ProductInventoryProviderName": "Inventory provider",
"ProductInventoryProviderNamePlaceholder": "Keep it empty if you don't understand",
"InventoryStrategy.NoNeed": "No need",
"InventoryStrategy.ReduceAfterPlacing": "Reduce inventory after placing",
"InventoryStrategy.ReduceAfterPayment": "Reduce inventory after payment",
"ProductIsPublished": "Published",
"ProductIsStatic": "Static",
"ProductIsHidden": "Hidden",
"ProductPaymentExpireIn": "Payment expire in",
"ProductMediaResources": "Media resources",
"ProductAttributeDisplayName": "Display name",
"ProductAttributeDescription": "Description",
"ProductAttributeDisplayOrder": "Display order",
"ProductAttributeOptionDisplayName": "Display name",
"ProductAttributeOptionDescription": "Description",
"ProductAttributeOptionDisplayOrder": "Display order",
"CreateProduct": "New",
"EditProduct": "Edit",
"ProductDeletionConfirmationMessage": "Are you sure to delete the product {0}?",
"SuccessfullyDeleted": "Successfully deleted",
"CouponType.Normal": "Normal (X discount)",
"CouponType.PerMeet": "PerMeet (X discount for every Y)",
"CouponType.Custom": "Custom",
"Menu:Category": "Category",
"Category": "Category",
"Subcategory": "Subcategory",
"CategoryParentId": "Parent ID",
"CategoryUniqueName": "Unique name",
"CategoryDisplayName": "Display name",
"CategoryDescription": "Description",
"CategoryMediaResources": "Media resources",
"CategoryIsHidden": "Hidden",
"CreateCategory": "New",
"EditCategory": "Edit",
"CategoryDeletionConfirmationMessage": "Are you sure to delete the category {0}?",
"Permission:ProductInventory": "Product inventory",
"ProductInventory": "Product inventory",
"ProductInventoryChangedInventory": "Changed inventory",
"ProductInventoryChangeType": "Change type",
"IncreaseInventory": "Increase",
"DecreaseInventory": "Decrease",
"ProductInventoryInventory": "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:NonexistentInventoryProvider": "The specified inventory provider ({inventoryProviderName}) is nonexistent.",
"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:ProductSkuIncorrectAttributeOptions": "Sku {serializedAttributeOptionIds} is incorrect for the product {productId}",
"EasyAbp.EShop.Products:NotAllowedToGetCategoryListWithShowHidden": "You have no permission to get category list with hidden categories.",
"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}."
}
}

102
modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Domain.Shared/EasyAbp/EShop/Products/Localization/Products/tr.json

@ -1,102 +0,0 @@
{
"culture": "tr",
"texts": {
"Menu:EasyAbpEShop": "EShop",
"Menu:ProductManagement": "Products",
"ManageYourProfile": "Profil y�netimi",
"Menu:Product": "Product",
"Product": "Product",
"ProductStoreId": "Store ID",
"ProductCategoryId": "Category ID",
"ProductProductGroupName": "Product group name",
"ProductProductGroupDisplayName": "Product group",
"ProductDetailId": "Product detail ID",
"ProductUniqueName": "Unique name",
"ProductDisplayName": "Display name",
"ProductDisplayOrder": "Display order",
"ProductSold": "Sold",
"ProductDetailDescription": "Description",
"ProductCategory": "Categories",
"ProductAttribute": "Attribute",
"ProductAttributeNames": "Attribute names",
"ProductAttributeNamesPlaceholder": "e.g. Color,Size",
"ProductAttributeOption": "Attribute option",
"ProductAttributeOptionNames": "Attribute option names",
"ProductAttributeOptionNamesPlaceholder": "e.g.\nRed,Green,Blue\nS,M,L,XL",
"ProductSku": "Product SKU",
"ProductSkuAttributeOptionIds": "Attribute option IDs",
"ProductSkuName": "SKU name",
"ProductSkuCurrency": "Currency",
"ProductSkuOriginalPrice": "Original price",
"ProductSkuPrice": "Price",
"ProductSkuInventory": "Inventory",
"ProductSkuSold": "Sold",
"ProductSkuOrderMinQuantity": "Minimum quantity per purchase",
"ProductSkuOrderMaxQuantity": "Maximum quantity per purchase",
"ProductSkuPaymentExpireIn": "Payment expire in",
"ProductSkuMediaResources": "Media resources",
"ProductSkuContentDescription": "SKU content",
"ProductSkuProductDetailDescriptionPlaceholder": "Fallback to details of the product if you keep null here.",
"CreateProductSku": "New",
"EditProductSku": "Edit",
"ProductSkuDeletionConfirmationMessage": "Are you sure to delete the product SKU {0}?",
"ProductInventoryStrategy": "Inventory strategy",
"ProductInventoryProviderName": "Inventory provider",
"ProductInventoryProviderNamePlaceholder": "Keep it empty if you don't understand",
"InventoryStrategy.NoNeed": "No need",
"InventoryStrategy.ReduceAfterPlacing": "Reduce inventory after placing",
"InventoryStrategy.ReduceAfterPayment": "Reduce inventory after payment",
"ProductIsPublished": "Published",
"ProductIsStatic": "Static",
"ProductIsHidden": "Hidden",
"ProductPaymentExpireIn": "Payment expire in",
"ProductMediaResources": "Media resources",
"ProductAttributeDisplayName": "Display name",
"ProductAttributeDescription": "Description",
"ProductAttributeDisplayOrder": "Display order",
"ProductAttributeOptionDisplayName": "Display name",
"ProductAttributeOptionDescription": "Description",
"ProductAttributeOptionDisplayOrder": "Display order",
"CreateProduct": "New",
"EditProduct": "Edit",
"ProductDeletionConfirmationMessage": "Are you sure to delete the product {0}?",
"SuccessfullyDeleted": "Successfully deleted",
"CouponType.Normal": "Normal (X discount)",
"CouponType.PerMeet": "PerMeet (X discount for every Y)",
"CouponType.Custom": "Custom",
"Menu:Category": "Category",
"Category": "Category",
"Subcategory": "Subcategory",
"CategoryParentId": "Parent ID",
"CategoryUniqueName": "Unique name",
"CategoryDisplayName": "Display name",
"CategoryDescription": "Description",
"CategoryMediaResources": "Media resources",
"CategoryIsHidden": "Hidden",
"CreateCategory": "New",
"EditCategory": "Edit",
"CategoryDeletionConfirmationMessage": "Are you sure to delete the category {0}?",
"Permission:ProductInventory": "Product inventory",
"ProductInventory": "Product inventory",
"ProductInventoryChangedInventory": "Changed inventory",
"ProductInventoryChangeType": "Change type",
"IncreaseInventory": "Increase",
"DecreaseInventory": "Decrease",
"ProductInventoryInventory": "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:NonexistentInventoryProvider": "The specified inventory provider ({inventoryProviderName}) is nonexistent.",
"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:ProductSkuIncorrectAttributeOptions": "Sku {serializedAttributeOptionIds} is incorrect for the product {productId}",
"EasyAbp.EShop.Products:NotAllowedToGetCategoryListWithShowHidden": "You have no permission to get category list with hidden categories.",
"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}."
}
}

101
modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Domain.Shared/EasyAbp/EShop/Products/Localization/Products/vi.json

@ -1,101 +0,0 @@
{
"culture": "vi",
"texts": {
"Menu:EasyAbpEShop": "EShop",
"Menu:ProductManagement": "Products",
"Menu:Product": "Product",
"Product": "Product",
"ProductStoreId": "Store ID",
"ProductCategoryId": "Category ID",
"ProductProductGroupName": "Product group name",
"ProductProductGroupDisplayName": "Product group",
"ProductDetailId": "Product detail ID",
"ProductUniqueName": "Unique name",
"ProductDisplayName": "Display name",
"ProductDisplayOrder": "Display order",
"ProductSold": "Sold",
"ProductDetailDescription": "Description",
"ProductCategory": "Categories",
"ProductAttribute": "Attribute",
"ProductAttributeNames": "Attribute names",
"ProductAttributeNamesPlaceholder": "e.g. Color,Size",
"ProductAttributeOption": "Attribute option",
"ProductAttributeOptionNames": "Attribute option names",
"ProductAttributeOptionNamesPlaceholder": "e.g.\nRed,Green,Blue\nS,M,L,XL",
"ProductSku": "Product SKU",
"ProductSkuAttributeOptionIds": "Attribute option IDs",
"ProductSkuName": "SKU name",
"ProductSkuCurrency": "Currency",
"ProductSkuOriginalPrice": "Original price",
"ProductSkuPrice": "Price",
"ProductSkuInventory": "Inventory",
"ProductSkuSold": "Sold",
"ProductSkuOrderMinQuantity": "Minimum quantity per purchase",
"ProductSkuOrderMaxQuantity": "Maximum quantity per purchase",
"ProductSkuPaymentExpireIn": "Payment expire in",
"ProductSkuMediaResources": "Media resources",
"ProductSkuContentDescription": "SKU content",
"ProductSkuProductDetailDescriptionPlaceholder": "Fallback to details of the product if you keep null here.",
"CreateProductSku": "New",
"EditProductSku": "Edit",
"ProductSkuDeletionConfirmationMessage": "Are you sure to delete the product SKU {0}?",
"ProductInventoryStrategy": "Inventory strategy",
"ProductInventoryProviderName": "Inventory provider",
"ProductInventoryProviderNamePlaceholder": "Keep it empty if you don't understand",
"InventoryStrategy.NoNeed": "No need",
"InventoryStrategy.ReduceAfterPlacing": "Reduce inventory after placing",
"InventoryStrategy.ReduceAfterPayment": "Reduce inventory after payment",
"ProductIsPublished": "Published",
"ProductIsStatic": "Static",
"ProductIsHidden": "Hidden",
"ProductPaymentExpireIn": "Payment expire in",
"ProductMediaResources": "Media resources",
"ProductAttributeDisplayName": "Display name",
"ProductAttributeDescription": "Description",
"ProductAttributeDisplayOrder": "Display order",
"ProductAttributeOptionDisplayName": "Display name",
"ProductAttributeOptionDescription": "Description",
"ProductAttributeOptionDisplayOrder": "Display order",
"CreateProduct": "New",
"EditProduct": "Edit",
"ProductDeletionConfirmationMessage": "Are you sure to delete the product {0}?",
"SuccessfullyDeleted": "Successfully deleted",
"CouponType.Normal": "Normal (X discount)",
"CouponType.PerMeet": "PerMeet (X discount for every Y)",
"CouponType.Custom": "Custom",
"Menu:Category": "Category",
"Category": "Category",
"Subcategory": "Subcategory",
"CategoryParentId": "Parent ID",
"CategoryUniqueName": "Unique name",
"CategoryDisplayName": "Display name",
"CategoryDescription": "Description",
"CategoryMediaResources": "Media resources",
"CategoryIsHidden": "Hidden",
"CreateCategory": "New",
"EditCategory": "Edit",
"CategoryDeletionConfirmationMessage": "Are you sure to delete the category {0}?",
"Permission:ProductInventory": "Product inventory",
"ProductInventory": "Product inventory",
"ProductInventoryChangedInventory": "Changed inventory",
"ProductInventoryChangeType": "Change type",
"IncreaseInventory": "Increase",
"DecreaseInventory": "Decrease",
"ProductInventoryInventory": "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:NonexistentInventoryProvider": "The specified inventory provider ({inventoryProviderName}) is nonexistent.",
"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:ProductSkuIncorrectAttributeOptions": "Sku {serializedAttributeOptionIds} is incorrect for the product {productId}",
"EasyAbp.EShop.Products:NotAllowedToGetCategoryListWithShowHidden": "You have no permission to get category list with hidden categories.",
"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}."
}
}

1
modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Domain.Shared/EasyAbp/EShop/Products/Localization/Products/zh-Hans.json

@ -3,7 +3,6 @@
"texts": {
"Menu:EasyAbpEShop": "EShop 商城",
"Menu:ProductManagement": "商品",
"ManageYourProfile": "管理个人资料",
"Menu:Product": "商品",
"Product": "商品",
"ProductStoreId": "店铺 ID",

1
modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Domain.Shared/EasyAbp/EShop/Products/Localization/Products/zh-Hant.json

@ -3,7 +3,6 @@
"texts": {
"Menu:EasyAbpEShop": "EShop 商城",
"Menu:ProductManagement": "商品",
"ManageYourProfile": "管理個人資料",
"Menu:Product": "商品",
"Product": "商品",
"ProductStoreId": "店鋪 ID",

3
modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Domain.Shared/EasyAbp/EShop/Products/Products/InventoryStrategy.cs

@ -7,6 +7,7 @@ namespace EasyAbp.EShop.Products.Products
{
NoNeed = 1,
ReduceAfterPlacing = 2,
ReduceAfterPayment = 4
ReduceAfterPayment = 4,
FlashSales = 8
}
}

2
modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Web/Menus/ProductsMenuContributor.cs

@ -41,7 +41,7 @@ namespace EasyAbp.EShop.Products.Web.Menus
if (!productManagementMenuItem.Items.IsNullOrEmpty())
{
var eShopMenuItem = context.Menu.Items.GetOrAdd(i => i.Name == ProductsMenus.ModuleGroupPrefix,
() => new ApplicationMenuItem(ProductsMenus.ModuleGroupPrefix, l["Menu:EasyAbpEShop"]));
() => new ApplicationMenuItem(ProductsMenus.ModuleGroupPrefix, l["Menu:EasyAbpEShop"], icon: "fa fa-shopping-bag"));
eShopMenuItem.Items.Add(productManagementMenuItem);
}

39
modules/EasyAbp.EShop.Stores/src/EasyAbp.EShop.Stores.Domain.Shared/EasyAbp/EShop/Stores/Localization/Stores/cs.json

@ -1,39 +0,0 @@
{
"culture": "cs",
"texts": {
"Menu:EasyAbpEShop": "EShop",
"Menu:StoreManagement": "Stores",
"Menu:Store": "Store",
"Store": "Store",
"StoreName": "Name",
"CreateStore": "New",
"EditStore": "Edit",
"StoreDeletionConfirmationMessage": "Are you sure to delete the store {0}?",
"SuccessfullyDeleted": "Successfully deleted",
"CouponType.Normal": "Normal (X discount)",
"CouponType.PerMeet": "PerMeet (X discount for every Y)",
"CouponType.Custom": "Custom",
"StoreOwner": "Store owner",
"Menu:StoreOwner": "Store owner",
"StoreOwnerUserName": "Username",
"CreateStoreOwner": "New",
"EditStoreOwner": "Edit",
"StoreOwnerDeletionConfirmationMessage": "Are you sure to delete the store owner {0}?",
"Permission:Transaction": "Transaction",
"Permission:Create": "Create",
"Permission:Update": "Update",
"Permission:Delete": "Delete",
"Menu:Transaction": "Transaction",
"Transaction": "Transaction",
"TransactionStoreId": "Store ID",
"TransactionOrderId": "Order ID",
"TransactionTransactionType": "Transaction type",
"TransactionActionName": "Action name",
"TransactionCurrency": "Currency",
"TransactionAmount": "Amount",
"CreateTransaction": "New",
"EditTransaction": "Edit",
"TransactionDeletionConfirmationMessage": "Are you sure to delete the transaction {0}?",
"EasyAbp.EShop.Stores:StoreOwnerDuplicated": "Owner {ownerUserId} is duplicate for the store {storeId}."
}
}

1
modules/EasyAbp.EShop.Stores/src/EasyAbp.EShop.Stores.Domain.Shared/EasyAbp/EShop/Stores/Localization/Stores/en.json

@ -3,7 +3,6 @@
"texts": {
"Menu:EasyAbpEShop": "EShop",
"Menu:StoreManagement": "Stores",
"ManageYourProfile": "Manage your profile",
"Menu:Store": "Store",
"Store": "Store",
"StoreName": "Name",

39
modules/EasyAbp.EShop.Stores/src/EasyAbp.EShop.Stores.Domain.Shared/EasyAbp/EShop/Stores/Localization/Stores/pl.json

@ -1,39 +0,0 @@
{
"culture": "pl",
"texts": {
"Menu:EasyAbpEShop": "EShop",
"Menu:StoreManagement": "Stores",
"Menu:Store": "Store",
"Store": "Store",
"StoreName": "Name",
"CreateStore": "New",
"EditStore": "Edit",
"StoreDeletionConfirmationMessage": "Are you sure to delete the store {0}?",
"SuccessfullyDeleted": "Successfully deleted",
"CouponType.Normal": "Normal (X discount)",
"CouponType.PerMeet": "PerMeet (X discount for every Y)",
"CouponType.Custom": "Custom",
"StoreOwner": "Store owner",
"Menu:StoreOwner": "Store owner",
"StoreOwnerUserName": "Username",
"CreateStoreOwner": "New",
"EditStoreOwner": "Edit",
"StoreOwnerDeletionConfirmationMessage": "Are you sure to delete the store owner {0}?",
"Permission:Transaction": "Transaction",
"Permission:Create": "Create",
"Permission:Update": "Update",
"Permission:Delete": "Delete",
"Menu:Transaction": "Transaction",
"Transaction": "Transaction",
"TransactionStoreId": "Store ID",
"TransactionOrderId": "Order ID",
"TransactionTransactionType": "Transaction type",
"TransactionActionName": "Action name",
"TransactionCurrency": "Currency",
"TransactionAmount": "Amount",
"CreateTransaction": "New",
"EditTransaction": "Edit",
"TransactionDeletionConfirmationMessage": "Are you sure to delete the transaction {0}?",
"EasyAbp.EShop.Stores:StoreOwnerDuplicated": "Owner {ownerUserId} is duplicate for the store {storeId}."
}
}

39
modules/EasyAbp.EShop.Stores/src/EasyAbp.EShop.Stores.Domain.Shared/EasyAbp/EShop/Stores/Localization/Stores/pt-BR.json

@ -1,39 +0,0 @@
{
"culture": "pt-BR",
"texts": {
"Menu:EasyAbpEShop": "EShop",
"Menu:StoreManagement": "Stores",
"Menu:Store": "Store",
"Store": "Store",
"StoreName": "Name",
"CreateStore": "New",
"EditStore": "Edit",
"StoreDeletionConfirmationMessage": "Are you sure to delete the store {0}?",
"SuccessfullyDeleted": "Successfully deleted",
"CouponType.Normal": "Normal (X discount)",
"CouponType.PerMeet": "PerMeet (X discount for every Y)",
"CouponType.Custom": "Custom",
"StoreOwner": "Store owner",
"Menu:StoreOwner": "Store owner",
"StoreOwnerUserName": "Username",
"CreateStoreOwner": "New",
"EditStoreOwner": "Edit",
"StoreOwnerDeletionConfirmationMessage": "Are you sure to delete the store owner {0}?",
"Permission:Transaction": "Transaction",
"Permission:Create": "Create",
"Permission:Update": "Update",
"Permission:Delete": "Delete",
"Menu:Transaction": "Transaction",
"Transaction": "Transaction",
"TransactionStoreId": "Store ID",
"TransactionOrderId": "Order ID",
"TransactionTransactionType": "Transaction type",
"TransactionActionName": "Action name",
"TransactionCurrency": "Currency",
"TransactionAmount": "Amount",
"CreateTransaction": "New",
"EditTransaction": "Edit",
"TransactionDeletionConfirmationMessage": "Are you sure to delete the transaction {0}?",
"EasyAbp.EShop.Stores:StoreOwnerDuplicated": "Owner {ownerUserId} is duplicate for the store {storeId}."
}
}

40
modules/EasyAbp.EShop.Stores/src/EasyAbp.EShop.Stores.Domain.Shared/EasyAbp/EShop/Stores/Localization/Stores/sl.json

@ -1,40 +0,0 @@
{
"culture": "sl",
"texts": {
"Menu:EasyAbpEShop": "EShop",
"Menu:StoreManagement": "Stores",
"ManageYourProfile": "Upravljajte svojim profilom",
"Menu:Store": "Store",
"Store": "Store",
"StoreName": "Name",
"CreateStore": "New",
"EditStore": "Edit",
"StoreDeletionConfirmationMessage": "Are you sure to delete the store {0}?",
"SuccessfullyDeleted": "Successfully deleted",
"CouponType.Normal": "Normal (X discount)",
"CouponType.PerMeet": "PerMeet (X discount for every Y)",
"CouponType.Custom": "Custom",
"StoreOwner": "Store owner",
"Menu:StoreOwner": "Store owner",
"StoreOwnerUserName": "Username",
"CreateStoreOwner": "New",
"EditStoreOwner": "Edit",
"StoreOwnerDeletionConfirmationMessage": "Are you sure to delete the store owner {0}?",
"Permission:Transaction": "Transaction",
"Permission:Create": "Create",
"Permission:Update": "Update",
"Permission:Delete": "Delete",
"Menu:Transaction": "Transaction",
"Transaction": "Transaction",
"TransactionStoreId": "Store ID",
"TransactionOrderId": "Order ID",
"TransactionTransactionType": "Transaction type",
"TransactionActionName": "Action name",
"TransactionCurrency": "Currency",
"TransactionAmount": "Amount",
"CreateTransaction": "New",
"EditTransaction": "Edit",
"TransactionDeletionConfirmationMessage": "Are you sure to delete the transaction {0}?",
"EasyAbp.EShop.Stores:StoreOwnerDuplicated": "Owner {ownerUserId} is duplicate for the store {storeId}."
}
}

40
modules/EasyAbp.EShop.Stores/src/EasyAbp.EShop.Stores.Domain.Shared/EasyAbp/EShop/Stores/Localization/Stores/tr.json

@ -1,40 +0,0 @@
{
"culture": "tr",
"texts": {
"Menu:EasyAbpEShop": "EShop",
"Menu:StoreManagement": "Stores",
"ManageYourProfile": "Profil y�netimi",
"Menu:Store": "Store",
"Store": "Store",
"StoreName": "Name",
"CreateStore": "New",
"EditStore": "Edit",
"StoreDeletionConfirmationMessage": "Are you sure to delete the store {0}?",
"SuccessfullyDeleted": "Successfully deleted",
"CouponType.Normal": "Normal (X discount)",
"CouponType.PerMeet": "PerMeet (X discount for every Y)",
"CouponType.Custom": "Custom",
"StoreOwner": "Store owner",
"Menu:StoreOwner": "Store owner",
"StoreOwnerUserName": "Username",
"CreateStoreOwner": "New",
"EditStoreOwner": "Edit",
"StoreOwnerDeletionConfirmationMessage": "Are you sure to delete the store owner {0}?",
"Permission:Transaction": "Transaction",
"Permission:Create": "Create",
"Permission:Update": "Update",
"Permission:Delete": "Delete",
"Menu:Transaction": "Transaction",
"Transaction": "Transaction",
"TransactionStoreId": "Store ID",
"TransactionOrderId": "Order ID",
"TransactionTransactionType": "Transaction type",
"TransactionActionName": "Action name",
"TransactionCurrency": "Currency",
"TransactionAmount": "Amount",
"CreateTransaction": "New",
"EditTransaction": "Edit",
"TransactionDeletionConfirmationMessage": "Are you sure to delete the transaction {0}?",
"EasyAbp.EShop.Stores:StoreOwnerDuplicated": "Owner {ownerUserId} is duplicate for the store {storeId}."
}
}

39
modules/EasyAbp.EShop.Stores/src/EasyAbp.EShop.Stores.Domain.Shared/EasyAbp/EShop/Stores/Localization/Stores/vi.json

@ -1,39 +0,0 @@
{
"culture": "vi",
"texts": {
"Menu:EasyAbpEShop": "EShop",
"Menu:StoreManagement": "Stores",
"Menu:Store": "Store",
"Store": "Store",
"StoreName": "Name",
"CreateStore": "New",
"EditStore": "Edit",
"StoreDeletionConfirmationMessage": "Are you sure to delete the store {0}?",
"SuccessfullyDeleted": "Successfully deleted",
"CouponType.Normal": "Normal (X discount)",
"CouponType.PerMeet": "PerMeet (X discount for every Y)",
"CouponType.Custom": "Custom",
"StoreOwner": "Store owner",
"Menu:StoreOwner": "Store owner",
"StoreOwnerUserName": "Username",
"CreateStoreOwner": "New",
"EditStoreOwner": "Edit",
"StoreOwnerDeletionConfirmationMessage": "Are you sure to delete the store owner {0}?",
"Permission:Transaction": "Transaction",
"Permission:Create": "Create",
"Permission:Update": "Update",
"Permission:Delete": "Delete",
"Menu:Transaction": "Transaction",
"Transaction": "Transaction",
"TransactionStoreId": "Store ID",
"TransactionOrderId": "Order ID",
"TransactionTransactionType": "Transaction type",
"TransactionActionName": "Action name",
"TransactionCurrency": "Currency",
"TransactionAmount": "Amount",
"CreateTransaction": "New",
"EditTransaction": "Edit",
"TransactionDeletionConfirmationMessage": "Are you sure to delete the transaction {0}?",
"EasyAbp.EShop.Stores:StoreOwnerDuplicated": "Owner {ownerUserId} is duplicate for the store {storeId}."
}
}

1
modules/EasyAbp.EShop.Stores/src/EasyAbp.EShop.Stores.Domain.Shared/EasyAbp/EShop/Stores/Localization/Stores/zh-Hans.json

@ -3,7 +3,6 @@
"texts": {
"Menu:EasyAbpEShop": "EShop 商城",
"Menu:StoreManagement": "店铺",
"ManageYourProfile": "管理个人资料",
"Menu:Store": "店铺",
"Store": "店铺",
"StoreName": "店铺名称",

1
modules/EasyAbp.EShop.Stores/src/EasyAbp.EShop.Stores.Domain.Shared/EasyAbp/EShop/Stores/Localization/Stores/zh-Hant.json

@ -3,7 +3,6 @@
"texts": {
"Menu:EasyAbpEShop": "EShop 商城",
"Menu:StoreManagement": "店鋪",
"ManageYourProfile": "管理個人資料",
"Menu:Store": "店鋪",
"Store": "店鋪",
"StoreName": "店鋪名稱",

4
modules/EasyAbp.EShop.Stores/src/EasyAbp.EShop.Stores.Domain/EasyAbp/EShop/Stores/StoresDataSeedContributor.cs

@ -15,8 +15,8 @@ namespace EasyAbp.EShop.Stores
_storeDataSeeder = storeDataSeeder;
}
[UnitOfWork(true)]
public async Task SeedAsync(DataSeedContext context)
[UnitOfWork]
public virtual async Task SeedAsync(DataSeedContext context)
{
await _storeDataSeeder.SeedAsync(context);
}

2
modules/EasyAbp.EShop.Stores/src/EasyAbp.EShop.Stores.Web/Menus/StoresMenuContributor.cs

@ -51,7 +51,7 @@ namespace EasyAbp.EShop.Stores.Web.Menus
if (!storeManagementMenuItem.Items.IsNullOrEmpty())
{
var eShopMenuItem = context.Menu.Items.GetOrAdd(i => i.Name == StoresMenus.ModuleGroupPrefix,
() => new ApplicationMenuItem(StoresMenus.ModuleGroupPrefix, l["Menu:EasyAbpEShop"]));
() => new ApplicationMenuItem(StoresMenus.ModuleGroupPrefix, l["Menu:EasyAbpEShop"], icon: "fa fa-shopping-bag"));
eShopMenuItem.Items.Add(storeManagementMenuItem);
}

33
plugins/Baskets/src/EasyAbp.EShop.Plugins.Baskets.Domain.Shared/EasyAbp/EShop/Plugins/Baskets/Localization/cs.json

@ -1,33 +0,0 @@
{
"culture": "cs",
"texts": {
"Menu:EasyAbpEShop": "EShop",
"Menu:BasketManagement": "Baskets",
"ManageYourProfile": "Spravovat profil",
"Permission:BasketItem": "Basket item",
"Menu:BasketItem": "Basket item",
"BasketItem": "Basket item",
"BasketItemBasketName": "Basket name",
"BasketItemUserId": "User ID",
"BasketItemStoreId": "Store ID",
"BasketItemProductId": "Product ID",
"BasketItemProductSkuId": "Product SKU ID",
"BasketItemQuantity": "Quantity",
"BasketItemMediaResources": "Media resources",
"BasketItemProductUniqueName": "Product unique name",
"BasketItemProductDisplayName": "Product display name",
"BasketItemSkuName": "SKU name",
"BasketItemSkuDescription": "SKU description",
"BasketItemCurrency": "Currency",
"BasketItemUnitPrice": "Unit price",
"BasketItemTotalPrice": "Total price",
"BasketItemTotalDiscount": "Total discount",
"BasketItemInventory": "Inventory",
"BasketItemIsInvalid": "Invalid",
"CreateBasketItem": "New",
"EditBasketItem": "Edit",
"BasketItemDeletionConfirmationMessage": "Are you sure to delete the basket item {0}?",
"SuccessfullyDeleted": "Successfully deleted",
"EasyAbp.EShop.Plugins.Baskets:ProductSkuNotFound": "Product {productId} (SKU: {productSkuId}) not found."
}
}

1
plugins/Baskets/src/EasyAbp.EShop.Plugins.Baskets.Domain.Shared/EasyAbp/EShop/Plugins/Baskets/Localization/en.json

@ -3,7 +3,6 @@
"texts": {
"Menu:EasyAbpEShop": "EShop",
"Menu:BasketManagement": "Baskets",
"ManageYourProfile": "Manage your profile",
"Permission:BasketItem": "Basket item",
"Menu:BasketItem": "Basket item",
"BasketItem": "Basket item",

32
plugins/Baskets/src/EasyAbp.EShop.Plugins.Baskets.Domain.Shared/EasyAbp/EShop/Plugins/Baskets/Localization/pl-PL.json

@ -1,32 +0,0 @@
{
"culture": "pl-PL",
"texts": {
"Menu:EasyAbpEShop": "EShop",
"Menu:BasketManagement": "Baskets",
"Permission:BasketItem": "Basket item",
"Menu:BasketItem": "Basket item",
"BasketItem": "Basket item",
"BasketItemBasketName": "Basket name",
"BasketItemUserId": "User ID",
"BasketItemStoreId": "Store ID",
"BasketItemProductId": "Product ID",
"BasketItemProductSkuId": "Product SKU ID",
"BasketItemQuantity": "Quantity",
"BasketItemMediaResources": "Media resources",
"BasketItemProductUniqueName": "Product unique name",
"BasketItemProductDisplayName": "Product display name",
"BasketItemSkuName": "SKU name",
"BasketItemSkuDescription": "SKU description",
"BasketItemCurrency": "Currency",
"BasketItemUnitPrice": "Unit price",
"BasketItemTotalPrice": "Total price",
"BasketItemTotalDiscount": "Total discount",
"BasketItemInventory": "Inventory",
"BasketItemIsInvalid": "Invalid",
"CreateBasketItem": "New",
"EditBasketItem": "Edit",
"BasketItemDeletionConfirmationMessage": "Are you sure to delete the basket item {0}?",
"SuccessfullyDeleted": "Successfully deleted",
"EasyAbp.EShop.Plugins.Baskets:ProductSkuNotFound": "Product {productId} (SKU: {productSkuId}) not found."
}
}

32
plugins/Baskets/src/EasyAbp.EShop.Plugins.Baskets.Domain.Shared/EasyAbp/EShop/Plugins/Baskets/Localization/pt-BR.json

@ -1,32 +0,0 @@
{
"culture": "pt-BR",
"texts": {
"Menu:EasyAbpEShop": "EShop",
"Menu:BasketManagement": "Baskets",
"Permission:BasketItem": "Basket item",
"Menu:BasketItem": "Basket item",
"BasketItem": "Basket item",
"BasketItemBasketName": "Basket name",
"BasketItemUserId": "User ID",
"BasketItemStoreId": "Store ID",
"BasketItemProductId": "Product ID",
"BasketItemProductSkuId": "Product SKU ID",
"BasketItemQuantity": "Quantity",
"BasketItemMediaResources": "Media resources",
"BasketItemProductUniqueName": "Product unique name",
"BasketItemProductDisplayName": "Product display name",
"BasketItemSkuName": "SKU name",
"BasketItemSkuDescription": "SKU description",
"BasketItemCurrency": "Currency",
"BasketItemUnitPrice": "Unit price",
"BasketItemTotalPrice": "Total price",
"BasketItemTotalDiscount": "Total discount",
"BasketItemInventory": "Inventory",
"BasketItemIsInvalid": "Invalid",
"CreateBasketItem": "New",
"EditBasketItem": "Edit",
"BasketItemDeletionConfirmationMessage": "Are you sure to delete the basket item {0}?",
"SuccessfullyDeleted": "Successfully deleted",
"EasyAbp.EShop.Plugins.Baskets:ProductSkuNotFound": "Product {productId} (SKU: {productSkuId}) not found."
}
}

33
plugins/Baskets/src/EasyAbp.EShop.Plugins.Baskets.Domain.Shared/EasyAbp/EShop/Plugins/Baskets/Localization/sl.json

@ -1,33 +0,0 @@
{
"culture": "sl",
"texts": {
"Menu:EasyAbpEShop": "EShop",
"Menu:BasketManagement": "Baskets",
"ManageYourProfile": "Upravljajte svojim profilom",
"Permission:BasketItem": "Basket item",
"Menu:BasketItem": "Basket item",
"BasketItem": "Basket item",
"BasketItemBasketName": "Basket name",
"BasketItemUserId": "User ID",
"BasketItemStoreId": "Store ID",
"BasketItemProductId": "Product ID",
"BasketItemProductSkuId": "Product SKU ID",
"BasketItemQuantity": "Quantity",
"BasketItemMediaResources": "Media resources",
"BasketItemProductUniqueName": "Product unique name",
"BasketItemProductDisplayName": "Product display name",
"BasketItemSkuName": "SKU name",
"BasketItemSkuDescription": "SKU description",
"BasketItemCurrency": "Currency",
"BasketItemUnitPrice": "Unit price",
"BasketItemTotalPrice": "Total price",
"BasketItemTotalDiscount": "Total discount",
"BasketItemInventory": "Inventory",
"BasketItemIsInvalid": "Invalid",
"CreateBasketItem": "New",
"EditBasketItem": "Edit",
"BasketItemDeletionConfirmationMessage": "Are you sure to delete the basket item {0}?",
"SuccessfullyDeleted": "Successfully deleted",
"EasyAbp.EShop.Plugins.Baskets:ProductSkuNotFound": "Product {productId} (SKU: {productSkuId}) not found."
}
}

34
plugins/Baskets/src/EasyAbp.EShop.Plugins.Baskets.Domain.Shared/EasyAbp/EShop/Plugins/Baskets/Localization/tr.json

@ -1,34 +0,0 @@
{
"culture": "tr",
"texts": {
"Menu:EasyAbpEShop": "EShop",
"Menu:BasketManagement": "Baskets",
"ManageYourProfile": "Profil yönetimi",
"SamplePageMessage": "Baskets modulünden örnek bir sayfa",
"Permission:BasketItem": "Basket item",
"Menu:BasketItem": "Basket item",
"BasketItem": "Basket item",
"BasketItemBasketName": "Basket name",
"BasketItemUserId": "User ID",
"BasketItemStoreId": "Store ID",
"BasketItemProductId": "Product ID",
"BasketItemProductSkuId": "Product SKU ID",
"BasketItemQuantity": "Quantity",
"BasketItemMediaResources": "Media resources",
"BasketItemProductUniqueName": "Product unique name",
"BasketItemProductDisplayName": "Product display name",
"BasketItemSkuName": "SKU name",
"BasketItemSkuDescription": "SKU description",
"BasketItemCurrency": "Currency",
"BasketItemUnitPrice": "Unit price",
"BasketItemTotalPrice": "Total price",
"BasketItemTotalDiscount": "Total discount",
"BasketItemInventory": "Inventory",
"BasketItemIsInvalid": "Invalid",
"CreateBasketItem": "New",
"EditBasketItem": "Edit",
"BasketItemDeletionConfirmationMessage": "Are you sure to delete the basket item {0}?",
"SuccessfullyDeleted": "Successfully deleted",
"EasyAbp.EShop.Plugins.Baskets:ProductSkuNotFound": "Product {productId} (SKU: {productSkuId}) not found."
}
}

32
plugins/Baskets/src/EasyAbp.EShop.Plugins.Baskets.Domain.Shared/EasyAbp/EShop/Plugins/Baskets/Localization/vi.json

@ -1,32 +0,0 @@
{
"culture": "vi",
"texts": {
"Menu:EasyAbpEShop": "EShop",
"Menu:BasketManagement": "Baskets",
"Permission:BasketItem": "Basket item",
"Menu:BasketItem": "Basket item",
"BasketItem": "Basket item",
"BasketItemBasketName": "Basket name",
"BasketItemUserId": "User ID",
"BasketItemStoreId": "Store ID",
"BasketItemProductId": "Product ID",
"BasketItemProductSkuId": "Product SKU ID",
"BasketItemQuantity": "Quantity",
"BasketItemMediaResources": "Media resources",
"BasketItemProductUniqueName": "Product unique name",
"BasketItemProductDisplayName": "Product display name",
"BasketItemSkuName": "SKU name",
"BasketItemSkuDescription": "SKU description",
"BasketItemCurrency": "Currency",
"BasketItemUnitPrice": "Unit price",
"BasketItemTotalPrice": "Total price",
"BasketItemTotalDiscount": "Total discount",
"BasketItemInventory": "Inventory",
"BasketItemIsInvalid": "Invalid",
"CreateBasketItem": "New",
"EditBasketItem": "Edit",
"BasketItemDeletionConfirmationMessage": "Are you sure to delete the basket item {0}?",
"SuccessfullyDeleted": "Successfully deleted",
"EasyAbp.EShop.Plugins.Baskets:ProductSkuNotFound": "Product {productId} (SKU: {productSkuId}) not found."
}
}

1
plugins/Baskets/src/EasyAbp.EShop.Plugins.Baskets.Domain.Shared/EasyAbp/EShop/Plugins/Baskets/Localization/zh-Hans.json

@ -3,7 +3,6 @@
"texts": {
"Menu:EasyAbpEShop": "EShop 商城",
"Menu:BasketManagement": "购物车",
"ManageYourProfile": "管理个人资料",
"Permission:BasketItem": "购物车项",
"Menu:BasketItem": "购物车项",
"BasketItem": "购物车项",

1
plugins/Baskets/src/EasyAbp.EShop.Plugins.Baskets.Domain.Shared/EasyAbp/EShop/Plugins/Baskets/Localization/zh-Hant.json

@ -3,7 +3,6 @@
"texts": {
"Menu:EasyAbpEShop": "EShop 商城",
"Menu:BasketManagement": "購物車",
"ManageYourProfile": "管理個人資料",
"Permission:BasketItem": "購物車項",
"Menu:BasketItem": "購物車項",
"BasketItem": "購物車項",

2
plugins/Baskets/src/EasyAbp.EShop.Plugins.Baskets.Web/Menus/BasketsMenuContributor.cs

@ -28,7 +28,7 @@ namespace EasyAbp.EShop.Plugins.Baskets.Web.Menus
if (!basketManagementMenuItem.Items.IsNullOrEmpty())
{
var eShopMenuItem = context.Menu.Items.GetOrAdd(i => i.Name == BasketsMenus.ModuleGroupPrefix,
() => new ApplicationMenuItem(BasketsMenus.ModuleGroupPrefix, l["Menu:EasyAbpEShop"]));
() => new ApplicationMenuItem(BasketsMenus.ModuleGroupPrefix, l["Menu:EasyAbpEShop"], icon: "fa fa-shopping-bag"));
eShopMenuItem.Items.Add(basketManagementMenuItem);
}

59
plugins/Coupons/src/EasyAbp.EShop.Plugins.Coupons.Domain.Shared/EasyAbp/EShop/Plugins/Coupons/Localization/cs.json

@ -1,59 +0,0 @@
{
"culture": "cs",
"texts": {
"ManageYourProfile": "Spravovat profil",
"SamplePageMessage": "Ukázková stránka pro modul Coupons",
"Menu:CouponManagement": "Coupons",
"Permission:CouponTemplate": "Coupon template",
"Permission:Create": "Create",
"Permission:Update": "Update",
"Permission:Delete": "Delete",
"Menu:CouponTemplate": "Coupon template",
"CouponTemplate": "Coupon template",
"CouponTemplateStoreId": "Store ID",
"CouponTemplateCouponType": "Coupon type",
"CouponTemplateUniqueName": "Unique name",
"CouponTemplateDisplayName": "Display name",
"CouponTemplateDescription": "Description",
"CouponTemplateUsableDuration": "Usable duration",
"CouponTemplateUsableBeginTime": "Usable begin time",
"CouponTemplateUsableEndTime": "Usable end time",
"CouponTemplateConditionAmount": "Condition amount",
"CouponTemplateDiscountAmount": "Discount amount",
"CouponTemplateCurrency": "Currency",
"CouponTemplateIsUnscoped": "Unscoped",
"CreateCouponTemplate": "New",
"EditCouponTemplate": "Edit",
"CouponTemplateDeletionConfirmationMessage": "Are you sure to delete the coupon template {0}?",
"CouponTemplateScope": "Coupon template scope",
"CouponTemplateScopeStoreId": "Store ID",
"CouponTemplateScopeProductGroupName": "Product group name",
"CouponTemplateScopeProductId": "Product ID",
"CouponTemplateScopeProductSkuId": "Product SKU ID",
"CreateCouponTemplateScope": "New",
"EditCouponTemplateScope": "Edit",
"CouponTemplateScopeDeletionConfirmationMessage": "Are you sure to delete the coupon template scope {0}?",
"SuccessfullyDeleted": "Successfully deleted",
"CouponType.Normal": "Normal (X discount)",
"CouponType.PerMeet": "PerMeet (X discount for every Y)",
"CouponType.Custom": "Custom",
"Permission:Coupon": "Coupon",
"Menu:Coupon": "Coupon",
"Coupon": "Coupon",
"CouponCouponTemplateId": "Coupon template ID",
"CouponUserId": "User ID",
"CouponOrderId": "Order ID",
"CouponExpirationTime": "Expiration time",
"CouponUsedTime": "Used time",
"CouponDiscountedAmount": "Discounted amount",
"CreateCoupon": "New",
"EditCoupon": "Edit",
"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}."
}
}

2
plugins/Coupons/src/EasyAbp.EShop.Plugins.Coupons.Domain.Shared/EasyAbp/EShop/Plugins/Coupons/Localization/en.json

@ -1,8 +1,6 @@
{
"culture": "en",
"texts": {
"ManageYourProfile": "Manage your profile",
"SamplePageMessage": "A sample page for the Coupons module",
"Menu:CouponManagement": "Coupons",
"Permission:CouponTemplate": "Coupon template",
"Permission:Create": "Create",

56
plugins/Coupons/src/EasyAbp.EShop.Plugins.Coupons.Domain.Shared/EasyAbp/EShop/Plugins/Coupons/Localization/pl-PL.json

@ -1,56 +0,0 @@
{
"culture": "pl-PL",
"texts": {
"Permission:CouponTemplate": "Coupon template",
"Permission:Create": "Create",
"Permission:Update": "Update",
"Permission:Delete": "Delete",
"Menu:CouponTemplate": "Coupon template",
"CouponTemplate": "Coupon template",
"CouponTemplateStoreId": "Store ID",
"CouponTemplateCouponType": "Coupon type",
"CouponTemplateUniqueName": "Unique name",
"CouponTemplateDisplayName": "Display name",
"CouponTemplateDescription": "Description",
"CouponTemplateUsableDuration": "Usable duration",
"CouponTemplateUsableBeginTime": "Usable begin time",
"CouponTemplateUsableEndTime": "Usable end time",
"CouponTemplateConditionAmount": "Condition amount",
"CouponTemplateDiscountAmount": "Discount amount",
"CouponTemplateCurrency": "Currency",
"CouponTemplateIsUnscoped": "Unscoped",
"CreateCouponTemplate": "New",
"EditCouponTemplate": "Edit",
"CouponTemplateDeletionConfirmationMessage": "Are you sure to delete the coupon template {0}?",
"CouponTemplateScope": "Coupon template scope",
"CouponTemplateScopeStoreId": "Store ID",
"CouponTemplateScopeProductGroupName": "Product group name",
"CouponTemplateScopeProductId": "Product ID",
"CouponTemplateScopeProductSkuId": "Product SKU ID",
"CreateCouponTemplateScope": "New",
"EditCouponTemplateScope": "Edit",
"CouponTemplateScopeDeletionConfirmationMessage": "Are you sure to delete the coupon template scope {0}?",
"SuccessfullyDeleted": "Successfully deleted",
"CouponType.Normal": "Normal (X discount)",
"CouponType.PerMeet": "PerMeet (X discount for every Y)",
"CouponType.Custom": "Custom",
"Permission:Coupon": "Coupon",
"Menu:Coupon": "Coupon",
"Coupon": "Coupon",
"CouponCouponTemplateId": "Coupon template ID",
"CouponUserId": "User ID",
"CouponOrderId": "Order ID",
"CouponExpirationTime": "Expiration time",
"CouponUsedTime": "Used time",
"CouponDiscountedAmount": "Discounted amount",
"CreateCoupon": "New",
"EditCoupon": "Edit",
"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}."
}
}

56
plugins/Coupons/src/EasyAbp.EShop.Plugins.Coupons.Domain.Shared/EasyAbp/EShop/Plugins/Coupons/Localization/pt-BR.json

@ -1,56 +0,0 @@
{
"culture": "pt-BR",
"texts": {
"Permission:CouponTemplate": "Coupon template",
"Permission:Create": "Create",
"Permission:Update": "Update",
"Permission:Delete": "Delete",
"Menu:CouponTemplate": "Coupon template",
"CouponTemplate": "Coupon template",
"CouponTemplateStoreId": "Store ID",
"CouponTemplateCouponType": "Coupon type",
"CouponTemplateUniqueName": "Unique name",
"CouponTemplateDisplayName": "Display name",
"CouponTemplateDescription": "Description",
"CouponTemplateUsableDuration": "Usable duration",
"CouponTemplateUsableBeginTime": "Usable begin time",
"CouponTemplateUsableEndTime": "Usable end time",
"CouponTemplateConditionAmount": "Condition amount",
"CouponTemplateDiscountAmount": "Discount amount",
"CouponTemplateCurrency": "Currency",
"CouponTemplateIsUnscoped": "Unscoped",
"CreateCouponTemplate": "New",
"EditCouponTemplate": "Edit",
"CouponTemplateDeletionConfirmationMessage": "Are you sure to delete the coupon template {0}?",
"CouponTemplateScope": "Coupon template scope",
"CouponTemplateScopeStoreId": "Store ID",
"CouponTemplateScopeProductGroupName": "Product group name",
"CouponTemplateScopeProductId": "Product ID",
"CouponTemplateScopeProductSkuId": "Product SKU ID",
"CreateCouponTemplateScope": "New",
"EditCouponTemplateScope": "Edit",
"CouponTemplateScopeDeletionConfirmationMessage": "Are you sure to delete the coupon template scope {0}?",
"SuccessfullyDeleted": "Successfully deleted",
"CouponType.Normal": "Normal (X discount)",
"CouponType.PerMeet": "PerMeet (X discount for every Y)",
"CouponType.Custom": "Custom",
"Permission:Coupon": "Coupon",
"Menu:Coupon": "Coupon",
"Coupon": "Coupon",
"CouponCouponTemplateId": "Coupon template ID",
"CouponUserId": "User ID",
"CouponOrderId": "Order ID",
"CouponExpirationTime": "Expiration time",
"CouponUsedTime": "Used time",
"CouponDiscountedAmount": "Discounted amount",
"CreateCoupon": "New",
"EditCoupon": "Edit",
"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}."
}
}

58
plugins/Coupons/src/EasyAbp.EShop.Plugins.Coupons.Domain.Shared/EasyAbp/EShop/Plugins/Coupons/Localization/sl.json

@ -1,58 +0,0 @@
{
"culture": "sl",
"texts": {
"ManageYourProfile": "Upravljajte svojim profilom",
"Menu:CouponManagement": "Coupons",
"Permission:CouponTemplate": "Coupon template",
"Permission:Create": "Create",
"Permission:Update": "Update",
"Permission:Delete": "Delete",
"Menu:CouponTemplate": "Coupon template",
"CouponTemplate": "Coupon template",
"CouponTemplateStoreId": "Store ID",
"CouponTemplateCouponType": "Coupon type",
"CouponTemplateUniqueName": "Unique name",
"CouponTemplateDisplayName": "Display name",
"CouponTemplateDescription": "Description",
"CouponTemplateUsableDuration": "Usable duration",
"CouponTemplateUsableBeginTime": "Usable begin time",
"CouponTemplateUsableEndTime": "Usable end time",
"CouponTemplateConditionAmount": "Condition amount",
"CouponTemplateDiscountAmount": "Discount amount",
"CouponTemplateCurrency": "Currency",
"CouponTemplateIsUnscoped": "Unscoped",
"CreateCouponTemplate": "New",
"EditCouponTemplate": "Edit",
"CouponTemplateDeletionConfirmationMessage": "Are you sure to delete the coupon template {0}?",
"CouponTemplateScope": "Coupon template scope",
"CouponTemplateScopeStoreId": "Store ID",
"CouponTemplateScopeProductGroupName": "Product group name",
"CouponTemplateScopeProductId": "Product ID",
"CouponTemplateScopeProductSkuId": "Product SKU ID",
"CreateCouponTemplateScope": "New",
"EditCouponTemplateScope": "Edit",
"CouponTemplateScopeDeletionConfirmationMessage": "Are you sure to delete the coupon template scope {0}?",
"SuccessfullyDeleted": "Successfully deleted",
"CouponType.Normal": "Normal (X discount)",
"CouponType.PerMeet": "PerMeet (X discount for every Y)",
"CouponType.Custom": "Custom",
"Permission:Coupon": "Coupon",
"Menu:Coupon": "Coupon",
"Coupon": "Coupon",
"CouponCouponTemplateId": "Coupon template ID",
"CouponUserId": "User ID",
"CouponOrderId": "Order ID",
"CouponExpirationTime": "Expiration time",
"CouponUsedTime": "Used time",
"CouponDiscountedAmount": "Discounted amount",
"CreateCoupon": "New",
"EditCoupon": "Edit",
"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}."
}
}

59
plugins/Coupons/src/EasyAbp.EShop.Plugins.Coupons.Domain.Shared/EasyAbp/EShop/Plugins/Coupons/Localization/tr.json

@ -1,59 +0,0 @@
{
"culture": "tr",
"texts": {
"ManageYourProfile": "Profil yönetimi",
"SamplePageMessage": "Coupons modulünden örnek bir sayfa",
"Menu:CouponManagement": "Coupons",
"Permission:CouponTemplate": "Coupon template",
"Permission:Create": "Create",
"Permission:Update": "Update",
"Permission:Delete": "Delete",
"Menu:CouponTemplate": "Coupon template",
"CouponTemplate": "Coupon template",
"CouponTemplateStoreId": "Store ID",
"CouponTemplateCouponType": "Coupon type",
"CouponTemplateUniqueName": "Unique name",
"CouponTemplateDisplayName": "Display name",
"CouponTemplateDescription": "Description",
"CouponTemplateUsableDuration": "Usable duration",
"CouponTemplateUsableBeginTime": "Usable begin time",
"CouponTemplateUsableEndTime": "Usable end time",
"CouponTemplateConditionAmount": "Condition amount",
"CouponTemplateDiscountAmount": "Discount amount",
"CouponTemplateCurrency": "Currency",
"CouponTemplateIsUnscoped": "Unscoped",
"CreateCouponTemplate": "New",
"EditCouponTemplate": "Edit",
"CouponTemplateDeletionConfirmationMessage": "Are you sure to delete the coupon template {0}?",
"CouponTemplateScope": "Coupon template scope",
"CouponTemplateScopeStoreId": "Store ID",
"CouponTemplateScopeProductGroupName": "Product group name",
"CouponTemplateScopeProductId": "Product ID",
"CouponTemplateScopeProductSkuId": "Product SKU ID",
"CreateCouponTemplateScope": "New",
"EditCouponTemplateScope": "Edit",
"CouponTemplateScopeDeletionConfirmationMessage": "Are you sure to delete the coupon template scope {0}?",
"SuccessfullyDeleted": "Successfully deleted",
"CouponType.Normal": "Normal (X discount)",
"CouponType.PerMeet": "PerMeet (X discount for every Y)",
"CouponType.Custom": "Custom",
"Permission:Coupon": "Coupon",
"Menu:Coupon": "Coupon",
"Coupon": "Coupon",
"CouponCouponTemplateId": "Coupon template ID",
"CouponUserId": "User ID",
"CouponOrderId": "Order ID",
"CouponExpirationTime": "Expiration time",
"CouponUsedTime": "Used time",
"CouponDiscountedAmount": "Discounted amount",
"CreateCoupon": "New",
"EditCoupon": "Edit",
"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}."
}
}

56
plugins/Coupons/src/EasyAbp.EShop.Plugins.Coupons.Domain.Shared/EasyAbp/EShop/Plugins/Coupons/Localization/vi.json

@ -1,56 +0,0 @@
{
"culture": "vi",
"texts": {
"Permission:CouponTemplate": "Coupon template",
"Permission:Create": "Create",
"Permission:Update": "Update",
"Permission:Delete": "Delete",
"Menu:CouponTemplate": "Coupon template",
"CouponTemplate": "Coupon template",
"CouponTemplateStoreId": "Store ID",
"CouponTemplateCouponType": "Coupon type",
"CouponTemplateUniqueName": "Unique name",
"CouponTemplateDisplayName": "Display name",
"CouponTemplateDescription": "Description",
"CouponTemplateUsableDuration": "Usable duration",
"CouponTemplateUsableBeginTime": "Usable begin time",
"CouponTemplateUsableEndTime": "Usable end time",
"CouponTemplateConditionAmount": "Condition amount",
"CouponTemplateDiscountAmount": "Discount amount",
"CouponTemplateCurrency": "Currency",
"CouponTemplateIsUnscoped": "Unscoped",
"CreateCouponTemplate": "New",
"EditCouponTemplate": "Edit",
"CouponTemplateDeletionConfirmationMessage": "Are you sure to delete the coupon template {0}?",
"CouponTemplateScope": "Coupon template scope",
"CouponTemplateScopeStoreId": "Store ID",
"CouponTemplateScopeProductGroupName": "Product group name",
"CouponTemplateScopeProductId": "Product ID",
"CouponTemplateScopeProductSkuId": "Product SKU ID",
"CreateCouponTemplateScope": "New",
"EditCouponTemplateScope": "Edit",
"CouponTemplateScopeDeletionConfirmationMessage": "Are you sure to delete the coupon template scope {0}?",
"SuccessfullyDeleted": "Successfully deleted",
"CouponType.Normal": "Normal (X discount)",
"CouponType.PerMeet": "PerMeet (X discount for every Y)",
"CouponType.Custom": "Custom",
"Permission:Coupon": "Coupon",
"Menu:Coupon": "Coupon",
"Coupon": "Coupon",
"CouponCouponTemplateId": "Coupon template ID",
"CouponUserId": "User ID",
"CouponOrderId": "Order ID",
"CouponExpirationTime": "Expiration time",
"CouponUsedTime": "Used time",
"CouponDiscountedAmount": "Discounted amount",
"CreateCoupon": "New",
"EditCoupon": "Edit",
"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}."
}
}

1
plugins/Coupons/src/EasyAbp.EShop.Plugins.Coupons.Domain.Shared/EasyAbp/EShop/Plugins/Coupons/Localization/zh-Hans.json

@ -1,7 +1,6 @@
{
"culture": "zh-Hans",
"texts": {
"ManageYourProfile": "管理个人资料",
"Menu:CouponManagement": "优惠券",
"Permission:CouponTemplate": "优惠券模板",
"Permission:Create": "新建",

1
plugins/Coupons/src/EasyAbp.EShop.Plugins.Coupons.Domain.Shared/EasyAbp/EShop/Plugins/Coupons/Localization/zh-Hant.json

@ -1,7 +1,6 @@
{
"culture": "zh-Hant",
"texts": {
"ManageYourProfile": "管理個人資料",
"Menu:CouponManagement": "優惠券",
"Permission:CouponTemplate": "優惠券模板",
"Permission:Create": "新建",

2
plugins/Coupons/src/EasyAbp.EShop.Plugins.Coupons.Web/Menus/CouponsMenuContributor.cs

@ -39,7 +39,7 @@ namespace EasyAbp.EShop.Plugins.Coupons.Web.Menus
if (!couponManagementMenuItem.Items.IsNullOrEmpty())
{
var eShopMenuItem = context.Menu.Items.GetOrAdd(i => i.Name == CouponsMenus.ModuleGroupPrefix,
() => new ApplicationMenuItem(CouponsMenus.ModuleGroupPrefix, l["Menu:EasyAbpEShop"]));
() => new ApplicationMenuItem(CouponsMenus.ModuleGroupPrefix, l["Menu:EasyAbpEShop"], icon: "fa fa-shopping-bag"));
eShopMenuItem.Items.Add(couponManagementMenuItem);
}

12
plugins/Inventories/DaprActors/src/EasyAbp.EShop.Products.DaprActorsInventory.Domain/EasyAbp/EShop/Products/DaprActorsInventory/DaprActorsProductInventoryProvider.cs

@ -2,6 +2,7 @@ using System;
using System.Collections.Generic;
using System.Threading.Tasks;
using Dapr.Actors;
using Dapr.Actors.Client;
using EasyAbp.EShop.Plugins.Inventories.DaprActors;
using EasyAbp.EShop.Products.ProductInventories;
using Microsoft.Extensions.Logging;
@ -11,6 +12,7 @@ namespace EasyAbp.EShop.Products.DaprActorsInventory;
public class DaprActorsProductInventoryProvider : IProductInventoryProvider, ITransientDependency
{
public static string ActorType { get; set; } = "InventoryActor";
public static string DaprActorsProductInventoryProviderName { get; set; } = "DaprActors";
public static string DaprActorsProductInventoryProviderDisplayName { get; set; } = "DaprActors";
public static string DaprActorsProductInventoryProviderDescription { get; set; } = "DaprActors";
@ -18,13 +20,13 @@ public class DaprActorsProductInventoryProvider : IProductInventoryProvider, ITr
public string InventoryProviderName { get; } = DaprActorsProductInventoryProviderName;
private readonly ILogger<DaprActorsProductInventoryProvider> _logger;
protected IInventoryActorProvider InventoryActorProvider { get; }
protected IActorProxyFactory ActorProxyFactory { get; }
public DaprActorsProductInventoryProvider(
IInventoryActorProvider inventoryActorProvider,
IActorProxyFactory actorProxyFactory,
ILogger<DaprActorsProductInventoryProvider> logger)
{
InventoryActorProvider = inventoryActorProvider;
ActorProxyFactory = actorProxyFactory;
_logger = logger;
}
@ -98,9 +100,9 @@ public class DaprActorsProductInventoryProvider : IProductInventoryProvider, ITr
return true;
}
protected virtual async Task<IInventoryActor> GetActorAsync(InventoryQueryModel model)
protected virtual Task<IInventoryActor> GetActorAsync(InventoryQueryModel model)
{
return await InventoryActorProvider.GetAsync(GetActorId(model));
return Task.FromResult(ActorProxyFactory.CreateActorProxy<IInventoryActor>(GetActorId(model), ActorType));
}
protected virtual ActorId GetActorId(InventoryQueryModel model)

10
plugins/Inventories/DaprActors/src/EasyAbp.EShop.Products.DaprActorsInventory.Domain/EasyAbp/EShop/Products/DaprActorsInventory/IInventoryActorProvider.cs

@ -1,10 +0,0 @@
using System.Threading.Tasks;
using Dapr.Actors;
using EasyAbp.EShop.Plugins.Inventories.DaprActors;
namespace EasyAbp.EShop.Products.DaprActorsInventory;
public interface IInventoryActorProvider
{
Task<IInventoryActor> GetAsync(ActorId actorId);
}

17
plugins/Inventories/DaprActors/src/EasyAbp.EShop.Products.DaprActorsInventory.Domain/EasyAbp/EShop/Products/DaprActorsInventory/InventoryActorProvider.cs

@ -1,17 +0,0 @@
using System.Threading.Tasks;
using Dapr.Actors;
using Dapr.Actors.Client;
using EasyAbp.EShop.Plugins.Inventories.DaprActors;
using Volo.Abp.DependencyInjection;
namespace EasyAbp.EShop.Products.DaprActorsInventory;
public class InventoryActorProvider : IInventoryActorProvider, ITransientDependency
{
public static string ActorType { get; set; } = "InventoryActor";
public virtual Task<IInventoryActor> GetAsync(ActorId actorId)
{
return Task.FromResult(ActorProxy.Create<IInventoryActor>(actorId, ActorType));
}
}

50
plugins/Inventories/DaprActors/test/EasyAbp.EShop.Products.DaprActorsInventory.Domain.Tests/TestActorProxyFactory.cs

@ -0,0 +1,50 @@
using System;
using Dapr.Actors;
using Dapr.Actors.Client;
using EasyAbp.EShop.Plugins.Inventories.DaprActors;
using Microsoft.Extensions.DependencyInjection;
using Volo.Abp.DependencyInjection;
namespace EasyAbp.EShop.Products.DaprActorsInventory.Domain;
[Dependency(ReplaceServices = true)]
public class TestActorProxyFactory : IActorProxyFactory, ITransientDependency
{
private IInventoryActor Actor { get; set; }
private readonly IServiceProvider _serviceProvider;
public TestActorProxyFactory(IServiceProvider serviceProvider)
{
_serviceProvider = serviceProvider;
}
public TActorInterface CreateActorProxy<TActorInterface>(ActorId actorId, string actorType,
ActorProxyOptions options = null) where TActorInterface : IActor
{
if (typeof(TActorInterface) != typeof(IInventoryActor))
{
throw new ApplicationException();
}
if (Actor is not null)
{
return (TActorInterface)Actor;
}
Actor = _serviceProvider.GetRequiredService<IInventoryActor>();
return (TActorInterface)Actor;
}
public object CreateActorProxy(ActorId actorId, Type actorInterfaceType, string actorType,
ActorProxyOptions options = null)
{
throw new NotSupportedException();
}
public ActorProxy Create(ActorId actorId, string actorType, ActorProxyOptions options = null)
{
throw new NotSupportedException();
}
}

26
plugins/Inventories/DaprActors/test/EasyAbp.EShop.Products.DaprActorsInventory.Domain.Tests/TestInventoryActorProvider.cs

@ -1,26 +0,0 @@
using System;
using System.Threading.Tasks;
using Dapr.Actors;
using EasyAbp.EShop.Plugins.Inventories.DaprActors;
using Microsoft.Extensions.DependencyInjection;
using Volo.Abp.DependencyInjection;
namespace EasyAbp.EShop.Products.DaprActorsInventory.Domain;
[Dependency(ReplaceServices = true)]
public class TestInventoryActorProvider : IInventoryActorProvider, ITransientDependency
{
private IInventoryActor Actor { get; set; }
private readonly IServiceProvider _serviceProvider;
public TestInventoryActorProvider(IServiceProvider serviceProvider)
{
_serviceProvider = serviceProvider;
}
public Task<IInventoryActor> GetAsync(ActorId actorId)
{
return Task.FromResult(Actor ??= _serviceProvider.GetRequiredService<FakeInventoryActor>());
}
}

9
plugins/Inventories/OrleansGrains/src/EasyAbp.EShop.Products.OrleansGrainsInventory.Domain/EasyAbp/EShop/Products/OrleansGrainsInventory/IInventoryGrainProvider.cs

@ -1,9 +0,0 @@
using System.Threading.Tasks;
using EasyAbp.EShop.Plugins.Inventories.OrleansGrains;
namespace EasyAbp.EShop.Products.OrleansGrainsInventory;
public interface IInventoryGrainProvider
{
Task<IInventoryGrain> GetAsync(string grainKey);
}

21
plugins/Inventories/OrleansGrains/src/EasyAbp.EShop.Products.OrleansGrainsInventory.Domain/EasyAbp/EShop/Products/OrleansGrainsInventory/InventoryGrainProvider.cs

@ -1,21 +0,0 @@
using System.Threading.Tasks;
using EasyAbp.EShop.Plugins.Inventories.OrleansGrains;
using Orleans;
using Volo.Abp.DependencyInjection;
namespace EasyAbp.EShop.Products.OrleansGrainsInventory;
public class InventoryGrainProvider : IInventoryGrainProvider, ITransientDependency
{
private readonly IGrainFactory _grainFactory;
public InventoryGrainProvider(IGrainFactory grainFactory)
{
_grainFactory = grainFactory;
}
public virtual Task<IInventoryGrain> GetAsync(string grainKey)
{
return Task.FromResult(_grainFactory.GetGrain<IInventoryGrain>(grainKey));
}
}

11
plugins/Inventories/OrleansGrains/src/EasyAbp.EShop.Products.OrleansGrainsInventory.Domain/EasyAbp/EShop/Products/OrleansGrainsInventory/OrleansGrainsProductInventoryProvider.cs

@ -4,6 +4,7 @@ using System.Threading.Tasks;
using EasyAbp.EShop.Plugins.Inventories.OrleansGrains;
using EasyAbp.EShop.Products.ProductInventories;
using Microsoft.Extensions.Logging;
using Orleans;
using Volo.Abp.DependencyInjection;
namespace EasyAbp.EShop.Products.OrleansGrainsInventory;
@ -17,13 +18,13 @@ public class OrleansGrainsProductInventoryProvider : IProductInventoryProvider,
public string InventoryProviderName { get; } = OrleansGrainsProductInventoryProviderName;
private readonly ILogger<OrleansGrainsProductInventoryProvider> _logger;
protected IInventoryGrainProvider InventoryGrainProvider { get; }
protected IGrainFactory GrainFactory { get; }
public OrleansGrainsProductInventoryProvider(
IInventoryGrainProvider inventoryGrainProvider,
IGrainFactory grainFactory,
ILogger<OrleansGrainsProductInventoryProvider> logger)
{
InventoryGrainProvider = inventoryGrainProvider;
GrainFactory = grainFactory;
_logger = logger;
}
@ -97,9 +98,9 @@ public class OrleansGrainsProductInventoryProvider : IProductInventoryProvider,
return true;
}
protected virtual async Task<IInventoryGrain> GetGrainAsync(InventoryQueryModel model)
protected virtual Task<IInventoryGrain> GetGrainAsync(InventoryQueryModel model)
{
return await InventoryGrainProvider.GetAsync(GetGrainId(model));
return Task.FromResult(GrainFactory.GetGrain<IInventoryGrain>(GetGrainId(model)));
}
protected virtual string GetGrainId(InventoryQueryModel model)

136
plugins/Inventories/OrleansGrains/test/EasyAbp.EShop.Products.OrleansGrainsInventory.Domain.Tests/TestGrainFactory.cs

@ -0,0 +1,136 @@
using System;
using System.Threading.Tasks;
using EasyAbp.EShop.Plugins.Inventories.OrleansGrains;
using Microsoft.Extensions.DependencyInjection;
using Orleans;
using Orleans.Runtime;
using Volo.Abp.DependencyInjection;
namespace EasyAbp.EShop.Products.OrleansGrainsInventory.Domain;
[Dependency(ReplaceServices = true)]
public class TestGrainFactory : IGrainFactory, ITransientDependency
{
private IInventoryGrain Grain { get; set; }
private readonly IServiceProvider _serviceProvider;
public TestGrainFactory(IServiceProvider serviceProvider)
{
_serviceProvider = serviceProvider;
}
public TGrainInterface GetGrain<TGrainInterface>(Guid primaryKey, string grainClassNamePrefix = null)
where TGrainInterface : IGrainWithGuidKey
{
throw new NotSupportedException();
}
public TGrainInterface GetGrain<TGrainInterface>(long primaryKey, string grainClassNamePrefix = null)
where TGrainInterface : IGrainWithIntegerKey
{
throw new NotSupportedException();
}
public TGrainInterface GetGrain<TGrainInterface>(string primaryKey, string grainClassNamePrefix = null)
where TGrainInterface : IGrainWithStringKey
{
if (typeof(TGrainInterface) != typeof(IInventoryGrain))
{
throw new ApplicationException();
}
if (Grain is not null)
{
return (TGrainInterface)Grain;
}
Grain = _serviceProvider.GetRequiredService<FakeInventoryGrain>();
return (TGrainInterface)Grain;
}
public TGrainInterface GetGrain<TGrainInterface>(Guid primaryKey, string keyExtension,
string grainClassNamePrefix = null) where TGrainInterface : IGrainWithGuidCompoundKey
{
throw new NotSupportedException();
}
public TGrainInterface GetGrain<TGrainInterface>(long primaryKey, string keyExtension,
string grainClassNamePrefix = null) where TGrainInterface : IGrainWithIntegerCompoundKey
{
throw new NotSupportedException();
}
public async Task<TGrainObserverInterface> CreateObjectReference<TGrainObserverInterface>(IGrainObserver obj)
where TGrainObserverInterface : IGrainObserver
{
throw new NotSupportedException();
}
public async Task DeleteObjectReference<TGrainObserverInterface>(IGrainObserver obj)
where TGrainObserverInterface : IGrainObserver
{
throw new NotSupportedException();
}
public void BindGrainReference(IAddressable grain)
{
throw new NotSupportedException();
}
public TGrainInterface GetGrain<TGrainInterface>(Type grainInterfaceType, Guid grainPrimaryKey)
where TGrainInterface : IGrain
{
throw new NotSupportedException();
}
public TGrainInterface GetGrain<TGrainInterface>(Type grainInterfaceType, long grainPrimaryKey)
where TGrainInterface : IGrain
{
throw new NotSupportedException();
}
public TGrainInterface GetGrain<TGrainInterface>(Type grainInterfaceType, string grainPrimaryKey)
where TGrainInterface : IGrain
{
throw new NotSupportedException();
}
public TGrainInterface GetGrain<TGrainInterface>(Type grainInterfaceType, Guid grainPrimaryKey, string keyExtension)
where TGrainInterface : IGrain
{
throw new NotSupportedException();
}
public TGrainInterface GetGrain<TGrainInterface>(Type grainInterfaceType, long grainPrimaryKey, string keyExtension)
where TGrainInterface : IGrain
{
throw new NotSupportedException();
}
public IGrain GetGrain(Type grainInterfaceType, Guid grainPrimaryKey)
{
throw new NotSupportedException();
}
public IGrain GetGrain(Type grainInterfaceType, long grainPrimaryKey)
{
throw new NotSupportedException();
}
public IGrain GetGrain(Type grainInterfaceType, string grainPrimaryKey)
{
throw new NotSupportedException();
}
public IGrain GetGrain(Type grainInterfaceType, Guid grainPrimaryKey, string keyExtension)
{
throw new NotSupportedException();
}
public IGrain GetGrain(Type grainInterfaceType, long grainPrimaryKey, string keyExtension)
{
throw new NotSupportedException();
}
}

25
plugins/Inventories/OrleansGrains/test/EasyAbp.EShop.Products.OrleansGrainsInventory.Domain.Tests/TestInventoryGrainProvider.cs

@ -1,25 +0,0 @@
using System;
using System.Threading.Tasks;
using EasyAbp.EShop.Plugins.Inventories.OrleansGrains;
using Microsoft.Extensions.DependencyInjection;
using Volo.Abp.DependencyInjection;
namespace EasyAbp.EShop.Products.OrleansGrainsInventory.Domain;
[Dependency(ReplaceServices = true)]
public class TestInventoryGrainProvider : IInventoryGrainProvider, ITransientDependency
{
private IInventoryGrain Grain { get; set; }
private readonly IServiceProvider _serviceProvider;
public TestInventoryGrainProvider(IServiceProvider serviceProvider)
{
_serviceProvider = serviceProvider;
}
public Task<IInventoryGrain> GetAsync(string grainKey)
{
return Task.FromResult(Grain ??= _serviceProvider.GetRequiredService<FakeInventoryGrain>());
}
}

62
samples/EShopSample/aspnet-core/src/EShopSample.DbMigrator/DbMigratorHostedService.cs

@ -1,43 +1,49 @@
using System.Threading;
using System.Threading.Tasks;
using EShopSample.Data;
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Hosting;
using EShopSample.Data;
using Serilog;
using Volo.Abp;
namespace EShopSample.DbMigrator
namespace EShopSample.DbMigrator;
public class DbMigratorHostedService : IHostedService
{
public class DbMigratorHostedService : IHostedService
private readonly IHostApplicationLifetime _hostApplicationLifetime;
private readonly IConfiguration _configuration;
public DbMigratorHostedService(IHostApplicationLifetime hostApplicationLifetime, IConfiguration configuration)
{
private readonly IHostApplicationLifetime _hostApplicationLifetime;
_hostApplicationLifetime = hostApplicationLifetime;
_configuration = configuration;
}
public DbMigratorHostedService(IHostApplicationLifetime hostApplicationLifetime)
public async Task StartAsync(CancellationToken cancellationToken)
{
using (var application = await AbpApplicationFactory.CreateAsync<EShopSampleDbMigratorModule>(options =>
{
options.Services.ReplaceConfiguration(_configuration);
options.UseAutofac();
options.Services.AddLogging(c => c.AddSerilog());
}))
{
_hostApplicationLifetime = hostApplicationLifetime;
}
await application.InitializeAsync();
public async Task StartAsync(CancellationToken cancellationToken)
{
using (var application = await AbpApplicationFactory.CreateAsync<EShopSampleDbMigratorModule>(options =>
{
options.UseAutofac();
options.Services.AddLogging(c => c.AddSerilog());
}))
{
await application.InitializeAsync();
await application
.ServiceProvider
.GetRequiredService<EShopSampleDbMigrationService>()
.MigrateAsync();
await application.ShutdownAsync();
_hostApplicationLifetime.StopApplication();
}
await application
.ServiceProvider
.GetRequiredService<EShopSampleDbMigrationService>()
.MigrateAsync();
await application.ShutdownAsync();
_hostApplicationLifetime.StopApplication();
}
}
public Task StopAsync(CancellationToken cancellationToken) => Task.CompletedTask;
public Task StopAsync(CancellationToken cancellationToken)
{
return Task.CompletedTask;
}
}
}

69
samples/EShopSample/aspnet-core/src/EShopSample.DbMigrator/EShopSample.DbMigrator.csproj

@ -1,34 +1,43 @@
<Project Sdk="Microsoft.NET.Sdk">
<Import Project="..\..\common.props" />
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net6.0</TargetFramework>
</PropertyGroup>
<ItemGroup>
<None Remove="appsettings.json" />
</ItemGroup>
<ItemGroup>
<Content Include="appsettings.json">
<CopyToPublishDirectory>PreserveNewest</CopyToPublishDirectory>
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</Content>
</ItemGroup>
<ItemGroup>
<PackageReference Include="Serilog.Extensions.Logging" Version="3.0.1" />
<PackageReference Include="Serilog.Sinks.File" Version="5.0.0" />
<PackageReference Include="Serilog.Sinks.Console" Version="4.0.0" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Tools" Version="6.0.*" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="Volo.Abp.Autofac" Version="$(AbpVersion)" />
<ProjectReference Include="..\EShopSample.Application.Contracts\EShopSample.Application.Contracts.csproj" />
<ProjectReference Include="..\EShopSample.EntityFrameworkCore\EShopSample.EntityFrameworkCore.csproj" />
</ItemGroup>
<Import Project="..\..\common.props"/>
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net6.0</TargetFramework>
</PropertyGroup>
<ItemGroup>
<None Remove="appsettings.json"/>
</ItemGroup>
<ItemGroup>
<None Remove="appsettings.json"/>
<Content Include="appsettings.json">
<CopyToPublishDirectory>PreserveNewest</CopyToPublishDirectory>
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</Content>
</ItemGroup>
<ItemGroup>
<PackageReference Include="Serilog.Extensions.Logging" Version="3.1.0"/>
<PackageReference Include="Serilog.Sinks.Async" Version="1.5.0"/>
<PackageReference Include="Serilog.Sinks.File" Version="5.0.0"/>
<PackageReference Include="Serilog.Sinks.Console" Version="4.0.1"/>
<PackageReference Include="Microsoft.Extensions.Hosting" Version="6.0.1"/>
</ItemGroup>
<ItemGroup>
<PackageReference Include="Volo.Abp.Autofac" Version="$(AbpVersion)"/>
<ProjectReference Include="..\EShopSample.Application.Contracts\EShopSample.Application.Contracts.csproj"/>
<ProjectReference Include="..\EShopSample.EntityFrameworkCore\EShopSample.EntityFrameworkCore.csproj"/>
</ItemGroup>
<ItemGroup>
<Compile Remove="Logs\**"/>
<Content Remove="Logs\**"/>
<EmbeddedResource Remove="Logs\**"/>
<None Remove="Logs\**"/>
</ItemGroup>
</Project>

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

Loading…
Cancel
Save