Browse Source

Merge pull request #81 from RayMMond/ProductTagAndStoreOwner

Add store owner
pull/96/head
Super 6 years ago
committed by GitHub
parent
commit
b7823230bc
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 7
      EShop.sln
  2. 2
      common.props
  3. 4
      integration/EasyAbp.EShop/src/EasyAbp.EShop.Application.Contracts/EasyAbp.EShop.Application.Contracts.csproj
  4. 4
      integration/EasyAbp.EShop/src/EasyAbp.EShop.Application/EasyAbp.EShop.Application.csproj
  5. 2
      integration/EasyAbp.EShop/src/EasyAbp.EShop.Domain.Shared/EasyAbp.EShop.Domain.Shared.csproj
  6. 2
      integration/EasyAbp.EShop/src/EasyAbp.EShop.Domain/EasyAbp.EShop.Domain.csproj
  7. 2
      integration/EasyAbp.EShop/src/EasyAbp.EShop.EntityFrameworkCore/EasyAbp.EShop.EntityFrameworkCore.csproj
  8. 2
      integration/EasyAbp.EShop/src/EasyAbp.EShop.HttpApi.Client/EasyAbp.EShop.HttpApi.Client.csproj
  9. 2
      integration/EasyAbp.EShop/src/EasyAbp.EShop.HttpApi/EasyAbp.EShop.HttpApi.csproj
  10. 2
      integration/EasyAbp.EShop/src/EasyAbp.EShop.MongoDB/EasyAbp.EShop.MongoDB.csproj
  11. 4
      integration/EasyAbp.EShop/src/EasyAbp.EShop.Web/EasyAbp.EShop.Web.csproj
  12. 2
      integration/EasyAbp.EShop/test/EasyAbp.EShop.HttpApi.Client.ConsoleTestApp/EasyAbp.EShop.HttpApi.Client.ConsoleTestApp.csproj
  13. 6
      integration/EasyAbp.EShop/test/EasyAbp.EShop.TestBase/EasyAbp.EShop.TestBase.csproj
  14. 4
      modules/EasyAbp.EShop.Orders/src/EasyAbp.EShop.Orders.Application.Contracts/EasyAbp.EShop.Orders.Application.Contracts.csproj
  15. 3
      modules/EasyAbp.EShop.Orders/src/EasyAbp.EShop.Orders.Application.Contracts/EasyAbp/EShop/Orders/Orders/Dtos/CreateOrderDto.cs
  16. 5
      modules/EasyAbp.EShop.Orders/src/EasyAbp.EShop.Orders.Application/EasyAbp.EShop.Orders.Application.csproj
  17. 3
      modules/EasyAbp.EShop.Orders/src/EasyAbp.EShop.Orders.Application/EasyAbp/EShop/Orders/EShopOrdersApplicationModule.cs
  18. 49
      modules/EasyAbp.EShop.Orders/src/EasyAbp.EShop.Orders.Application/EasyAbp/EShop/Orders/Orders/OrderAppService.cs
  19. 1
      modules/EasyAbp.EShop.Orders/src/EasyAbp.EShop.Orders.Application/EasyAbp/EShop/Orders/OrdersApplicationAutoMapperProfile.cs
  20. 2
      modules/EasyAbp.EShop.Orders/src/EasyAbp.EShop.Orders.Domain.Shared/EasyAbp.EShop.Orders.Domain.Shared.csproj
  21. 4
      modules/EasyAbp.EShop.Orders/src/EasyAbp.EShop.Orders.Domain/EasyAbp.EShop.Orders.Domain.csproj
  22. 1
      modules/EasyAbp.EShop.Orders/src/EasyAbp.EShop.Orders.Domain/EasyAbp/EShop/Orders/Orders/Order.cs
  23. 2
      modules/EasyAbp.EShop.Orders/src/EasyAbp.EShop.Orders.EntityFrameworkCore/EasyAbp.EShop.Orders.EntityFrameworkCore.csproj
  24. 2
      modules/EasyAbp.EShop.Orders/src/EasyAbp.EShop.Orders.HttpApi.Client/EasyAbp.EShop.Orders.HttpApi.Client.csproj
  25. 2
      modules/EasyAbp.EShop.Orders/src/EasyAbp.EShop.Orders.HttpApi/EasyAbp.EShop.Orders.HttpApi.csproj
  26. 2
      modules/EasyAbp.EShop.Orders/src/EasyAbp.EShop.Orders.MongoDB/EasyAbp.EShop.Orders.MongoDB.csproj
  27. 4
      modules/EasyAbp.EShop.Orders/src/EasyAbp.EShop.Orders.Web/EasyAbp.EShop.Orders.Web.csproj
  28. 3
      modules/EasyAbp.EShop.Orders/src/EasyAbp.EShop.Orders.Web/OrdersWebAutoMapperProfile.cs
  29. 2
      modules/EasyAbp.EShop.Orders/test/EasyAbp.EShop.Orders.HttpApi.Client.ConsoleTestApp/EasyAbp.EShop.Orders.HttpApi.Client.ConsoleTestApp.csproj
  30. 6
      modules/EasyAbp.EShop.Orders/test/EasyAbp.EShop.Orders.TestBase/EasyAbp.EShop.Orders.TestBase.csproj
  31. 4
      modules/EasyAbp.EShop.Payments/src/EasyAbp.EShop.Payments.Application.Contracts/EasyAbp.EShop.Payments.Application.Contracts.csproj
  32. 5
      modules/EasyAbp.EShop.Payments/src/EasyAbp.EShop.Payments.Application/EasyAbp.EShop.Payments.Application.csproj
  33. 20
      modules/EasyAbp.EShop.Payments/src/EasyAbp.EShop.Payments.Application/EasyAbp/EShop/Payments/Payments/PaymentAppService.cs
  34. 19
      modules/EasyAbp.EShop.Payments/src/EasyAbp.EShop.Payments.Application/EasyAbp/EShop/Payments/Refunds/RefundAppService.cs
  35. 2
      modules/EasyAbp.EShop.Payments/src/EasyAbp.EShop.Payments.Domain.Shared/EasyAbp.EShop.Payments.Domain.Shared.csproj
  36. 4
      modules/EasyAbp.EShop.Payments/src/EasyAbp.EShop.Payments.Domain/EasyAbp.EShop.Payments.Domain.csproj
  37. 2
      modules/EasyAbp.EShop.Payments/src/EasyAbp.EShop.Payments.EntityFrameworkCore/EasyAbp.EShop.Payments.EntityFrameworkCore.csproj
  38. 2
      modules/EasyAbp.EShop.Payments/src/EasyAbp.EShop.Payments.HttpApi.Client/EasyAbp.EShop.Payments.HttpApi.Client.csproj
  39. 2
      modules/EasyAbp.EShop.Payments/src/EasyAbp.EShop.Payments.HttpApi/EasyAbp.EShop.Payments.HttpApi.csproj
  40. 2
      modules/EasyAbp.EShop.Payments/src/EasyAbp.EShop.Payments.MongoDB/EasyAbp.EShop.Payments.MongoDB.csproj
  41. 4
      modules/EasyAbp.EShop.Payments/src/EasyAbp.EShop.Payments.Web/EasyAbp.EShop.Payments.Web.csproj
  42. 2
      modules/EasyAbp.EShop.Payments/test/EasyAbp.EShop.Payments.HttpApi.Client.ConsoleTestApp/EasyAbp.EShop.Payments.HttpApi.Client.ConsoleTestApp.csproj
  43. 6
      modules/EasyAbp.EShop.Payments/test/EasyAbp.EShop.Payments.TestBase/EasyAbp.EShop.Payments.TestBase.csproj
  44. 4
      modules/EasyAbp.EShop.Plugins/src/EasyAbp.EShop.Plugins.Application.Contracts/EasyAbp.EShop.Plugins.Application.Contracts.csproj
  45. 4
      modules/EasyAbp.EShop.Plugins/src/EasyAbp.EShop.Plugins.Application/EasyAbp.EShop.Plugins.Application.csproj
  46. 2
      modules/EasyAbp.EShop.Plugins/src/EasyAbp.EShop.Plugins.Domain.Shared/EasyAbp.EShop.Plugins.Domain.Shared.csproj
  47. 2
      modules/EasyAbp.EShop.Plugins/src/EasyAbp.EShop.Plugins.Domain/EasyAbp.EShop.Plugins.Domain.csproj
  48. 2
      modules/EasyAbp.EShop.Plugins/src/EasyAbp.EShop.Plugins.EntityFrameworkCore/EasyAbp.EShop.Plugins.EntityFrameworkCore.csproj
  49. 2
      modules/EasyAbp.EShop.Plugins/src/EasyAbp.EShop.Plugins.HttpApi.Client/EasyAbp.EShop.Plugins.HttpApi.Client.csproj
  50. 2
      modules/EasyAbp.EShop.Plugins/src/EasyAbp.EShop.Plugins.HttpApi/EasyAbp.EShop.Plugins.HttpApi.csproj
  51. 2
      modules/EasyAbp.EShop.Plugins/src/EasyAbp.EShop.Plugins.MongoDB/EasyAbp.EShop.Plugins.MongoDB.csproj
  52. 4
      modules/EasyAbp.EShop.Plugins/src/EasyAbp.EShop.Plugins.Web/EasyAbp.EShop.Plugins.Web.csproj
  53. 2
      modules/EasyAbp.EShop.Plugins/test/EasyAbp.EShop.Plugins.HttpApi.Client.ConsoleTestApp/EasyAbp.EShop.Plugins.HttpApi.Client.ConsoleTestApp.csproj
  54. 6
      modules/EasyAbp.EShop.Plugins/test/EasyAbp.EShop.Plugins.TestBase/EasyAbp.EShop.Plugins.TestBase.csproj
  55. 6
      modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Application.Contracts/EasyAbp.EShop.Products.Application.Contracts.csproj
  56. 3
      modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Application.Contracts/EasyAbp/EShop/Products/Permissions/ProductsPermissionDefinitionProvider.cs
  57. 1
      modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Application.Contracts/EasyAbp/EShop/Products/Permissions/ProductsPermissions.cs
  58. 2
      modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Application.Contracts/EasyAbp/EShop/Products/Products/Dtos/GetProductListDto.cs
  59. 3
      modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Application.Contracts/EasyAbp/EShop/Products/Products/IProductAppService.cs
  60. 0
      modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Application.Contracts/EasyAbp/EShop/Products/Products/NotAllowedToGetProductListWithShowHiddenException.cs
  61. 0
      modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Application.Contracts/EasyAbp/EShop/Products/Products/ProductAttributeOptionsDeletionFailedException.cs
  62. 0
      modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Application.Contracts/EasyAbp/EShop/Products/Products/ProductAttributesModificationFailedException.cs
  63. 0
      modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Application.Contracts/EasyAbp/EShop/Products/Products/StaticProductCannotBeModifiedException.cs
  64. 0
      modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Application.Contracts/EasyAbp/EShop/Products/Products/StoreIsNotProductOwnerException.cs
  65. 7
      modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Application/EasyAbp.EShop.Products.Application.csproj
  66. 6
      modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Application/EasyAbp/EShop/Products/Categories/CategoryAppService.cs
  67. 3
      modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Application/EasyAbp/EShop/Products/EShopProductsApplicationModule.cs
  68. 5
      modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Application/EasyAbp/EShop/Products/ProductCategories/ProductCategoryAppService.cs
  69. 40
      modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Application/EasyAbp/EShop/Products/ProductInventories/ProductInventoryAppService.cs
  70. 147
      modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Application/EasyAbp/EShop/Products/Products/ProductAppService.cs
  71. 18
      modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Application/EasyAbp/EShop/Products/ProductsApplicationAutoMapperProfile.cs
  72. 4
      modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Domain.Shared/EasyAbp.EShop.Products.Domain.Shared.csproj
  73. 4
      modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Domain.Shared/EasyAbp/EShop/Products/Localization/Products/en.json
  74. 2
      modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Domain.Shared/EasyAbp/EShop/Products/Products/IProductSku.cs
  75. 6
      modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Domain/EasyAbp.EShop.Products.Domain.csproj
  76. 2
      modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Domain/EasyAbp/EShop/Products/ProductStores/IProductStoreRepository.cs
  77. 11
      modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Domain/EasyAbp/EShop/Products/Products/IProductRepository.cs
  78. 3
      modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Domain/EasyAbp/EShop/Products/Products/Product.cs
  79. 4
      modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.EntityFrameworkCore/EasyAbp.EShop.Products.EntityFrameworkCore.csproj
  80. 11
      modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.EntityFrameworkCore/EasyAbp/EShop/Products/ProductStores/ProductStoreRepository.cs
  81. 36
      modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.EntityFrameworkCore/EasyAbp/EShop/Products/Products/ProductRepository.cs
  82. 2
      modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.HttpApi.Client/EasyAbp.EShop.Products.HttpApi.Client.csproj
  83. 2
      modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.HttpApi/EasyAbp.EShop.Products.HttpApi.csproj
  84. 18
      modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.HttpApi/EasyAbp/EShop/Products/Products/ProductController.cs
  85. 2
      modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.MongoDB/EasyAbp.EShop.Products.MongoDB.csproj
  86. 4
      modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Web/EasyAbp.EShop.Products.Web.csproj
  87. 15
      modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Web/Menus/ProductsMenuContributor.cs
  88. 28
      modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Web/Pages/EShop/Products/Products/Product/CreateModal.cshtml.cs
  89. 12
      modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Web/Pages/EShop/Products/Products/Product/EditModal.cshtml.cs
  90. 41
      modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Web/Pages/EShop/Products/Products/Product/Index.cshtml.cs
  91. 2
      modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Web/Pages/EShop/Products/Products/Product/ViewModels/CreateEditProductViewModel.cs
  92. 2
      modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Web/ProductsWebAutoMapperProfile.cs
  93. 2
      modules/EasyAbp.EShop.Products/test/EasyAbp.EShop.Products.HttpApi.Client.ConsoleTestApp/EasyAbp.EShop.Products.HttpApi.Client.ConsoleTestApp.csproj
  94. 6
      modules/EasyAbp.EShop.Products/test/EasyAbp.EShop.Products.TestBase/EasyAbp.EShop.Products.TestBase.csproj
  95. 4
      modules/EasyAbp.EShop.Stores/src/EasyAbp.EShop.Stores.Application.Contracts/EasyAbp.EShop.Stores.Application.Contracts.csproj
  96. 4
      modules/EasyAbp.EShop.Stores/src/EasyAbp.EShop.Stores.Application.Contracts/EasyAbp/EShop/Stores/EShopStoresApplicationContractsModule.cs
  97. 2
      modules/EasyAbp.EShop.Stores/src/EasyAbp.EShop.Stores.Application.Contracts/EasyAbp/EShop/Stores/Permissions/StoresPermissionDefinitionProvider.cs
  98. 2
      modules/EasyAbp.EShop.Stores/src/EasyAbp.EShop.Stores.Application.Contracts/EasyAbp/EShop/Stores/Permissions/StoresPermissions.cs
  99. 15
      modules/EasyAbp.EShop.Stores/src/EasyAbp.EShop.Stores.Application.Contracts/EasyAbp/EShop/Stores/StoreOwners/Dtos/CreateUpdateStoreOwnerDto.cs
  100. 13
      modules/EasyAbp.EShop.Stores/src/EasyAbp.EShop.Stores.Application.Contracts/EasyAbp/EShop/Stores/StoreOwners/Dtos/GetStoreOwnerListDto.cs

7
EShop.sln

@ -305,6 +305,8 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "samples", "samples", "{D261
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "EShopSample", "EShopSample", "{FE0A5FD6-AEE7-4738-9A6D-261BF086704D}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "EasyAbp.EShop.Stores.Application.Shared", "modules\EasyAbp.EShop.Stores\src\EasyAbp.EShop.Stores.Application.Shared\EasyAbp.EShop.Stores.Application.Shared.csproj", "{06700175-4E04-4993-A1FB-24E7A8835E19}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
@ -795,6 +797,10 @@ Global
{5929D955-4E2C-4E84-B9D7-F32A3375A1AA}.Debug|Any CPU.Build.0 = Debug|Any CPU
{5929D955-4E2C-4E84-B9D7-F32A3375A1AA}.Release|Any CPU.ActiveCfg = Release|Any CPU
{5929D955-4E2C-4E84-B9D7-F32A3375A1AA}.Release|Any CPU.Build.0 = Release|Any CPU
{06700175-4E04-4993-A1FB-24E7A8835E19}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{06700175-4E04-4993-A1FB-24E7A8835E19}.Debug|Any CPU.Build.0 = Debug|Any CPU
{06700175-4E04-4993-A1FB-24E7A8835E19}.Release|Any CPU.ActiveCfg = Release|Any CPU
{06700175-4E04-4993-A1FB-24E7A8835E19}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
@ -947,6 +953,7 @@ Global
{F5CD8112-382D-42AC-9D91-46B91D64FACB} = {9333EF8D-0A21-4586-81EB-9C39ECA2873C}
{5929D955-4E2C-4E84-B9D7-F32A3375A1AA} = {9333EF8D-0A21-4586-81EB-9C39ECA2873C}
{FE0A5FD6-AEE7-4738-9A6D-261BF086704D} = {D261DC47-83D7-4B7C-941E-E27291C78A52}
{06700175-4E04-4993-A1FB-24E7A8835E19} = {8CB54A0E-BAAE-4D10-81B5-6F902A7950EB}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {28315BFD-90E7-4E14-A2EA-F3D23AF4126F}

2
common.props

@ -20,7 +20,7 @@
<ItemGroup>
<PackageReference Include="ConfigureAwait.Fody" Version="3.3.1" PrivateAssets="All" />
<PackageReference Include="Fody" Version="6.2.0">
<PackageReference Include="Fody" Version="6.2.4">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
</PackageReference>

4
integration/EasyAbp.EShop/src/EasyAbp.EShop.Application.Contracts/EasyAbp.EShop.Application.Contracts.csproj

@ -8,8 +8,8 @@
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Volo.Abp.Ddd.Application.Contracts" Version="3.0.4" />
<PackageReference Include="Volo.Abp.Authorization" Version="3.0.4" />
<PackageReference Include="Volo.Abp.Ddd.Application.Contracts" Version="3.0.5" />
<PackageReference Include="Volo.Abp.Authorization" Version="3.0.5" />
<ProjectReference Include="..\..\..\..\modules\EasyAbp.EShop.Orders\src\EasyAbp.EShop.Orders.Application.Contracts\EasyAbp.EShop.Orders.Application.Contracts.csproj" />
<ProjectReference Include="..\..\..\..\modules\EasyAbp.EShop.Payments\src\EasyAbp.EShop.Payments.Application.Contracts\EasyAbp.EShop.Payments.Application.Contracts.csproj" />
<ProjectReference Include="..\..\..\..\modules\EasyAbp.EShop.Plugins\src\EasyAbp.EShop.Plugins.Application.Contracts\EasyAbp.EShop.Plugins.Application.Contracts.csproj" />

4
integration/EasyAbp.EShop/src/EasyAbp.EShop.Application/EasyAbp.EShop.Application.csproj

@ -8,8 +8,8 @@
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Volo.Abp.AutoMapper" Version="3.0.4" />
<PackageReference Include="Volo.Abp.Ddd.Application" Version="3.0.4" />
<PackageReference Include="Volo.Abp.AutoMapper" Version="3.0.5" />
<PackageReference Include="Volo.Abp.Ddd.Application" Version="3.0.5" />
<ProjectReference Include="..\..\..\..\modules\EasyAbp.EShop.Orders\src\EasyAbp.EShop.Orders.Application\EasyAbp.EShop.Orders.Application.csproj" />
<ProjectReference Include="..\..\..\..\modules\EasyAbp.EShop.Payments\src\EasyAbp.EShop.Payments.Application\EasyAbp.EShop.Payments.Application.csproj" />
<ProjectReference Include="..\..\..\..\modules\EasyAbp.EShop.Plugins\src\EasyAbp.EShop.Plugins.Application\EasyAbp.EShop.Plugins.Application.csproj" />

2
integration/EasyAbp.EShop/src/EasyAbp.EShop.Domain.Shared/EasyAbp.EShop.Domain.Shared.csproj

@ -9,7 +9,7 @@
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Volo.Abp.Validation" Version="3.0.4" />
<PackageReference Include="Volo.Abp.Validation" Version="3.0.5" />
<ProjectReference Include="..\..\..\..\modules\EasyAbp.EShop.Orders\src\EasyAbp.EShop.Orders.Domain.Shared\EasyAbp.EShop.Orders.Domain.Shared.csproj" />
<ProjectReference Include="..\..\..\..\modules\EasyAbp.EShop.Payments\src\EasyAbp.EShop.Payments.Domain.Shared\EasyAbp.EShop.Payments.Domain.Shared.csproj" />
<ProjectReference Include="..\..\..\..\modules\EasyAbp.EShop.Plugins\src\EasyAbp.EShop.Plugins.Domain.Shared\EasyAbp.EShop.Plugins.Domain.Shared.csproj" />

2
integration/EasyAbp.EShop/src/EasyAbp.EShop.Domain/EasyAbp.EShop.Domain.csproj

@ -8,7 +8,7 @@
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Volo.Abp.Ddd.Domain" Version="3.0.4" />
<PackageReference Include="Volo.Abp.Ddd.Domain" Version="3.0.5" />
<ProjectReference Include="..\..\..\..\modules\EasyAbp.EShop.Orders\src\EasyAbp.EShop.Orders.Domain\EasyAbp.EShop.Orders.Domain.csproj" />
<ProjectReference Include="..\..\..\..\modules\EasyAbp.EShop.Payments\src\EasyAbp.EShop.Payments.Domain\EasyAbp.EShop.Payments.Domain.csproj" />
<ProjectReference Include="..\..\..\..\modules\EasyAbp.EShop.Plugins\src\EasyAbp.EShop.Plugins.Domain\EasyAbp.EShop.Plugins.Domain.csproj" />

2
integration/EasyAbp.EShop/src/EasyAbp.EShop.EntityFrameworkCore/EasyAbp.EShop.EntityFrameworkCore.csproj

@ -8,7 +8,7 @@
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Volo.Abp.EntityFrameworkCore" Version="3.0.4" />
<PackageReference Include="Volo.Abp.EntityFrameworkCore" Version="3.0.5" />
<ProjectReference Include="..\..\..\..\modules\EasyAbp.EShop.Orders\src\EasyAbp.EShop.Orders.EntityFrameworkCore\EasyAbp.EShop.Orders.EntityFrameworkCore.csproj" />
<ProjectReference Include="..\..\..\..\modules\EasyAbp.EShop.Payments\src\EasyAbp.EShop.Payments.EntityFrameworkCore\EasyAbp.EShop.Payments.EntityFrameworkCore.csproj" />
<ProjectReference Include="..\..\..\..\modules\EasyAbp.EShop.Plugins\src\EasyAbp.EShop.Plugins.EntityFrameworkCore\EasyAbp.EShop.Plugins.EntityFrameworkCore.csproj" />

2
integration/EasyAbp.EShop/src/EasyAbp.EShop.HttpApi.Client/EasyAbp.EShop.HttpApi.Client.csproj

@ -8,7 +8,7 @@
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Volo.Abp.Http.Client" Version="3.0.4" />
<PackageReference Include="Volo.Abp.Http.Client" Version="3.0.5" />
<ProjectReference Include="..\..\..\..\modules\EasyAbp.EShop.Orders\src\EasyAbp.EShop.Orders.HttpApi.Client\EasyAbp.EShop.Orders.HttpApi.Client.csproj" />
<ProjectReference Include="..\..\..\..\modules\EasyAbp.EShop.Payments\src\EasyAbp.EShop.Payments.HttpApi.Client\EasyAbp.EShop.Payments.HttpApi.Client.csproj" />
<ProjectReference Include="..\..\..\..\modules\EasyAbp.EShop.Plugins\src\EasyAbp.EShop.Plugins.HttpApi.Client\EasyAbp.EShop.Plugins.HttpApi.Client.csproj" />

2
integration/EasyAbp.EShop/src/EasyAbp.EShop.HttpApi/EasyAbp.EShop.HttpApi.csproj

@ -8,7 +8,7 @@
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Volo.Abp.AspNetCore.Mvc" Version="3.0.4" />
<PackageReference Include="Volo.Abp.AspNetCore.Mvc" Version="3.0.5" />
<ProjectReference Include="..\..\..\..\modules\EasyAbp.EShop.Orders\src\EasyAbp.EShop.Orders.HttpApi\EasyAbp.EShop.Orders.HttpApi.csproj" />
<ProjectReference Include="..\..\..\..\modules\EasyAbp.EShop.Payments\src\EasyAbp.EShop.Payments.HttpApi\EasyAbp.EShop.Payments.HttpApi.csproj" />
<ProjectReference Include="..\..\..\..\modules\EasyAbp.EShop.Plugins\src\EasyAbp.EShop.Plugins.HttpApi\EasyAbp.EShop.Plugins.HttpApi.csproj" />

2
integration/EasyAbp.EShop/src/EasyAbp.EShop.MongoDB/EasyAbp.EShop.MongoDB.csproj

@ -8,7 +8,7 @@
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Volo.Abp.MongoDB" Version="3.0.4" />
<PackageReference Include="Volo.Abp.MongoDB" Version="3.0.5" />
<ProjectReference Include="..\..\..\..\modules\EasyAbp.EShop.Orders\src\EasyAbp.EShop.Orders.MongoDB\EasyAbp.EShop.Orders.MongoDB.csproj" />
<ProjectReference Include="..\..\..\..\modules\EasyAbp.EShop.Payments\src\EasyAbp.EShop.Payments.MongoDB\EasyAbp.EShop.Payments.MongoDB.csproj" />
<ProjectReference Include="..\..\..\..\modules\EasyAbp.EShop.Plugins\src\EasyAbp.EShop.Plugins.MongoDB\EasyAbp.EShop.Plugins.MongoDB.csproj" />

4
integration/EasyAbp.EShop/src/EasyAbp.EShop.Web/EasyAbp.EShop.Web.csproj

@ -12,8 +12,8 @@
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Volo.Abp.AutoMapper" Version="3.0.4" />
<PackageReference Include="Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared" Version="3.0.4" />
<PackageReference Include="Volo.Abp.AutoMapper" Version="3.0.5" />
<PackageReference Include="Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared" Version="3.0.5" />
<ProjectReference Include="..\..\..\..\modules\EasyAbp.EShop.Orders\src\EasyAbp.EShop.Orders.Web\EasyAbp.EShop.Orders.Web.csproj" />
<ProjectReference Include="..\..\..\..\modules\EasyAbp.EShop.Payments\src\EasyAbp.EShop.Payments.Web\EasyAbp.EShop.Payments.Web.csproj" />
<ProjectReference Include="..\..\..\..\modules\EasyAbp.EShop.Plugins\src\EasyAbp.EShop.Plugins.Web\EasyAbp.EShop.Plugins.Web.csproj" />

2
integration/EasyAbp.EShop/test/EasyAbp.EShop.HttpApi.Client.ConsoleTestApp/EasyAbp.EShop.HttpApi.Client.ConsoleTestApp.csproj

@ -7,7 +7,7 @@
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Volo.Abp.Http.Client.IdentityModel" Version="3.0.4" />
<PackageReference Include="Volo.Abp.Http.Client.IdentityModel" Version="3.0.5" />
<ProjectReference Include="..\..\src\EasyAbp.EShop.HttpApi.Client\EasyAbp.EShop.HttpApi.Client.csproj" />
</ItemGroup>

6
integration/EasyAbp.EShop/test/EasyAbp.EShop.TestBase/EasyAbp.EShop.TestBase.csproj

@ -14,9 +14,9 @@
<PackageReference Include="xunit" Version="2.4.1" />
<PackageReference Include="xunit.extensibility.execution" Version="2.4.1" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.1" />
<PackageReference Include="Volo.Abp.Autofac" Version="3.0.4" />
<PackageReference Include="Volo.Abp.Authorization" Version="3.0.4" />
<PackageReference Include="Volo.Abp.TestBase" Version="3.0.4" />
<PackageReference Include="Volo.Abp.Autofac" Version="3.0.5" />
<PackageReference Include="Volo.Abp.Authorization" Version="3.0.5" />
<PackageReference Include="Volo.Abp.TestBase" Version="3.0.5" />
<ProjectReference Include="..\..\src\EasyAbp.EShop.Domain\EasyAbp.EShop.Domain.csproj" />
</ItemGroup>

4
modules/EasyAbp.EShop.Orders/src/EasyAbp.EShop.Orders.Application.Contracts/EasyAbp.EShop.Orders.Application.Contracts.csproj

@ -8,8 +8,8 @@
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Volo.Abp.Ddd.Application.Contracts" Version="3.0.4" />
<PackageReference Include="Volo.Abp.Authorization" Version="3.0.4" />
<PackageReference Include="Volo.Abp.Ddd.Application.Contracts" Version="3.0.5" />
<PackageReference Include="Volo.Abp.Authorization" Version="3.0.5" />
<ProjectReference Include="..\EasyAbp.EShop.Orders.Domain.Shared\EasyAbp.EShop.Orders.Domain.Shared.csproj" />
</ItemGroup>

3
modules/EasyAbp.EShop.Orders/src/EasyAbp.EShop.Orders.Application.Contracts/EasyAbp/EShop/Orders/Orders/Dtos/CreateOrderDto.cs

@ -3,11 +3,12 @@ using System.Collections.Generic;
using System.ComponentModel;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using EasyAbp.EShop.Stores.Stores;
using Volo.Abp.Data;
namespace EasyAbp.EShop.Orders.Orders.Dtos
{
public class CreateOrderDto : IHasExtraProperties, IValidatableObject
public class CreateOrderDto : IHasExtraProperties, IValidatableObject, IMultiStore
{
[DisplayName("OrderStoreId")]
public Guid StoreId { get; set; }

5
modules/EasyAbp.EShop.Orders/src/EasyAbp.EShop.Orders.Application/EasyAbp.EShop.Orders.Application.csproj

@ -8,9 +8,10 @@
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Volo.Abp.AutoMapper" Version="3.0.4" />
<PackageReference Include="Volo.Abp.Ddd.Application" Version="3.0.4" />
<PackageReference Include="Volo.Abp.AutoMapper" Version="3.0.5" />
<PackageReference Include="Volo.Abp.Ddd.Application" Version="3.0.5" />
<ProjectReference Include="..\..\..\EasyAbp.EShop.Products\src\EasyAbp.EShop.Products.Application.Contracts\EasyAbp.EShop.Products.Application.Contracts.csproj" />
<ProjectReference Include="..\..\..\EasyAbp.EShop.Stores\src\EasyAbp.EShop.Stores.Application.Shared\EasyAbp.EShop.Stores.Application.Shared.csproj" />
<ProjectReference Include="..\EasyAbp.EShop.Orders.Application.Contracts\EasyAbp.EShop.Orders.Application.Contracts.csproj" />
<ProjectReference Include="..\EasyAbp.EShop.Orders.Domain\EasyAbp.EShop.Orders.Domain.csproj" />
</ItemGroup>

3
modules/EasyAbp.EShop.Orders/src/EasyAbp.EShop.Orders.Application/EasyAbp/EShop/Orders/EShopOrdersApplicationModule.cs

@ -1,4 +1,5 @@
using EasyAbp.EShop.Products;
using EasyAbp.EShop.Stores;
using Microsoft.Extensions.DependencyInjection;
using Volo.Abp.AutoMapper;
using Volo.Abp.Modularity;
@ -10,6 +11,8 @@ namespace EasyAbp.EShop.Orders
typeof(EShopOrdersDomainModule),
typeof(EShopOrdersApplicationContractsModule),
typeof(EShopProductsApplicationContractsModule),
typeof(EShopStoresDomainSharedModule),
typeof(EShopStoresApplicationSharedModule),
typeof(AbpDddApplicationModule),
typeof(AbpAutoMapperModule)
)]

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

@ -6,21 +6,25 @@ using EasyAbp.EShop.Orders.Authorization;
using EasyAbp.EShop.Orders.Orders.Dtos;
using EasyAbp.EShop.Products.Products;
using EasyAbp.EShop.Products.Products.Dtos;
using EasyAbp.EShop.Stores.Authorization;
using EasyAbp.EShop.Stores.Stores;
using Microsoft.AspNetCore.Authorization;
using Volo.Abp;
using Volo.Abp.Application.Dtos;
using Volo.Abp.Application.Services;
using Volo.Abp.Authorization;
using Volo.Abp.Users;
namespace EasyAbp.EShop.Orders.Orders
{
[Authorize]
public class OrderAppService : CrudAppService<Order, OrderDto, Guid, GetOrderListDto, CreateOrderDto>,
public class OrderAppService : MultiStoreCrudAppService<Order, OrderDto, Guid, GetOrderListDto, CreateOrderDto>,
IOrderAppService
{
protected override string CreatePolicyName { get; set; } = OrdersPermissions.Orders.Create;
protected override string GetPolicyName { get; set; } = OrdersPermissions.Orders.Default;
protected override string GetListPolicyName { get; set; } = OrdersPermissions.Orders.Default;
protected override string GetPolicyName { get; set; } = OrdersPermissions.Orders.Manage;
protected override string GetListPolicyName { get; set; } = OrdersPermissions.Orders.Manage;
protected override string CrossStorePolicyName { get; set; } = OrdersPermissions.Orders.CrossStore;
private readonly INewOrderGenerator _newOrderGenerator;
private readonly IProductAppService _productAppService;
@ -63,16 +67,7 @@ namespace EasyAbp.EShop.Orders.Orders
{
if (input.CustomerUserId != CurrentUser.GetId())
{
await AuthorizationService.CheckAsync(OrdersPermissions.Orders.Manage);
if (input.StoreId.HasValue)
{
// Todo: Check if current user is an admin of the store.
}
else
{
await AuthorizationService.CheckAsync(OrdersPermissions.Orders.CrossStore);
}
await CheckMultiStorePolicyAsync(input.StoreId, GetListPolicyName);
}
return await base.GetListAsync(input);
@ -80,23 +75,19 @@ namespace EasyAbp.EShop.Orders.Orders
public override async Task<OrderDto> GetAsync(Guid id)
{
await CheckGetPolicyAsync();
var order = await GetEntityByIdAsync(id);
if (order.CustomerUserId != CurrentUser.GetId())
{
await AuthorizationService.CheckAsync(OrdersPermissions.Orders.Manage);
// Todo: Check if current user is an admin of the store.
await CheckMultiStorePolicyAsync(order.StoreId, GetPolicyName);
}
return MapToGetOutputDto(order);
}
public override async Task<OrderDto> CreateAsync(CreateOrderDto input)
{
await CheckCreatePolicyAsync();
await CheckMultiStorePolicyAsync(input.StoreId, CreatePolicyName);
// Todo: Check if the store is open.
@ -106,7 +97,7 @@ namespace EasyAbp.EShop.Orders.Orders
var orderExtraProperties = new Dictionary<string, object>();
await _purchasableChecker.CheckAsync(input, productDict, orderExtraProperties);
var order = await _newOrderGenerator.GenerateAsync(input, productDict, orderExtraProperties);
await _orderManager.DiscountAsync(order, input.ExtraProperties);
@ -134,7 +125,7 @@ namespace EasyAbp.EShop.Orders.Orders
{
throw new NotSupportedException();
}
[RemoteService(false)]
public override Task DeleteAsync(Guid id)
{
@ -143,17 +134,13 @@ namespace EasyAbp.EShop.Orders.Orders
public virtual async Task<OrderDto> GetByOrderNumberAsync(string orderNumber)
{
await CheckGetPolicyAsync();
var order = await _repository.GetAsync(x => x.OrderNumber == orderNumber);
if (order.CustomerUserId != CurrentUser.GetId())
{
await AuthorizationService.CheckAsync(OrdersPermissions.Orders.Manage);
// Todo: Check if current user is an admin of the store.
await CheckMultiStorePolicyAsync(order.StoreId, OrdersPermissions.Orders.Manage);
}
return MapToGetOutputDto(order);
}
@ -161,12 +148,10 @@ namespace EasyAbp.EShop.Orders.Orders
public virtual async Task<OrderDto> CompleteAsync(Guid id)
{
var order = await GetEntityByIdAsync(id);
if (order.CustomerUserId != CurrentUser.GetId())
{
await AuthorizationService.CheckAsync(OrdersPermissions.Orders.Manage);
// Todo: Check if current user is an admin of the store.
await CheckMultiStorePolicyAsync(order.StoreId, OrdersPermissions.Orders.Manage);
}
order = await _orderManager.CompleteAsync(order);

1
modules/EasyAbp.EShop.Orders/src/EasyAbp.EShop.Orders.Application/EasyAbp/EShop/Orders/OrdersApplicationAutoMapperProfile.cs

@ -1,6 +1,7 @@
using EasyAbp.EShop.Orders.Orders;
using EasyAbp.EShop.Orders.Orders.Dtos;
using AutoMapper;
using Volo.Abp.ObjectExtending;
namespace EasyAbp.EShop.Orders
{

2
modules/EasyAbp.EShop.Orders/src/EasyAbp.EShop.Orders.Domain.Shared/EasyAbp.EShop.Orders.Domain.Shared.csproj

@ -9,7 +9,7 @@
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Volo.Abp.Validation" Version="3.0.4" />
<PackageReference Include="Volo.Abp.Validation" Version="3.0.5" />
<ProjectReference Include="..\..\..\EasyAbp.EShop.Payments\src\EasyAbp.EShop.Payments.Domain.Shared\EasyAbp.EShop.Payments.Domain.Shared.csproj" />
<ProjectReference Include="..\..\..\EasyAbp.EShop.Stores\src\EasyAbp.EShop.Stores.Domain.Shared\EasyAbp.EShop.Stores.Domain.Shared.csproj" />
</ItemGroup>

4
modules/EasyAbp.EShop.Orders/src/EasyAbp.EShop.Orders.Domain/EasyAbp.EShop.Orders.Domain.csproj

@ -8,8 +8,8 @@
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Volo.Abp.AutoMapper" Version="3.0.4" />
<PackageReference Include="Volo.Abp.Ddd.Domain" Version="3.0.4" />
<PackageReference Include="Volo.Abp.AutoMapper" Version="3.0.5" />
<PackageReference Include="Volo.Abp.Ddd.Domain" Version="3.0.5" />
<ProjectReference Include="..\..\..\EasyAbp.EShop.Payments\src\EasyAbp.EShop.Payments.Domain.Shared\EasyAbp.EShop.Payments.Domain.Shared.csproj" />
<ProjectReference Include="..\..\..\EasyAbp.EShop.Products\src\EasyAbp.EShop.Products.Domain.Shared\EasyAbp.EShop.Products.Domain.Shared.csproj" />
<ProjectReference Include="..\EasyAbp.EShop.Orders.Domain.Shared\EasyAbp.EShop.Orders.Domain.Shared.csproj" />

1
modules/EasyAbp.EShop.Orders/src/EasyAbp.EShop.Orders.Domain/EasyAbp/EShop/Orders/Orders/Order.cs

@ -1,5 +1,6 @@
using System;
using System.Collections.Generic;
using EasyAbp.EShop.Stores.Stores;
using System.Linq;
using JetBrains.Annotations;
using Volo.Abp.Domain.Entities.Auditing;

2
modules/EasyAbp.EShop.Orders/src/EasyAbp.EShop.Orders.EntityFrameworkCore/EasyAbp.EShop.Orders.EntityFrameworkCore.csproj

@ -8,7 +8,7 @@
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Volo.Abp.EntityFrameworkCore" Version="3.0.4" />
<PackageReference Include="Volo.Abp.EntityFrameworkCore" Version="3.0.5" />
<ProjectReference Include="..\EasyAbp.EShop.Orders.Domain\EasyAbp.EShop.Orders.Domain.csproj" />
</ItemGroup>

2
modules/EasyAbp.EShop.Orders/src/EasyAbp.EShop.Orders.HttpApi.Client/EasyAbp.EShop.Orders.HttpApi.Client.csproj

@ -8,7 +8,7 @@
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Volo.Abp.Http.Client" Version="3.0.4" />
<PackageReference Include="Volo.Abp.Http.Client" Version="3.0.5" />
<ProjectReference Include="..\EasyAbp.EShop.Orders.Application.Contracts\EasyAbp.EShop.Orders.Application.Contracts.csproj" />
</ItemGroup>

2
modules/EasyAbp.EShop.Orders/src/EasyAbp.EShop.Orders.HttpApi/EasyAbp.EShop.Orders.HttpApi.csproj

@ -8,7 +8,7 @@
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Volo.Abp.AspNetCore.Mvc" Version="3.0.4" />
<PackageReference Include="Volo.Abp.AspNetCore.Mvc" Version="3.0.5" />
<ProjectReference Include="..\EasyAbp.EShop.Orders.Application.Contracts\EasyAbp.EShop.Orders.Application.Contracts.csproj" />
</ItemGroup>

2
modules/EasyAbp.EShop.Orders/src/EasyAbp.EShop.Orders.MongoDB/EasyAbp.EShop.Orders.MongoDB.csproj

@ -8,7 +8,7 @@
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Volo.Abp.MongoDB" Version="3.0.4" />
<PackageReference Include="Volo.Abp.MongoDB" Version="3.0.5" />
<ProjectReference Include="..\EasyAbp.EShop.Orders.Domain\EasyAbp.EShop.Orders.Domain.csproj" />
</ItemGroup>

4
modules/EasyAbp.EShop.Orders/src/EasyAbp.EShop.Orders.Web/EasyAbp.EShop.Orders.Web.csproj

@ -12,8 +12,8 @@
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Volo.Abp.AutoMapper" Version="3.0.4" />
<PackageReference Include="Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared" Version="3.0.4" />
<PackageReference Include="Volo.Abp.AutoMapper" Version="3.0.5" />
<PackageReference Include="Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared" Version="3.0.5" />
</ItemGroup>
<ItemGroup>

3
modules/EasyAbp.EShop.Orders/src/EasyAbp.EShop.Orders.Web/OrdersWebAutoMapperProfile.cs

@ -1,5 +1,6 @@
using EasyAbp.EShop.Orders.Orders.Dtos;
using AutoMapper;
using Volo.Abp.ObjectExtending;
namespace EasyAbp.EShop.Orders.Web
{
@ -10,8 +11,6 @@ namespace EasyAbp.EShop.Orders.Web
/* You can configure your AutoMapper mapping configuration here.
* Alternatively, you can split your mapping configurations
* into multiple profile classes for a better organization. */
CreateMap<OrderDto, CreateOrderDto>();
CreateMap<OrderLineDto, CreateOrderLineDto>();
}
}
}

2
modules/EasyAbp.EShop.Orders/test/EasyAbp.EShop.Orders.HttpApi.Client.ConsoleTestApp/EasyAbp.EShop.Orders.HttpApi.Client.ConsoleTestApp.csproj

@ -7,7 +7,7 @@
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Volo.Abp.Http.Client.IdentityModel" Version="3.0.4" />
<PackageReference Include="Volo.Abp.Http.Client.IdentityModel" Version="3.0.5" />
<ProjectReference Include="..\..\src\EasyAbp.EShop.Orders.HttpApi.Client\EasyAbp.EShop.Orders.HttpApi.Client.csproj" />
</ItemGroup>

6
modules/EasyAbp.EShop.Orders/test/EasyAbp.EShop.Orders.TestBase/EasyAbp.EShop.Orders.TestBase.csproj

@ -14,9 +14,9 @@
<PackageReference Include="xunit" Version="2.4.1" />
<PackageReference Include="xunit.extensibility.execution" Version="2.4.1" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.1" />
<PackageReference Include="Volo.Abp.Autofac" Version="3.0.4" />
<PackageReference Include="Volo.Abp.Authorization" Version="3.0.4" />
<PackageReference Include="Volo.Abp.TestBase" Version="3.0.4" />
<PackageReference Include="Volo.Abp.Autofac" Version="3.0.5" />
<PackageReference Include="Volo.Abp.Authorization" Version="3.0.5" />
<PackageReference Include="Volo.Abp.TestBase" Version="3.0.5" />
<ProjectReference Include="..\..\src\EasyAbp.EShop.Orders.Domain\EasyAbp.EShop.Orders.Domain.csproj" />
</ItemGroup>

4
modules/EasyAbp.EShop.Payments/src/EasyAbp.EShop.Payments.Application.Contracts/EasyAbp.EShop.Payments.Application.Contracts.csproj

@ -9,8 +9,8 @@
<ItemGroup>
<PackageReference Include="EasyAbp.PaymentService.Domain.Shared" Version="1.1.7" />
<PackageReference Include="Volo.Abp.Ddd.Application.Contracts" Version="3.0.4" />
<PackageReference Include="Volo.Abp.Authorization" Version="3.0.4" />
<PackageReference Include="Volo.Abp.Ddd.Application.Contracts" Version="3.0.5" />
<PackageReference Include="Volo.Abp.Authorization" Version="3.0.5" />
<ProjectReference Include="..\EasyAbp.EShop.Payments.Domain.Shared\EasyAbp.EShop.Payments.Domain.Shared.csproj" />
</ItemGroup>

5
modules/EasyAbp.EShop.Payments/src/EasyAbp.EShop.Payments.Application/EasyAbp.EShop.Payments.Application.csproj

@ -8,9 +8,10 @@
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Volo.Abp.AutoMapper" Version="3.0.4" />
<PackageReference Include="Volo.Abp.Ddd.Application" Version="3.0.4" />
<PackageReference Include="Volo.Abp.AutoMapper" Version="3.0.5" />
<PackageReference Include="Volo.Abp.Ddd.Application" Version="3.0.5" />
<ProjectReference Include="..\..\..\EasyAbp.EShop.Orders\src\EasyAbp.EShop.Orders.Application.Contracts\EasyAbp.EShop.Orders.Application.Contracts.csproj" />
<ProjectReference Include="..\..\..\EasyAbp.EShop.Stores\src\EasyAbp.EShop.Stores.Application.Contracts\EasyAbp.EShop.Stores.Application.Contracts.csproj" />
<ProjectReference Include="..\EasyAbp.EShop.Payments.Application.Contracts\EasyAbp.EShop.Payments.Application.Contracts.csproj" />
<ProjectReference Include="..\EasyAbp.EShop.Payments.Domain\EasyAbp.EShop.Payments.Domain.csproj" />
</ItemGroup>

20
modules/EasyAbp.EShop.Payments/src/EasyAbp.EShop.Payments.Application/EasyAbp/EShop/Payments/Payments/PaymentAppService.cs

@ -1,15 +1,15 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using EasyAbp.EShop.Orders.Orders;
using EasyAbp.EShop.Orders.Orders.Dtos;
using EasyAbp.EShop.Payments.Authorization;
using EasyAbp.EShop.Payments.Payments;
using EasyAbp.EShop.Payments.Payments.Dtos;
using EasyAbp.EShop.Stores.Permissions;
using EasyAbp.PaymentService.Payments;
using Microsoft.AspNetCore.Authorization;
using Volo.Abp;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using EasyAbp.EShop.Stores.Stores;
using Volo.Abp.Application.Dtos;
using Volo.Abp.Application.Services;
using Volo.Abp.EventBus.Distributed;
@ -21,8 +21,8 @@ namespace EasyAbp.EShop.Payments.Payments
public class PaymentAppService : ReadOnlyAppService<Payment, PaymentDto, Guid, GetPaymentListDto>,
IPaymentAppService
{
protected override string GetPolicyName { get; set; } = PaymentsPermissions.Payments.Default;
protected override string GetListPolicyName { get; set; } = PaymentsPermissions.Payments.Default;
protected override string GetPolicyName { get; set; } = PaymentsPermissions.Payments.Manage;
protected override string GetListPolicyName { get; set; } = PaymentsPermissions.Payments.Manage;
private readonly IPayableChecker _payableChecker;
private readonly IDistributedEventBus _distributedEventBus;
@ -48,7 +48,7 @@ namespace EasyAbp.EShop.Payments.Payments
if (payment.UserId != CurrentUser.GetId())
{
await AuthorizationService.CheckAsync(PaymentsPermissions.Payments.Manage);
await CheckPolicyAsync(GetPolicyName);
}
return payment;
@ -71,7 +71,7 @@ namespace EasyAbp.EShop.Payments.Payments
{
if (input.UserId != CurrentUser.GetId())
{
await AuthorizationService.CheckAsync(PaymentsPermissions.Payments.Manage);
await CheckPolicyAsync(GetListPolicyName);
}
return await base.GetListAsync(input);

19
modules/EasyAbp.EShop.Payments/src/EasyAbp.EShop.Payments.Application/EasyAbp/EShop/Payments/Refunds/RefundAppService.cs

@ -1,14 +1,15 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using EasyAbp.EShop.Orders.Orders;
using EasyAbp.EShop.Payments.Authorization;
using EasyAbp.EShop.Payments.Payments;
using EasyAbp.EShop.Payments.Refunds.Dtos;
using EasyAbp.EShop.Stores.Permissions;
using EasyAbp.EShop.Orders.Orders;
using EasyAbp.PaymentService.Payments;
using EasyAbp.PaymentService.Refunds;
using Microsoft.AspNetCore.Authorization;
using System;
using System.Linq;
using System.Collections.Generic;
using System.Threading.Tasks;
using Volo.Abp.Application.Dtos;
using Volo.Abp.Application.Services;
using Volo.Abp.Data;
@ -22,8 +23,8 @@ namespace EasyAbp.EShop.Payments.Refunds
public class RefundAppService : ReadOnlyAppService<Refund, RefundDto, Guid, GetRefundListDto>,
IRefundAppService
{
protected override string GetPolicyName { get; set; } = PaymentsPermissions.Refunds.Default;
protected override string GetListPolicyName { get; set; } = PaymentsPermissions.Refunds.Default;
protected override string GetPolicyName { get; set; } = PaymentsPermissions.Refunds.Manage;
protected override string GetListPolicyName { get; set; } = PaymentsPermissions.Refunds.Manage;
private readonly IOrderAppService _orderAppService;
private readonly IDistributedEventBus _distributedEventBus;
@ -54,7 +55,7 @@ namespace EasyAbp.EShop.Payments.Refunds
if (payment.UserId != CurrentUser.GetId())
{
await AuthorizationService.CheckAsync(PaymentsPermissions.Refunds.Manage);
await CheckPolicyAsync(GetPolicyName);
}
return refund;
@ -72,7 +73,7 @@ namespace EasyAbp.EShop.Payments.Refunds
{
if (input.UserId != CurrentUser.GetId())
{
await AuthorizationService.CheckAsync(PaymentsPermissions.Refunds.Manage);
await CheckPolicyAsync(GetListPolicyName);
}
return await base.GetListAsync(input);

2
modules/EasyAbp.EShop.Payments/src/EasyAbp.EShop.Payments.Domain.Shared/EasyAbp.EShop.Payments.Domain.Shared.csproj

@ -9,7 +9,7 @@
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Volo.Abp.Validation" Version="3.0.4" />
<PackageReference Include="Volo.Abp.Validation" Version="3.0.5" />
<PackageReference Include="EasyAbp.PaymentService.Domain.Shared" Version="1.1.7" />
</ItemGroup>

4
modules/EasyAbp.EShop.Payments/src/EasyAbp.EShop.Payments.Domain/EasyAbp.EShop.Payments.Domain.csproj

@ -8,8 +8,8 @@
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Volo.Abp.AutoMapper" Version="3.0.4" />
<PackageReference Include="Volo.Abp.Ddd.Domain" Version="3.0.4" />
<PackageReference Include="Volo.Abp.AutoMapper" Version="3.0.5" />
<PackageReference Include="Volo.Abp.Ddd.Domain" Version="3.0.5" />
<ProjectReference Include="..\..\..\EasyAbp.EShop.Stores\src\EasyAbp.EShop.Stores.Domain.Shared\EasyAbp.EShop.Stores.Domain.Shared.csproj" />
<ProjectReference Include="..\EasyAbp.EShop.Payments.Domain.Shared\EasyAbp.EShop.Payments.Domain.Shared.csproj" />
</ItemGroup>

2
modules/EasyAbp.EShop.Payments/src/EasyAbp.EShop.Payments.EntityFrameworkCore/EasyAbp.EShop.Payments.EntityFrameworkCore.csproj

@ -8,7 +8,7 @@
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Volo.Abp.EntityFrameworkCore" Version="3.0.4" />
<PackageReference Include="Volo.Abp.EntityFrameworkCore" Version="3.0.5" />
<ProjectReference Include="..\EasyAbp.EShop.Payments.Domain\EasyAbp.EShop.Payments.Domain.csproj" />
</ItemGroup>

2
modules/EasyAbp.EShop.Payments/src/EasyAbp.EShop.Payments.HttpApi.Client/EasyAbp.EShop.Payments.HttpApi.Client.csproj

@ -8,7 +8,7 @@
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Volo.Abp.Http.Client" Version="3.0.4" />
<PackageReference Include="Volo.Abp.Http.Client" Version="3.0.5" />
<ProjectReference Include="..\EasyAbp.EShop.Payments.Application.Contracts\EasyAbp.EShop.Payments.Application.Contracts.csproj" />
</ItemGroup>

2
modules/EasyAbp.EShop.Payments/src/EasyAbp.EShop.Payments.HttpApi/EasyAbp.EShop.Payments.HttpApi.csproj

@ -8,7 +8,7 @@
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Volo.Abp.AspNetCore.Mvc" Version="3.0.4" />
<PackageReference Include="Volo.Abp.AspNetCore.Mvc" Version="3.0.5" />
<ProjectReference Include="..\EasyAbp.EShop.Payments.Application.Contracts\EasyAbp.EShop.Payments.Application.Contracts.csproj" />
</ItemGroup>

2
modules/EasyAbp.EShop.Payments/src/EasyAbp.EShop.Payments.MongoDB/EasyAbp.EShop.Payments.MongoDB.csproj

@ -8,7 +8,7 @@
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Volo.Abp.MongoDB" Version="3.0.4" />
<PackageReference Include="Volo.Abp.MongoDB" Version="3.0.5" />
<ProjectReference Include="..\EasyAbp.EShop.Payments.Domain\EasyAbp.EShop.Payments.Domain.csproj" />
</ItemGroup>

4
modules/EasyAbp.EShop.Payments/src/EasyAbp.EShop.Payments.Web/EasyAbp.EShop.Payments.Web.csproj

@ -12,8 +12,8 @@
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Volo.Abp.AutoMapper" Version="3.0.4" />
<PackageReference Include="Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared" Version="3.0.4" />
<PackageReference Include="Volo.Abp.AutoMapper" Version="3.0.5" />
<PackageReference Include="Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared" Version="3.0.5" />
</ItemGroup>
<ItemGroup>

2
modules/EasyAbp.EShop.Payments/test/EasyAbp.EShop.Payments.HttpApi.Client.ConsoleTestApp/EasyAbp.EShop.Payments.HttpApi.Client.ConsoleTestApp.csproj

@ -7,7 +7,7 @@
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Volo.Abp.Http.Client.IdentityModel" Version="3.0.4" />
<PackageReference Include="Volo.Abp.Http.Client.IdentityModel" Version="3.0.5" />
<ProjectReference Include="..\..\src\EasyAbp.EShop.Payments.HttpApi.Client\EasyAbp.EShop.Payments.HttpApi.Client.csproj" />
</ItemGroup>

6
modules/EasyAbp.EShop.Payments/test/EasyAbp.EShop.Payments.TestBase/EasyAbp.EShop.Payments.TestBase.csproj

@ -14,9 +14,9 @@
<PackageReference Include="xunit" Version="2.4.1" />
<PackageReference Include="xunit.extensibility.execution" Version="2.4.1" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.1" />
<PackageReference Include="Volo.Abp.Autofac" Version="3.0.4" />
<PackageReference Include="Volo.Abp.Authorization" Version="3.0.4" />
<PackageReference Include="Volo.Abp.TestBase" Version="3.0.4" />
<PackageReference Include="Volo.Abp.Autofac" Version="3.0.5" />
<PackageReference Include="Volo.Abp.Authorization" Version="3.0.5" />
<PackageReference Include="Volo.Abp.TestBase" Version="3.0.5" />
<ProjectReference Include="..\..\src\EasyAbp.EShop.Payments.Domain\EasyAbp.EShop.Payments.Domain.csproj" />
</ItemGroup>

4
modules/EasyAbp.EShop.Plugins/src/EasyAbp.EShop.Plugins.Application.Contracts/EasyAbp.EShop.Plugins.Application.Contracts.csproj

@ -8,8 +8,8 @@
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Volo.Abp.Ddd.Application.Contracts" Version="3.0.4" />
<PackageReference Include="Volo.Abp.Authorization" Version="3.0.4" />
<PackageReference Include="Volo.Abp.Ddd.Application.Contracts" Version="3.0.5" />
<PackageReference Include="Volo.Abp.Authorization" Version="3.0.5" />
<ProjectReference Include="..\EasyAbp.EShop.Plugins.Domain.Shared\EasyAbp.EShop.Plugins.Domain.Shared.csproj" />
</ItemGroup>

4
modules/EasyAbp.EShop.Plugins/src/EasyAbp.EShop.Plugins.Application/EasyAbp.EShop.Plugins.Application.csproj

@ -8,8 +8,8 @@
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Volo.Abp.AutoMapper" Version="3.0.4" />
<PackageReference Include="Volo.Abp.Ddd.Application" Version="3.0.4" />
<PackageReference Include="Volo.Abp.AutoMapper" Version="3.0.5" />
<PackageReference Include="Volo.Abp.Ddd.Application" Version="3.0.5" />
<ProjectReference Include="..\EasyAbp.EShop.Plugins.Application.Contracts\EasyAbp.EShop.Plugins.Application.Contracts.csproj" />
<ProjectReference Include="..\EasyAbp.EShop.Plugins.Domain\EasyAbp.EShop.Plugins.Domain.csproj" />
</ItemGroup>

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

@ -9,7 +9,7 @@
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Volo.Abp.Validation" Version="3.0.4" />
<PackageReference Include="Volo.Abp.Validation" Version="3.0.5" />
</ItemGroup>
<ItemGroup>

2
modules/EasyAbp.EShop.Plugins/src/EasyAbp.EShop.Plugins.Domain/EasyAbp.EShop.Plugins.Domain.csproj

@ -8,7 +8,7 @@
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Volo.Abp.Ddd.Domain" Version="3.0.4" />
<PackageReference Include="Volo.Abp.Ddd.Domain" Version="3.0.5" />
<ProjectReference Include="..\EasyAbp.EShop.Plugins.Domain.Shared\EasyAbp.EShop.Plugins.Domain.Shared.csproj" />
</ItemGroup>

2
modules/EasyAbp.EShop.Plugins/src/EasyAbp.EShop.Plugins.EntityFrameworkCore/EasyAbp.EShop.Plugins.EntityFrameworkCore.csproj

@ -8,7 +8,7 @@
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Volo.Abp.EntityFrameworkCore" Version="3.0.4" />
<PackageReference Include="Volo.Abp.EntityFrameworkCore" Version="3.0.5" />
<ProjectReference Include="..\EasyAbp.EShop.Plugins.Domain\EasyAbp.EShop.Plugins.Domain.csproj" />
</ItemGroup>

2
modules/EasyAbp.EShop.Plugins/src/EasyAbp.EShop.Plugins.HttpApi.Client/EasyAbp.EShop.Plugins.HttpApi.Client.csproj

@ -8,7 +8,7 @@
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Volo.Abp.Http.Client" Version="3.0.4" />
<PackageReference Include="Volo.Abp.Http.Client" Version="3.0.5" />
<ProjectReference Include="..\EasyAbp.EShop.Plugins.Application.Contracts\EasyAbp.EShop.Plugins.Application.Contracts.csproj" />
</ItemGroup>

2
modules/EasyAbp.EShop.Plugins/src/EasyAbp.EShop.Plugins.HttpApi/EasyAbp.EShop.Plugins.HttpApi.csproj

@ -8,7 +8,7 @@
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Volo.Abp.AspNetCore.Mvc" Version="3.0.4" />
<PackageReference Include="Volo.Abp.AspNetCore.Mvc" Version="3.0.5" />
<ProjectReference Include="..\EasyAbp.EShop.Plugins.Application.Contracts\EasyAbp.EShop.Plugins.Application.Contracts.csproj" />
</ItemGroup>

2
modules/EasyAbp.EShop.Plugins/src/EasyAbp.EShop.Plugins.MongoDB/EasyAbp.EShop.Plugins.MongoDB.csproj

@ -8,7 +8,7 @@
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Volo.Abp.MongoDB" Version="3.0.4" />
<PackageReference Include="Volo.Abp.MongoDB" Version="3.0.5" />
<ProjectReference Include="..\EasyAbp.EShop.Plugins.Domain\EasyAbp.EShop.Plugins.Domain.csproj" />
</ItemGroup>

4
modules/EasyAbp.EShop.Plugins/src/EasyAbp.EShop.Plugins.Web/EasyAbp.EShop.Plugins.Web.csproj

@ -12,8 +12,8 @@
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Volo.Abp.AutoMapper" Version="3.0.4" />
<PackageReference Include="Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared" Version="3.0.4" />
<PackageReference Include="Volo.Abp.AutoMapper" Version="3.0.5" />
<PackageReference Include="Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared" Version="3.0.5" />
</ItemGroup>
<ItemGroup>

2
modules/EasyAbp.EShop.Plugins/test/EasyAbp.EShop.Plugins.HttpApi.Client.ConsoleTestApp/EasyAbp.EShop.Plugins.HttpApi.Client.ConsoleTestApp.csproj

@ -7,7 +7,7 @@
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Volo.Abp.Http.Client.IdentityModel" Version="3.0.4" />
<PackageReference Include="Volo.Abp.Http.Client.IdentityModel" Version="3.0.5" />
<ProjectReference Include="..\..\src\EasyAbp.EShop.Plugins.HttpApi.Client\EasyAbp.EShop.Plugins.HttpApi.Client.csproj" />
</ItemGroup>

6
modules/EasyAbp.EShop.Plugins/test/EasyAbp.EShop.Plugins.TestBase/EasyAbp.EShop.Plugins.TestBase.csproj

@ -14,9 +14,9 @@
<PackageReference Include="xunit" Version="2.4.1" />
<PackageReference Include="xunit.extensibility.execution" Version="2.4.1" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.1" />
<PackageReference Include="Volo.Abp.Autofac" Version="3.0.4" />
<PackageReference Include="Volo.Abp.Authorization" Version="3.0.4" />
<PackageReference Include="Volo.Abp.TestBase" Version="3.0.4" />
<PackageReference Include="Volo.Abp.Autofac" Version="3.0.5" />
<PackageReference Include="Volo.Abp.Authorization" Version="3.0.5" />
<PackageReference Include="Volo.Abp.TestBase" Version="3.0.5" />
<ProjectReference Include="..\..\src\EasyAbp.EShop.Plugins.Domain\EasyAbp.EShop.Plugins.Domain.csproj" />
</ItemGroup>

6
modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Application.Contracts/EasyAbp.EShop.Products.Application.Contracts.csproj

@ -8,9 +8,9 @@
</PropertyGroup>
<ItemGroup>
<PackageReference Include="EasyAbp.Abp.Trees.Application.Contracts" Version="0.290.4" />
<PackageReference Include="Volo.Abp.Ddd.Application.Contracts" Version="3.0.4" />
<PackageReference Include="Volo.Abp.Authorization" Version="3.0.4" />
<PackageReference Include="EasyAbp.Abp.Trees.Application.Contracts" Version="1.0.0" />
<PackageReference Include="Volo.Abp.Ddd.Application.Contracts" Version="3.0.5" />
<PackageReference Include="Volo.Abp.Authorization" Version="3.0.5" />
<ProjectReference Include="..\EasyAbp.EShop.Products.Domain.Shared\EasyAbp.EShop.Products.Domain.Shared.csproj" />
</ItemGroup>

3
modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Application.Contracts/EasyAbp/EShop/Products/Permissions/ProductsPermissionDefinitionProvider.cs

@ -18,7 +18,8 @@ namespace EasyAbp.EShop.Products.Permissions
categories.AddChild(ProductsPermissions.Categories.Create, L("Permission:Create"));
categories.AddChild(ProductsPermissions.Categories.Update, L("Permission:Update"));
categories.AddChild(ProductsPermissions.Categories.Delete, L("Permission:Delete"));
categories.AddChild(ProductsPermissions.Categories.ShowHidden, L("Permission:ShowHidden"));
var product = moduleGroup.AddPermission(ProductsPermissions.Products.Default, L("Permission:Product"));
product.AddChild(ProductsPermissions.Products.CrossStore, L("Permission:CrossStore"));
product.AddChild(ProductsPermissions.Products.Create, L("Permission:Create"));

1
modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Application.Contracts/EasyAbp/EShop/Products/Permissions/ProductsPermissions.cs

@ -18,6 +18,7 @@ namespace EasyAbp.EShop.Products.Permissions
public const string Delete = Default + ".Delete";
public const string Update = Default + ".Update";
public const string Create = Default + ".Create";
public const string ShowHidden = Default + ".ShowHidden";
}
public class Products

2
modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Application.Contracts/EasyAbp/EShop/Products/Products/Dtos/GetProductListDto.cs

@ -1,10 +1,12 @@
using System;
using System.ComponentModel.DataAnnotations;
using Volo.Abp.Application.Dtos;
namespace EasyAbp.EShop.Products.Products.Dtos
{
public class GetProductListDto : PagedAndSortedResultRequestDto
{
[Required]
public Guid StoreId { get; set; }
public Guid? CategoryId { get; set; }

3
modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Application.Contracts/EasyAbp/EShop/Products/Products/IProductAppService.cs

@ -1,7 +1,6 @@
using EasyAbp.EShop.Products.Products.Dtos;
using System;
using System.Collections.Generic;
using System.Threading.Tasks;
using EasyAbp.EShop.Products.Products.Dtos;
using Volo.Abp.Application.Services;
namespace EasyAbp.EShop.Products.Products

0
modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Application/EasyAbp/EShop/Products/Products/NotAllowedToGetProductListWithShowHiddenException.cs → modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Application.Contracts/EasyAbp/EShop/Products/Products/NotAllowedToGetProductListWithShowHiddenException.cs

0
modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Application/EasyAbp/EShop/Products/Products/ProductAttributeOptionsDeletionFailedException.cs → modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Application.Contracts/EasyAbp/EShop/Products/Products/ProductAttributeOptionsDeletionFailedException.cs

0
modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Application/EasyAbp/EShop/Products/Products/ProductAttributesModificationFailedException.cs → modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Application.Contracts/EasyAbp/EShop/Products/Products/ProductAttributesModificationFailedException.cs

0
modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Application/EasyAbp/EShop/Products/Products/StaticProductCannotBeModifiedException.cs → modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Application.Contracts/EasyAbp/EShop/Products/Products/StaticProductCannotBeModifiedException.cs

0
modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Application/EasyAbp/EShop/Products/Products/StoreIsNotProductOwnerException.cs → modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Application.Contracts/EasyAbp/EShop/Products/Products/StoreIsNotProductOwnerException.cs

7
modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Application/EasyAbp.EShop.Products.Application.csproj

@ -8,9 +8,10 @@
</PropertyGroup>
<ItemGroup>
<PackageReference Include="EasyAbp.Abp.Trees.Application" Version="0.290.4" />
<PackageReference Include="Volo.Abp.AutoMapper" Version="3.0.4" />
<PackageReference Include="Volo.Abp.Ddd.Application" Version="3.0.4" />
<PackageReference Include="EasyAbp.Abp.Trees.Application" Version="1.0.0" />
<PackageReference Include="Volo.Abp.AutoMapper" Version="3.0.5" />
<PackageReference Include="Volo.Abp.Ddd.Application" Version="3.0.5" />
<ProjectReference Include="..\..\..\EasyAbp.EShop.Stores\src\EasyAbp.EShop.Stores.Application.Shared\EasyAbp.EShop.Stores.Application.Shared.csproj" />
<ProjectReference Include="..\EasyAbp.EShop.Products.Application.Contracts\EasyAbp.EShop.Products.Application.Contracts.csproj" />
<ProjectReference Include="..\EasyAbp.EShop.Products.Domain\EasyAbp.EShop.Products.Domain.csproj" />
</ItemGroup>

6
modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Application/EasyAbp/EShop/Products/Categories/CategoryAppService.cs

@ -3,6 +3,7 @@ using System.Linq;
using System.Threading.Tasks;
using EasyAbp.EShop.Products.Categories.Dtos;
using EasyAbp.EShop.Products.Permissions;
using EasyAbp.EShop.Stores.Authorization;
using Microsoft.AspNetCore.Authorization;
using Volo.Abp.Application.Dtos;
using Volo.Abp.Application.Services;
@ -34,10 +35,7 @@ namespace EasyAbp.EShop.Products.Categories
public override async Task<PagedResultDto<CategoryDto>> GetListAsync(GetCategoryListDto input)
{
// Todo: Check if current user is an admin of the store.
var isCurrentUserStoreAdmin = true && await AuthorizationService.IsGrantedAsync(ProductsPermissions.Categories.Default);
if (input.ShowHidden && !isCurrentUserStoreAdmin)
if (input.ShowHidden && !await AuthorizationService.IsGrantedAsync(ProductsPermissions.Categories.ShowHidden))
{
throw new NotAllowedToGetCategoryListWithShowHiddenException();
}

3
modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Application/EasyAbp/EShop/Products/EShopProductsApplicationModule.cs

@ -1,4 +1,5 @@
using EasyAbp.Abp.Trees;
using EasyAbp.EShop.Stores;
using Microsoft.Extensions.DependencyInjection;
using Volo.Abp.AutoMapper;
using Volo.Abp.Modularity;
@ -9,6 +10,8 @@ namespace EasyAbp.EShop.Products
[DependsOn(
typeof(EShopProductsDomainModule),
typeof(EShopProductsApplicationContractsModule),
typeof(EShopStoresDomainSharedModule),
typeof(EShopStoresApplicationSharedModule),
typeof(AbpDddApplicationModule),
typeof(AbpAutoMapperModule),
typeof(AbpTreesApplicationModule)

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

@ -1,10 +1,9 @@
using EasyAbp.EShop.Products.Permissions;
using EasyAbp.EShop.Products.ProductCategories.Dtos;
using System;
using System.Linq;
using System.Threading.Tasks;
using EasyAbp.EShop.Products.Permissions;
using EasyAbp.EShop.Products.ProductCategories.Dtos;
using Volo.Abp;
using Volo.Abp.Application.Dtos;
using Volo.Abp.Application.Services;
namespace EasyAbp.EShop.Products.ProductCategories

40
modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Application/EasyAbp/EShop/Products/ProductInventories/ProductInventoryAppService.cs

@ -1,10 +1,11 @@
using System;
using System.Threading.Tasks;
using EasyAbp.EShop.Products.Permissions;
using EasyAbp.EShop.Products.ProductInventories.Dtos;
using EasyAbp.EShop.Products.Products;
using EasyAbp.EShop.Products.ProductStores;
using EasyAbp.EShop.Stores.Authorization;
using Microsoft.AspNetCore.Authorization;
using System;
using System.Threading.Tasks;
using Volo.Abp.Application.Services;
using Volo.Abp.Validation;
@ -41,21 +42,16 @@ namespace EasyAbp.EShop.Products.ProductInventories
return ObjectMapper.Map<ProductInventory, ProductInventoryDto>(productInventory);
}
[Authorize(ProductsPermissions.ProductInventory.Update)]
public virtual async Task<ProductInventoryDto> UpdateAsync(UpdateProductInventoryDto input)
{
if (!await AuthorizationService.IsGrantedAsync(ProductsPermissions.ProductInventory.CrossStore))
await AuthorizationService.CheckMultiStorePolicyAsync(input.StoreId,
ProductsPermissions.ProductInventory.Update, ProductsPermissions.ProductInventory.CrossStore);
if (input.StoreId.HasValue)
{
if (!input.StoreId.HasValue)
{
throw new AbpValidationException("StoreId should not be null.");
}
// Todo: Check if current user is an admin of the store.
await _productStoreRepository.GetAsync(input.ProductId, input.StoreId.Value);
await CheckStoreIsProductOwnerAsync(input.ProductId, input.StoreId.Value);
}
var productInventory = await _repository.FindAsync(x => x.ProductSkuId == input.ProductSkuId);
if (productInventory == null)
@ -65,17 +61,28 @@ namespace EasyAbp.EShop.Products.ProductInventories
await _repository.InsertAsync(productInventory, true);
}
await ChangeInventoryAsync(productInventory, input.ChangedInventory);
return ObjectMapper.Map<ProductInventory, ProductInventoryDto>(productInventory);
}
protected virtual async Task CheckStoreIsProductOwnerAsync(Guid productId, Guid storeId)
{
var productStore = await _productStoreRepository.GetAsync(productId, storeId);
if (!productStore.IsOwner)
{
throw new StoreIsNotProductOwnerException(productId, storeId);
}
}
protected virtual async Task ChangeInventoryAsync(ProductInventory productInventory, int changedInventory)
{
if (changedInventory >= 0)
{
if (!await _productInventoryProvider.TryIncreaseInventoryAsync(productInventory, changedInventory, false))
if (!await _productInventoryProvider.TryIncreaseInventoryAsync(productInventory, changedInventory,
false))
{
throw new InventoryChangeFailedException(productInventory.ProductId, productInventory.ProductSkuId,
productInventory.Inventory, changedInventory);
@ -83,7 +90,8 @@ namespace EasyAbp.EShop.Products.ProductInventories
}
else
{
if (!await _productInventoryProvider.TryReduceInventoryAsync(productInventory, -changedInventory, false))
if (!await _productInventoryProvider.TryReduceInventoryAsync(productInventory, -changedInventory, false)
)
{
throw new InventoryChangeFailedException(productInventory.ProductId, productInventory.ProductSkuId,
productInventory.Inventory, changedInventory);

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

@ -1,12 +1,12 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using EasyAbp.EShop.Products.Permissions;
using EasyAbp.EShop.Products.Products.Dtos;
using EasyAbp.EShop.Products.ProductStores;
using EasyAbp.EShop.Products.ProductTypes;
using Microsoft.AspNetCore.Authorization;
using EasyAbp.EShop.Stores.Authorization;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Volo.Abp;
using Volo.Abp.Application.Dtos;
using Volo.Abp.Application.Services;
@ -14,7 +14,8 @@ using Volo.Abp.Domain.Entities;
namespace EasyAbp.EShop.Products.Products
{
public class ProductAppService : CrudAppService<Product, ProductDto, Guid, GetProductListDto, CreateUpdateProductDto, CreateUpdateProductDto>,
public class ProductAppService : CrudAppService<Product, ProductDto, Guid, GetProductListDto, CreateUpdateProductDto
, CreateUpdateProductDto>,
IProductAppService
{
protected override string CreatePolicyName { get; set; } = ProductsPermissions.Products.Create;
@ -24,7 +25,6 @@ namespace EasyAbp.EShop.Products.Products
protected override string GetListPolicyName { get; set; } = null;
private readonly IProductManager _productManager;
private readonly IProductPriceProvider _productPriceProvider;
private readonly IProductInventoryProvider _productInventoryProvider;
private readonly IAttributeOptionIdsSerializer _attributeOptionIdsSerializer;
private readonly IProductStoreRepository _productStoreRepository;
@ -33,7 +33,6 @@ namespace EasyAbp.EShop.Products.Products
public ProductAppService(
IProductManager productManager,
IProductPriceProvider productPriceProvider,
IProductInventoryProvider productInventoryProvider,
IAttributeOptionIdsSerializer attributeOptionIdsSerializer,
IProductStoreRepository productStoreRepository,
@ -41,7 +40,6 @@ namespace EasyAbp.EShop.Products.Products
IProductRepository repository) : base(repository)
{
_productManager = productManager;
_productPriceProvider = productPriceProvider;
_productInventoryProvider = productInventoryProvider;
_attributeOptionIdsSerializer = attributeOptionIdsSerializer;
_productStoreRepository = productStoreRepository;
@ -51,9 +49,7 @@ namespace EasyAbp.EShop.Products.Products
protected override IQueryable<Product> CreateFilteredQuery(GetProductListDto input)
{
var query = input.CategoryId.HasValue
? _repository.WithDetails(input.StoreId, input.CategoryId.Value)
: _repository.WithDetails(input.StoreId);
var query = _repository.WithDetails(input.StoreId, input.CategoryId);
return input.ShowHidden ? query : query.Where(x => !x.IsHidden);
}
@ -67,14 +63,15 @@ namespace EasyAbp.EShop.Products.Products
public override async Task<ProductDto> CreateAsync(CreateUpdateProductDto input)
{
await CheckCreatePolicyAsync();
await AuthorizationService.CheckMultiStorePolicyAsync(input.StoreId, CreatePolicyName,
ProductsPermissions.Products.CrossStore);
var product = MapToEntity(input);
TryToSetTenantId(product);
await UpdateProductAttributesAsync(product, input);
await _productManager.CreateAsync(product, input.StoreId, input.CategoryIds);
var dto = MapToGetOutputDto(product);
@ -84,19 +81,20 @@ namespace EasyAbp.EShop.Products.Products
return dto;
}
public override async Task<ProductDto> UpdateAsync(Guid id, CreateUpdateProductDto input)
{
await CheckUpdatePolicyAsync();
await AuthorizationService.CheckMultiStorePolicyAsync(input.StoreId, UpdatePolicyName,
ProductsPermissions.Products.CrossStore);
await CheckStoreIsProductOwnerAsync(id, input.StoreId);
var product = await GetEntityByIdAsync(id);
CheckProductIsNotStatic(product);
MapToEntity(input, product);
await UpdateProductAttributesAsync(product, input);
await _productManager.UpdateAsync(product, input.CategoryIds);
@ -124,41 +122,45 @@ namespace EasyAbp.EShop.Products.Products
var isProductSkusEmpty = product.ProductSkus.IsNullOrEmpty();
var usedAttributeOptionIds = new HashSet<Guid>();
foreach (var serializedAttributeOptionIds in product.ProductSkus.Select(sku => sku.SerializedAttributeOptionIds))
foreach (var serializedAttributeOptionIds in product.ProductSkus.Select(sku =>
sku.SerializedAttributeOptionIds))
{
foreach (var attributeOptionId in await _attributeOptionIdsSerializer.DeserializeAsync(serializedAttributeOptionIds))
foreach (var attributeOptionId in await _attributeOptionIdsSerializer.DeserializeAsync(
serializedAttributeOptionIds))
{
usedAttributeOptionIds.Add(attributeOptionId);
}
}
foreach (var attributeDto in input.ProductAttributes)
{
var attribute = product.ProductAttributes.FirstOrDefault(a => a.DisplayName == attributeDto.DisplayName);
var attribute =
product.ProductAttributes.FirstOrDefault(a => a.DisplayName == attributeDto.DisplayName);
if (attribute == null)
{
if (!isProductSkusEmpty)
{
throw new ProductAttributesModificationFailedException();
}
attribute = new ProductAttribute(GuidGenerator.Create(),
attributeDto.DisplayName, attributeDto.Description);
product.ProductAttributes.Add(attribute);
}
foreach (var optionDto in attributeDto.ProductAttributeOptions)
{
var option = attribute.ProductAttributeOptions.FirstOrDefault(o => o.DisplayName == optionDto.DisplayName);
var option =
attribute.ProductAttributeOptions.FirstOrDefault(o => o.DisplayName == optionDto.DisplayName);
if (option == null)
{
option = new ProductAttributeOption(GuidGenerator.Create(),
optionDto.DisplayName, optionDto.Description);
attribute.ProductAttributeOptions.Add(option);
}
}
@ -184,7 +186,7 @@ namespace EasyAbp.EShop.Products.Products
{
throw new ProductAttributesModificationFailedException();
}
product.ProductAttributes.RemoveAll(a => removedAttributeNames.Contains(a.DisplayName));
}
@ -201,20 +203,20 @@ namespace EasyAbp.EShop.Products.Products
{
throw new NotSupportedException();
}
public virtual async Task<ProductDto> GetAsync(Guid id, Guid storeId)
{
await CheckGetPolicyAsync();
var product = await GetEntityByIdAsync(id);
if (!product.IsPublished)
{
await CheckStoreIsProductOwnerAsync(product.Id, storeId);
}
var dto = MapToGetOutputDto(product);
await LoadDtoExtraDataAsync(product, dto, storeId);
await LoadDtosProductTypeUniqueNameAsync(new[] {dto});
@ -236,14 +238,14 @@ namespace EasyAbp.EShop.Products.Products
await CheckGetPolicyAsync();
var product = await _repository.GetAsync(x => x.UniqueName == code);
if (!product.IsPublished)
{
await CheckStoreIsProductOwnerAsync(product.Id, storeId);
}
var dto = MapToGetOutputDto(product);
await LoadDtoExtraDataAsync(product, dto, storeId);
await LoadDtosProductTypeUniqueNameAsync(new[] {dto});
@ -254,9 +256,10 @@ namespace EasyAbp.EShop.Products.Products
{
await CheckGetListPolicyAsync();
// Todo: Check if current user is an admin of the store.
var isCurrentUserStoreAdmin = true && await AuthorizationService.IsGrantedAsync(ProductsPermissions.Products.Default);
var isCurrentUserStoreAdmin =
await AuthorizationService.IsMultiStoreGrantedAsync(input.StoreId,
ProductsPermissions.Products.Default, ProductsPermissions.Products.CrossStore);
if (input.ShowHidden && !isCurrentUserStoreAdmin)
{
throw new NotAllowedToGetProductListWithShowHiddenException();
@ -264,7 +267,7 @@ namespace EasyAbp.EShop.Products.Products
// Todo: Products cache.
var query = CreateFilteredQuery(input);
if (!isCurrentUserStoreAdmin)
{
query = query.Where(x => x.IsPublished);
@ -278,31 +281,32 @@ namespace EasyAbp.EShop.Products.Products
var products = await AsyncExecuter.ToListAsync(query);
var items = new List<ProductDto>();
foreach (var product in products)
{
var productDto = MapToGetListOutputDto(product);
await LoadDtoExtraDataAsync(product, productDto, input.StoreId);
items.Add(productDto);
}
await LoadDtosProductTypeUniqueNameAsync(items);
return new PagedResultDto<ProductDto>(totalCount, items);
}
protected virtual async Task<ProductDto> LoadDtoInventoryDataAsync(Product product, ProductDto productDto, Guid storeId)
protected virtual async Task<ProductDto> LoadDtoInventoryDataAsync(Product product, ProductDto productDto,
Guid storeId)
{
var inventoryDataDict = await _productInventoryProvider.GetInventoryDataDictionaryAsync(product, storeId);
productDto.Sold = 0;
foreach (var productSkuDto in productDto.ProductSkus)
{
var inventoryData = inventoryDataDict[productSkuDto.Id];
productSkuDto.Inventory = inventoryData.Inventory;
productSkuDto.Sold = inventoryData.Sold;
productDto.Sold += productSkuDto.Sold;
@ -342,10 +346,11 @@ namespace EasyAbp.EShop.Products.Products
public async Task DeleteAsync(Guid id, Guid storeId)
{
await CheckDeletePolicyAsync();
await AuthorizationService.CheckMultiStorePolicyAsync(storeId, DeletePolicyName,
ProductsPermissions.Products.CrossStore);
var product = await GetEntityByIdAsync(id);
CheckProductIsNotStatic(product);
await CheckStoreIsProductOwnerAsync(id, storeId);
@ -363,20 +368,21 @@ namespace EasyAbp.EShop.Products.Products
public async Task<ProductDto> CreateSkuAsync(Guid productId, Guid storeId, CreateProductSkuDto input)
{
await CheckUpdatePolicyAsync();
await AuthorizationService.CheckMultiStorePolicyAsync(storeId, UpdatePolicyName,
ProductsPermissions.Products.CrossStore);
await CheckStoreIsProductOwnerAsync(productId, storeId);
var product = await GetEntityByIdAsync(productId);
CheckProductIsNotStatic(product);
var sku = ObjectMapper.Map<CreateProductSkuDto, ProductSku>(input);
EntityHelper.TrySetId(sku, GuidGenerator.Create);
await _productManager.CreateSkuAsync(product, sku);
var dto = MapToGetOutputDto(product);
await LoadDtoExtraDataAsync(product, dto, storeId);
@ -384,13 +390,15 @@ namespace EasyAbp.EShop.Products.Products
return dto;
}
public async Task<ProductDto> UpdateSkuAsync(Guid productId, Guid productSkuId, Guid storeId, UpdateProductSkuDto input)
public async Task<ProductDto> UpdateSkuAsync(Guid productId, Guid productSkuId, Guid storeId,
UpdateProductSkuDto input)
{
await CheckUpdatePolicyAsync();
await AuthorizationService.CheckMultiStorePolicyAsync(storeId, UpdatePolicyName,
ProductsPermissions.Products.CrossStore);
await CheckStoreIsProductOwnerAsync(productId, storeId);
var product = await GetEntityByIdAsync(productId);
CheckProductIsNotStatic(product);
@ -400,7 +408,7 @@ namespace EasyAbp.EShop.Products.Products
ObjectMapper.Map(input, sku);
await _productManager.UpdateSkuAsync(product, sku);
var dto = MapToGetOutputDto(product);
await LoadDtoExtraDataAsync(product, dto, storeId);
@ -411,12 +419,13 @@ namespace EasyAbp.EShop.Products.Products
public async Task<ProductDto> DeleteSkuAsync(Guid productId, Guid productSkuId, Guid storeId)
{
await CheckUpdatePolicyAsync();
await AuthorizationService.CheckMultiStorePolicyAsync(storeId, UpdatePolicyName,
ProductsPermissions.Products.CrossStore);
await CheckStoreIsProductOwnerAsync(productId, storeId);
var product = await GetEntityByIdAsync(productId);
CheckProductIsNotStatic(product);
var sku = product.ProductSkus.Single(x => x.Id == productSkuId);

18
modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Application/EasyAbp/EShop/Products/ProductsApplicationAutoMapperProfile.cs

@ -1,22 +1,22 @@
using System.Linq;
using EasyAbp.EShop.Products.Products;
using EasyAbp.EShop.Products.Products.Dtos;
using AutoMapper;
using EasyAbp.EShop.Products.Categories;
using EasyAbp.EShop.Products.Categories.Dtos;
using EasyAbp.EShop.Products.ProductTypes;
using EasyAbp.EShop.Products.ProductTypes.Dtos;
using EasyAbp.EShop.Products.ProductCategories;
using EasyAbp.EShop.Products.ProductCategories.Dtos;
using AutoMapper;
using EasyAbp.EShop.Products.ProductDetails;
using EasyAbp.EShop.Products.ProductDetails.Dtos;
using EasyAbp.EShop.Products.ProductDetailHistories;
using EasyAbp.EShop.Products.ProductDetailHistories.Dtos;
using EasyAbp.EShop.Products.ProductDetails;
using EasyAbp.EShop.Products.ProductDetails.Dtos;
using EasyAbp.EShop.Products.ProductHistories;
using EasyAbp.EShop.Products.ProductHistories.Dtos;
using Volo.Abp.AutoMapper;
using EasyAbp.EShop.Products.ProductInventories;
using EasyAbp.EShop.Products.ProductInventories.Dtos;
using EasyAbp.EShop.Products.Products;
using EasyAbp.EShop.Products.Products.Dtos;
using EasyAbp.EShop.Products.ProductTypes;
using EasyAbp.EShop.Products.ProductTypes.Dtos;
using System.Linq;
using Volo.Abp.AutoMapper;
using Volo.Abp.DependencyInjection;
namespace EasyAbp.EShop.Products

4
modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Domain.Shared/EasyAbp.EShop.Products.Domain.Shared.csproj

@ -9,8 +9,8 @@
</PropertyGroup>
<ItemGroup>
<PackageReference Include="EasyAbp.Abp.Trees.Domain.Shared" Version="0.290.4" />
<PackageReference Include="Volo.Abp.Validation" Version="3.0.4" />
<PackageReference Include="EasyAbp.Abp.Trees.Domain.Shared" Version="1.0.0" />
<PackageReference Include="Volo.Abp.Validation" Version="3.0.5" />
</ItemGroup>
<ItemGroup>

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

@ -67,7 +67,7 @@
"ProductTypeMultiTenancySide": "ProductTypeMultiTenancySide",
"CreateProductType": "CreateProductType",
"EditProductType": "EditProductType",
"ProductTypeDeletionConfirmationMessage": "Are you sure to delete the producttype {0}?",
"ProductTypeDeletionConfirmationMessage": "Are you sure to delete the product type {0}?",
"Menu:ProductCategory": "MenuProductCategory",
"ProductCategory": "ProductCategory",
"ProductCategoryTenantId": "ProductCategoryTenantId",
@ -76,7 +76,7 @@
"ProductCategoryDisplayOrder": "ProductCategoryDisplayOrder",
"CreateProductCategory": "CreateProductCategory",
"EditProductCategory": "EditProductCategory",
"ProductCategoryDeletionConfirmationMessage": "Are you sure to delete the productcategory {0}?",
"ProductCategoryDeletionConfirmationMessage": "Are you sure to delete the product category {0}?",
"Permission:ProductInventory": "ProductInventory",
"ProductInventory": "ProductInventory",
"ProductInventoryChangeType": "ProductInventoryChangeType",

2
modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Domain.Shared/EasyAbp/EShop/Products/Products/IProductSku.cs

@ -20,6 +20,6 @@ namespace EasyAbp.EShop.Products.Products
string MediaResources { get; }
public Guid? ProductDetailId { get; }
Guid? ProductDetailId { get; }
}
}

6
modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Domain/EasyAbp.EShop.Products.Domain.csproj

@ -8,9 +8,9 @@
</PropertyGroup>
<ItemGroup>
<PackageReference Include="EasyAbp.Abp.Trees.Domain" Version="0.290.4" />
<PackageReference Include="Volo.Abp.AutoMapper" Version="3.0.4" />
<PackageReference Include="Volo.Abp.Ddd.Domain" Version="3.0.4" />
<PackageReference Include="EasyAbp.Abp.Trees.Domain" Version="1.0.0" />
<PackageReference Include="Volo.Abp.AutoMapper" Version="3.0.5" />
<PackageReference Include="Volo.Abp.Ddd.Domain" Version="3.0.5" />
<ProjectReference Include="..\..\..\EasyAbp.EShop.Orders\src\EasyAbp.EShop.Orders.Domain.Shared\EasyAbp.EShop.Orders.Domain.Shared.csproj" />
<ProjectReference Include="..\..\..\EasyAbp.EShop.Stores\src\EasyAbp.EShop.Stores.Domain.Shared\EasyAbp.EShop.Stores.Domain.Shared.csproj" />
<ProjectReference Include="..\EasyAbp.EShop.Products.Domain.Shared\EasyAbp.EShop.Products.Domain.Shared.csproj" />

2
modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Domain/EasyAbp/EShop/Products/ProductStores/IProductStoreRepository.cs

@ -7,6 +7,6 @@ namespace EasyAbp.EShop.Products.ProductStores
{
public interface IProductStoreRepository : IRepository<ProductStore, Guid>
{
Task<ProductStore> GetAsync(Guid productId, Guid storeId, CancellationToken cancellationToken = default);
Task<ProductStore> GetAsync(Guid productId, Guid storeId, bool includeDetails = true, CancellationToken cancellationToken = default);
}
}

11
modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Domain/EasyAbp/EShop/Products/Products/IProductRepository.cs

@ -6,13 +6,8 @@ namespace EasyAbp.EShop.Products.Products
{
public interface IProductRepository : IRepository<Product, Guid>
{
IQueryable<Product> GetQueryable(Guid storeId, Guid categoryId);
IQueryable<Product> GetQueryable(Guid storeId);
IQueryable<Product> WithDetails(Guid storeId, Guid categoryId);
IQueryable<Product> WithDetails(Guid storeId);
IQueryable<Product> GetQueryable(Guid storeId, Guid? categoryId = null);
IQueryable<Product> WithDetails(Guid storeId, Guid? categoryId = null);
}
}

3
modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Domain/EasyAbp/EShop/Products/Products/Product.cs

@ -1,7 +1,6 @@
using JetBrains.Annotations;
using System;
using System.Collections.Generic;
using EasyAbp.EShop.Products.ProductDetails;
using JetBrains.Annotations;
using Volo.Abp.Domain.Entities.Auditing;
namespace EasyAbp.EShop.Products.Products

4
modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.EntityFrameworkCore/EasyAbp.EShop.Products.EntityFrameworkCore.csproj

@ -8,8 +8,8 @@
</PropertyGroup>
<ItemGroup>
<PackageReference Include="EasyAbp.Abp.Trees.EntityFrameworkCore" Version="0.290.4" />
<PackageReference Include="Volo.Abp.EntityFrameworkCore" Version="3.0.4" />
<PackageReference Include="EasyAbp.Abp.Trees.EntityFrameworkCore" Version="1.0.0" />
<PackageReference Include="Volo.Abp.EntityFrameworkCore" Version="3.0.5" />
<ProjectReference Include="..\EasyAbp.EShop.Products.Domain\EasyAbp.EShop.Products.Domain.csproj" />
</ItemGroup>

11
modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.EntityFrameworkCore/EasyAbp/EShop/Products/ProductStores/ProductStoreRepository.cs

@ -1,9 +1,7 @@
using EasyAbp.EShop.Products.EntityFrameworkCore;
using System;
using System.Linq;
using System.Threading;
using System.Threading.Tasks;
using EasyAbp.EShop.Products.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore;
using Volo.Abp.Domain.Entities;
using Volo.Abp.Domain.Repositories.EntityFrameworkCore;
using Volo.Abp.EntityFrameworkCore;
@ -16,14 +14,13 @@ namespace EasyAbp.EShop.Products.ProductStores
{
}
public virtual async Task<ProductStore> GetAsync(Guid productId, Guid storeId, CancellationToken cancellationToken = default)
public virtual async Task<ProductStore> GetAsync(Guid productId, Guid storeId, bool includeDetails = true, CancellationToken cancellationToken = default)
{
var entity = await GetQueryable().Where(x => x.ProductId == productId && x.StoreId == storeId)
.FirstOrDefaultAsync(cancellationToken);
var entity = await FindAsync(x => x.ProductId == productId && x.StoreId == storeId, includeDetails, cancellationToken);
if (entity == null)
{
throw new EntityNotFoundException(typeof(ProductStore), new {ProductId = productId, StoreId = storeId});
throw new EntityNotFoundException(typeof(ProductStore), new { ProductId = productId, StoreId = storeId });
}
return entity;

36
modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.EntityFrameworkCore/EasyAbp/EShop/Products/Products/ProductRepository.cs

@ -20,22 +20,36 @@ namespace EasyAbp.EShop.Products.Products
.Include(x => x.ProductSkus);
}
public IQueryable<Product> GetQueryable(Guid storeId, Guid categoryId)
public IQueryable<Product> GetQueryable(Guid storeId, Guid? categoryId = null)
{
return JoinProductCategories(GetQueryable(storeId), categoryId);
var queryable = GetStoreQueryable(storeId);
if (categoryId.HasValue)
{
queryable = JoinProductCategories(queryable, categoryId.Value);
}
return queryable;
}
public IQueryable<Product> GetQueryable(Guid storeId)
public IQueryable<Product> WithDetails(Guid storeId, Guid? categoryId = null)
{
return JoinProductStores(GetQueryable(), storeId);
var queryable = WithStoreDetails(storeId);
if (categoryId.HasValue)
{
queryable = JoinProductCategories(queryable, categoryId.Value);
}
return queryable;
}
public IQueryable<Product> WithDetails(Guid storeId, Guid categoryId)
protected virtual IQueryable<Product> GetStoreQueryable(Guid storeId)
{
return JoinProductCategories(WithDetails(storeId), categoryId);
return JoinProductStores(GetQueryable(), storeId);
}
public IQueryable<Product> WithDetails(Guid storeId)
protected virtual IQueryable<Product> WithStoreDetails(Guid storeId)
{
return JoinProductStores(WithDetails(), storeId);
}
@ -49,7 +63,7 @@ namespace EasyAbp.EShop.Products.Products
(product, productStore) => product
);
}
protected virtual IQueryable<Product> JoinProductCategories(IQueryable<Product> queryable, Guid categoryId)
{
return queryable.Join(

2
modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.HttpApi.Client/EasyAbp.EShop.Products.HttpApi.Client.csproj

@ -8,7 +8,7 @@
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Volo.Abp.Http.Client" Version="3.0.4" />
<PackageReference Include="Volo.Abp.Http.Client" Version="3.0.5" />
<ProjectReference Include="..\EasyAbp.EShop.Products.Application.Contracts\EasyAbp.EShop.Products.Application.Contracts.csproj" />
</ItemGroup>

2
modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.HttpApi/EasyAbp.EShop.Products.HttpApi.csproj

@ -8,7 +8,7 @@
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Volo.Abp.AspNetCore.Mvc" Version="3.0.4" />
<PackageReference Include="Volo.Abp.AspNetCore.Mvc" Version="3.0.5" />
<ProjectReference Include="..\EasyAbp.EShop.Products.Application.Contracts\EasyAbp.EShop.Products.Application.Contracts.csproj" />
</ItemGroup>

18
modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.HttpApi/EasyAbp/EShop/Products/Products/ProductController.cs

@ -61,17 +61,17 @@ namespace EasyAbp.EShop.Products.Products
}
[HttpPost]
[Route("sku")]
public Task<ProductDto> CreateSkuAsync(Guid productId, Guid storeId, CreateProductSkuDto input)
[Route("{id}/sku")]
public Task<ProductDto> CreateSkuAsync(Guid id, Guid storeId, CreateProductSkuDto input)
{
return _service.CreateSkuAsync(productId, storeId, input);
return _service.CreateSkuAsync(id, storeId, input);
}
[HttpPut]
[Route("sku")]
public Task<ProductDto> UpdateSkuAsync(Guid productId, Guid productSkuId, Guid storeId, UpdateProductSkuDto input)
[Route("{id}/sku/{productSkuId}")]
public Task<ProductDto> UpdateSkuAsync(Guid id, Guid productSkuId, Guid storeId, UpdateProductSkuDto input)
{
return _service.UpdateSkuAsync(productId, productSkuId, storeId, input);
return _service.UpdateSkuAsync(id, productSkuId, storeId, input);
}
[HttpGet]
@ -89,10 +89,10 @@ namespace EasyAbp.EShop.Products.Products
}
[HttpDelete]
[Route("sku")]
public Task<ProductDto> DeleteSkuAsync(Guid productId, Guid productSkuId, Guid storeId)
[Route("{id}/sku/{productSkuId}")]
public Task<ProductDto> DeleteSkuAsync(Guid id, Guid productSkuId, Guid storeId)
{
return _service.DeleteSkuAsync(productId, productSkuId, storeId);
return _service.DeleteSkuAsync(id, productSkuId, storeId);
}
}
}

2
modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.MongoDB/EasyAbp.EShop.Products.MongoDB.csproj

@ -8,7 +8,7 @@
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Volo.Abp.MongoDB" Version="3.0.4" />
<PackageReference Include="Volo.Abp.MongoDB" Version="3.0.5" />
<ProjectReference Include="..\EasyAbp.EShop.Products.Domain\EasyAbp.EShop.Products.Domain.csproj" />
</ItemGroup>

4
modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Web/EasyAbp.EShop.Products.Web.csproj

@ -12,8 +12,8 @@
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Volo.Abp.AutoMapper" Version="3.0.4" />
<PackageReference Include="Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared" Version="3.0.4" />
<PackageReference Include="Volo.Abp.AutoMapper" Version="3.0.5" />
<PackageReference Include="Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared" Version="3.0.5" />
</ItemGroup>
<ItemGroup>

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

@ -1,10 +1,7 @@
using System.Collections.Generic;
using EasyAbp.EShop.Products.Localization;
using EasyAbp.EShop.Products.Permissions;
using System.Collections.Generic;
using System.Threading.Tasks;
using EasyAbp.EShop.Products.Localization;
using EasyAbp.EShop.Stores.Stores;
using Microsoft.Extensions.DependencyInjection;
using Volo.Abp.UI.Navigation;
namespace EasyAbp.EShop.Products.Web.Menus
@ -21,7 +18,9 @@ namespace EasyAbp.EShop.Products.Web.Menus
private async Task ConfigureMainMenu(MenuConfigurationContext context)
{
var l = context.GetLocalizer<ProductsResource>(); //Add main menu items.
var l = context.GetLocalizer<ProductsResource>();
//Add main menu items.
var productManagementMenuItem = new ApplicationMenuItem(ProductsMenus.Prefix, l["Menu:ProductManagement"]);
@ -41,12 +40,8 @@ namespace EasyAbp.EShop.Products.Web.Menus
if (await context.IsGrantedAsync(ProductsPermissions.Products.Default))
{
var storeAppService = context.ServiceProvider.GetRequiredService<IStoreAppService>();
var defaultStore = (await storeAppService.GetDefaultAsync())?.Id;
productManagementMenuItem.AddItem(
new ApplicationMenuItem(ProductsMenus.Product, l["Menu:Product"], "/EShop/Products/Products/Product?storeId=" + defaultStore)
new ApplicationMenuItem(ProductsMenus.Product, l["Menu:Product"], "/EShop/Products/Products/Product")
);
}

28
modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Web/Pages/EShop/Products/Products/Product/CreateModal.cshtml.cs

@ -1,7 +1,3 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using EasyAbp.EShop.Products.Categories;
using EasyAbp.EShop.Products.Categories.Dtos;
using EasyAbp.EShop.Products.ProductDetails;
@ -12,6 +8,10 @@ using EasyAbp.EShop.Products.ProductTypes;
using EasyAbp.EShop.Products.Web.Pages.EShop.Products.Products.Product.ViewModels;
using Microsoft.AspNetCore.Mvc;
using Microsoft.AspNetCore.Mvc.Rendering;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Volo.Abp.Application.Dtos;
namespace EasyAbp.EShop.Products.Web.Pages.EShop.Products.Products.Product
@ -20,12 +20,12 @@ namespace EasyAbp.EShop.Products.Web.Pages.EShop.Products.Products.Product
{
[BindProperty(SupportsGet = true)]
public Guid StoreId { get; set; }
[BindProperty]
public CreateEditProductViewModel Product { get; set; }
public ICollection<SelectListItem> ProductTypes { get; set; }
public ICollection<SelectListItem> Categories { get; set; }
private readonly IProductTypeAppService _productTypeAppService;
@ -49,14 +49,14 @@ namespace EasyAbp.EShop.Products.Web.Pages.EShop.Products.Products.Product
{
ProductTypes =
(await _productTypeAppService.GetListAsync(new PagedAndSortedResultRequestDto
{MaxResultCount = LimitedResultRequestDto.MaxMaxResultCount})).Items
{ MaxResultCount = LimitedResultRequestDto.MaxMaxResultCount })).Items
.Select(dto => new SelectListItem(dto.DisplayName, dto.Id.ToString())).ToList();
Categories =
(await _categoryAppService.GetListAsync(new GetCategoryListDto
{MaxResultCount = LimitedResultRequestDto.MaxMaxResultCount}))?.Items
{ MaxResultCount = LimitedResultRequestDto.MaxMaxResultCount }))?.Items
.Select(dto => new SelectListItem(dto.DisplayName, dto.Id.ToString())).ToList();
Product = new CreateEditProductViewModel
{
StoreId = StoreId,
@ -68,10 +68,10 @@ namespace EasyAbp.EShop.Products.Web.Pages.EShop.Products.Products.Product
if (categoryId.HasValue)
{
Product.CategoryIds = new List<Guid>(new[] {categoryId.Value});
Product.CategoryIds = new List<Guid>(new[] { categoryId.Value });
}
}
public virtual async Task<IActionResult> OnPostAsync()
{
var detail = await _productDetailAppService.CreateAsync(
@ -81,7 +81,7 @@ namespace EasyAbp.EShop.Products.Web.Pages.EShop.Products.Products.Product
var createDto = ObjectMapper.Map<CreateEditProductViewModel, CreateUpdateProductDto>(Product);
createDto.ProductDetailId = detail.Id;
var product = await _service.CreateAsync(createDto);
return NoContent();

12
modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Web/Pages/EShop/Products/Products/Product/EditModal.cshtml.cs

@ -1,19 +1,19 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using EasyAbp.EShop.Products.Categories;
using EasyAbp.EShop.Products.Categories.Dtos;
using EasyAbp.EShop.Products.ProductCategories;
using EasyAbp.EShop.Products.ProductCategories.Dtos;
using EasyAbp.EShop.Products.ProductDetails;
using EasyAbp.EShop.Products.ProductDetails.Dtos;
using Microsoft.AspNetCore.Mvc;
using EasyAbp.EShop.Products.Products;
using EasyAbp.EShop.Products.Products.Dtos;
using EasyAbp.EShop.Products.ProductTypes;
using EasyAbp.EShop.Products.Web.Pages.EShop.Products.Products.Product.ViewModels;
using Microsoft.AspNetCore.Mvc;
using Microsoft.AspNetCore.Mvc.Rendering;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Volo.Abp.Application.Dtos;
namespace EasyAbp.EShop.Products.Web.Pages.EShop.Products.Products.Product
@ -74,7 +74,7 @@ namespace EasyAbp.EShop.Products.Web.Pages.EShop.Products.Products.Product
ProductId = productDto.Id,
MaxResultCount = LimitedResultRequestDto.MaxMaxResultCount
})).Items.Select(x => x.CategoryId).ToList();
Product.ProductDetail = new CreateEditProductDetailViewModel
{
StoreId = storeId,

41
modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Web/Pages/EShop/Products/Products/Product/Index.cshtml.cs

@ -1,30 +1,53 @@
using System;
using System.Threading.Tasks;
using EasyAbp.EShop.Stores.StoreOwners;
using EasyAbp.EShop.Stores.StoreOwners.Dtos;
using EasyAbp.EShop.Stores.Stores;
using Microsoft.AspNetCore.Mvc;
using System;
using System.Linq;
using System.Threading.Tasks;
namespace EasyAbp.EShop.Products.Web.Pages.EShop.Products.Products.Product
{
public class IndexModel : ProductsPageModel
{
private readonly IStoreAppService _storeAppService;
private readonly IStoreOwnerAppService _storeOwnerAppService;
[BindProperty(SupportsGet = true)]
public Guid StoreId { get; set; }
public Guid? StoreId { get; set; }
[BindProperty(SupportsGet = true)]
public Guid? CategoryId { get; set; }
public string StoreName { get; set; }
public IndexModel(IStoreAppService storeAppService)
public IndexModel(IStoreAppService storeAppService,
IStoreOwnerAppService storeOwnerAppService)
{
_storeAppService = storeAppService;
_storeOwnerAppService = storeOwnerAppService;
}
public virtual async Task OnGetAsync()
{
StoreName = (await _storeAppService.GetAsync(StoreId)).Name;
//TODO: Need to handle: when StoreId is empty, and current user owns multiple store
if (!StoreId.HasValue && CurrentUser.Id.HasValue)
{
var storeOwners = await _storeOwnerAppService.GetListAsync(new GetStoreOwnerListDto
{
OwnerUserId = CurrentUser.Id.Value,
});
StoreId = storeOwners.Items.FirstOrDefault()?.StoreId;
}
if (!StoreId.HasValue)
{
var defaultStore = await _storeAppService.GetDefaultAsync();
StoreId = defaultStore.Id;
}
StoreName = (await _storeAppService.GetAsync(StoreId.Value)).Name;
}
}
}

2
modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Web/Pages/EShop/Products/Products/Product/ViewModels/CreateEditProductViewModel.cs

@ -23,7 +23,7 @@ namespace EasyAbp.EShop.Products.Web.Pages.EShop.Products.Products.Product.ViewM
[SelectItems("Categories")]
[Display(Name = "ProductCategory")]
public List<Guid> CategoryIds { get; set; }
[Display(Name = "ProductUniqueName")]
public string UniqueName { get; set; }

2
modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Web/ProductsWebAutoMapperProfile.cs

@ -1,4 +1,4 @@
using System;
using System;
using System.Collections.Generic;
using System.Linq;
using EasyAbp.EShop.Products.Products.Dtos;

2
modules/EasyAbp.EShop.Products/test/EasyAbp.EShop.Products.HttpApi.Client.ConsoleTestApp/EasyAbp.EShop.Products.HttpApi.Client.ConsoleTestApp.csproj

@ -7,7 +7,7 @@
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Volo.Abp.Http.Client.IdentityModel" Version="3.0.4" />
<PackageReference Include="Volo.Abp.Http.Client.IdentityModel" Version="3.0.5" />
<ProjectReference Include="..\..\src\EasyAbp.EShop.Products.HttpApi.Client\EasyAbp.EShop.Products.HttpApi.Client.csproj" />
</ItemGroup>

6
modules/EasyAbp.EShop.Products/test/EasyAbp.EShop.Products.TestBase/EasyAbp.EShop.Products.TestBase.csproj

@ -14,9 +14,9 @@
<PackageReference Include="xunit" Version="2.4.1" />
<PackageReference Include="xunit.extensibility.execution" Version="2.4.1" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.1" />
<PackageReference Include="Volo.Abp.Autofac" Version="3.0.4" />
<PackageReference Include="Volo.Abp.Authorization" Version="3.0.4" />
<PackageReference Include="Volo.Abp.TestBase" Version="3.0.4" />
<PackageReference Include="Volo.Abp.Autofac" Version="3.0.5" />
<PackageReference Include="Volo.Abp.Authorization" Version="3.0.5" />
<PackageReference Include="Volo.Abp.TestBase" Version="3.0.5" />
<ProjectReference Include="..\..\src\EasyAbp.EShop.Products.Domain\EasyAbp.EShop.Products.Domain.csproj" />
</ItemGroup>

4
modules/EasyAbp.EShop.Stores/src/EasyAbp.EShop.Stores.Application.Contracts/EasyAbp.EShop.Stores.Application.Contracts.csproj

@ -8,8 +8,8 @@
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Volo.Abp.Ddd.Application.Contracts" Version="3.0.4" />
<PackageReference Include="Volo.Abp.Authorization" Version="3.0.4" />
<PackageReference Include="Volo.Abp.Ddd.Application.Contracts" Version="3.0.5" />
<PackageReference Include="Volo.Abp.Authorization" Version="3.0.5" />
<ProjectReference Include="..\EasyAbp.EShop.Stores.Domain.Shared\EasyAbp.EShop.Stores.Domain.Shared.csproj" />
</ItemGroup>

4
modules/EasyAbp.EShop.Stores/src/EasyAbp.EShop.Stores.Application.Contracts/EasyAbp/EShop/Stores/EShopStoresApplicationContractsModule.cs

@ -1,7 +1,6 @@
using Volo.Abp.Application;
using Volo.Abp.Modularity;
using Volo.Abp.VirtualFileSystem;
using Volo.Abp.Authorization;
using Volo.Abp.Modularity;
namespace EasyAbp.EShop.Stores
{
@ -12,6 +11,5 @@ namespace EasyAbp.EShop.Stores
)]
public class EShopStoresApplicationContractsModule : AbpModule
{
}
}

2
modules/EasyAbp.EShop.Stores/src/EasyAbp.EShop.Stores.Application.Contracts/EasyAbp/EShop/Stores/Permissions/StoresPermissionDefinitionProvider.cs

@ -12,6 +12,8 @@ namespace EasyAbp.EShop.Stores.Permissions
var myGroup = context.AddGroup(StoresPermissions.GroupName, L("Permission:Stores"));
var stores = myGroup.AddPermission(StoresPermissions.Stores.Default, L("Permission:Store"));
stores.AddChild(StoresPermissions.Stores.CrossStore, L("Permission:CrossStore"));
stores.AddChild(StoresPermissions.Stores.Manage, L("Permission:Manage"));
stores.AddChild(StoresPermissions.Stores.Create, L("Permission:Create"));
stores.AddChild(StoresPermissions.Stores.Update, L("Permission:Update"));
stores.AddChild(StoresPermissions.Stores.Delete, L("Permission:Delete"), MultiTenancySides.Host);

2
modules/EasyAbp.EShop.Stores/src/EasyAbp.EShop.Stores.Application.Contracts/EasyAbp/EShop/Stores/Permissions/StoresPermissions.cs

@ -14,6 +14,8 @@ namespace EasyAbp.EShop.Stores.Permissions
public class Stores
{
public const string Default = GroupName + ".Store";
public const string CrossStore = Default + ".CrossStore";
public const string Manage = Default + ".Manage";
public const string Delete = Default + ".Delete";
public const string Update = Default + ".Update";
public const string Create = Default + ".Create";

15
modules/EasyAbp.EShop.Stores/src/EasyAbp.EShop.Stores.Application.Contracts/EasyAbp/EShop/Stores/StoreOwners/Dtos/CreateUpdateStoreOwnerDto.cs

@ -0,0 +1,15 @@
using System;
using System.ComponentModel.DataAnnotations;
using EasyAbp.EShop.Stores.Stores;
namespace EasyAbp.EShop.Stores.StoreOwners.Dtos
{
public class CreateUpdateStoreOwnerDto : IMultiStore
{
[Required]
public Guid StoreId { get; set; }
[Required]
public Guid OwnerUserId { get; set; }
}
}

13
modules/EasyAbp.EShop.Stores/src/EasyAbp.EShop.Stores.Application.Contracts/EasyAbp/EShop/Stores/StoreOwners/Dtos/GetStoreOwnerListDto.cs

@ -0,0 +1,13 @@
using System;
using EasyAbp.EShop.Stores.Stores;
using Volo.Abp.Application.Dtos;
namespace EasyAbp.EShop.Stores.StoreOwners.Dtos
{
public class GetStoreOwnerListDto : PagedAndSortedResultRequestDto
{
public Guid? StoreId { get; set; }
public Guid? OwnerUserId { get; set; }
}
}

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

Loading…
Cancel
Save