diff --git a/common.props b/common.props
index 90e6e98a6..da3e11c8d 100644
--- a/common.props
+++ b/common.props
@@ -1,7 +1,7 @@
latest
- 0.8.0
+ 0.8.5
$(NoWarn);CS1591
true
EasyAbp Team
diff --git a/integration/EasyAbp.EShop/src/EasyAbp.EShop.Application.Contracts/EasyAbp.EShop.Application.Contracts.csproj b/integration/EasyAbp.EShop/src/EasyAbp.EShop.Application.Contracts/EasyAbp.EShop.Application.Contracts.csproj
index 02f475b56..d52531947 100644
--- a/integration/EasyAbp.EShop/src/EasyAbp.EShop.Application.Contracts/EasyAbp.EShop.Application.Contracts.csproj
+++ b/integration/EasyAbp.EShop/src/EasyAbp.EShop.Application.Contracts/EasyAbp.EShop.Application.Contracts.csproj
@@ -8,8 +8,8 @@
-
-
+
+
diff --git a/integration/EasyAbp.EShop/src/EasyAbp.EShop.Application.Contracts/EasyAbp/EShop/EShopApplicationContractsModule.cs b/integration/EasyAbp.EShop/src/EasyAbp.EShop.Application.Contracts/EasyAbp/EShop/EShopApplicationContractsModule.cs
index 7f429aa62..8c91f3d1e 100644
--- a/integration/EasyAbp.EShop/src/EasyAbp.EShop.Application.Contracts/EasyAbp/EShop/EShopApplicationContractsModule.cs
+++ b/integration/EasyAbp.EShop/src/EasyAbp.EShop.Application.Contracts/EasyAbp/EShop/EShopApplicationContractsModule.cs
@@ -26,7 +26,7 @@ public override void ConfigureServices(ServiceConfigurationContext context)
{
Configure(options =>
{
- options.FileSets.AddEmbedded("EasyAbp.EShop");
+ options.FileSets.AddEmbedded();
});
}
}
diff --git a/integration/EasyAbp.EShop/src/EasyAbp.EShop.Application/EasyAbp.EShop.Application.csproj b/integration/EasyAbp.EShop/src/EasyAbp.EShop.Application/EasyAbp.EShop.Application.csproj
index 439e68b6e..9a79af94a 100644
--- a/integration/EasyAbp.EShop/src/EasyAbp.EShop.Application/EasyAbp.EShop.Application.csproj
+++ b/integration/EasyAbp.EShop/src/EasyAbp.EShop.Application/EasyAbp.EShop.Application.csproj
@@ -8,8 +8,8 @@
-
-
+
+
diff --git a/integration/EasyAbp.EShop/src/EasyAbp.EShop.Domain.Shared/EasyAbp.EShop.Domain.Shared.csproj b/integration/EasyAbp.EShop/src/EasyAbp.EShop.Domain.Shared/EasyAbp.EShop.Domain.Shared.csproj
index acb035878..814100f6a 100644
--- a/integration/EasyAbp.EShop/src/EasyAbp.EShop.Domain.Shared/EasyAbp.EShop.Domain.Shared.csproj
+++ b/integration/EasyAbp.EShop/src/EasyAbp.EShop.Domain.Shared/EasyAbp.EShop.Domain.Shared.csproj
@@ -5,10 +5,11 @@
netstandard2.0
+ true
-
+
@@ -21,4 +22,8 @@
+
+
+
+
diff --git a/integration/EasyAbp.EShop/src/EasyAbp.EShop.Domain/EasyAbp.EShop.Domain.csproj b/integration/EasyAbp.EShop/src/EasyAbp.EShop.Domain/EasyAbp.EShop.Domain.csproj
index 2cd18c9f9..1e306ec29 100644
--- a/integration/EasyAbp.EShop/src/EasyAbp.EShop.Domain/EasyAbp.EShop.Domain.csproj
+++ b/integration/EasyAbp.EShop/src/EasyAbp.EShop.Domain/EasyAbp.EShop.Domain.csproj
@@ -8,7 +8,7 @@
-
+
diff --git a/integration/EasyAbp.EShop/src/EasyAbp.EShop.EntityFrameworkCore/EasyAbp.EShop.EntityFrameworkCore.csproj b/integration/EasyAbp.EShop/src/EasyAbp.EShop.EntityFrameworkCore/EasyAbp.EShop.EntityFrameworkCore.csproj
index 2972a983a..08e9043d9 100644
--- a/integration/EasyAbp.EShop/src/EasyAbp.EShop.EntityFrameworkCore/EasyAbp.EShop.EntityFrameworkCore.csproj
+++ b/integration/EasyAbp.EShop/src/EasyAbp.EShop.EntityFrameworkCore/EasyAbp.EShop.EntityFrameworkCore.csproj
@@ -8,7 +8,7 @@
-
+
diff --git a/integration/EasyAbp.EShop/src/EasyAbp.EShop.HttpApi.Client/EasyAbp.EShop.HttpApi.Client.csproj b/integration/EasyAbp.EShop/src/EasyAbp.EShop.HttpApi.Client/EasyAbp.EShop.HttpApi.Client.csproj
index 0ff1b46f9..a4a09eb1e 100644
--- a/integration/EasyAbp.EShop/src/EasyAbp.EShop.HttpApi.Client/EasyAbp.EShop.HttpApi.Client.csproj
+++ b/integration/EasyAbp.EShop/src/EasyAbp.EShop.HttpApi.Client/EasyAbp.EShop.HttpApi.Client.csproj
@@ -8,7 +8,7 @@
-
+
diff --git a/integration/EasyAbp.EShop/src/EasyAbp.EShop.HttpApi/EasyAbp.EShop.HttpApi.csproj b/integration/EasyAbp.EShop/src/EasyAbp.EShop.HttpApi/EasyAbp.EShop.HttpApi.csproj
index ea7871b58..231df789a 100644
--- a/integration/EasyAbp.EShop/src/EasyAbp.EShop.HttpApi/EasyAbp.EShop.HttpApi.csproj
+++ b/integration/EasyAbp.EShop/src/EasyAbp.EShop.HttpApi/EasyAbp.EShop.HttpApi.csproj
@@ -8,7 +8,7 @@
-
+
diff --git a/integration/EasyAbp.EShop/src/EasyAbp.EShop.MongoDB/EasyAbp.EShop.MongoDB.csproj b/integration/EasyAbp.EShop/src/EasyAbp.EShop.MongoDB/EasyAbp.EShop.MongoDB.csproj
index 2b1867701..b288ee5b7 100644
--- a/integration/EasyAbp.EShop/src/EasyAbp.EShop.MongoDB/EasyAbp.EShop.MongoDB.csproj
+++ b/integration/EasyAbp.EShop/src/EasyAbp.EShop.MongoDB/EasyAbp.EShop.MongoDB.csproj
@@ -8,7 +8,7 @@
-
+
diff --git a/integration/EasyAbp.EShop/src/EasyAbp.EShop.Web/EShopWebModule.cs b/integration/EasyAbp.EShop/src/EasyAbp.EShop.Web/EShopWebModule.cs
index 82cf853b5..da8f396f7 100644
--- a/integration/EasyAbp.EShop/src/EasyAbp.EShop.Web/EShopWebModule.cs
+++ b/integration/EasyAbp.EShop/src/EasyAbp.EShop.Web/EShopWebModule.cs
@@ -50,7 +50,7 @@ public override void ConfigureServices(ServiceConfigurationContext context)
Configure(options =>
{
- options.FileSets.AddEmbedded("EasyAbp.EShop.Web");
+ options.FileSets.AddEmbedded();
});
context.Services.AddAutoMapperObjectMapper();
diff --git a/integration/EasyAbp.EShop/src/EasyAbp.EShop.Web/EasyAbp.EShop.Web.csproj b/integration/EasyAbp.EShop/src/EasyAbp.EShop.Web/EasyAbp.EShop.Web.csproj
index 534cc7415..f2f49fd88 100644
--- a/integration/EasyAbp.EShop/src/EasyAbp.EShop.Web/EasyAbp.EShop.Web.csproj
+++ b/integration/EasyAbp.EShop/src/EasyAbp.EShop.Web/EasyAbp.EShop.Web.csproj
@@ -8,11 +8,12 @@
true
Library
EasyAbp.EShop.Web
+ true
-
-
+
+
@@ -24,6 +25,10 @@
+
+
+
+
@@ -33,11 +38,6 @@
-
-
-
-
-
diff --git a/integration/EasyAbp.EShop/test/EasyAbp.EShop.HttpApi.Client.ConsoleTestApp/EasyAbp.EShop.HttpApi.Client.ConsoleTestApp.csproj b/integration/EasyAbp.EShop/test/EasyAbp.EShop.HttpApi.Client.ConsoleTestApp/EasyAbp.EShop.HttpApi.Client.ConsoleTestApp.csproj
index 8c096c904..bb0a397ea 100644
--- a/integration/EasyAbp.EShop/test/EasyAbp.EShop.HttpApi.Client.ConsoleTestApp/EasyAbp.EShop.HttpApi.Client.ConsoleTestApp.csproj
+++ b/integration/EasyAbp.EShop/test/EasyAbp.EShop.HttpApi.Client.ConsoleTestApp/EasyAbp.EShop.HttpApi.Client.ConsoleTestApp.csproj
@@ -7,7 +7,7 @@
-
+
diff --git a/integration/EasyAbp.EShop/test/EasyAbp.EShop.TestBase/EasyAbp.EShop.TestBase.csproj b/integration/EasyAbp.EShop/test/EasyAbp.EShop.TestBase/EasyAbp.EShop.TestBase.csproj
index 39071a408..ff2fc0180 100644
--- a/integration/EasyAbp.EShop/test/EasyAbp.EShop.TestBase/EasyAbp.EShop.TestBase.csproj
+++ b/integration/EasyAbp.EShop/test/EasyAbp.EShop.TestBase/EasyAbp.EShop.TestBase.csproj
@@ -14,9 +14,9 @@
-
-
-
+
+
+
diff --git a/modules/EasyAbp.EShop.Orders/src/EasyAbp.EShop.Orders.Application.Contracts/EasyAbp.EShop.Orders.Application.Contracts.csproj b/modules/EasyAbp.EShop.Orders/src/EasyAbp.EShop.Orders.Application.Contracts/EasyAbp.EShop.Orders.Application.Contracts.csproj
index af4e767f6..4233e16a9 100644
--- a/modules/EasyAbp.EShop.Orders/src/EasyAbp.EShop.Orders.Application.Contracts/EasyAbp.EShop.Orders.Application.Contracts.csproj
+++ b/modules/EasyAbp.EShop.Orders/src/EasyAbp.EShop.Orders.Application.Contracts/EasyAbp.EShop.Orders.Application.Contracts.csproj
@@ -8,8 +8,8 @@
-
-
+
+
diff --git a/modules/EasyAbp.EShop.Orders/src/EasyAbp.EShop.Orders.Application.Contracts/EasyAbp/EShop/Orders/EShopOrdersApplicationContractsModule.cs b/modules/EasyAbp.EShop.Orders/src/EasyAbp.EShop.Orders.Application.Contracts/EasyAbp/EShop/Orders/EShopOrdersApplicationContractsModule.cs
index 0b13f1637..38b22558a 100644
--- a/modules/EasyAbp.EShop.Orders/src/EasyAbp.EShop.Orders.Application.Contracts/EasyAbp/EShop/Orders/EShopOrdersApplicationContractsModule.cs
+++ b/modules/EasyAbp.EShop.Orders/src/EasyAbp.EShop.Orders.Application.Contracts/EasyAbp/EShop/Orders/EShopOrdersApplicationContractsModule.cs
@@ -14,10 +14,7 @@ public class EShopOrdersApplicationContractsModule : AbpModule
{
public override void ConfigureServices(ServiceConfigurationContext context)
{
- Configure(options =>
- {
- options.FileSets.AddEmbedded("EasyAbp.EShop.Orders");
- });
+
}
}
}
diff --git a/modules/EasyAbp.EShop.Orders/src/EasyAbp.EShop.Orders.Application.Contracts/EasyAbp/EShop/Orders/Orders/Dtos/GetOrderListDto.cs b/modules/EasyAbp.EShop.Orders/src/EasyAbp.EShop.Orders.Application.Contracts/EasyAbp/EShop/Orders/Orders/Dtos/GetOrderListDto.cs
index 359040e6a..1a1d5a426 100644
--- a/modules/EasyAbp.EShop.Orders/src/EasyAbp.EShop.Orders.Application.Contracts/EasyAbp/EShop/Orders/Orders/Dtos/GetOrderListDto.cs
+++ b/modules/EasyAbp.EShop.Orders/src/EasyAbp.EShop.Orders.Application.Contracts/EasyAbp/EShop/Orders/Orders/Dtos/GetOrderListDto.cs
@@ -8,5 +8,10 @@ public class GetOrderListDto : PagedAndSortedResultRequestDto
public Guid? StoreId { get; set; }
public Guid? CustomerUserId { get; set; }
+
+ public GetOrderListDto()
+ {
+ MaxMaxResultCount = 50;
+ }
}
}
\ No newline at end of file
diff --git a/modules/EasyAbp.EShop.Orders/src/EasyAbp.EShop.Orders.Application/EasyAbp.EShop.Orders.Application.csproj b/modules/EasyAbp.EShop.Orders/src/EasyAbp.EShop.Orders.Application/EasyAbp.EShop.Orders.Application.csproj
index bcbfaf1f2..e5947cc70 100644
--- a/modules/EasyAbp.EShop.Orders/src/EasyAbp.EShop.Orders.Application/EasyAbp.EShop.Orders.Application.csproj
+++ b/modules/EasyAbp.EShop.Orders/src/EasyAbp.EShop.Orders.Application/EasyAbp.EShop.Orders.Application.csproj
@@ -8,8 +8,8 @@
-
-
+
+
diff --git a/modules/EasyAbp.EShop.Orders/src/EasyAbp.EShop.Orders.Application/EasyAbp/EShop/Orders/Orders/OrderAppService.cs b/modules/EasyAbp.EShop.Orders/src/EasyAbp.EShop.Orders.Application/EasyAbp/EShop/Orders/Orders/OrderAppService.cs
index d55aa3ee8..1b966cd02 100644
--- a/modules/EasyAbp.EShop.Orders/src/EasyAbp.EShop.Orders.Application/EasyAbp/EShop/Orders/Orders/OrderAppService.cs
+++ b/modules/EasyAbp.EShop.Orders/src/EasyAbp.EShop.Orders.Application/EasyAbp/EShop/Orders/Orders/OrderAppService.cs
@@ -10,7 +10,6 @@
using Volo.Abp;
using Volo.Abp.Application.Dtos;
using Volo.Abp.Application.Services;
-using Volo.Abp.Timing;
using Volo.Abp.Users;
namespace EasyAbp.EShop.Orders.Orders
@@ -23,7 +22,6 @@ public class OrderAppService : CrudAppService CreateFilteredQuery(GetOrderListDto input)
{
- var query = base.CreateFilteredQuery(input);
+ var query = _repository.WithDetails();
if (input.StoreId.HasValue)
{
diff --git a/modules/EasyAbp.EShop.Orders/src/EasyAbp.EShop.Orders.Domain.Shared/EasyAbp.EShop.Orders.Domain.Shared.csproj b/modules/EasyAbp.EShop.Orders/src/EasyAbp.EShop.Orders.Domain.Shared/EasyAbp.EShop.Orders.Domain.Shared.csproj
index c853b56f8..4c581bcea 100644
--- a/modules/EasyAbp.EShop.Orders/src/EasyAbp.EShop.Orders.Domain.Shared/EasyAbp.EShop.Orders.Domain.Shared.csproj
+++ b/modules/EasyAbp.EShop.Orders/src/EasyAbp.EShop.Orders.Domain.Shared/EasyAbp.EShop.Orders.Domain.Shared.csproj
@@ -5,10 +5,11 @@
netstandard2.0
+ true
-
+
@@ -17,4 +18,8 @@
+
+
+
+
diff --git a/modules/EasyAbp.EShop.Orders/src/EasyAbp.EShop.Orders.Domain/EasyAbp.EShop.Orders.Domain.csproj b/modules/EasyAbp.EShop.Orders/src/EasyAbp.EShop.Orders.Domain/EasyAbp.EShop.Orders.Domain.csproj
index 5424463b7..1f671c4c3 100644
--- a/modules/EasyAbp.EShop.Orders/src/EasyAbp.EShop.Orders.Domain/EasyAbp.EShop.Orders.Domain.csproj
+++ b/modules/EasyAbp.EShop.Orders/src/EasyAbp.EShop.Orders.Domain/EasyAbp.EShop.Orders.Domain.csproj
@@ -8,9 +8,9 @@
-
-
-
+
+
+
diff --git a/modules/EasyAbp.EShop.Orders/src/EasyAbp.EShop.Orders.EntityFrameworkCore/EasyAbp.EShop.Orders.EntityFrameworkCore.csproj b/modules/EasyAbp.EShop.Orders/src/EasyAbp.EShop.Orders.EntityFrameworkCore/EasyAbp.EShop.Orders.EntityFrameworkCore.csproj
index c0a101c95..06084e49d 100644
--- a/modules/EasyAbp.EShop.Orders/src/EasyAbp.EShop.Orders.EntityFrameworkCore/EasyAbp.EShop.Orders.EntityFrameworkCore.csproj
+++ b/modules/EasyAbp.EShop.Orders/src/EasyAbp.EShop.Orders.EntityFrameworkCore/EasyAbp.EShop.Orders.EntityFrameworkCore.csproj
@@ -8,7 +8,7 @@
-
+
diff --git a/modules/EasyAbp.EShop.Orders/src/EasyAbp.EShop.Orders.HttpApi.Client/EasyAbp.EShop.Orders.HttpApi.Client.csproj b/modules/EasyAbp.EShop.Orders/src/EasyAbp.EShop.Orders.HttpApi.Client/EasyAbp.EShop.Orders.HttpApi.Client.csproj
index ece26fc10..9beb9cd6a 100644
--- a/modules/EasyAbp.EShop.Orders/src/EasyAbp.EShop.Orders.HttpApi.Client/EasyAbp.EShop.Orders.HttpApi.Client.csproj
+++ b/modules/EasyAbp.EShop.Orders/src/EasyAbp.EShop.Orders.HttpApi.Client/EasyAbp.EShop.Orders.HttpApi.Client.csproj
@@ -8,7 +8,7 @@
-
+
diff --git a/modules/EasyAbp.EShop.Orders/src/EasyAbp.EShop.Orders.HttpApi/EasyAbp.EShop.Orders.HttpApi.csproj b/modules/EasyAbp.EShop.Orders/src/EasyAbp.EShop.Orders.HttpApi/EasyAbp.EShop.Orders.HttpApi.csproj
index c7f8efd0d..7d1685983 100644
--- a/modules/EasyAbp.EShop.Orders/src/EasyAbp.EShop.Orders.HttpApi/EasyAbp.EShop.Orders.HttpApi.csproj
+++ b/modules/EasyAbp.EShop.Orders/src/EasyAbp.EShop.Orders.HttpApi/EasyAbp.EShop.Orders.HttpApi.csproj
@@ -8,7 +8,7 @@
-
+
diff --git a/modules/EasyAbp.EShop.Orders/src/EasyAbp.EShop.Orders.MongoDB/EasyAbp.EShop.Orders.MongoDB.csproj b/modules/EasyAbp.EShop.Orders/src/EasyAbp.EShop.Orders.MongoDB/EasyAbp.EShop.Orders.MongoDB.csproj
index a1524724e..193a549d7 100644
--- a/modules/EasyAbp.EShop.Orders/src/EasyAbp.EShop.Orders.MongoDB/EasyAbp.EShop.Orders.MongoDB.csproj
+++ b/modules/EasyAbp.EShop.Orders/src/EasyAbp.EShop.Orders.MongoDB/EasyAbp.EShop.Orders.MongoDB.csproj
@@ -8,7 +8,7 @@
-
+
diff --git a/modules/EasyAbp.EShop.Orders/src/EasyAbp.EShop.Orders.Web/EShopOrdersWebModule.cs b/modules/EasyAbp.EShop.Orders/src/EasyAbp.EShop.Orders.Web/EShopOrdersWebModule.cs
index 2b556c47b..da82c00e5 100644
--- a/modules/EasyAbp.EShop.Orders/src/EasyAbp.EShop.Orders.Web/EShopOrdersWebModule.cs
+++ b/modules/EasyAbp.EShop.Orders/src/EasyAbp.EShop.Orders.Web/EShopOrdersWebModule.cs
@@ -40,7 +40,7 @@ public override void ConfigureServices(ServiceConfigurationContext context)
Configure(options =>
{
- options.FileSets.AddEmbedded("EasyAbp.EShop.Orders.Web");
+ options.FileSets.AddEmbedded();
});
context.Services.AddAutoMapperObjectMapper();
diff --git a/modules/EasyAbp.EShop.Orders/src/EasyAbp.EShop.Orders.Web/EasyAbp.EShop.Orders.Web.csproj b/modules/EasyAbp.EShop.Orders/src/EasyAbp.EShop.Orders.Web/EasyAbp.EShop.Orders.Web.csproj
index d5c62d1ab..1181b13c5 100644
--- a/modules/EasyAbp.EShop.Orders/src/EasyAbp.EShop.Orders.Web/EasyAbp.EShop.Orders.Web.csproj
+++ b/modules/EasyAbp.EShop.Orders/src/EasyAbp.EShop.Orders.Web/EasyAbp.EShop.Orders.Web.csproj
@@ -8,11 +8,12 @@
true
Library
EasyAbp.EShop.Orders.Web
+ true
-
-
+
+
@@ -20,6 +21,10 @@
+
+
+
+
@@ -29,11 +34,6 @@
-
-
-
-
-
diff --git a/modules/EasyAbp.EShop.Orders/test/EasyAbp.EShop.Orders.HttpApi.Client.ConsoleTestApp/EasyAbp.EShop.Orders.HttpApi.Client.ConsoleTestApp.csproj b/modules/EasyAbp.EShop.Orders/test/EasyAbp.EShop.Orders.HttpApi.Client.ConsoleTestApp/EasyAbp.EShop.Orders.HttpApi.Client.ConsoleTestApp.csproj
index 117fc5089..0cf6c3b6a 100644
--- a/modules/EasyAbp.EShop.Orders/test/EasyAbp.EShop.Orders.HttpApi.Client.ConsoleTestApp/EasyAbp.EShop.Orders.HttpApi.Client.ConsoleTestApp.csproj
+++ b/modules/EasyAbp.EShop.Orders/test/EasyAbp.EShop.Orders.HttpApi.Client.ConsoleTestApp/EasyAbp.EShop.Orders.HttpApi.Client.ConsoleTestApp.csproj
@@ -7,7 +7,7 @@
-
+
diff --git a/modules/EasyAbp.EShop.Orders/test/EasyAbp.EShop.Orders.TestBase/EasyAbp.EShop.Orders.TestBase.csproj b/modules/EasyAbp.EShop.Orders/test/EasyAbp.EShop.Orders.TestBase/EasyAbp.EShop.Orders.TestBase.csproj
index 5686ed01d..b5ce62f0a 100644
--- a/modules/EasyAbp.EShop.Orders/test/EasyAbp.EShop.Orders.TestBase/EasyAbp.EShop.Orders.TestBase.csproj
+++ b/modules/EasyAbp.EShop.Orders/test/EasyAbp.EShop.Orders.TestBase/EasyAbp.EShop.Orders.TestBase.csproj
@@ -14,9 +14,9 @@
-
-
-
+
+
+
diff --git a/modules/EasyAbp.EShop.Payments/src/EasyAbp.EShop.Payments.Application.Contracts/EasyAbp.EShop.Payments.Application.Contracts.csproj b/modules/EasyAbp.EShop.Payments/src/EasyAbp.EShop.Payments.Application.Contracts/EasyAbp.EShop.Payments.Application.Contracts.csproj
index 1313dcb95..598bff721 100644
--- a/modules/EasyAbp.EShop.Payments/src/EasyAbp.EShop.Payments.Application.Contracts/EasyAbp.EShop.Payments.Application.Contracts.csproj
+++ b/modules/EasyAbp.EShop.Payments/src/EasyAbp.EShop.Payments.Application.Contracts/EasyAbp.EShop.Payments.Application.Contracts.csproj
@@ -8,8 +8,8 @@
-
-
+
+
diff --git a/modules/EasyAbp.EShop.Payments/src/EasyAbp.EShop.Payments.Application.Contracts/EasyAbp/EShop/Payments/EShopPaymentsApplicationContractsModule.cs b/modules/EasyAbp.EShop.Payments/src/EasyAbp.EShop.Payments.Application.Contracts/EasyAbp/EShop/Payments/EShopPaymentsApplicationContractsModule.cs
index d51433d8f..5f0b4e987 100644
--- a/modules/EasyAbp.EShop.Payments/src/EasyAbp.EShop.Payments.Application.Contracts/EasyAbp/EShop/Payments/EShopPaymentsApplicationContractsModule.cs
+++ b/modules/EasyAbp.EShop.Payments/src/EasyAbp.EShop.Payments.Application.Contracts/EasyAbp/EShop/Payments/EShopPaymentsApplicationContractsModule.cs
@@ -14,10 +14,7 @@ public class EShopPaymentsApplicationContractsModule : AbpModule
{
public override void ConfigureServices(ServiceConfigurationContext context)
{
- Configure(options =>
- {
- options.FileSets.AddEmbedded("EasyAbp.EShop.Payments");
- });
+
}
}
}
diff --git a/modules/EasyAbp.EShop.Payments/src/EasyAbp.EShop.Payments.Application/EasyAbp.EShop.Payments.Application.csproj b/modules/EasyAbp.EShop.Payments/src/EasyAbp.EShop.Payments.Application/EasyAbp.EShop.Payments.Application.csproj
index ef5bbc9a7..fc41bb90b 100644
--- a/modules/EasyAbp.EShop.Payments/src/EasyAbp.EShop.Payments.Application/EasyAbp.EShop.Payments.Application.csproj
+++ b/modules/EasyAbp.EShop.Payments/src/EasyAbp.EShop.Payments.Application/EasyAbp.EShop.Payments.Application.csproj
@@ -8,8 +8,8 @@
-
-
+
+
diff --git a/modules/EasyAbp.EShop.Payments/src/EasyAbp.EShop.Payments.Domain.Shared/EasyAbp.EShop.Payments.Domain.Shared.csproj b/modules/EasyAbp.EShop.Payments/src/EasyAbp.EShop.Payments.Domain.Shared/EasyAbp.EShop.Payments.Domain.Shared.csproj
index 8c28389c9..e24c8c57b 100644
--- a/modules/EasyAbp.EShop.Payments/src/EasyAbp.EShop.Payments.Domain.Shared/EasyAbp.EShop.Payments.Domain.Shared.csproj
+++ b/modules/EasyAbp.EShop.Payments/src/EasyAbp.EShop.Payments.Domain.Shared/EasyAbp.EShop.Payments.Domain.Shared.csproj
@@ -5,10 +5,11 @@
netstandard2.0
+ true
-
+
@@ -16,4 +17,8 @@
+
+
+
+
diff --git a/modules/EasyAbp.EShop.Payments/src/EasyAbp.EShop.Payments.Domain/EasyAbp.EShop.Payments.Domain.csproj b/modules/EasyAbp.EShop.Payments/src/EasyAbp.EShop.Payments.Domain/EasyAbp.EShop.Payments.Domain.csproj
index d6464a101..080bcb68c 100644
--- a/modules/EasyAbp.EShop.Payments/src/EasyAbp.EShop.Payments.Domain/EasyAbp.EShop.Payments.Domain.csproj
+++ b/modules/EasyAbp.EShop.Payments/src/EasyAbp.EShop.Payments.Domain/EasyAbp.EShop.Payments.Domain.csproj
@@ -8,9 +8,9 @@
-
-
-
+
+
+
diff --git a/modules/EasyAbp.EShop.Payments/src/EasyAbp.EShop.Payments.EntityFrameworkCore/EasyAbp.EShop.Payments.EntityFrameworkCore.csproj b/modules/EasyAbp.EShop.Payments/src/EasyAbp.EShop.Payments.EntityFrameworkCore/EasyAbp.EShop.Payments.EntityFrameworkCore.csproj
index d9f7122ae..d1c8b000f 100644
--- a/modules/EasyAbp.EShop.Payments/src/EasyAbp.EShop.Payments.EntityFrameworkCore/EasyAbp.EShop.Payments.EntityFrameworkCore.csproj
+++ b/modules/EasyAbp.EShop.Payments/src/EasyAbp.EShop.Payments.EntityFrameworkCore/EasyAbp.EShop.Payments.EntityFrameworkCore.csproj
@@ -8,7 +8,7 @@
-
+
diff --git a/modules/EasyAbp.EShop.Payments/src/EasyAbp.EShop.Payments.HttpApi.Client/EasyAbp.EShop.Payments.HttpApi.Client.csproj b/modules/EasyAbp.EShop.Payments/src/EasyAbp.EShop.Payments.HttpApi.Client/EasyAbp.EShop.Payments.HttpApi.Client.csproj
index 1bbab3219..25fd567bc 100644
--- a/modules/EasyAbp.EShop.Payments/src/EasyAbp.EShop.Payments.HttpApi.Client/EasyAbp.EShop.Payments.HttpApi.Client.csproj
+++ b/modules/EasyAbp.EShop.Payments/src/EasyAbp.EShop.Payments.HttpApi.Client/EasyAbp.EShop.Payments.HttpApi.Client.csproj
@@ -8,7 +8,7 @@
-
+
diff --git a/modules/EasyAbp.EShop.Payments/src/EasyAbp.EShop.Payments.HttpApi/EasyAbp.EShop.Payments.HttpApi.csproj b/modules/EasyAbp.EShop.Payments/src/EasyAbp.EShop.Payments.HttpApi/EasyAbp.EShop.Payments.HttpApi.csproj
index 1496c0ea1..bef8b9593 100644
--- a/modules/EasyAbp.EShop.Payments/src/EasyAbp.EShop.Payments.HttpApi/EasyAbp.EShop.Payments.HttpApi.csproj
+++ b/modules/EasyAbp.EShop.Payments/src/EasyAbp.EShop.Payments.HttpApi/EasyAbp.EShop.Payments.HttpApi.csproj
@@ -8,7 +8,7 @@
-
+
diff --git a/modules/EasyAbp.EShop.Payments/src/EasyAbp.EShop.Payments.MongoDB/EasyAbp.EShop.Payments.MongoDB.csproj b/modules/EasyAbp.EShop.Payments/src/EasyAbp.EShop.Payments.MongoDB/EasyAbp.EShop.Payments.MongoDB.csproj
index 5619bc835..e171b3866 100644
--- a/modules/EasyAbp.EShop.Payments/src/EasyAbp.EShop.Payments.MongoDB/EasyAbp.EShop.Payments.MongoDB.csproj
+++ b/modules/EasyAbp.EShop.Payments/src/EasyAbp.EShop.Payments.MongoDB/EasyAbp.EShop.Payments.MongoDB.csproj
@@ -8,7 +8,7 @@
-
+
diff --git a/modules/EasyAbp.EShop.Payments/src/EasyAbp.EShop.Payments.Web/EShopPaymentsWebModule.cs b/modules/EasyAbp.EShop.Payments/src/EasyAbp.EShop.Payments.Web/EShopPaymentsWebModule.cs
index ae761d2a6..540ee34ae 100644
--- a/modules/EasyAbp.EShop.Payments/src/EasyAbp.EShop.Payments.Web/EShopPaymentsWebModule.cs
+++ b/modules/EasyAbp.EShop.Payments/src/EasyAbp.EShop.Payments.Web/EShopPaymentsWebModule.cs
@@ -40,7 +40,7 @@ public override void ConfigureServices(ServiceConfigurationContext context)
Configure(options =>
{
- options.FileSets.AddEmbedded("EasyAbp.EShop.Payments.Web");
+ options.FileSets.AddEmbedded();
});
context.Services.AddAutoMapperObjectMapper();
diff --git a/modules/EasyAbp.EShop.Payments/src/EasyAbp.EShop.Payments.Web/EasyAbp.EShop.Payments.Web.csproj b/modules/EasyAbp.EShop.Payments/src/EasyAbp.EShop.Payments.Web/EasyAbp.EShop.Payments.Web.csproj
index 13f4522e7..2a14610c4 100644
--- a/modules/EasyAbp.EShop.Payments/src/EasyAbp.EShop.Payments.Web/EasyAbp.EShop.Payments.Web.csproj
+++ b/modules/EasyAbp.EShop.Payments/src/EasyAbp.EShop.Payments.Web/EasyAbp.EShop.Payments.Web.csproj
@@ -8,11 +8,12 @@
true
Library
EasyAbp.EShop.Payments.Web
+ true
-
-
+
+
@@ -20,6 +21,10 @@
+
+
+
+
@@ -29,11 +34,6 @@
-
-
-
-
-
diff --git a/modules/EasyAbp.EShop.Payments/test/EasyAbp.EShop.Payments.HttpApi.Client.ConsoleTestApp/EasyAbp.EShop.Payments.HttpApi.Client.ConsoleTestApp.csproj b/modules/EasyAbp.EShop.Payments/test/EasyAbp.EShop.Payments.HttpApi.Client.ConsoleTestApp/EasyAbp.EShop.Payments.HttpApi.Client.ConsoleTestApp.csproj
index 91a5f7fdc..1ff1a7c9c 100644
--- a/modules/EasyAbp.EShop.Payments/test/EasyAbp.EShop.Payments.HttpApi.Client.ConsoleTestApp/EasyAbp.EShop.Payments.HttpApi.Client.ConsoleTestApp.csproj
+++ b/modules/EasyAbp.EShop.Payments/test/EasyAbp.EShop.Payments.HttpApi.Client.ConsoleTestApp/EasyAbp.EShop.Payments.HttpApi.Client.ConsoleTestApp.csproj
@@ -7,7 +7,7 @@
-
+
diff --git a/modules/EasyAbp.EShop.Payments/test/EasyAbp.EShop.Payments.TestBase/EasyAbp.EShop.Payments.TestBase.csproj b/modules/EasyAbp.EShop.Payments/test/EasyAbp.EShop.Payments.TestBase/EasyAbp.EShop.Payments.TestBase.csproj
index 8d8800436..582e12bdc 100644
--- a/modules/EasyAbp.EShop.Payments/test/EasyAbp.EShop.Payments.TestBase/EasyAbp.EShop.Payments.TestBase.csproj
+++ b/modules/EasyAbp.EShop.Payments/test/EasyAbp.EShop.Payments.TestBase/EasyAbp.EShop.Payments.TestBase.csproj
@@ -14,9 +14,9 @@
-
-
-
+
+
+
diff --git a/modules/EasyAbp.EShop.Plugins/src/EasyAbp.EShop.Plugins.Application.Contracts/EShopPluginsApplicationContractsModule.cs b/modules/EasyAbp.EShop.Plugins/src/EasyAbp.EShop.Plugins.Application.Contracts/EShopPluginsApplicationContractsModule.cs
index a7b32fba3..637596980 100644
--- a/modules/EasyAbp.EShop.Plugins/src/EasyAbp.EShop.Plugins.Application.Contracts/EShopPluginsApplicationContractsModule.cs
+++ b/modules/EasyAbp.EShop.Plugins/src/EasyAbp.EShop.Plugins.Application.Contracts/EShopPluginsApplicationContractsModule.cs
@@ -12,12 +12,6 @@ namespace EasyAbp.EShop.Plugins
)]
public class EShopPluginsApplicationContractsModule : AbpModule
{
- public override void ConfigureServices(ServiceConfigurationContext context)
- {
- Configure(options =>
- {
- options.FileSets.AddEmbedded("EasyAbp.EShop.Plugins");
- });
- }
+
}
}
diff --git a/modules/EasyAbp.EShop.Plugins/src/EasyAbp.EShop.Plugins.Application.Contracts/EasyAbp.EShop.Plugins.Application.Contracts.csproj b/modules/EasyAbp.EShop.Plugins/src/EasyAbp.EShop.Plugins.Application.Contracts/EasyAbp.EShop.Plugins.Application.Contracts.csproj
index 84cad9011..7be88759b 100644
--- a/modules/EasyAbp.EShop.Plugins/src/EasyAbp.EShop.Plugins.Application.Contracts/EasyAbp.EShop.Plugins.Application.Contracts.csproj
+++ b/modules/EasyAbp.EShop.Plugins/src/EasyAbp.EShop.Plugins.Application.Contracts/EasyAbp.EShop.Plugins.Application.Contracts.csproj
@@ -8,8 +8,8 @@
-
-
+
+
diff --git a/modules/EasyAbp.EShop.Plugins/src/EasyAbp.EShop.Plugins.Application/EasyAbp.EShop.Plugins.Application.csproj b/modules/EasyAbp.EShop.Plugins/src/EasyAbp.EShop.Plugins.Application/EasyAbp.EShop.Plugins.Application.csproj
index e13cbed30..ecd82098c 100644
--- a/modules/EasyAbp.EShop.Plugins/src/EasyAbp.EShop.Plugins.Application/EasyAbp.EShop.Plugins.Application.csproj
+++ b/modules/EasyAbp.EShop.Plugins/src/EasyAbp.EShop.Plugins.Application/EasyAbp.EShop.Plugins.Application.csproj
@@ -8,8 +8,8 @@
-
-
+
+
diff --git a/modules/EasyAbp.EShop.Plugins/src/EasyAbp.EShop.Plugins.Domain.Shared/EShopPluginsDomainSharedModule.cs b/modules/EasyAbp.EShop.Plugins/src/EasyAbp.EShop.Plugins.Domain.Shared/EShopPluginsDomainSharedModule.cs
index 6d6748f13..5b1912a52 100644
--- a/modules/EasyAbp.EShop.Plugins/src/EasyAbp.EShop.Plugins.Domain.Shared/EShopPluginsDomainSharedModule.cs
+++ b/modules/EasyAbp.EShop.Plugins/src/EasyAbp.EShop.Plugins.Domain.Shared/EShopPluginsDomainSharedModule.cs
@@ -17,7 +17,7 @@ public override void ConfigureServices(ServiceConfigurationContext context)
{
Configure(options =>
{
- options.FileSets.AddEmbedded("EasyAbp.EShop.Plugins");
+ options.FileSets.AddEmbedded();
});
Configure(options =>
diff --git a/modules/EasyAbp.EShop.Plugins/src/EasyAbp.EShop.Plugins.Domain.Shared/EasyAbp.EShop.Plugins.Domain.Shared.csproj b/modules/EasyAbp.EShop.Plugins/src/EasyAbp.EShop.Plugins.Domain.Shared/EasyAbp.EShop.Plugins.Domain.Shared.csproj
index 59cab61dc..bb2fec65f 100644
--- a/modules/EasyAbp.EShop.Plugins/src/EasyAbp.EShop.Plugins.Domain.Shared/EasyAbp.EShop.Plugins.Domain.Shared.csproj
+++ b/modules/EasyAbp.EShop.Plugins/src/EasyAbp.EShop.Plugins.Domain.Shared/EasyAbp.EShop.Plugins.Domain.Shared.csproj
@@ -5,10 +5,11 @@
netstandard2.0
EasyAbp.EShop.Plugins
+ true
-
+
@@ -16,4 +17,8 @@
+
+
+
+
diff --git a/modules/EasyAbp.EShop.Plugins/src/EasyAbp.EShop.Plugins.Domain/EasyAbp.EShop.Plugins.Domain.csproj b/modules/EasyAbp.EShop.Plugins/src/EasyAbp.EShop.Plugins.Domain/EasyAbp.EShop.Plugins.Domain.csproj
index 3bf8363ed..fec1b9bb5 100644
--- a/modules/EasyAbp.EShop.Plugins/src/EasyAbp.EShop.Plugins.Domain/EasyAbp.EShop.Plugins.Domain.csproj
+++ b/modules/EasyAbp.EShop.Plugins/src/EasyAbp.EShop.Plugins.Domain/EasyAbp.EShop.Plugins.Domain.csproj
@@ -8,7 +8,7 @@
-
+
diff --git a/modules/EasyAbp.EShop.Plugins/src/EasyAbp.EShop.Plugins.EntityFrameworkCore/EasyAbp.EShop.Plugins.EntityFrameworkCore.csproj b/modules/EasyAbp.EShop.Plugins/src/EasyAbp.EShop.Plugins.EntityFrameworkCore/EasyAbp.EShop.Plugins.EntityFrameworkCore.csproj
index 222105970..8c9d9410e 100644
--- a/modules/EasyAbp.EShop.Plugins/src/EasyAbp.EShop.Plugins.EntityFrameworkCore/EasyAbp.EShop.Plugins.EntityFrameworkCore.csproj
+++ b/modules/EasyAbp.EShop.Plugins/src/EasyAbp.EShop.Plugins.EntityFrameworkCore/EasyAbp.EShop.Plugins.EntityFrameworkCore.csproj
@@ -8,7 +8,7 @@
-
+
diff --git a/modules/EasyAbp.EShop.Plugins/src/EasyAbp.EShop.Plugins.HttpApi.Client/EasyAbp.EShop.Plugins.HttpApi.Client.csproj b/modules/EasyAbp.EShop.Plugins/src/EasyAbp.EShop.Plugins.HttpApi.Client/EasyAbp.EShop.Plugins.HttpApi.Client.csproj
index bc69a34f2..e00eb11a0 100644
--- a/modules/EasyAbp.EShop.Plugins/src/EasyAbp.EShop.Plugins.HttpApi.Client/EasyAbp.EShop.Plugins.HttpApi.Client.csproj
+++ b/modules/EasyAbp.EShop.Plugins/src/EasyAbp.EShop.Plugins.HttpApi.Client/EasyAbp.EShop.Plugins.HttpApi.Client.csproj
@@ -8,7 +8,7 @@
-
+
diff --git a/modules/EasyAbp.EShop.Plugins/src/EasyAbp.EShop.Plugins.HttpApi/EasyAbp.EShop.Plugins.HttpApi.csproj b/modules/EasyAbp.EShop.Plugins/src/EasyAbp.EShop.Plugins.HttpApi/EasyAbp.EShop.Plugins.HttpApi.csproj
index bc86355e5..d5dae3b43 100644
--- a/modules/EasyAbp.EShop.Plugins/src/EasyAbp.EShop.Plugins.HttpApi/EasyAbp.EShop.Plugins.HttpApi.csproj
+++ b/modules/EasyAbp.EShop.Plugins/src/EasyAbp.EShop.Plugins.HttpApi/EasyAbp.EShop.Plugins.HttpApi.csproj
@@ -8,7 +8,7 @@
-
+
diff --git a/modules/EasyAbp.EShop.Plugins/src/EasyAbp.EShop.Plugins.MongoDB/EasyAbp.EShop.Plugins.MongoDB.csproj b/modules/EasyAbp.EShop.Plugins/src/EasyAbp.EShop.Plugins.MongoDB/EasyAbp.EShop.Plugins.MongoDB.csproj
index 2dc9a48d5..e15a603d3 100644
--- a/modules/EasyAbp.EShop.Plugins/src/EasyAbp.EShop.Plugins.MongoDB/EasyAbp.EShop.Plugins.MongoDB.csproj
+++ b/modules/EasyAbp.EShop.Plugins/src/EasyAbp.EShop.Plugins.MongoDB/EasyAbp.EShop.Plugins.MongoDB.csproj
@@ -8,7 +8,7 @@
-
+
diff --git a/modules/EasyAbp.EShop.Plugins/src/EasyAbp.EShop.Plugins.Web/EShopPluginsWebModule.cs b/modules/EasyAbp.EShop.Plugins/src/EasyAbp.EShop.Plugins.Web/EShopPluginsWebModule.cs
index 6063a3fd1..2e0b249f2 100644
--- a/modules/EasyAbp.EShop.Plugins/src/EasyAbp.EShop.Plugins.Web/EShopPluginsWebModule.cs
+++ b/modules/EasyAbp.EShop.Plugins/src/EasyAbp.EShop.Plugins.Web/EShopPluginsWebModule.cs
@@ -40,7 +40,7 @@ public override void ConfigureServices(ServiceConfigurationContext context)
Configure(options =>
{
- options.FileSets.AddEmbedded("EasyAbp.EShop.Plugins.Web");
+ options.FileSets.AddEmbedded();
});
context.Services.AddAutoMapperObjectMapper();
diff --git a/modules/EasyAbp.EShop.Plugins/src/EasyAbp.EShop.Plugins.Web/EasyAbp.EShop.Plugins.Web.csproj b/modules/EasyAbp.EShop.Plugins/src/EasyAbp.EShop.Plugins.Web/EasyAbp.EShop.Plugins.Web.csproj
index 4acc389e5..4566e412e 100644
--- a/modules/EasyAbp.EShop.Plugins/src/EasyAbp.EShop.Plugins.Web/EasyAbp.EShop.Plugins.Web.csproj
+++ b/modules/EasyAbp.EShop.Plugins/src/EasyAbp.EShop.Plugins.Web/EasyAbp.EShop.Plugins.Web.csproj
@@ -8,17 +8,22 @@
true
Library
EasyAbp.EShop.Plugins.Web
+ true
-
-
+
+
+
+
+
+
@@ -28,11 +33,6 @@
-
-
-
-
-
diff --git a/modules/EasyAbp.EShop.Plugins/test/EasyAbp.EShop.Plugins.HttpApi.Client.ConsoleTestApp/EasyAbp.EShop.Plugins.HttpApi.Client.ConsoleTestApp.csproj b/modules/EasyAbp.EShop.Plugins/test/EasyAbp.EShop.Plugins.HttpApi.Client.ConsoleTestApp/EasyAbp.EShop.Plugins.HttpApi.Client.ConsoleTestApp.csproj
index 8264e2ef5..7c315b453 100644
--- a/modules/EasyAbp.EShop.Plugins/test/EasyAbp.EShop.Plugins.HttpApi.Client.ConsoleTestApp/EasyAbp.EShop.Plugins.HttpApi.Client.ConsoleTestApp.csproj
+++ b/modules/EasyAbp.EShop.Plugins/test/EasyAbp.EShop.Plugins.HttpApi.Client.ConsoleTestApp/EasyAbp.EShop.Plugins.HttpApi.Client.ConsoleTestApp.csproj
@@ -7,7 +7,7 @@
-
+
diff --git a/modules/EasyAbp.EShop.Plugins/test/EasyAbp.EShop.Plugins.TestBase/EasyAbp.EShop.Plugins.TestBase.csproj b/modules/EasyAbp.EShop.Plugins/test/EasyAbp.EShop.Plugins.TestBase/EasyAbp.EShop.Plugins.TestBase.csproj
index 4fa0ece45..2ed017490 100644
--- a/modules/EasyAbp.EShop.Plugins/test/EasyAbp.EShop.Plugins.TestBase/EasyAbp.EShop.Plugins.TestBase.csproj
+++ b/modules/EasyAbp.EShop.Plugins/test/EasyAbp.EShop.Plugins.TestBase/EasyAbp.EShop.Plugins.TestBase.csproj
@@ -14,9 +14,9 @@
-
-
-
+
+
+
diff --git a/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Application.Contracts/EasyAbp.EShop.Products.Application.Contracts.csproj b/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Application.Contracts/EasyAbp.EShop.Products.Application.Contracts.csproj
index 7df5aa2d7..dd94c6734 100644
--- a/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Application.Contracts/EasyAbp.EShop.Products.Application.Contracts.csproj
+++ b/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Application.Contracts/EasyAbp.EShop.Products.Application.Contracts.csproj
@@ -9,8 +9,8 @@
-
-
+
+
diff --git a/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Application.Contracts/EasyAbp/EShop/Products/EShopProductsApplicationContractsModule.cs b/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Application.Contracts/EasyAbp/EShop/Products/EShopProductsApplicationContractsModule.cs
index e8278e0c6..390d57d14 100644
--- a/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Application.Contracts/EasyAbp/EShop/Products/EShopProductsApplicationContractsModule.cs
+++ b/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Application.Contracts/EasyAbp/EShop/Products/EShopProductsApplicationContractsModule.cs
@@ -16,10 +16,7 @@ public class EShopProductsApplicationContractsModule : AbpModule
{
public override void ConfigureServices(ServiceConfigurationContext context)
{
- Configure(options =>
- {
- options.FileSets.AddEmbedded("EasyAbp.EShop.Products");
- });
+
}
}
}
diff --git a/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Application.Contracts/EasyAbp/EShop/Products/Permissions/ProductsPermissionDefinitionProvider.cs b/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Application.Contracts/EasyAbp/EShop/Products/Permissions/ProductsPermissionDefinitionProvider.cs
index 47cb94b57..3e36aa412 100644
--- a/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Application.Contracts/EasyAbp/EShop/Products/Permissions/ProductsPermissionDefinitionProvider.cs
+++ b/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Application.Contracts/EasyAbp/EShop/Products/Permissions/ProductsPermissionDefinitionProvider.cs
@@ -18,7 +18,12 @@ public override void Define(IPermissionDefinitionContext context)
categories.AddChild(ProductsPermissions.Categories.Create, L("Permission:Create"));
categories.AddChild(ProductsPermissions.Categories.Update, L("Permission:Update"));
categories.AddChild(ProductsPermissions.Categories.Delete, L("Permission:Delete"));
-
+
+ var tags = moduleGroup.AddPermission(ProductsPermissions.Tags.Default, L("Permission:Tag"));
+ tags.AddChild(ProductsPermissions.Tags.Create, L("Permission:Create"));
+ tags.AddChild(ProductsPermissions.Tags.Update, L("Permission:Update"));
+ tags.AddChild(ProductsPermissions.Tags.Delete, L("Permission:Delete"));
+
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"));
diff --git a/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Application.Contracts/EasyAbp/EShop/Products/Permissions/ProductsPermissions.cs b/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Application.Contracts/EasyAbp/EShop/Products/Permissions/ProductsPermissions.cs
index 42a97ea05..8f75a7574 100644
--- a/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Application.Contracts/EasyAbp/EShop/Products/Permissions/ProductsPermissions.cs
+++ b/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Application.Contracts/EasyAbp/EShop/Products/Permissions/ProductsPermissions.cs
@@ -20,6 +20,14 @@ public class Categories
public const string Create = Default + ".Create";
}
+ public class Tags
+ {
+ public const string Default = GroupName + ".Tag";
+ public const string Delete = Default + ".Delete";
+ public const string Update = Default + ".Update";
+ public const string Create = Default + ".Create";
+ }
+
public class Products
{
public const string Default = GroupName + ".Product";
diff --git a/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Application.Contracts/EasyAbp/EShop/Products/ProductTags/Dtos/GetProductTagListDto.cs b/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Application.Contracts/EasyAbp/EShop/Products/ProductTags/Dtos/GetProductTagListDto.cs
new file mode 100644
index 000000000..6e0f3af09
--- /dev/null
+++ b/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Application.Contracts/EasyAbp/EShop/Products/ProductTags/Dtos/GetProductTagListDto.cs
@@ -0,0 +1,12 @@
+using System;
+using Volo.Abp.Application.Dtos;
+
+namespace EasyAbp.EShop.Products.ProductTags.Dtos
+{
+ public class GetProductTagListDto : PagedAndSortedResultRequestDto
+ {
+ public Guid? TagId { get; set; }
+
+ public Guid? ProductId { get; set; }
+ }
+}
\ No newline at end of file
diff --git a/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Application.Contracts/EasyAbp/EShop/Products/ProductTags/Dtos/ProductTagDto.cs b/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Application.Contracts/EasyAbp/EShop/Products/ProductTags/Dtos/ProductTagDto.cs
new file mode 100644
index 000000000..2cdbfc023
--- /dev/null
+++ b/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Application.Contracts/EasyAbp/EShop/Products/ProductTags/Dtos/ProductTagDto.cs
@@ -0,0 +1,14 @@
+using System;
+using Volo.Abp.Application.Dtos;
+
+namespace EasyAbp.EShop.Products.ProductTags.Dtos
+{
+ public class ProductTagDto : AuditedEntityDto
+ {
+ public Guid TagId { get; set; }
+
+ public Guid ProductId { get; set; }
+
+ public int DisplayOrder { get; set; }
+ }
+}
\ No newline at end of file
diff --git a/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Application.Contracts/EasyAbp/EShop/Products/ProductTags/IProductTagAppService.cs b/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Application.Contracts/EasyAbp/EShop/Products/ProductTags/IProductTagAppService.cs
new file mode 100644
index 000000000..555aee04d
--- /dev/null
+++ b/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Application.Contracts/EasyAbp/EShop/Products/ProductTags/IProductTagAppService.cs
@@ -0,0 +1,15 @@
+using System;
+using EasyAbp.EShop.Products.ProductTags.Dtos;
+using Volo.Abp.Application.Services;
+
+namespace EasyAbp.EShop.Products.ProductTags
+{
+ public interface IProductTagAppService :
+ IReadOnlyAppService<
+ ProductTagDto,
+ Guid,
+ GetProductTagListDto>
+ {
+
+ }
+}
diff --git a/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Application.Contracts/EasyAbp/EShop/Products/Products/Dtos/CreateUpdateProductDto.cs b/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Application.Contracts/EasyAbp/EShop/Products/Products/Dtos/CreateUpdateProductDto.cs
index 8933b2433..fd4aa4875 100644
--- a/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Application.Contracts/EasyAbp/EShop/Products/Products/Dtos/CreateUpdateProductDto.cs
+++ b/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Application.Contracts/EasyAbp/EShop/Products/Products/Dtos/CreateUpdateProductDto.cs
@@ -22,6 +22,9 @@ public class CreateUpdateProductDto : IValidatableObject
[DisplayName("ProductCategory")]
public ICollection CategoryIds { get; set; }
+
+ [DisplayName("ProductTag")]
+ public ICollection TagIds { get; set; }
[DisplayName("ProductUniqueName")]
public string UniqueName { get; set; }
diff --git a/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Application.Contracts/EasyAbp/EShop/Products/Products/Dtos/GetProductListDto.cs b/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Application.Contracts/EasyAbp/EShop/Products/Products/Dtos/GetProductListDto.cs
index 561c2981a..f9c09b2e7 100644
--- a/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Application.Contracts/EasyAbp/EShop/Products/Products/Dtos/GetProductListDto.cs
+++ b/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Application.Contracts/EasyAbp/EShop/Products/Products/Dtos/GetProductListDto.cs
@@ -8,6 +8,8 @@ public class GetProductListDto : PagedAndSortedResultRequestDto
public Guid StoreId { get; set; }
public Guid? CategoryId { get; set; }
+
+ public Guid? TagId { get; set; }
public bool ShowHidden { get; set; }
}
diff --git a/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Application.Contracts/EasyAbp/EShop/Products/Tags/Dtos/CreateUpdateTagDto.cs b/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Application.Contracts/EasyAbp/EShop/Products/Tags/Dtos/CreateUpdateTagDto.cs
new file mode 100644
index 000000000..87c174497
--- /dev/null
+++ b/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Application.Contracts/EasyAbp/EShop/Products/Tags/Dtos/CreateUpdateTagDto.cs
@@ -0,0 +1,30 @@
+using System;
+using System.ComponentModel;
+using System.ComponentModel.DataAnnotations;
+using Volo.Abp.ObjectExtending;
+
+namespace EasyAbp.EShop.Products.Tags.Dtos
+{
+ public class UpdateTagDto
+ {
+ [DisplayName("TagParentId")]
+ public Guid? ParentId { get; set; }
+
+ [Required]
+ [DisplayName("TagDisplayName")]
+ public string DisplayName { get; set; }
+
+ [DisplayName("TagDescription")]
+ public string Description { get; set; }
+
+ [DisplayName("TagMediaResources")]
+ public string MediaResources { get; set; }
+ }
+
+ public class CreateTagDto : UpdateTagDto
+ {
+ [Required]
+ [DisplayName("TagStoreId")]
+ public Guid StoreId { get; set; }
+ }
+}
\ No newline at end of file
diff --git a/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Application.Contracts/EasyAbp/EShop/Products/Tags/Dtos/GetTagListDto.cs b/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Application.Contracts/EasyAbp/EShop/Products/Tags/Dtos/GetTagListDto.cs
new file mode 100644
index 000000000..39ba1c6e5
--- /dev/null
+++ b/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Application.Contracts/EasyAbp/EShop/Products/Tags/Dtos/GetTagListDto.cs
@@ -0,0 +1,14 @@
+using System;
+using System.ComponentModel.DataAnnotations;
+using Volo.Abp.Application.Dtos;
+
+namespace EasyAbp.EShop.Products.Tags.Dtos
+{
+ public class GetTagListDto : PagedAndSortedResultRequestDto
+ {
+ [Required]
+ public Guid StoreId { get; set; }
+
+ public bool ShowHidden { get; set; }
+ }
+}
\ No newline at end of file
diff --git a/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Application.Contracts/EasyAbp/EShop/Products/Tags/Dtos/TagDto.cs b/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Application.Contracts/EasyAbp/EShop/Products/Tags/Dtos/TagDto.cs
new file mode 100644
index 000000000..8a99e12ca
--- /dev/null
+++ b/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Application.Contracts/EasyAbp/EShop/Products/Tags/Dtos/TagDto.cs
@@ -0,0 +1,25 @@
+using System;
+using System.Collections.Generic;
+using Volo.Abp.Application.Dtos;
+
+namespace EasyAbp.EShop.Products.Tags.Dtos
+{
+ public class TagDto : ExtensibleFullAuditedEntityDto
+ {
+ public Guid StoreId { get; set; }
+
+ public Guid? ParentId { get; set; }
+
+ public string Code { get; set; }
+
+ public int Level { get; set; }
+
+ public string DisplayName { get; set; }
+
+ public string Description { get; set; }
+
+ public string MediaResources { get; set; }
+
+ public ICollection Children { get; set; }
+ }
+}
\ No newline at end of file
diff --git a/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Application.Contracts/EasyAbp/EShop/Products/Tags/ITagAppService.cs b/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Application.Contracts/EasyAbp/EShop/Products/Tags/ITagAppService.cs
new file mode 100644
index 000000000..231ebf7de
--- /dev/null
+++ b/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Application.Contracts/EasyAbp/EShop/Products/Tags/ITagAppService.cs
@@ -0,0 +1,15 @@
+using System;
+using EasyAbp.EShop.Products.Tags.Dtos;
+using Volo.Abp.Application.Services;
+
+namespace EasyAbp.EShop.Products.Tags
+{
+ public interface ITagAppService : ICrudAppService<
+ TagDto,
+ Guid,
+ GetTagListDto,
+ CreateTagDto,
+ UpdateTagDto>
+ {
+ }
+}
diff --git a/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Application/EasyAbp.EShop.Products.Application.csproj b/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Application/EasyAbp.EShop.Products.Application.csproj
index 20650f38c..1fe7357b3 100644
--- a/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Application/EasyAbp.EShop.Products.Application.csproj
+++ b/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Application/EasyAbp.EShop.Products.Application.csproj
@@ -9,8 +9,8 @@
-
-
+
+
diff --git a/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Application/EasyAbp/EShop/Products/ProductCategories/ProductCategoryAppService.cs b/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Application/EasyAbp/EShop/Products/ProductCategories/ProductCategoryAppService.cs
index f951f2c02..7f9296a95 100644
--- a/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Application/EasyAbp/EShop/Products/ProductCategories/ProductCategoryAppService.cs
+++ b/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
diff --git a/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Application/EasyAbp/EShop/Products/ProductTags/ProductTagAppService.cs b/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Application/EasyAbp/EShop/Products/ProductTags/ProductTagAppService.cs
new file mode 100644
index 000000000..610eefe27
--- /dev/null
+++ b/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Application/EasyAbp/EShop/Products/ProductTags/ProductTagAppService.cs
@@ -0,0 +1,44 @@
+using EasyAbp.EShop.Products.Permissions;
+using EasyAbp.EShop.Products.ProductTags.Dtos;
+using System;
+using System.Linq;
+using System.Threading.Tasks;
+using Volo.Abp;
+using Volo.Abp.Application.Services;
+using Volo.Abp.Domain.Repositories;
+
+namespace EasyAbp.EShop.Products.ProductTags
+{
+ public class ProductTagAppService : CrudAppService,
+ IProductTagAppService
+ {
+ public ProductTagAppService(IRepository repository) : base(repository)
+ {
+ }
+
+ protected override string GetListPolicyName { get; set; } = ProductsPermissions.Products.Default;
+
+ protected override IQueryable CreateFilteredQuery(GetProductTagListDto input)
+ {
+ var queryable = Repository.AsQueryable();
+
+ if (input.TagId.HasValue)
+ {
+ queryable = queryable.Where(x => x.TagId == input.TagId);
+ }
+
+ if (input.ProductId.HasValue)
+ {
+ queryable = queryable.Where(x => x.ProductId == input.ProductId);
+ }
+
+ return queryable;
+ }
+
+ [RemoteService(false)]
+ public override Task GetAsync(Guid id)
+ {
+ throw new NotSupportedException();
+ }
+ }
+}
diff --git a/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Application/EasyAbp/EShop/Products/Products/ProductAppService.cs b/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Application/EasyAbp/EShop/Products/Products/ProductAppService.cs
index 35c20af25..a29099910 100644
--- a/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Application/EasyAbp/EShop/Products/Products/ProductAppService.cs
+++ b/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Application/EasyAbp/EShop/Products/Products/ProductAppService.cs
@@ -48,9 +48,7 @@ public ProductAppService(
protected override IQueryable 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, input.TagId);
return input.ShowHidden ? query : query.Where(x => !x.IsHidden);
}
@@ -65,33 +63,33 @@ protected override Product MapToEntity(CreateUpdateProductDto createInput)
public override async Task CreateAsync(CreateUpdateProductDto input)
{
await CheckCreatePolicyAsync();
-
+
var product = MapToEntity(input);
TryToSetTenantId(product);
-
+
await UpdateProductAttributesAsync(product, input);
-
- await _productManager.CreateAsync(product, input.StoreId, input.CategoryIds);
+
+ await _productManager.CreateAsync(product, input.StoreId, input.CategoryIds, input.TagIds);
return MapToGetOutputDto(product);
}
-
+
public override async Task UpdateAsync(Guid id, CreateUpdateProductDto input)
{
await CheckUpdatePolicyAsync();
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);
+ await _productManager.UpdateAsync(product, input.CategoryIds, input.TagIds);
return MapToGetOutputDto(product);
}
@@ -111,7 +109,7 @@ protected virtual async Task UpdateProductAttributesAsync(Product product, Creat
var isProductSkusEmpty = product.ProductSkus.IsNullOrEmpty();
var usedAttributeOptionIds = new HashSet();
-
+
foreach (var serializedAttributeOptionIds in product.ProductSkus.Select(sku => sku.SerializedAttributeOptionIds))
{
foreach (var attributeOptionId in await _attributeOptionIdsSerializer.DeserializeAsync(serializedAttributeOptionIds))
@@ -119,21 +117,21 @@ protected virtual async Task UpdateProductAttributesAsync(Product product, Creat
usedAttributeOptionIds.Add(attributeOptionId);
}
}
-
+
foreach (var attributeDto in input.ProductAttributes)
{
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);
}
@@ -145,7 +143,7 @@ protected virtual async Task UpdateProductAttributesAsync(Product product, Creat
{
option = new ProductAttributeOption(GuidGenerator.Create(),
optionDto.DisplayName, optionDto.Description);
-
+
attribute.ProductAttributeOptions.Add(option);
}
}
@@ -171,7 +169,7 @@ protected virtual async Task UpdateProductAttributesAsync(Product product, Creat
{
throw new ProductAttributesModificationFailedException();
}
-
+
product.ProductAttributes.RemoveAll(a => removedAttributeNames.Contains(a.DisplayName));
}
@@ -188,20 +186,20 @@ public override Task GetAsync(Guid id)
{
throw new NotSupportedException();
}
-
+
public virtual async Task 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 LoadDtoInventoryDataAsync(product, dto, storeId);
await LoadDtoPriceAsync(product, dto, storeId);
@@ -225,16 +223,16 @@ public virtual async Task GetByCodeAsync(string code, Guid storeId)
await CheckGetPolicyAsync();
var product = await _repository.GetAsync(x => x.UniqueName == code);
-
+
if (!product.IsPublished)
{
await CheckStoreIsProductOwnerAsync(product.Id, storeId);
}
-
+
var dto = MapToGetOutputDto(product);
-
+
await LoadDtoInventoryDataAsync(product, dto, storeId);
-
+
return dto;
}
@@ -244,7 +242,7 @@ public override async Task> GetListAsync(GetProductLi
// Todo: Check if current user is an admin of the store.
var isCurrentUserStoreAdmin = true && await AuthorizationService.IsGrantedAsync(ProductsPermissions.Products.Default);
-
+
if (input.ShowHidden && !isCurrentUserStoreAdmin)
{
throw new NotAllowedToGetProductListWithShowHiddenException();
@@ -252,7 +250,7 @@ public override async Task> GetListAsync(GetProductLi
// Todo: Products cache.
var query = CreateFilteredQuery(input);
-
+
if (!isCurrentUserStoreAdmin)
{
query = query.Where(x => x.IsPublished);
@@ -266,22 +264,22 @@ public override async Task> GetListAsync(GetProductLi
var products = await AsyncExecuter.ToListAsync(query);
var items = new List();
-
+
foreach (var product in products)
{
var productDto = MapToGetListOutputDto(product);
-
+
await LoadDtoInventoryDataAsync(product, productDto, input.StoreId);
await LoadDtoPriceAsync(product, productDto, input.StoreId);
items.Add(productDto);
}
-
+
await LoadDtosProductTypeUniqueNameAsync(items);
return new PagedResultDto(totalCount, items);
}
-
+
protected virtual async Task LoadDtoInventoryDataAsync(Product product, ProductDto productDto, Guid storeId)
{
var inventoryDataDict = await _productInventoryProvider.GetInventoryDataDictionaryAsync(product, storeId);
@@ -322,7 +320,7 @@ public async Task DeleteAsync(Guid id, Guid storeId)
await CheckDeletePolicyAsync();
var product = await GetEntityByIdAsync(id);
-
+
CheckProductIsNotStatic(product);
await CheckStoreIsProductOwnerAsync(id, storeId);
@@ -341,28 +339,28 @@ private static void CheckProductIsNotStatic(Product product)
public async Task CreateSkuAsync(Guid productId, Guid storeId, CreateProductSkuDto input)
{
await CheckUpdatePolicyAsync();
-
+
await CheckStoreIsProductOwnerAsync(productId, storeId);
-
+
var product = await GetEntityByIdAsync(productId);
CheckProductIsNotStatic(product);
-
+
var sku = ObjectMapper.Map(input);
EntityHelper.TrySetId(sku, GuidGenerator.Create);
await _productManager.CreateSkuAsync(product, sku);
-
+
return ObjectMapper.Map(product);
}
-
+
public async Task UpdateSkuAsync(Guid productId, Guid productSkuId, Guid storeId, UpdateProductSkuDto input)
{
await CheckUpdatePolicyAsync();
-
+
await CheckStoreIsProductOwnerAsync(productId, storeId);
-
+
var product = await GetEntityByIdAsync(productId);
CheckProductIsNotStatic(product);
@@ -372,18 +370,18 @@ public async Task UpdateSkuAsync(Guid productId, Guid productSkuId,
ObjectMapper.Map(input, sku);
await _productManager.UpdateSkuAsync(product, sku);
-
+
return ObjectMapper.Map(product);
}
public async Task DeleteSkuAsync(Guid productId, Guid productSkuId, Guid storeId)
{
await CheckUpdatePolicyAsync();
-
+
await CheckStoreIsProductOwnerAsync(productId, storeId);
-
+
var product = await GetEntityByIdAsync(productId);
-
+
CheckProductIsNotStatic(product);
var sku = product.ProductSkus.Single(x => x.Id == productSkuId);
diff --git a/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Application/EasyAbp/EShop/Products/ProductsApplicationAutoMapperProfile.cs b/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Application/EasyAbp/EShop/Products/ProductsApplicationAutoMapperProfile.cs
index ac7bcc8cb..fc327f89f 100644
--- a/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Application/EasyAbp/EShop/Products/ProductsApplicationAutoMapperProfile.cs
+++ b/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Application/EasyAbp/EShop/Products/ProductsApplicationAutoMapperProfile.cs
@@ -14,6 +14,10 @@
using EasyAbp.EShop.Products.ProductDetailHistories.Dtos;
using EasyAbp.EShop.Products.ProductHistories;
using EasyAbp.EShop.Products.ProductHistories.Dtos;
+using EasyAbp.EShop.Products.ProductTags;
+using EasyAbp.EShop.Products.ProductTags.Dtos;
+using EasyAbp.EShop.Products.Tags;
+using EasyAbp.EShop.Products.Tags.Dtos;
using Volo.Abp.AutoMapper;
using EasyAbp.EShop.Products.ProductInventories;
using EasyAbp.EShop.Products.ProductInventories.Dtos;
@@ -68,6 +72,12 @@ public ProductsApplicationAutoMapperProfile(IAttributeOptionIdsSerializer attrib
CreateMap();
CreateMap();
CreateMap();
+ CreateMap(MemberList.Source);
+ CreateMap(MemberList.Source);
+ CreateMap();
+ CreateMap(MemberList.Source);
+ CreateMap(MemberList.Source);
+ CreateMap();
}
}
}
diff --git a/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Application/EasyAbp/EShop/Products/Tags/TagAppService.cs b/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Application/EasyAbp/EShop/Products/Tags/TagAppService.cs
new file mode 100644
index 000000000..45e20475d
--- /dev/null
+++ b/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Application/EasyAbp/EShop/Products/Tags/TagAppService.cs
@@ -0,0 +1,115 @@
+using EasyAbp.EShop.Products.Permissions;
+using EasyAbp.EShop.Products.Tags.Dtos;
+using System;
+using System.Linq;
+using System.Threading.Tasks;
+using JetBrains.Annotations;
+using Volo.Abp.Application.Dtos;
+using Volo.Abp.Application.Services;
+using Volo.Abp.Linq;
+
+namespace EasyAbp.EShop.Products.Tags
+{
+ public class TagAppService : CrudAppService,
+ ITagAppService
+ {
+ private readonly IAsyncQueryableExecuter _asyncQueryableExecuter;
+ protected override string CreatePolicyName { get; set; } = ProductsPermissions.Tags.Create;
+ protected override string DeletePolicyName { get; set; } = ProductsPermissions.Tags.Delete;
+ protected override string UpdatePolicyName { get; set; } = ProductsPermissions.Tags.Update;
+ protected override string GetPolicyName { get; set; } = ProductsPermissions.Tags.Default;
+ protected override string GetListPolicyName { get; set; } = ProductsPermissions.Tags.Default;
+
+ public TagAppService(ITagRepository repository,
+ [NotNull] IAsyncQueryableExecuter asyncQueryableExecuter) : base(repository)
+ {
+ _asyncQueryableExecuter = asyncQueryableExecuter ?? throw new ArgumentNullException(nameof(asyncQueryableExecuter));
+ }
+
+ protected override IQueryable CreateFilteredQuery(GetTagListDto input)
+ {
+ var query = base.CreateFilteredQuery(input);
+
+ query = query.Where(x => x.StoreId == input.StoreId);
+
+ return input.ShowHidden ? query : query.Where(x => !x.IsHidden);
+ }
+
+ public override async Task GetAsync(Guid id)
+ {
+ await CheckGetPolicyAsync();
+
+ var entity = await GetEntityByIdAsync(id);
+
+ await CheckCurrentUserIsStoreOwner(entity.StoreId, CurrentUser.Id);
+
+ return MapToGetOutputDto(entity);
+ }
+
+ public override async Task> GetListAsync(GetTagListDto input)
+ {
+ await CheckGetListPolicyAsync();
+
+ await CheckCurrentUserIsStoreOwner(input.StoreId, CurrentUser.Id);
+
+ var query = CreateFilteredQuery(input);
+
+ var totalCount = await _asyncQueryableExecuter.CountAsync(query);
+
+ query = ApplySorting(query, input);
+ query = ApplyPaging(query, input);
+
+ var entities = await _asyncQueryableExecuter.ToListAsync(query);
+
+ return new PagedResultDto(
+ totalCount,
+ entities.Select(MapToGetListOutputDto).ToList());
+ }
+
+ public override async Task CreateAsync(CreateTagDto input)
+ {
+ await CheckCreatePolicyAsync();
+
+ await CheckCurrentUserIsStoreOwner(input.StoreId, CurrentUser.Id);
+
+ var entity = MapToEntity(input);
+
+ TryToSetTenantId(entity);
+
+ await Repository.InsertAsync(entity, autoSave: true);
+
+ return MapToGetOutputDto(entity);
+ }
+
+ public override async Task UpdateAsync(Guid id, UpdateTagDto input)
+ {
+ await CheckUpdatePolicyAsync();
+
+ var entity = await GetEntityByIdAsync(id);
+
+ await CheckCurrentUserIsStoreOwner(entity.StoreId, CurrentUser.Id);
+
+ MapToEntity(input, entity);
+ await Repository.UpdateAsync(entity, autoSave: true);
+
+ return MapToGetOutputDto(entity);
+ }
+
+ public override async Task DeleteAsync(Guid id)
+ {
+ await CheckDeletePolicyAsync();
+
+ var entity = await GetEntityByIdAsync(id);
+
+ await CheckCurrentUserIsStoreOwner(entity.StoreId, CurrentUser.Id);
+
+ await DeleteByIdAsync(id);
+ }
+
+ protected virtual Task CheckCurrentUserIsStoreOwner(Guid storeId, Guid? userId)
+ {
+ //TODO: check if current user id owner of store
+ return Task.CompletedTask;
+ }
+ }
+}
diff --git a/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Application/EasyAbp/EShop/Products/Tags/UserIsNotOwnerOfStoreException.cs b/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Application/EasyAbp/EShop/Products/Tags/UserIsNotOwnerOfStoreException.cs
new file mode 100644
index 000000000..ee7c3d38b
--- /dev/null
+++ b/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Application/EasyAbp/EShop/Products/Tags/UserIsNotOwnerOfStoreException.cs
@@ -0,0 +1,12 @@
+using Volo.Abp;
+
+namespace EasyAbp.EShop.Products.Tags
+{
+ public class UserIsNotOwnerOfStoreException : BusinessException
+ {
+ public UserIsNotOwnerOfStoreException() : base(
+ message: $"You have to be owner of store to modify tags.")
+ {
+ }
+ }
+}
diff --git a/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Domain.Shared/EasyAbp.EShop.Products.Domain.Shared.csproj b/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Domain.Shared/EasyAbp.EShop.Products.Domain.Shared.csproj
index b9dcc8fd7..37082b8e2 100644
--- a/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Domain.Shared/EasyAbp.EShop.Products.Domain.Shared.csproj
+++ b/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Domain.Shared/EasyAbp.EShop.Products.Domain.Shared.csproj
@@ -5,11 +5,12 @@
netstandard2.0
+ true
-
+
@@ -17,4 +18,8 @@
+
+
+
+
diff --git a/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Domain.Shared/EasyAbp/EShop/Products/Localization/Products/cs.json b/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Domain.Shared/EasyAbp/EShop/Products/Localization/Products/cs.json
index 31adc89b6..6818b7a31 100644
--- a/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Domain.Shared/EasyAbp/EShop/Products/Localization/Products/cs.json
+++ b/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Domain.Shared/EasyAbp/EShop/Products/Localization/Products/cs.json
@@ -61,6 +61,16 @@
"CreateCategory": "CreateCategory",
"EditCategory": "EditCategory",
"CategoryDeletionConfirmationMessage": "Are you sure to delete the category {0}?",
+ "Menu:Tag": "MenuTag",
+ "Tag": "Tag",
+ "TagTenantId": "TagTenantId",
+ "TagStoreId": "TagStoreId",
+ "TagDisplayName": "TagDisplayName",
+ "TagDescription": "TagDescription",
+ "TagMediaResources": "TagMediaResources",
+ "CreateTag": "CreateTag",
+ "EditTag": "EditTag",
+ "TagDeletionConfirmationMessage": "Are you sure to delete the category {0}?",
"Menu:ProductType": "MenuProductType",
"ProductType": "ProductType",
"ProductTypeUniqueName": "ProductTypeUniqueName",
diff --git a/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Domain.Shared/EasyAbp/EShop/Products/Localization/Products/en.json b/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Domain.Shared/EasyAbp/EShop/Products/Localization/Products/en.json
index c2c9aac24..a58b16ed8 100644
--- a/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Domain.Shared/EasyAbp/EShop/Products/Localization/Products/en.json
+++ b/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Domain.Shared/EasyAbp/EShop/Products/Localization/Products/en.json
@@ -62,6 +62,16 @@
"CreateCategory": "CreateCategory",
"EditCategory": "EditCategory",
"CategoryDeletionConfirmationMessage": "Are you sure to delete the category {0}?",
+ "Menu:Tag": "MenuTag",
+ "Tag": "Tag",
+ "TagTenantId": "TagTenantId",
+ "TagStoreId": "TagStoreId",
+ "TagDisplayName": "TagDisplayName",
+ "TagDescription": "TagDescription",
+ "TagMediaResources": "TagMediaResources",
+ "CreateTag": "CreateTag",
+ "EditTag": "EditTag",
+ "TagDeletionConfirmationMessage": "Are you sure to delete the category {0}?",
"Menu:ProductType": "MenuProductType",
"ProductType": "ProductType",
"ProductTypeUniqueName": "ProductTypeUniqueName",
diff --git a/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Domain.Shared/EasyAbp/EShop/Products/Localization/Products/pl.json b/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Domain.Shared/EasyAbp/EShop/Products/Localization/Products/pl.json
index c132d4d5e..ea97ef52a 100644
--- a/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Domain.Shared/EasyAbp/EShop/Products/Localization/Products/pl.json
+++ b/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Domain.Shared/EasyAbp/EShop/Products/Localization/Products/pl.json
@@ -61,6 +61,16 @@
"CreateCategory": "CreateCategory",
"EditCategory": "EditCategory",
"CategoryDeletionConfirmationMessage": "Are you sure to delete the category {0}?",
+ "Menu:Tag": "MenuTag",
+ "Tag": "Tag",
+ "TagTenantId": "TagTenantId",
+ "TagStoreId": "TagStoreId",
+ "TagDisplayName": "TagDisplayName",
+ "TagDescription": "TagDescription",
+ "TagMediaResources": "TagMediaResources",
+ "CreateTag": "CreateTag",
+ "EditTag": "EditTag",
+ "TagDeletionConfirmationMessage": "Are you sure to delete the category {0}?",
"Menu:ProductType": "MenuProductType",
"ProductType": "ProductType",
"ProductTypeUniqueName": "ProductTypeUniqueName",
diff --git a/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Domain.Shared/EasyAbp/EShop/Products/Localization/Products/pt-BR.json b/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Domain.Shared/EasyAbp/EShop/Products/Localization/Products/pt-BR.json
index 0abe7df96..c1ea58c1c 100644
--- a/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Domain.Shared/EasyAbp/EShop/Products/Localization/Products/pt-BR.json
+++ b/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Domain.Shared/EasyAbp/EShop/Products/Localization/Products/pt-BR.json
@@ -61,6 +61,16 @@
"CreateCategory": "CreateCategory",
"EditCategory": "EditCategory",
"CategoryDeletionConfirmationMessage": "Are you sure to delete the category {0}?",
+ "Menu:Tag": "MenuTag",
+ "Tag": "Tag",
+ "TagTenantId": "TagTenantId",
+ "TagStoreId": "TagStoreId",
+ "TagDisplayName": "TagDisplayName",
+ "TagDescription": "TagDescription",
+ "TagMediaResources": "TagMediaResources",
+ "CreateTag": "CreateTag",
+ "EditTag": "EditTag",
+ "TagDeletionConfirmationMessage": "Are you sure to delete the category {0}?",
"Menu:ProductType": "MenuProductType",
"ProductType": "ProductType",
"ProductTypeUniqueName": "ProductTypeUniqueName",
diff --git a/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Domain.Shared/EasyAbp/EShop/Products/Localization/Products/sl.json b/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Domain.Shared/EasyAbp/EShop/Products/Localization/Products/sl.json
index 2b0f8b8d2..4a6a98bc9 100644
--- a/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Domain.Shared/EasyAbp/EShop/Products/Localization/Products/sl.json
+++ b/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Domain.Shared/EasyAbp/EShop/Products/Localization/Products/sl.json
@@ -62,6 +62,16 @@
"CreateCategory": "CreateCategory",
"EditCategory": "EditCategory",
"CategoryDeletionConfirmationMessage": "Are you sure to delete the category {0}?",
+ "Menu:Tag": "MenuTag",
+ "Tag": "Tag",
+ "TagTenantId": "TagTenantId",
+ "TagStoreId": "TagStoreId",
+ "TagDisplayName": "TagDisplayName",
+ "TagDescription": "TagDescription",
+ "TagMediaResources": "TagMediaResources",
+ "CreateTag": "CreateTag",
+ "EditTag": "EditTag",
+ "TagDeletionConfirmationMessage": "Are you sure to delete the category {0}?",
"Menu:ProductType": "MenuProductType",
"ProductType": "ProductType",
"ProductTypeUniqueName": "ProductTypeUniqueName",
diff --git a/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Domain.Shared/EasyAbp/EShop/Products/Localization/Products/tr.json b/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Domain.Shared/EasyAbp/EShop/Products/Localization/Products/tr.json
index f963d52ca..62f6f64df 100644
--- a/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Domain.Shared/EasyAbp/EShop/Products/Localization/Products/tr.json
+++ b/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Domain.Shared/EasyAbp/EShop/Products/Localization/Products/tr.json
@@ -62,6 +62,16 @@
"CreateCategory": "CreateCategory",
"EditCategory": "EditCategory",
"CategoryDeletionConfirmationMessage": "Are you sure to delete the category {0}?",
+ "Menu:Tag": "MenuTag",
+ "Tag": "Tag",
+ "TagTenantId": "TagTenantId",
+ "TagStoreId": "TagStoreId",
+ "TagDisplayName": "TagDisplayName",
+ "TagDescription": "TagDescription",
+ "TagMediaResources": "TagMediaResources",
+ "CreateTag": "CreateTag",
+ "EditTag": "EditTag",
+ "TagDeletionConfirmationMessage": "Are you sure to delete the category {0}?",
"Menu:ProductType": "MenuProductType",
"ProductType": "ProductType",
"ProductTypeUniqueName": "ProductTypeUniqueName",
diff --git a/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Domain.Shared/EasyAbp/EShop/Products/Localization/Products/vi.json b/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Domain.Shared/EasyAbp/EShop/Products/Localization/Products/vi.json
index 04e7d31cd..99d7e66f4 100644
--- a/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Domain.Shared/EasyAbp/EShop/Products/Localization/Products/vi.json
+++ b/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Domain.Shared/EasyAbp/EShop/Products/Localization/Products/vi.json
@@ -61,6 +61,16 @@
"CreateCategory": "CreateCategory",
"EditCategory": "EditCategory",
"CategoryDeletionConfirmationMessage": "Are you sure to delete the category {0}?",
+ "Menu:Tag": "MenuTag",
+ "Tag": "Tag",
+ "TagTenantId": "TagTenantId",
+ "TagStoreId": "TagStoreId",
+ "TagDisplayName": "TagDisplayName",
+ "TagDescription": "TagDescription",
+ "TagMediaResources": "TagMediaResources",
+ "CreateTag": "CreateTag",
+ "EditTag": "EditTag",
+ "TagDeletionConfirmationMessage": "Are you sure to delete the category {0}?",
"Menu:ProductType": "MenuProductType",
"ProductType": "ProductType",
"ProductTypeUniqueName": "ProductTypeUniqueName",
diff --git a/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Domain.Shared/EasyAbp/EShop/Products/Localization/Products/zh-Hans.json b/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Domain.Shared/EasyAbp/EShop/Products/Localization/Products/zh-Hans.json
index c20e6baa4..ec2409d21 100644
--- a/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Domain.Shared/EasyAbp/EShop/Products/Localization/Products/zh-Hans.json
+++ b/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Domain.Shared/EasyAbp/EShop/Products/Localization/Products/zh-Hans.json
@@ -62,6 +62,16 @@
"CreateCategory": "CreateCategory",
"EditCategory": "EditCategory",
"CategoryDeletionConfirmationMessage": "Are you sure to delete the category {0}?",
+ "Menu:Tag": "MenuTag",
+ "Tag": "Tag",
+ "TagTenantId": "TagTenantId",
+ "TagStoreId": "TagStoreId",
+ "TagDisplayName": "TagDisplayName",
+ "TagDescription": "TagDescription",
+ "TagMediaResources": "TagMediaResources",
+ "CreateTag": "CreateTag",
+ "EditTag": "EditTag",
+ "TagDeletionConfirmationMessage": "Are you sure to delete the category {0}?",
"Menu:ProductType": "MenuProductType",
"ProductType": "ProductType",
"ProductTypeUniqueName": "ProductTypeUniqueName",
diff --git a/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Domain.Shared/EasyAbp/EShop/Products/Localization/Products/zh-Hant.json b/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Domain.Shared/EasyAbp/EShop/Products/Localization/Products/zh-Hant.json
index f64480121..9a5510042 100644
--- a/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Domain.Shared/EasyAbp/EShop/Products/Localization/Products/zh-Hant.json
+++ b/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Domain.Shared/EasyAbp/EShop/Products/Localization/Products/zh-Hant.json
@@ -62,6 +62,16 @@
"CreateCategory": "CreateCategory",
"EditCategory": "EditCategory",
"CategoryDeletionConfirmationMessage": "Are you sure to delete the category {0}?",
+ "Menu:Tag": "MenuTag",
+ "Tag": "Tag",
+ "TagTenantId": "TagTenantId",
+ "TagStoreId": "TagStoreId",
+ "TagDisplayName": "TagDisplayName",
+ "TagDescription": "TagDescription",
+ "TagMediaResources": "TagMediaResources",
+ "CreateTag": "CreateTag",
+ "EditTag": "EditTag",
+ "TagDeletionConfirmationMessage": "Are you sure to delete the category {0}?",
"Menu:ProductType": "MenuProductType",
"ProductType": "ProductType",
"ProductTypeUniqueName": "ProductTypeUniqueName",
diff --git a/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Domain.Shared/EasyAbp/EShop/Products/Products/IProductSku.cs b/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Domain.Shared/EasyAbp/EShop/Products/Products/IProductSku.cs
index 7dc3231c2..0d1117cc9 100644
--- a/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Domain.Shared/EasyAbp/EShop/Products/Products/IProductSku.cs
+++ b/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Domain.Shared/EasyAbp/EShop/Products/Products/IProductSku.cs
@@ -20,6 +20,6 @@ public interface IProductSku
string MediaResources { get; }
- public Guid? ProductDetailId { get; }
+ Guid? ProductDetailId { get; }
}
}
\ No newline at end of file
diff --git a/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Domain/EasyAbp.EShop.Products.Domain.csproj b/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Domain/EasyAbp.EShop.Products.Domain.csproj
index e9f0038b3..f7cb7745e 100644
--- a/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Domain/EasyAbp.EShop.Products.Domain.csproj
+++ b/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Domain/EasyAbp.EShop.Products.Domain.csproj
@@ -9,8 +9,8 @@
-
-
+
+
diff --git a/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Domain/EasyAbp/EShop/Products/ProductStores/IProductStoreRepository.cs b/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Domain/EasyAbp/EShop/Products/ProductStores/IProductStoreRepository.cs
index 302f69a68..ee295c5cc 100644
--- a/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Domain/EasyAbp/EShop/Products/ProductStores/IProductStoreRepository.cs
+++ b/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
{
- Task GetAsync(Guid productId, Guid storeId, CancellationToken cancellationToken = default);
+ Task GetAsync(Guid productId, Guid storeId, bool includeDetails = true, CancellationToken cancellationToken = default);
}
}
\ No newline at end of file
diff --git a/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Domain/EasyAbp/EShop/Products/ProductTags/IProductTagRepository.cs b/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Domain/EasyAbp/EShop/Products/ProductTags/IProductTagRepository.cs
new file mode 100644
index 000000000..fc9490142
--- /dev/null
+++ b/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Domain/EasyAbp/EShop/Products/ProductTags/IProductTagRepository.cs
@@ -0,0 +1,15 @@
+using System;
+using System.Collections.Generic;
+using System.Threading;
+using System.Threading.Tasks;
+using Volo.Abp.Domain.Repositories;
+
+namespace EasyAbp.EShop.Products.ProductTags
+{
+ public interface IProductTagRepository : IRepository
+ {
+ Task> GetListByTagIdAsync(Guid tagId, CancellationToken cancellationToken = default);
+
+ Task> GetListByProductIdAsync(Guid productId, CancellationToken cancellationToken = default);
+ }
+}
diff --git a/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Domain/EasyAbp/EShop/Products/ProductTags/ProductTags.cs b/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Domain/EasyAbp/EShop/Products/ProductTags/ProductTags.cs
new file mode 100644
index 000000000..f59c52030
--- /dev/null
+++ b/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Domain/EasyAbp/EShop/Products/ProductTags/ProductTags.cs
@@ -0,0 +1,35 @@
+using System;
+using Volo.Abp.Domain.Entities.Auditing;
+using Volo.Abp.MultiTenancy;
+
+namespace EasyAbp.EShop.Products.ProductTags
+{
+ public class ProductTag : AuditedAggregateRoot, IMultiTenant
+ {
+ public virtual Guid? TenantId { get; protected set; }
+
+ public virtual Guid TagId { get; protected set; }
+
+ public virtual Guid ProductId { get; protected set; }
+
+ public virtual int DisplayOrder { get; protected set; }
+
+ protected ProductTag()
+ {
+ }
+
+ public ProductTag(
+ Guid id,
+ Guid? tenantId,
+ Guid tagId,
+ Guid productId,
+ int displayOrder = 0
+ ) : base(id)
+ {
+ TenantId = tenantId;
+ TagId = tagId;
+ ProductId = productId;
+ DisplayOrder = displayOrder;
+ }
+ }
+}
diff --git a/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Domain/EasyAbp/EShop/Products/Products/IProductManager.cs b/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Domain/EasyAbp/EShop/Products/Products/IProductManager.cs
index 02a2ef870..556d66e8e 100644
--- a/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Domain/EasyAbp/EShop/Products/Products/IProductManager.cs
+++ b/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Domain/EasyAbp/EShop/Products/Products/IProductManager.cs
@@ -7,9 +7,9 @@ namespace EasyAbp.EShop.Products.Products
{
public interface IProductManager : IDomainService
{
- Task CreateAsync(Product product, Guid? storeId = null, IEnumerable categoryIds = null);
+ Task CreateAsync(Product product, Guid? storeId = null, IEnumerable categoryIds = null, IEnumerable tagIds = null);
- Task UpdateAsync(Product product, IEnumerable categoryIds = null);
+ Task UpdateAsync(Product product, IEnumerable categoryIds = null, IEnumerable tagIds = null);
Task DeleteAsync(Product product);
diff --git a/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Domain/EasyAbp/EShop/Products/Products/IProductRepository.cs b/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Domain/EasyAbp/EShop/Products/Products/IProductRepository.cs
index 1e1ab030a..03d8eef75 100644
--- a/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Domain/EasyAbp/EShop/Products/Products/IProductRepository.cs
+++ b/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
{
- IQueryable GetQueryable(Guid storeId, Guid categoryId);
-
- IQueryable GetQueryable(Guid storeId);
-
- IQueryable WithDetails(Guid storeId, Guid categoryId);
-
- IQueryable WithDetails(Guid storeId);
-
+ IQueryable GetQueryable(Guid storeId, Guid? categoryId = null, Guid? tagId = null);
+
+ IQueryable WithDetails(Guid storeId, Guid? categoryId = null, Guid? tagId = null);
}
}
\ No newline at end of file
diff --git a/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Domain/EasyAbp/EShop/Products/Products/Product.cs b/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Domain/EasyAbp/EShop/Products/Products/Product.cs
index bbd034af2..782b06042 100644
--- a/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Domain/EasyAbp/EShop/Products/Products/Product.cs
+++ b/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
diff --git a/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Domain/EasyAbp/EShop/Products/Products/ProductManager.cs b/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Domain/EasyAbp/EShop/Products/Products/ProductManager.cs
index a15d09c91..606897cee 100644
--- a/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Domain/EasyAbp/EShop/Products/Products/ProductManager.cs
+++ b/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Domain/EasyAbp/EShop/Products/Products/ProductManager.cs
@@ -5,6 +5,9 @@
using EasyAbp.EShop.Products.ProductCategories;
using EasyAbp.EShop.Products.ProductStores;
using Microsoft.Extensions.DependencyInjection;
+using EasyAbp.EShop.Products.ProductTags;
+using JetBrains.Annotations;
+using Volo.Abp.Domain.Entities;
using Volo.Abp.Domain.Services;
namespace EasyAbp.EShop.Products.Products
@@ -16,22 +19,26 @@ public class ProductManager : DomainService, IProductManager
private readonly IProductRepository _productRepository;
private readonly IProductStoreRepository _productStoreRepository;
private readonly IProductCategoryRepository _productCategoryRepository;
+ private readonly IProductTagRepository _productTagRepository;
private readonly IAttributeOptionIdsSerializer _attributeOptionIdsSerializer;
public ProductManager(
IProductRepository productRepository,
IProductStoreRepository productStoreRepository,
IProductCategoryRepository productCategoryRepository,
+ IProductTagRepository productTagRepository,
IAttributeOptionIdsSerializer attributeOptionIdsSerializer)
{
_productRepository = productRepository;
_productStoreRepository = productStoreRepository;
_productCategoryRepository = productCategoryRepository;
+ _productTagRepository = productTagRepository;
_attributeOptionIdsSerializer = attributeOptionIdsSerializer;
}
public virtual async Task CreateAsync(Product product, Guid? storeId = null,
- IEnumerable categoryIds = null)
+ IEnumerable categoryIds = null,
+ IEnumerable tagIds = null)
{
product.TrimCode();
@@ -43,6 +50,8 @@ public virtual async Task CreateAsync(Product product, Guid? storeId =
await UpdateProductCategoriesAsync(product.Id, categoryIds);
+ await UpdateProductTagsAsync(product.Id, tagIds);
+
if (storeId.HasValue)
{
await AddProductToStoreAsync(product.Id, storeId.Value);
@@ -51,7 +60,9 @@ public virtual async Task CreateAsync(Product product, Guid? storeId =
return product;
}
- public virtual async Task UpdateAsync(Product product, IEnumerable categoryIds = null)
+ public virtual async Task UpdateAsync(Product product,
+ IEnumerable categoryIds = null,
+ IEnumerable tagIds = null)
{
await CheckProductCodeUniqueAsync(product);
@@ -61,6 +72,8 @@ public virtual async Task UpdateAsync(Product product, IEnumerable categoryIds)
{
- await _productCategoryRepository.DeleteAsync(x => x.ProductId.Equals(productId));
+ categoryIds ??= new List();
- if (categoryIds == null)
+ var productCategories = await _productCategoryRepository.GetListByProductIdAsync(productId);
+
+ foreach (var productCategory in productCategories.Where(x => !categoryIds.Contains(x.CategoryId)).ToList())
{
- return;
+ await _productCategoryRepository.DeleteAsync(productCategory, true);
}
-
- foreach (var categoryId in categoryIds)
+
+ foreach (var categoryId in categoryIds.Except(productCategories.Select(x => x.CategoryId).ToList()))
{
await _productCategoryRepository.InsertAsync(
new ProductCategory(GuidGenerator.Create(), CurrentTenant.Id, categoryId, productId), true);
}
}
+ protected virtual async Task UpdateProductTagsAsync(Guid productId, IEnumerable tagIds)
+ {
+ tagIds ??= new List();
+
+ var productTags = await _productTagRepository.GetListByProductIdAsync(productId);
+
+ foreach (var productTag in productTags.Where(x => !tagIds.Contains(x.TagId)).ToList())
+ {
+ await _productTagRepository.DeleteAsync(productTag, true);
+ }
+
+ foreach (var tagId in tagIds.Except(productTags.Select(x => x.TagId).ToList()))
+ {
+ await _productTagRepository.InsertAsync(
+ new ProductTag(GuidGenerator.Create(), CurrentTenant.Id, tagId, productId), true);
+ }
+ }
+
public virtual async Task IsInventorySufficientAsync(Product product, ProductSku productSku, Guid storeId, int quantity)
{
var inventoryData = await GetInventoryProviderOrDefault(product, productSku)
diff --git a/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Domain/EasyAbp/EShop/Products/Tags/ITagRepository.cs b/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Domain/EasyAbp/EShop/Products/Tags/ITagRepository.cs
new file mode 100644
index 000000000..8e19762a0
--- /dev/null
+++ b/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Domain/EasyAbp/EShop/Products/Tags/ITagRepository.cs
@@ -0,0 +1,13 @@
+using System;
+using System.Collections.Generic;
+using System.Threading;
+using System.Threading.Tasks;
+using Volo.Abp.Domain.Repositories;
+
+namespace EasyAbp.EShop.Products.Tags
+{
+ public interface ITagRepository : IRepository
+ {
+ Task> GetListByAsync(Guid storeId, bool includeDetails = false, CancellationToken cancellationToken = default);
+ }
+}
diff --git a/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Domain/EasyAbp/EShop/Products/Tags/Tag.cs b/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Domain/EasyAbp/EShop/Products/Tags/Tag.cs
new file mode 100644
index 000000000..324a5e891
--- /dev/null
+++ b/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Domain/EasyAbp/EShop/Products/Tags/Tag.cs
@@ -0,0 +1,67 @@
+using EasyAbp.Abp.Trees;
+using EasyAbp.EShop.Stores.Stores;
+using JetBrains.Annotations;
+using System;
+using System.Collections.Generic;
+using Volo.Abp.Domain.Entities.Auditing;
+using Volo.Abp.MultiTenancy;
+
+namespace EasyAbp.EShop.Products.Tags
+{
+ public class Tag : FullAuditedAggregateRoot, ITree, IMultiTenant, IMultiStore
+ {
+ public virtual Guid? TenantId { get; protected set; }
+
+ public virtual Guid StoreId { get; protected set; }
+
+ [CanBeNull]
+ public virtual string Description { get; protected set; }
+
+ [CanBeNull]
+ public virtual string MediaResources { get; protected set; }
+
+ public virtual bool IsHidden { get; protected set; }
+
+ #region Properties of ITree
+
+ [NotNull]
+ public virtual string DisplayName { get; set; }
+
+ [NotNull]
+ public virtual string Code { get; set; }
+
+ public virtual int Level { get; set; }
+
+ public virtual Guid? ParentId { get; set; }
+
+ public virtual Tag Parent { get; set; }
+
+ public virtual ICollection Children { get; set; }
+
+ #endregion
+
+ protected Tag()
+ {
+ }
+
+ public Tag(
+ Guid id,
+ Guid? tenantId,
+ Guid storeId,
+ Guid? parentId,
+ string displayName,
+ string description,
+ string mediaResources,
+ bool isHidden
+ ) : base(id)
+ {
+ TenantId = tenantId;
+ StoreId = storeId;
+ ParentId = parentId;
+ DisplayName = displayName;
+ Description = description;
+ MediaResources = mediaResources;
+ IsHidden = isHidden;
+ }
+ }
+}
diff --git a/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.EntityFrameworkCore/EasyAbp.EShop.Products.EntityFrameworkCore.csproj b/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.EntityFrameworkCore/EasyAbp.EShop.Products.EntityFrameworkCore.csproj
index ca50295f7..54fe8eab8 100644
--- a/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.EntityFrameworkCore/EasyAbp.EShop.Products.EntityFrameworkCore.csproj
+++ b/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.EntityFrameworkCore/EasyAbp.EShop.Products.EntityFrameworkCore.csproj
@@ -9,7 +9,7 @@
-
+
diff --git a/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.EntityFrameworkCore/EasyAbp/EShop/Products/EntityFrameworkCore/EShopProductsEntityFrameworkCoreModule.cs b/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.EntityFrameworkCore/EasyAbp/EShop/Products/EntityFrameworkCore/EShopProductsEntityFrameworkCoreModule.cs
index 048c82d8d..da8d1fe9c 100644
--- a/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.EntityFrameworkCore/EasyAbp/EShop/Products/EntityFrameworkCore/EShopProductsEntityFrameworkCoreModule.cs
+++ b/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.EntityFrameworkCore/EasyAbp/EShop/Products/EntityFrameworkCore/EShopProductsEntityFrameworkCoreModule.cs
@@ -8,6 +8,8 @@
using EasyAbp.EShop.Products.Categories;
using EasyAbp.EShop.Products.ProductDetails;
using EasyAbp.EShop.Products.Products;
+using EasyAbp.EShop.Products.ProductTags;
+using EasyAbp.EShop.Products.Tags;
using Microsoft.Extensions.DependencyInjection;
using Volo.Abp.EntityFrameworkCore;
using Volo.Abp.Modularity;
@@ -29,7 +31,9 @@ public override void ConfigureServices(ServiceConfigurationContext context)
* options.AddRepository();
*/
options.AddRepository();
+ options.AddRepository();
options.AddRepository();
+ options.AddRepository();
options.AddRepository();
options.AddRepository();
options.AddRepository();
diff --git a/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.EntityFrameworkCore/EasyAbp/EShop/Products/EntityFrameworkCore/IProductsDbContext.cs b/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.EntityFrameworkCore/EasyAbp/EShop/Products/EntityFrameworkCore/IProductsDbContext.cs
index 98ca60544..18573d2c6 100644
--- a/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.EntityFrameworkCore/EasyAbp/EShop/Products/EntityFrameworkCore/IProductsDbContext.cs
+++ b/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.EntityFrameworkCore/EasyAbp/EShop/Products/EntityFrameworkCore/IProductsDbContext.cs
@@ -10,6 +10,8 @@
using EasyAbp.EShop.Products.ProductHistories;
using EasyAbp.EShop.Products.ProductDetailHistories;
using EasyAbp.EShop.Products.ProductInventories;
+using EasyAbp.EShop.Products.ProductTags;
+using EasyAbp.EShop.Products.Tags;
namespace EasyAbp.EShop.Products.EntityFrameworkCore
{
@@ -25,7 +27,9 @@ public interface IProductsDbContext : IEfCoreDbContext
DbSet ProductAttributeOptions { get; set; }
DbSet ProductSkus { get; set; }
DbSet Categories { get; set; }
+ DbSet Tags { get; set; }
DbSet ProductTypes { get; set; }
+ DbSet ProductTags { get; set; }
DbSet ProductCategories { get; set; }
DbSet ProductStores { get; set; }
DbSet ProductHistories { get; set; }
diff --git a/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.EntityFrameworkCore/EasyAbp/EShop/Products/EntityFrameworkCore/ProductsDbContext.cs b/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.EntityFrameworkCore/EasyAbp/EShop/Products/EntityFrameworkCore/ProductsDbContext.cs
index 7dabeb2fc..cb783a9e7 100644
--- a/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.EntityFrameworkCore/EasyAbp/EShop/Products/EntityFrameworkCore/ProductsDbContext.cs
+++ b/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.EntityFrameworkCore/EasyAbp/EShop/Products/EntityFrameworkCore/ProductsDbContext.cs
@@ -10,6 +10,8 @@
using EasyAbp.EShop.Products.ProductHistories;
using EasyAbp.EShop.Products.ProductDetailHistories;
using EasyAbp.EShop.Products.ProductInventories;
+using EasyAbp.EShop.Products.ProductTags;
+using EasyAbp.EShop.Products.Tags;
namespace EasyAbp.EShop.Products.EntityFrameworkCore
{
@@ -25,7 +27,9 @@ public class ProductsDbContext : AbpDbContext, IProductsDbCon
public DbSet ProductAttributeOptions { get; set; }
public DbSet ProductSkus { get; set; }
public DbSet Categories { get; set; }
+ public DbSet Tags { get; set; }
public DbSet ProductTypes { get; set; }
+ public DbSet ProductTags { get; set; }
public DbSet ProductCategories { get; set; }
public DbSet ProductStores { get; set; }
public DbSet ProductHistories { get; set; }
diff --git a/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.EntityFrameworkCore/EasyAbp/EShop/Products/EntityFrameworkCore/ProductsDbContextModelCreatingExtensions.cs b/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.EntityFrameworkCore/EasyAbp/EShop/Products/EntityFrameworkCore/ProductsDbContextModelCreatingExtensions.cs
index b04497c28..76e5858af 100644
--- a/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.EntityFrameworkCore/EasyAbp/EShop/Products/EntityFrameworkCore/ProductsDbContextModelCreatingExtensions.cs
+++ b/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.EntityFrameworkCore/EasyAbp/EShop/Products/EntityFrameworkCore/ProductsDbContextModelCreatingExtensions.cs
@@ -8,6 +8,8 @@
using EasyAbp.EShop.Products.Products;
using System;
using EasyAbp.EShop.Products.ProductDetails;
+using EasyAbp.EShop.Products.ProductTags;
+using EasyAbp.EShop.Products.Tags;
using Microsoft.EntityFrameworkCore;
using Volo.Abp;
using Volo.Abp.EntityFrameworkCore.Modeling;
@@ -97,6 +99,15 @@ public static void ConfigureEShopProducts(
b.HasIndex(x => x.UniqueName).IsUnique();
});
+ builder.Entity(b =>
+ {
+ b.ToTable(options.TablePrefix + "Tags", options.Schema);
+ b.ConfigureByConvention();
+ /* Configure more properties here */
+
+ b.HasIndex(x => x.StoreId);
+ });
+
builder.Entity(b =>
{
b.ToTable(options.TablePrefix + "ProductTypes", options.Schema);
@@ -104,6 +115,16 @@ public static void ConfigureEShopProducts(
/* Configure more properties here */
});
+ builder.Entity(b =>
+ {
+ b.ToTable(options.TablePrefix + "ProductTags", options.Schema);
+ b.ConfigureByConvention();
+ /* Configure more properties here */
+
+ b.HasIndex(x => x.TagId);
+ b.HasIndex(x => x.ProductId);
+ });
+
builder.Entity(b =>
{
b.ToTable(options.TablePrefix + "ProductCategories", options.Schema);
diff --git a/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.EntityFrameworkCore/EasyAbp/EShop/Products/ProductStores/ProductStoreRepository.cs b/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.EntityFrameworkCore/EasyAbp/EShop/Products/ProductStores/ProductStoreRepository.cs
index 80bcce77d..cb5d94a30 100644
--- a/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.EntityFrameworkCore/EasyAbp/EShop/Products/ProductStores/ProductStoreRepository.cs
+++ b/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 @@ public ProductStoreRepository(IDbContextProvider dbContextPro
{
}
- public virtual async Task GetAsync(Guid productId, Guid storeId, CancellationToken cancellationToken = default)
+ public virtual async Task 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;
diff --git a/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.EntityFrameworkCore/EasyAbp/EShop/Products/ProductTags/ProductTagRepository.cs b/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.EntityFrameworkCore/EasyAbp/EShop/Products/ProductTags/ProductTagRepository.cs
new file mode 100644
index 000000000..4dd3e6d14
--- /dev/null
+++ b/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.EntityFrameworkCore/EasyAbp/EShop/Products/ProductTags/ProductTagRepository.cs
@@ -0,0 +1,31 @@
+using EasyAbp.EShop.Products.EntityFrameworkCore;
+using Microsoft.EntityFrameworkCore;
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Threading;
+using System.Threading.Tasks;
+using Volo.Abp.Domain.Repositories.EntityFrameworkCore;
+using Volo.Abp.EntityFrameworkCore;
+
+namespace EasyAbp.EShop.Products.ProductTags
+{
+ public class ProductTagRepository : EfCoreRepository, IProductTagRepository
+ {
+ public ProductTagRepository(IDbContextProvider dbContextProvider) : base(dbContextProvider)
+ {
+ }
+
+ public virtual async Task> GetListByTagIdAsync(Guid categoryId,
+ CancellationToken cancellationToken = default)
+ {
+ return await GetQueryable().Where(pc => pc.TagId == categoryId).ToListAsync(cancellationToken);
+ }
+
+ public virtual async Task> GetListByProductIdAsync(Guid productId,
+ CancellationToken cancellationToken = default)
+ {
+ return await GetQueryable().Where(pc => pc.ProductId == productId).ToListAsync(cancellationToken);
+ }
+ }
+}
diff --git a/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.EntityFrameworkCore/EasyAbp/EShop/Products/Products/ProductRepository.cs b/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.EntityFrameworkCore/EasyAbp/EShop/Products/Products/ProductRepository.cs
index 470df4224..5f04e81eb 100644
--- a/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.EntityFrameworkCore/EasyAbp/EShop/Products/Products/ProductRepository.cs
+++ b/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.EntityFrameworkCore/EasyAbp/EShop/Products/Products/ProductRepository.cs
@@ -20,22 +20,46 @@ public override IQueryable WithDetails()
.Include(x => x.ProductSkus);
}
- public IQueryable GetQueryable(Guid storeId, Guid categoryId)
+ public IQueryable GetQueryable(Guid storeId, Guid? categoryId = null, Guid? tagId = null)
{
- return JoinProductCategories(GetQueryable(storeId), categoryId);
+ var queryable = GetStoreQueryable(storeId);
+
+ if (categoryId.HasValue)
+ {
+ queryable = JoinProductCategories(queryable, categoryId.Value);
+ }
+
+ if (tagId.HasValue)
+ {
+ queryable = JoinProductTags(queryable, tagId.Value);
+ }
+
+ return queryable;
}
-
- public IQueryable GetQueryable(Guid storeId)
+
+ public IQueryable WithDetails(Guid storeId, Guid? categoryId = null, Guid? tagId = null)
{
- return JoinProductStores(GetQueryable(), storeId);
+ var queryable = WithStoreDetails(storeId);
+
+ if (categoryId.HasValue)
+ {
+ queryable = JoinProductCategories(queryable, categoryId.Value);
+ }
+
+ if (tagId.HasValue)
+ {
+ queryable = JoinProductTags(queryable, tagId.Value);
+ }
+
+ return queryable;
}
-
- public IQueryable WithDetails(Guid storeId, Guid categoryId)
+
+ protected virtual IQueryable GetStoreQueryable(Guid storeId)
{
- return JoinProductCategories(WithDetails(storeId), categoryId);
+ return JoinProductStores(GetQueryable(), storeId);
}
-
- public IQueryable WithDetails(Guid storeId)
+
+ protected virtual IQueryable WithStoreDetails(Guid storeId)
{
return JoinProductStores(WithDetails(), storeId);
}
@@ -49,7 +73,7 @@ protected virtual IQueryable JoinProductStores(IQueryable quer
(product, productStore) => product
);
}
-
+
protected virtual IQueryable JoinProductCategories(IQueryable queryable, Guid categoryId)
{
return queryable.Join(
@@ -59,5 +83,15 @@ protected virtual IQueryable JoinProductCategories(IQueryable
(product, productCategory) => product
);
}
+
+ protected virtual IQueryable JoinProductTags(IQueryable queryable, Guid tagId)
+ {
+ return queryable.Join(
+ DbContext.ProductTags.Where(productTag => productTag.TagId == tagId),
+ product => product.Id,
+ productTag => productTag.ProductId,
+ (product, productTag) => product
+ );
+ }
}
}
\ No newline at end of file
diff --git a/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.EntityFrameworkCore/EasyAbp/EShop/Products/Tags/TagRepository.cs b/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.EntityFrameworkCore/EasyAbp/EShop/Products/Tags/TagRepository.cs
new file mode 100644
index 000000000..1f4ccfbe8
--- /dev/null
+++ b/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.EntityFrameworkCore/EasyAbp/EShop/Products/Tags/TagRepository.cs
@@ -0,0 +1,32 @@
+using EasyAbp.Abp.Trees;
+using EasyAbp.EShop.Products.EntityFrameworkCore;
+using Microsoft.EntityFrameworkCore;
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Threading;
+using System.Threading.Tasks;
+using Volo.Abp.EntityFrameworkCore;
+
+namespace EasyAbp.EShop.Products.Tags
+{
+ public class TagRepository : EfCoreTreeRepository, ITagRepository
+ {
+ public TagRepository(IDbContextProvider dbContextProvider) : base(dbContextProvider)
+ {
+ }
+
+ public async Task> GetListByAsync(Guid storeId, bool includeDetails = false, CancellationToken cancellationToken = default)
+ {
+ return includeDetails
+ ? await WithDetails().Where(x => x.StoreId == storeId).ToListAsync(GetCancellationToken(cancellationToken))
+ : await GetQueryable().Where(x => x.StoreId == storeId).ToListAsync(GetCancellationToken(cancellationToken));
+ }
+
+ [Obsolete("Should use GetListByAsync(Guid storeId, bool includeDetails, CancellationToken cancellationToken)")]
+ public override Task> GetListAsync(bool includeDetails = false, CancellationToken cancellationToken = new CancellationToken())
+ {
+ return base.GetListAsync(includeDetails, cancellationToken);
+ }
+ }
+}
diff --git a/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.HttpApi.Client/EasyAbp.EShop.Products.HttpApi.Client.csproj b/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.HttpApi.Client/EasyAbp.EShop.Products.HttpApi.Client.csproj
index 9e938f967..bac6ae7a3 100644
--- a/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.HttpApi.Client/EasyAbp.EShop.Products.HttpApi.Client.csproj
+++ b/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.HttpApi.Client/EasyAbp.EShop.Products.HttpApi.Client.csproj
@@ -8,7 +8,7 @@
-
+
diff --git a/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.HttpApi/EasyAbp.EShop.Products.HttpApi.csproj b/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.HttpApi/EasyAbp.EShop.Products.HttpApi.csproj
index 5a26fbe7b..743845174 100644
--- a/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.HttpApi/EasyAbp.EShop.Products.HttpApi.csproj
+++ b/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.HttpApi/EasyAbp.EShop.Products.HttpApi.csproj
@@ -8,7 +8,7 @@
-
+
diff --git a/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.HttpApi/EasyAbp/EShop/Products/ProductTags/ProductTagController.cs b/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.HttpApi/EasyAbp/EShop/Products/ProductTags/ProductTagController.cs
new file mode 100644
index 000000000..91ecbf7cd
--- /dev/null
+++ b/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.HttpApi/EasyAbp/EShop/Products/ProductTags/ProductTagController.cs
@@ -0,0 +1,35 @@
+using System;
+using System.Threading.Tasks;
+using EasyAbp.EShop.Products.ProductTags.Dtos;
+using Microsoft.AspNetCore.Mvc;
+using Volo.Abp;
+using Volo.Abp.Application.Dtos;
+
+namespace EasyAbp.EShop.Products.ProductTags
+{
+ [RemoteService(Name = "ProductTagService")]
+ [Route("/api/products/productTag")]
+ public class ProductTagController : ProductsController, IProductTagAppService
+ {
+ private readonly IProductTagAppService _service;
+
+ public ProductTagController(IProductTagAppService service)
+ {
+ _service = service;
+ }
+
+ [HttpGet]
+ [Route("{id}")]
+ [RemoteService(false)]
+ public Task GetAsync(Guid id)
+ {
+ return _service.GetAsync(id);
+ }
+
+ [HttpGet]
+ public Task> GetListAsync(GetProductTagListDto input)
+ {
+ return _service.GetListAsync(input);
+ }
+ }
+}
\ No newline at end of file
diff --git a/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.HttpApi/EasyAbp/EShop/Products/Products/ProductController.cs b/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.HttpApi/EasyAbp/EShop/Products/Products/ProductController.cs
index aa9bda8c4..b806d0af4 100644
--- a/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.HttpApi/EasyAbp/EShop/Products/Products/ProductController.cs
+++ b/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.HttpApi/EasyAbp/EShop/Products/Products/ProductController.cs
@@ -18,9 +18,9 @@ public ProductController(IProductAppService service)
_service = service;
}
- [HttpGet]
- [Route("{id}/abandoned")]
+ [Route("{id}")]
[RemoteService(false)]
+ [NonAction]
public Task GetAsync(Guid id)
{
return _service.GetAsync(id);
@@ -45,8 +45,7 @@ public Task UpdateAsync(Guid id, CreateUpdateProductDto input)
return _service.UpdateAsync(id, input);
}
- [HttpDelete]
- [Route("{id}/abandoned")]
+ [NonAction]
[RemoteService(false)]
public Task DeleteAsync(Guid id)
{
diff --git a/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.HttpApi/EasyAbp/EShop/Products/Tags/TagController.cs b/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.HttpApi/EasyAbp/EShop/Products/Tags/TagController.cs
new file mode 100644
index 000000000..e42774075
--- /dev/null
+++ b/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.HttpApi/EasyAbp/EShop/Products/Tags/TagController.cs
@@ -0,0 +1,54 @@
+using System;
+using System.Threading.Tasks;
+using EasyAbp.EShop.Products.Tags.Dtos;
+using Microsoft.AspNetCore.Mvc;
+using Volo.Abp;
+using Volo.Abp.Application.Dtos;
+
+namespace EasyAbp.EShop.Products.Tags
+{
+ [RemoteService(Name = "TagService")]
+ [Route("/api/products/tag")]
+ public class TagController : ProductsController, ITagAppService
+ {
+ private readonly ITagAppService _service;
+
+ public TagController(ITagAppService service)
+ {
+ _service = service;
+ }
+
+ [HttpGet]
+ [Route("{id}")]
+ public Task GetAsync(Guid id)
+ {
+ return _service.GetAsync(id);
+ }
+
+ [HttpGet]
+ public Task> GetListAsync(GetTagListDto input)
+ {
+ return _service.GetListAsync(input);
+ }
+
+ [HttpPost]
+ public Task CreateAsync(CreateTagDto input)
+ {
+ return _service.CreateAsync(input);
+ }
+
+ [HttpPut]
+ [Route("{id}")]
+ public Task UpdateAsync(Guid id, UpdateTagDto input)
+ {
+ return _service.UpdateAsync(id, input);
+ }
+
+ [HttpDelete]
+ [Route("{id}")]
+ public Task DeleteAsync(Guid id)
+ {
+ return _service.DeleteAsync(id);
+ }
+ }
+}
\ No newline at end of file
diff --git a/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.MongoDB/EasyAbp.EShop.Products.MongoDB.csproj b/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.MongoDB/EasyAbp.EShop.Products.MongoDB.csproj
index c370f986e..5abb1036e 100644
--- a/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.MongoDB/EasyAbp.EShop.Products.MongoDB.csproj
+++ b/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.MongoDB/EasyAbp.EShop.Products.MongoDB.csproj
@@ -8,7 +8,7 @@
-
+
diff --git a/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Web/EShopProductsWebModule.cs b/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Web/EShopProductsWebModule.cs
index 70817417c..5cf97972b 100644
--- a/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Web/EShopProductsWebModule.cs
+++ b/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Web/EShopProductsWebModule.cs
@@ -40,7 +40,7 @@ public override void ConfigureServices(ServiceConfigurationContext context)
Configure(options =>
{
- options.FileSets.AddEmbedded("EasyAbp.EShop.Products.Web");
+ options.FileSets.AddEmbedded();
});
context.Services.AddAutoMapperObjectMapper();
diff --git a/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Web/EasyAbp.EShop.Products.Web.csproj b/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Web/EasyAbp.EShop.Products.Web.csproj
index 9f2f7aa75..f4e3528c7 100644
--- a/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Web/EasyAbp.EShop.Products.Web.csproj
+++ b/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Web/EasyAbp.EShop.Products.Web.csproj
@@ -8,11 +8,12 @@
true
Library
EasyAbp.EShop.Products.Web
+ true
-
-
+
+
@@ -20,6 +21,10 @@
+
+
+
+
@@ -29,11 +34,6 @@
-
-
-
-
-
diff --git a/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Web/Menus/ProductsMenuContributor.cs b/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Web/Menus/ProductsMenuContributor.cs
index b642997d5..993dd2c62 100644
--- a/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Web/Menus/ProductsMenuContributor.cs
+++ b/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 @@ public virtual async Task ConfigureMenuAsync(MenuConfigurationContext context)
private async Task ConfigureMainMenu(MenuConfigurationContext context)
{
- var l = context.GetLocalizer(); //Add main menu items.
+ var l = context.GetLocalizer();
+
+ //Add main menu items.
var productManagementMenuItem = new ApplicationMenuItem(ProductsMenus.Prefix, l["Menu:ProductManagement"]);
@@ -39,14 +38,17 @@ private async Task ConfigureMainMenu(MenuConfigurationContext context)
);
}
- if (await context.IsGrantedAsync(ProductsPermissions.Products.Default))
+ if (await context.IsGrantedAsync(ProductsPermissions.Tags.Default))
{
- var storeAppService = context.ServiceProvider.GetRequiredService();
+ productManagementMenuItem.AddItem(
+ new ApplicationMenuItem(ProductsMenus.Tag, l["Menu:Tag"], "/EShop/Products/Tags/Tag")
+ );
+ }
- var defaultStore = (await storeAppService.GetDefaultAsync())?.Id;
-
+ if (await context.IsGrantedAsync(ProductsPermissions.Products.Default))
+ {
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")
);
}
diff --git a/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Web/Menus/ProductsMenus.cs b/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Web/Menus/ProductsMenus.cs
index ef6797426..963266c3e 100644
--- a/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Web/Menus/ProductsMenus.cs
+++ b/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Web/Menus/ProductsMenus.cs
@@ -9,7 +9,9 @@ public class ProductsMenus
public const string ProductType = Prefix + ".ProductType";
public const string Category = Prefix + ".Category";
-
+
+ public const string Tag = Prefix + ".Tag";
+
public const string Product = Prefix + ".Product";
//Add your menu items here...
diff --git a/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Web/Pages/EShop/Products/Products/Product/CreateModal.cshtml.cs b/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Web/Pages/EShop/Products/Products/Product/CreateModal.cshtml.cs
index 43771b3b7..81db04bbc 100644
--- a/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Web/Pages/EShop/Products/Products/Product/CreateModal.cshtml.cs
+++ b/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Web/Pages/EShop/Products/Products/Product/CreateModal.cshtml.cs
@@ -9,6 +9,8 @@
using EasyAbp.EShop.Products.Products;
using EasyAbp.EShop.Products.Products.Dtos;
using EasyAbp.EShop.Products.ProductTypes;
+using EasyAbp.EShop.Products.Tags;
+using EasyAbp.EShop.Products.Tags.Dtos;
using EasyAbp.EShop.Products.Web.Pages.EShop.Products.Products.Product.ViewModels;
using Microsoft.AspNetCore.Mvc;
using Microsoft.AspNetCore.Mvc.Rendering;
@@ -20,16 +22,19 @@ public class CreateModalModel : ProductsPageModel
{
[BindProperty(SupportsGet = true)]
public Guid StoreId { get; set; }
-
+
[BindProperty]
public CreateEditProductViewModel Product { get; set; }
-
+
public ICollection ProductTypes { get; set; }
-
+
public ICollection Categories { get; set; }
+ public ICollection Tags { get; set; }
+
private readonly IProductTypeAppService _productTypeAppService;
private readonly ICategoryAppService _categoryAppService;
+ private readonly ITagAppService _tagAppService;
private readonly IProductDetailAppService _productDetailAppService;
private readonly IProductAppService _service;
@@ -37,26 +42,36 @@ public CreateModalModel(
IProductTypeAppService productTypeAppService,
ICategoryAppService categoryAppService,
IProductDetailAppService productDetailAppService,
+ ITagAppService tagAppService,
IProductAppService service)
{
_productTypeAppService = productTypeAppService;
_categoryAppService = categoryAppService;
_productDetailAppService = productDetailAppService;
+ _tagAppService = tagAppService;
_service = service;
}
- public virtual async Task OnGetAsync(Guid? categoryId)
+ public virtual async Task OnGetAsync(Guid? categoryId, Guid? tagId)
{
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();
-
+
+ Tags =
+ (await _tagAppService.GetListAsync(new GetTagListDto
+ {
+ MaxResultCount = LimitedResultRequestDto.MaxMaxResultCount,
+ StoreId = StoreId
+ }))?.Items
+ .Select(dto => new SelectListItem(dto.DisplayName, dto.Id.ToString())).ToList();
+
Product = new CreateEditProductViewModel
{
StoreId = StoreId,
@@ -68,10 +83,15 @@ public virtual async Task OnGetAsync(Guid? categoryId)
if (categoryId.HasValue)
{
- Product.CategoryIds = new List(new[] {categoryId.Value});
+ Product.CategoryIds = new List(new[] { categoryId.Value });
+ }
+
+ if (tagId.HasValue)
+ {
+ Product.TagIds = new List(new[] { tagId.Value });
}
}
-
+
public virtual async Task OnPostAsync()
{
var detail = await _productDetailAppService.CreateAsync(
@@ -81,7 +101,7 @@ public virtual async Task OnPostAsync()
var createDto = ObjectMapper.Map(Product);
createDto.ProductDetailId = detail.Id;
-
+
var product = await _service.CreateAsync(createDto);
return NoContent();
diff --git a/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Web/Pages/EShop/Products/Products/Product/EditModal.cshtml.cs b/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Web/Pages/EShop/Products/Products/Product/EditModal.cshtml.cs
index 0663b796e..23fdaf836 100644
--- a/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Web/Pages/EShop/Products/Products/Product/EditModal.cshtml.cs
+++ b/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Web/Pages/EShop/Products/Products/Product/EditModal.cshtml.cs
@@ -11,7 +11,11 @@
using Microsoft.AspNetCore.Mvc;
using EasyAbp.EShop.Products.Products;
using EasyAbp.EShop.Products.Products.Dtos;
+using EasyAbp.EShop.Products.ProductTags;
+using EasyAbp.EShop.Products.ProductTags.Dtos;
using EasyAbp.EShop.Products.ProductTypes;
+using EasyAbp.EShop.Products.Tags;
+using EasyAbp.EShop.Products.Tags.Dtos;
using EasyAbp.EShop.Products.Web.Pages.EShop.Products.Products.Product.ViewModels;
using Microsoft.AspNetCore.Mvc.Rendering;
using Volo.Abp.Application.Dtos;
@@ -31,23 +35,31 @@ public class EditModalModel : ProductsPageModel
public ICollection Categories { get; set; }
+ public ICollection Tags { get; set; }
+
private readonly IProductTypeAppService _productTypeAppService;
private readonly ICategoryAppService _categoryAppService;
+ private readonly ITagAppService _tagAppService;
private readonly IProductDetailAppService _productDetailAppService;
private readonly IProductCategoryAppService _productCategoryAppService;
+ private readonly IProductTagAppService _productTagAppService;
private readonly IProductAppService _service;
public EditModalModel(
IProductTypeAppService productTypeAppService,
ICategoryAppService categoryAppService,
+ ITagAppService tagAppService,
IProductDetailAppService productDetailAppService,
IProductCategoryAppService productCategoryAppService,
+ IProductTagAppService productTagAppService,
IProductAppService service)
{
_productTypeAppService = productTypeAppService;
_categoryAppService = categoryAppService;
+ _tagAppService = tagAppService;
_productDetailAppService = productDetailAppService;
_productCategoryAppService = productCategoryAppService;
+ _productTagAppService = productTagAppService;
_service = service;
}
@@ -63,6 +75,14 @@ public virtual async Task OnGetAsync(Guid storeId)
{MaxResultCount = LimitedResultRequestDto.MaxMaxResultCount}))?.Items
.Select(dto => new SelectListItem(dto.DisplayName, dto.Id.ToString())).ToList();
+ Tags =
+ (await _tagAppService.GetListAsync(new GetTagListDto
+ {
+ MaxResultCount = LimitedResultRequestDto.MaxMaxResultCount,
+ StoreId = storeId
+ }))?.Items
+ .Select(dto => new SelectListItem(dto.DisplayName, dto.Id.ToString())).ToList();
+
var productDto = await _service.GetAsync(Id, storeId);
var detailDto = await _productDetailAppService.GetAsync(productDto.ProductDetailId);
@@ -74,7 +94,13 @@ public virtual async Task OnGetAsync(Guid storeId)
ProductId = productDto.Id,
MaxResultCount = LimitedResultRequestDto.MaxMaxResultCount
})).Items.Select(x => x.CategoryId).ToList();
-
+
+ Product.TagIds = (await _productTagAppService.GetListAsync(new GetProductTagListDto
+ {
+ ProductId = productDto.Id,
+ MaxResultCount = LimitedResultRequestDto.MaxMaxResultCount
+ })).Items.Select(x => x.TagId).ToList();
+
Product.ProductDetail = new CreateEditProductDetailViewModel
{
StoreId = storeId,
diff --git a/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Web/Pages/EShop/Products/Products/Product/Index.cshtml b/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Web/Pages/EShop/Products/Products/Product/Index.cshtml
index c5ef3d60d..548ba20d4 100644
--- a/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Web/Pages/EShop/Products/Products/Product/Index.cshtml
+++ b/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Web/Pages/EShop/Products/Products/Product/Index.cshtml
@@ -24,6 +24,7 @@
diff --git a/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Web/Pages/EShop/Products/Products/Product/Index.cshtml.cs b/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Web/Pages/EShop/Products/Products/Product/Index.cshtml.cs
index 8194c851d..fab116b1d 100644
--- a/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Web/Pages/EShop/Products/Products/Product/Index.cshtml.cs
+++ b/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Web/Pages/EShop/Products/Products/Product/Index.cshtml.cs
@@ -10,21 +10,38 @@ public class IndexModel : ProductsPageModel
private readonly IStoreAppService _storeAppService;
[BindProperty(SupportsGet = true)]
- public Guid StoreId { get; set; }
-
+ public Guid? StoreId { get; set; }
+
[BindProperty(SupportsGet = true)]
public Guid? CategoryId { get; set; }
-
+
+ [BindProperty(SupportsGet = true)]
+ public Guid? TagId { get; set; }
+
public string StoreName { get; set; }
-
+
public IndexModel(IStoreAppService storeAppService)
{
_storeAppService = storeAppService;
}
-
+
public virtual async Task OnGetAsync()
{
- StoreName = (await _storeAppService.GetAsync(StoreId)).Name;
+ //TODO: when StoreId is empty, should get store which belongs to current user
+ //if (!StoreId.HasValue)
+ //{
+ // var store = _storeAppService.GetByOwner(CurrentUser.Id);
+ // StoreId = store.Id;
+ //}
+
+ //show default store
+ if (!StoreId.HasValue)
+ {
+ var defaultStore = await _storeAppService.GetDefaultAsync();
+ StoreId = defaultStore.Id;
+ }
+
+ StoreName = (await _storeAppService.GetAsync(StoreId.Value)).Name;
}
}
}
diff --git a/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Web/Pages/EShop/Products/Products/Product/ViewModels/CreateEditProductViewModel.cs b/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Web/Pages/EShop/Products/Products/Product/ViewModels/CreateEditProductViewModel.cs
index 6ec35a650..e1ed5a60f 100644
--- a/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Web/Pages/EShop/Products/Products/Product/ViewModels/CreateEditProductViewModel.cs
+++ b/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Web/Pages/EShop/Products/Products/Product/ViewModels/CreateEditProductViewModel.cs
@@ -23,7 +23,11 @@ public class CreateEditProductViewModel
[SelectItems("Categories")]
[Display(Name = "ProductCategory")]
public List CategoryIds { get; set; }
-
+
+ [SelectItems("Tags")]
+ [Display(Name = "ProductTag")]
+ public List TagIds { get; set; }
+
[Display(Name = "ProductUniqueName")]
public string UniqueName { get; set; }
diff --git a/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Web/Pages/EShop/Products/Products/Product/index.js b/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Web/Pages/EShop/Products/Products/Product/index.js
index 99b0f2556..6f049fd29 100644
--- a/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Web/Pages/EShop/Products/Products/Product/index.js
+++ b/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Web/Pages/EShop/Products/Products/Product/index.js
@@ -15,7 +15,7 @@ $(function () {
scrollCollapse: true,
order: [[1, "asc"]],
ajax: abp.libs.datatables.createAjax(service.getList, function () {
- return { storeId: storeId, categoryId: categoryId, showHidden: true }
+ return { storeId: storeId, categoryId: categoryId, tagId: tagId, showHidden: true }
}),
columnDefs: [
{
@@ -69,6 +69,6 @@ $(function () {
$('#NewProductButton').click(function (e) {
e.preventDefault();
- createModal.open({ storeId: storeId, categoryId: categoryId });
+ createModal.open({ storeId: storeId, categoryId: categoryId, tagId: tagId });
});
});
\ No newline at end of file
diff --git a/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Web/Pages/EShop/Products/Tags/Tag/CreateModal.cshtml b/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Web/Pages/EShop/Products/Tags/Tag/CreateModal.cshtml
new file mode 100644
index 000000000..956422cbf
--- /dev/null
+++ b/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Web/Pages/EShop/Products/Tags/Tag/CreateModal.cshtml
@@ -0,0 +1,18 @@
+@page
+@using Microsoft.AspNetCore.Mvc.Localization
+@using Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.TagHelpers.Modal;
+@using EasyAbp.EShop.Products.Localization
+@inject IHtmlLocalizer L
+@model EasyAbp.EShop.Products.Web.Pages.EShop.Products.Tags.Tag.CreateModalModel
+@{
+ Layout = null;
+}
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Web/Pages/EShop/Products/Tags/Tag/CreateModal.cshtml.cs b/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Web/Pages/EShop/Products/Tags/Tag/CreateModal.cshtml.cs
new file mode 100644
index 000000000..726427b1d
--- /dev/null
+++ b/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Web/Pages/EShop/Products/Tags/Tag/CreateModal.cshtml.cs
@@ -0,0 +1,26 @@
+using EasyAbp.EShop.Products.Tags;
+using EasyAbp.EShop.Products.Tags.Dtos;
+using Microsoft.AspNetCore.Mvc;
+using System.Threading.Tasks;
+
+namespace EasyAbp.EShop.Products.Web.Pages.EShop.Products.Tags.Tag
+{
+ public class CreateModalModel : ProductsPageModel
+ {
+ [BindProperty]
+ public CreateTagDto ViewModel { get; set; }
+
+ private readonly ITagAppService _service;
+
+ public CreateModalModel(ITagAppService service)
+ {
+ _service = service;
+ }
+
+ public virtual async Task OnPostAsync()
+ {
+ await _service.CreateAsync(ViewModel);
+ return NoContent();
+ }
+ }
+}
\ No newline at end of file
diff --git a/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Web/Pages/EShop/Products/Tags/Tag/EditModal.cshtml b/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Web/Pages/EShop/Products/Tags/Tag/EditModal.cshtml
new file mode 100644
index 000000000..6217cdfc9
--- /dev/null
+++ b/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Web/Pages/EShop/Products/Tags/Tag/EditModal.cshtml
@@ -0,0 +1,19 @@
+@page
+@using EasyAbp.EShop.Products.Localization
+@using Microsoft.AspNetCore.Mvc.Localization
+@using Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.TagHelpers.Modal;
+@inject IHtmlLocalizer L
+@model EasyAbp.EShop.Products.Web.Pages.EShop.Products.Tags.Tag.EditModalModel
+@{
+ Layout = null;
+}
+
+
+
+
+
+
+
+
+
+
diff --git a/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Web/Pages/EShop/Products/Tags/Tag/EditModal.cshtml.cs b/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Web/Pages/EShop/Products/Tags/Tag/EditModal.cshtml.cs
new file mode 100644
index 000000000..e508de63d
--- /dev/null
+++ b/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Web/Pages/EShop/Products/Tags/Tag/EditModal.cshtml.cs
@@ -0,0 +1,37 @@
+using EasyAbp.EShop.Products.Tags;
+using EasyAbp.EShop.Products.Tags.Dtos;
+using Microsoft.AspNetCore.Mvc;
+using System;
+using System.Threading.Tasks;
+
+namespace EasyAbp.EShop.Products.Web.Pages.EShop.Products.Tags.Tag
+{
+ public class EditModalModel : ProductsPageModel
+ {
+ [HiddenInput]
+ [BindProperty(SupportsGet = true)]
+ public Guid Id { get; set; }
+
+ [BindProperty]
+ public UpdateTagDto ViewModel { get; set; }
+
+ private readonly ITagAppService _service;
+
+ public EditModalModel(ITagAppService service)
+ {
+ _service = service;
+ }
+
+ public virtual async Task OnGetAsync()
+ {
+ var dto = await _service.GetAsync(Id);
+ ViewModel = ObjectMapper.Map(dto);
+ }
+
+ public virtual async Task OnPostAsync()
+ {
+ await _service.UpdateAsync(Id, ViewModel);
+ return NoContent();
+ }
+ }
+}
\ No newline at end of file
diff --git a/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Web/Pages/EShop/Products/Tags/Tag/Index.cshtml b/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Web/Pages/EShop/Products/Tags/Tag/Index.cshtml
new file mode 100644
index 000000000..137043c80
--- /dev/null
+++ b/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Web/Pages/EShop/Products/Tags/Tag/Index.cshtml
@@ -0,0 +1,62 @@
+@page
+@using EasyAbp.EShop.Products.Web.Pages.EShop.Products.Tags.Tag
+@using Microsoft.AspNetCore.Mvc.Localization
+@using Volo.Abp.AspNetCore.Mvc.UI.Layout
+@using EasyAbp.EShop.Products.Localization
+@using EasyAbp.EShop.Products.Web.Menus
+@model IndexModel
+@inject IPageLayout PageLayout
+@inject IHtmlLocalizer L
+@{
+ PageLayout.Content.Title = L["Tag"].Value;
+ PageLayout.Content.BreadCrumb.Add(L["Menu:Tag"].Value);
+ PageLayout.Content.MenuItemName = ProductsMenus.Tag;
+}
+
+@section scripts
+{
+
+}
+@section styles
+{
+
+}
+
+
+
+
+
+
+ @L["Tag"] - @Model.StoreName
+
+
+
+
+
+
+
+
+
+
+ @L["Actions"] |
+ Id |
+ @*@L["TagStoreId"] | *@
+ @L["TagDescription"] |
+ @L["TagMediaResources"] |
+ @*@L["TagIsHidden"] | *@
+ @L["TagDisplayName"] |
+ @*@L["TagCode"] | *@
+ @*@L["TagLevel"] | *@
+ @L["TagParentId"] |
+ @*@L["TagParent"] |
+ @L["TagChildren"] | *@
+
+
+
+
+
\ No newline at end of file
diff --git a/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Web/Pages/EShop/Products/Tags/Tag/Index.cshtml.cs b/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Web/Pages/EShop/Products/Tags/Tag/Index.cshtml.cs
new file mode 100644
index 000000000..df88044d9
--- /dev/null
+++ b/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Web/Pages/EShop/Products/Tags/Tag/Index.cshtml.cs
@@ -0,0 +1,41 @@
+using System;
+using System.Threading.Tasks;
+using EasyAbp.EShop.Stores.Stores;
+using Microsoft.AspNetCore.Mvc;
+
+namespace EasyAbp.EShop.Products.Web.Pages.EShop.Products.Tags.Tag
+{
+ public class IndexModel : ProductsPageModel
+ {
+ private readonly IStoreAppService _storeAppService;
+
+ [BindProperty(SupportsGet = true)]
+ public Guid? StoreId { get; set; }
+
+ public string StoreName { get; set; }
+
+ public IndexModel(IStoreAppService storeAppService)
+ {
+ _storeAppService = storeAppService;
+ }
+
+ public virtual async Task OnGetAsync()
+ {
+ //TODO: when StoreId is empty, should get store which belongs to current user
+ //if (!StoreId.HasValue)
+ //{
+ // var store = _storeAppService.GetByOwner(CurrentUser.Id);
+ // StoreId = store.Id;
+ //}
+
+ //show default store
+ if (!StoreId.HasValue)
+ {
+ var defaultStore = await _storeAppService.GetDefaultAsync();
+ StoreId = defaultStore.Id;
+ }
+
+ StoreName = (await _storeAppService.GetAsync(StoreId.Value)).Name;
+ }
+ }
+}
diff --git a/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Web/Pages/EShop/Products/Tags/Tag/index.css b/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Web/Pages/EShop/Products/Tags/Tag/index.css
new file mode 100644
index 000000000..e69de29bb
diff --git a/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Web/Pages/EShop/Products/Tags/Tag/index.js b/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Web/Pages/EShop/Products/Tags/Tag/index.js
new file mode 100644
index 000000000..1617ed57b
--- /dev/null
+++ b/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Web/Pages/EShop/Products/Tags/Tag/index.js
@@ -0,0 +1,80 @@
+$(function () {
+
+ var l = abp.localization.getResource('Products');
+
+ var service = easyAbp.eShop.products.tags.tag;
+ var createModal = new abp.ModalManager(abp.appPath + 'EShop/Products/Tags/Tag/CreateModal');
+ var editModal = new abp.ModalManager(abp.appPath + 'EShop/Products/Tags/Tag/EditModal');
+
+ var dataTable = $('#TagTable').DataTable(abp.libs.datatables.normalizeConfiguration({
+ processing: true,
+ serverSide: true,
+ paging: true,
+ searching: false,
+ autoWidth: false,
+ scrollCollapse: true,
+ order: [[1, "asc"]],
+ ajax: abp.libs.datatables.createAjax(service.getList, function () {
+ return { storeId: storeId, showHidden: true }
+ }),
+ columnDefs: [
+ {
+ rowAction: {
+ items:
+ [
+ {
+ text: l('Product'),
+ action: function (data) {
+ document.location.href = document.location.origin +
+ '/EShop/Products/Products/Product?StoreId=' + storeId + '&TagId=' + data.record.id;
+ }
+ },
+ {
+ text: l('Edit'),
+ action: function (data) {
+ editModal.open({ id: data.record.id });
+ }
+ },
+ {
+ text: l('Delete'),
+ confirmMessage: function (data) {
+ return l('TagDeletionConfirmationMessage', data.record.id);
+ },
+ action: function (data) {
+ service.delete(data.record.id)
+ .then(function () {
+ abp.notify.info(l('SuccessfullyDeleted'));
+ dataTable.ajax.reload();
+ });
+ }
+ }
+ ]
+ }
+ },
+ { data: "id"},
+ //{ data: "storeId" },
+ { data: "description" },
+ { data: "mediaResources" },
+ //{ data: "isHidden" },
+ { data: "displayName" },
+ //{ data: "code" },
+ //{ data: "level" },
+ { data: "parentId" },
+ //{ data: "parent" },
+ //{ data: "children" },
+ ]
+ }));
+
+ createModal.onResult(function () {
+ dataTable.ajax.reload();
+ });
+
+ editModal.onResult(function () {
+ dataTable.ajax.reload();
+ });
+
+ $('#NewTagButton').click(function (e) {
+ e.preventDefault();
+ createModal.open();
+ });
+});
\ No newline at end of file
diff --git a/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Web/ProductsWebAutoMapperProfile.cs b/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Web/ProductsWebAutoMapperProfile.cs
index 707aacce8..62f362ada 100644
--- a/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Web/ProductsWebAutoMapperProfile.cs
+++ b/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;
@@ -7,6 +7,7 @@
using EasyAbp.EShop.Products.ProductDetails.Dtos;
using EasyAbp.EShop.Products.Web.Pages.EShop.Products.Products.Product.ViewModels;
using EasyAbp.EShop.Products.Web.Pages.EShop.Products.Products.ProductSku.ViewModels;
+using EasyAbp.EShop.Products.Tags.Dtos;
using Volo.Abp.AutoMapper;
namespace EasyAbp.EShop.Products.Web
@@ -20,6 +21,7 @@ public ProductsWebAutoMapperProfile()
* into multiple profile classes for a better organization. */
CreateMap()
.Ignore(model => model.CategoryIds)
+ .Ignore(model => model.TagIds)
.Ignore(model => model.ProductDetail)
.Ignore(model => model.StoreId)
.ForSourceMember(dto => dto.Sold, opt => opt.DoNotValidate())
@@ -41,11 +43,11 @@ public ProductsWebAutoMapperProfile()
x.ProductAttributeNames.Split(",", StringSplitOptions.RemoveEmptyEntries).Select((s, i) =>
new CreateUpdateProductAttributeDto
{
- DisplayName = s,
+ DisplayName = s.Trim(),
ProductAttributeOptions = new List(
x.ProductAttributeOptionNames.SplitToLines(StringSplitOptions.RemoveEmptyEntries)[i]
.Split(",", StringSplitOptions.RemoveEmptyEntries).Select(o =>
- new CreateUpdateProductAttributeOptionDto {DisplayName = o}))
+ new CreateUpdateProductAttributeOptionDto {DisplayName = o.Trim()}))
})));
CreateMap()
.Ignore(model => model.StoreId);
@@ -63,6 +65,8 @@ public ProductsWebAutoMapperProfile()
CreateMap();
CreateMap();
CreateMap();
+ CreateMap();
+ CreateMap();
}
}
}
diff --git a/modules/EasyAbp.EShop.Products/test/EasyAbp.EShop.Products.Application.Tests/Tags/TagAppServiceTests.cs b/modules/EasyAbp.EShop.Products/test/EasyAbp.EShop.Products.Application.Tests/Tags/TagAppServiceTests.cs
new file mode 100644
index 000000000..647a435df
--- /dev/null
+++ b/modules/EasyAbp.EShop.Products/test/EasyAbp.EShop.Products.Application.Tests/Tags/TagAppServiceTests.cs
@@ -0,0 +1,26 @@
+using Shouldly;
+using System.Threading.Tasks;
+using Xunit;
+
+namespace EasyAbp.EShop.Products.Tags
+{
+ public class TagAppServiceTests : ProductsApplicationTestBase
+ {
+ private readonly ITagAppService _tagAppService;
+
+ public TagAppServiceTests()
+ {
+ _tagAppService = GetRequiredService();
+ }
+
+ [Fact]
+ public async Task Test1()
+ {
+ // Arrange
+
+ // Act
+
+ // Assert
+ }
+ }
+}
diff --git a/modules/EasyAbp.EShop.Products/test/EasyAbp.EShop.Products.Domain.Tests/Tags/TagDomainTests.cs b/modules/EasyAbp.EShop.Products/test/EasyAbp.EShop.Products.Domain.Tests/Tags/TagDomainTests.cs
new file mode 100644
index 000000000..3dd02e571
--- /dev/null
+++ b/modules/EasyAbp.EShop.Products/test/EasyAbp.EShop.Products.Domain.Tests/Tags/TagDomainTests.cs
@@ -0,0 +1,23 @@
+using System.Threading.Tasks;
+using Shouldly;
+using Xunit;
+
+namespace EasyAbp.EShop.Products.Tags
+{
+ public class TagDomainTests : ProductsDomainTestBase
+ {
+ public TagDomainTests()
+ {
+ }
+
+ [Fact]
+ public async Task Test1()
+ {
+ // Arrange
+
+ // Assert
+
+ // Assert
+ }
+ }
+}
diff --git a/modules/EasyAbp.EShop.Products/test/EasyAbp.EShop.Products.EntityFrameworkCore.Tests/EntityFrameworkCore/Tags/TagRepositoryTests.cs b/modules/EasyAbp.EShop.Products/test/EasyAbp.EShop.Products.EntityFrameworkCore.Tests/EntityFrameworkCore/Tags/TagRepositoryTests.cs
new file mode 100644
index 000000000..dd1ab85b9
--- /dev/null
+++ b/modules/EasyAbp.EShop.Products/test/EasyAbp.EShop.Products.EntityFrameworkCore.Tests/EntityFrameworkCore/Tags/TagRepositoryTests.cs
@@ -0,0 +1,31 @@
+using System;
+using System.Threading.Tasks;
+using EasyAbp.EShop.Products.Tags;
+using Volo.Abp.Domain.Repositories;
+using Xunit;
+
+namespace EasyAbp.EShop.Products.EntityFrameworkCore.Tags
+{
+ public class TagRepositoryTests : ProductsEntityFrameworkCoreTestBase
+ {
+ private readonly IRepository _tagRepository;
+
+ public TagRepositoryTests()
+ {
+ _tagRepository = GetRequiredService>();
+ }
+
+ [Fact]
+ public async Task Test1()
+ {
+ await WithUnitOfWorkAsync(async () =>
+ {
+ // Arrange
+
+ // Act
+
+ //Assert
+ });
+ }
+ }
+}
diff --git a/modules/EasyAbp.EShop.Products/test/EasyAbp.EShop.Products.HttpApi.Client.ConsoleTestApp/EasyAbp.EShop.Products.HttpApi.Client.ConsoleTestApp.csproj b/modules/EasyAbp.EShop.Products/test/EasyAbp.EShop.Products.HttpApi.Client.ConsoleTestApp/EasyAbp.EShop.Products.HttpApi.Client.ConsoleTestApp.csproj
index 3cabd9a9b..d838df6bb 100644
--- a/modules/EasyAbp.EShop.Products/test/EasyAbp.EShop.Products.HttpApi.Client.ConsoleTestApp/EasyAbp.EShop.Products.HttpApi.Client.ConsoleTestApp.csproj
+++ b/modules/EasyAbp.EShop.Products/test/EasyAbp.EShop.Products.HttpApi.Client.ConsoleTestApp/EasyAbp.EShop.Products.HttpApi.Client.ConsoleTestApp.csproj
@@ -7,7 +7,7 @@
-
+
diff --git a/modules/EasyAbp.EShop.Products/test/EasyAbp.EShop.Products.TestBase/EasyAbp.EShop.Products.TestBase.csproj b/modules/EasyAbp.EShop.Products/test/EasyAbp.EShop.Products.TestBase/EasyAbp.EShop.Products.TestBase.csproj
index e62f0094c..61a2674c1 100644
--- a/modules/EasyAbp.EShop.Products/test/EasyAbp.EShop.Products.TestBase/EasyAbp.EShop.Products.TestBase.csproj
+++ b/modules/EasyAbp.EShop.Products/test/EasyAbp.EShop.Products.TestBase/EasyAbp.EShop.Products.TestBase.csproj
@@ -14,9 +14,9 @@
-
-
-
+
+
+
diff --git a/modules/EasyAbp.EShop.Stores/src/EasyAbp.EShop.Stores.Application.Contracts/EasyAbp.EShop.Stores.Application.Contracts.csproj b/modules/EasyAbp.EShop.Stores/src/EasyAbp.EShop.Stores.Application.Contracts/EasyAbp.EShop.Stores.Application.Contracts.csproj
index 79319217f..0f4b53292 100644
--- a/modules/EasyAbp.EShop.Stores/src/EasyAbp.EShop.Stores.Application.Contracts/EasyAbp.EShop.Stores.Application.Contracts.csproj
+++ b/modules/EasyAbp.EShop.Stores/src/EasyAbp.EShop.Stores.Application.Contracts/EasyAbp.EShop.Stores.Application.Contracts.csproj
@@ -8,8 +8,8 @@
-
-
+
+
diff --git a/modules/EasyAbp.EShop.Stores/src/EasyAbp.EShop.Stores.Application.Contracts/EasyAbp/EShop/Stores/EShopStoresApplicationContractsModule.cs b/modules/EasyAbp.EShop.Stores/src/EasyAbp.EShop.Stores.Application.Contracts/EasyAbp/EShop/Stores/EShopStoresApplicationContractsModule.cs
index 5a60cdf02..c9fd41046 100644
--- a/modules/EasyAbp.EShop.Stores/src/EasyAbp.EShop.Stores.Application.Contracts/EasyAbp/EShop/Stores/EShopStoresApplicationContractsModule.cs
+++ b/modules/EasyAbp.EShop.Stores/src/EasyAbp.EShop.Stores.Application.Contracts/EasyAbp/EShop/Stores/EShopStoresApplicationContractsModule.cs
@@ -12,12 +12,6 @@ namespace EasyAbp.EShop.Stores
)]
public class EShopStoresApplicationContractsModule : AbpModule
{
- public override void ConfigureServices(ServiceConfigurationContext context)
- {
- Configure(options =>
- {
- options.FileSets.AddEmbedded("EasyAbp.EShop.Stores");
- });
- }
+
}
}
diff --git a/modules/EasyAbp.EShop.Stores/src/EasyAbp.EShop.Stores.Application/EasyAbp.EShop.Stores.Application.csproj b/modules/EasyAbp.EShop.Stores/src/EasyAbp.EShop.Stores.Application/EasyAbp.EShop.Stores.Application.csproj
index 1159c36fa..d68407ab7 100644
--- a/modules/EasyAbp.EShop.Stores/src/EasyAbp.EShop.Stores.Application/EasyAbp.EShop.Stores.Application.csproj
+++ b/modules/EasyAbp.EShop.Stores/src/EasyAbp.EShop.Stores.Application/EasyAbp.EShop.Stores.Application.csproj
@@ -8,8 +8,8 @@
-
-
+
+
diff --git a/modules/EasyAbp.EShop.Stores/src/EasyAbp.EShop.Stores.Domain.Shared/EasyAbp.EShop.Stores.Domain.Shared.csproj b/modules/EasyAbp.EShop.Stores/src/EasyAbp.EShop.Stores.Domain.Shared/EasyAbp.EShop.Stores.Domain.Shared.csproj
index 8adecc367..2a270ba6d 100644
--- a/modules/EasyAbp.EShop.Stores/src/EasyAbp.EShop.Stores.Domain.Shared/EasyAbp.EShop.Stores.Domain.Shared.csproj
+++ b/modules/EasyAbp.EShop.Stores/src/EasyAbp.EShop.Stores.Domain.Shared/EasyAbp.EShop.Stores.Domain.Shared.csproj
@@ -5,10 +5,11 @@
netstandard2.0
+ true
-
+
@@ -16,4 +17,8 @@
+
+
+
+
diff --git a/modules/EasyAbp.EShop.Stores/src/EasyAbp.EShop.Stores.Domain/EasyAbp.EShop.Stores.Domain.csproj b/modules/EasyAbp.EShop.Stores/src/EasyAbp.EShop.Stores.Domain/EasyAbp.EShop.Stores.Domain.csproj
index a6a7b45fc..31f32699c 100644
--- a/modules/EasyAbp.EShop.Stores/src/EasyAbp.EShop.Stores.Domain/EasyAbp.EShop.Stores.Domain.csproj
+++ b/modules/EasyAbp.EShop.Stores/src/EasyAbp.EShop.Stores.Domain/EasyAbp.EShop.Stores.Domain.csproj
@@ -8,7 +8,7 @@
-
+
diff --git a/modules/EasyAbp.EShop.Stores/src/EasyAbp.EShop.Stores.EntityFrameworkCore/EasyAbp.EShop.Stores.EntityFrameworkCore.csproj b/modules/EasyAbp.EShop.Stores/src/EasyAbp.EShop.Stores.EntityFrameworkCore/EasyAbp.EShop.Stores.EntityFrameworkCore.csproj
index 96e88b5c7..9e8e74b5c 100644
--- a/modules/EasyAbp.EShop.Stores/src/EasyAbp.EShop.Stores.EntityFrameworkCore/EasyAbp.EShop.Stores.EntityFrameworkCore.csproj
+++ b/modules/EasyAbp.EShop.Stores/src/EasyAbp.EShop.Stores.EntityFrameworkCore/EasyAbp.EShop.Stores.EntityFrameworkCore.csproj
@@ -8,7 +8,7 @@
-
+
diff --git a/modules/EasyAbp.EShop.Stores/src/EasyAbp.EShop.Stores.HttpApi.Client/EasyAbp.EShop.Stores.HttpApi.Client.csproj b/modules/EasyAbp.EShop.Stores/src/EasyAbp.EShop.Stores.HttpApi.Client/EasyAbp.EShop.Stores.HttpApi.Client.csproj
index 21a8e970b..ca512af67 100644
--- a/modules/EasyAbp.EShop.Stores/src/EasyAbp.EShop.Stores.HttpApi.Client/EasyAbp.EShop.Stores.HttpApi.Client.csproj
+++ b/modules/EasyAbp.EShop.Stores/src/EasyAbp.EShop.Stores.HttpApi.Client/EasyAbp.EShop.Stores.HttpApi.Client.csproj
@@ -8,7 +8,7 @@
-
+
diff --git a/modules/EasyAbp.EShop.Stores/src/EasyAbp.EShop.Stores.HttpApi/EasyAbp.EShop.Stores.HttpApi.csproj b/modules/EasyAbp.EShop.Stores/src/EasyAbp.EShop.Stores.HttpApi/EasyAbp.EShop.Stores.HttpApi.csproj
index 0dc46fabf..8a0d43ad9 100644
--- a/modules/EasyAbp.EShop.Stores/src/EasyAbp.EShop.Stores.HttpApi/EasyAbp.EShop.Stores.HttpApi.csproj
+++ b/modules/EasyAbp.EShop.Stores/src/EasyAbp.EShop.Stores.HttpApi/EasyAbp.EShop.Stores.HttpApi.csproj
@@ -8,7 +8,7 @@
-
+
diff --git a/modules/EasyAbp.EShop.Stores/src/EasyAbp.EShop.Stores.MongoDB/EasyAbp.EShop.Stores.MongoDB.csproj b/modules/EasyAbp.EShop.Stores/src/EasyAbp.EShop.Stores.MongoDB/EasyAbp.EShop.Stores.MongoDB.csproj
index 3ce749d93..c85c2201e 100644
--- a/modules/EasyAbp.EShop.Stores/src/EasyAbp.EShop.Stores.MongoDB/EasyAbp.EShop.Stores.MongoDB.csproj
+++ b/modules/EasyAbp.EShop.Stores/src/EasyAbp.EShop.Stores.MongoDB/EasyAbp.EShop.Stores.MongoDB.csproj
@@ -8,7 +8,7 @@
-
+
diff --git a/modules/EasyAbp.EShop.Stores/src/EasyAbp.EShop.Stores.Web/EShopStoresWebModule.cs b/modules/EasyAbp.EShop.Stores/src/EasyAbp.EShop.Stores.Web/EShopStoresWebModule.cs
index d40f0ad9e..134d0241b 100644
--- a/modules/EasyAbp.EShop.Stores/src/EasyAbp.EShop.Stores.Web/EShopStoresWebModule.cs
+++ b/modules/EasyAbp.EShop.Stores/src/EasyAbp.EShop.Stores.Web/EShopStoresWebModule.cs
@@ -40,7 +40,7 @@ public override void ConfigureServices(ServiceConfigurationContext context)
Configure(options =>
{
- options.FileSets.AddEmbedded("EasyAbp.EShop.Stores.Web");
+ options.FileSets.AddEmbedded();
});
context.Services.AddAutoMapperObjectMapper();
diff --git a/modules/EasyAbp.EShop.Stores/src/EasyAbp.EShop.Stores.Web/EasyAbp.EShop.Stores.Web.csproj b/modules/EasyAbp.EShop.Stores/src/EasyAbp.EShop.Stores.Web/EasyAbp.EShop.Stores.Web.csproj
index 2ca718db1..5de28a2eb 100644
--- a/modules/EasyAbp.EShop.Stores/src/EasyAbp.EShop.Stores.Web/EasyAbp.EShop.Stores.Web.csproj
+++ b/modules/EasyAbp.EShop.Stores/src/EasyAbp.EShop.Stores.Web/EasyAbp.EShop.Stores.Web.csproj
@@ -8,17 +8,22 @@
true
Library
EasyAbp.EShop.Stores.Web
+ true
-
-
+
+
+
+
+
+
@@ -28,11 +33,6 @@
-
-
-
-
-
diff --git a/modules/EasyAbp.EShop.Stores/test/EasyAbp.EShop.Stores.HttpApi.Client.ConsoleTestApp/EasyAbp.EShop.Stores.HttpApi.Client.ConsoleTestApp.csproj b/modules/EasyAbp.EShop.Stores/test/EasyAbp.EShop.Stores.HttpApi.Client.ConsoleTestApp/EasyAbp.EShop.Stores.HttpApi.Client.ConsoleTestApp.csproj
index 67d66675d..15ff3344f 100644
--- a/modules/EasyAbp.EShop.Stores/test/EasyAbp.EShop.Stores.HttpApi.Client.ConsoleTestApp/EasyAbp.EShop.Stores.HttpApi.Client.ConsoleTestApp.csproj
+++ b/modules/EasyAbp.EShop.Stores/test/EasyAbp.EShop.Stores.HttpApi.Client.ConsoleTestApp/EasyAbp.EShop.Stores.HttpApi.Client.ConsoleTestApp.csproj
@@ -7,7 +7,7 @@
-
+
diff --git a/modules/EasyAbp.EShop.Stores/test/EasyAbp.EShop.Stores.TestBase/EasyAbp.EShop.Stores.TestBase.csproj b/modules/EasyAbp.EShop.Stores/test/EasyAbp.EShop.Stores.TestBase/EasyAbp.EShop.Stores.TestBase.csproj
index e7b861be8..695d4f0ab 100644
--- a/modules/EasyAbp.EShop.Stores/test/EasyAbp.EShop.Stores.TestBase/EasyAbp.EShop.Stores.TestBase.csproj
+++ b/modules/EasyAbp.EShop.Stores/test/EasyAbp.EShop.Stores.TestBase/EasyAbp.EShop.Stores.TestBase.csproj
@@ -14,9 +14,9 @@
-
-
-
+
+
+
diff --git a/plugins/Baskets/src/EasyAbp.EShop.Plugins.Baskets.Application.Contracts/EasyAbp.EShop.Plugins.Baskets.Application.Contracts.csproj b/plugins/Baskets/src/EasyAbp.EShop.Plugins.Baskets.Application.Contracts/EasyAbp.EShop.Plugins.Baskets.Application.Contracts.csproj
index cb1438cb1..97ac50f21 100644
--- a/plugins/Baskets/src/EasyAbp.EShop.Plugins.Baskets.Application.Contracts/EasyAbp.EShop.Plugins.Baskets.Application.Contracts.csproj
+++ b/plugins/Baskets/src/EasyAbp.EShop.Plugins.Baskets.Application.Contracts/EasyAbp.EShop.Plugins.Baskets.Application.Contracts.csproj
@@ -8,8 +8,8 @@
-
-
+
+
diff --git a/plugins/Baskets/src/EasyAbp.EShop.Plugins.Baskets.Application/EasyAbp.EShop.Plugins.Baskets.Application.csproj b/plugins/Baskets/src/EasyAbp.EShop.Plugins.Baskets.Application/EasyAbp.EShop.Plugins.Baskets.Application.csproj
index c88781601..b303d448f 100644
--- a/plugins/Baskets/src/EasyAbp.EShop.Plugins.Baskets.Application/EasyAbp.EShop.Plugins.Baskets.Application.csproj
+++ b/plugins/Baskets/src/EasyAbp.EShop.Plugins.Baskets.Application/EasyAbp.EShop.Plugins.Baskets.Application.csproj
@@ -8,8 +8,8 @@
-
-
+
+
diff --git a/plugins/Baskets/src/EasyAbp.EShop.Plugins.Baskets.Application/EasyAbp/EShop/Plugins/Baskets/BasketItems/BasketItemAppService.cs b/plugins/Baskets/src/EasyAbp.EShop.Plugins.Baskets.Application/EasyAbp/EShop/Plugins/Baskets/BasketItems/BasketItemAppService.cs
index 6ca40125c..4394b0385 100644
--- a/plugins/Baskets/src/EasyAbp.EShop.Plugins.Baskets.Application/EasyAbp/EShop/Plugins/Baskets/BasketItems/BasketItemAppService.cs
+++ b/plugins/Baskets/src/EasyAbp.EShop.Plugins.Baskets.Application/EasyAbp/EShop/Plugins/Baskets/BasketItems/BasketItemAppService.cs
@@ -78,9 +78,9 @@ public override async Task> GetListAsync(GetBasket
{
await CheckGetListPolicyAsync();
- if (input.UserId != CurrentUser.GetId() && !await IsCurrentUserManagerAsync())
+ if (input.UserId != CurrentUser.GetId())
{
- throw new AbpAuthorizationException();
+ await AuthorizationService.CheckAsync(BasketsPermissions.BasketItem.Manage);
}
var query = CreateFilteredQuery(input);
diff --git a/plugins/Baskets/src/EasyAbp.EShop.Plugins.Baskets.Domain.Shared/EasyAbp.EShop.Plugins.Baskets.Domain.Shared.csproj b/plugins/Baskets/src/EasyAbp.EShop.Plugins.Baskets.Domain.Shared/EasyAbp.EShop.Plugins.Baskets.Domain.Shared.csproj
index 0c36eb7fe..979c1520a 100644
--- a/plugins/Baskets/src/EasyAbp.EShop.Plugins.Baskets.Domain.Shared/EasyAbp.EShop.Plugins.Baskets.Domain.Shared.csproj
+++ b/plugins/Baskets/src/EasyAbp.EShop.Plugins.Baskets.Domain.Shared/EasyAbp.EShop.Plugins.Baskets.Domain.Shared.csproj
@@ -9,7 +9,7 @@
-
+
diff --git a/plugins/Baskets/src/EasyAbp.EShop.Plugins.Baskets.Domain/EasyAbp.EShop.Plugins.Baskets.Domain.csproj b/plugins/Baskets/src/EasyAbp.EShop.Plugins.Baskets.Domain/EasyAbp.EShop.Plugins.Baskets.Domain.csproj
index 6bceffa47..5383439bd 100644
--- a/plugins/Baskets/src/EasyAbp.EShop.Plugins.Baskets.Domain/EasyAbp.EShop.Plugins.Baskets.Domain.csproj
+++ b/plugins/Baskets/src/EasyAbp.EShop.Plugins.Baskets.Domain/EasyAbp.EShop.Plugins.Baskets.Domain.csproj
@@ -8,7 +8,7 @@
-
+
diff --git a/plugins/Baskets/src/EasyAbp.EShop.Plugins.Baskets.EntityFrameworkCore/EasyAbp.EShop.Plugins.Baskets.EntityFrameworkCore.csproj b/plugins/Baskets/src/EasyAbp.EShop.Plugins.Baskets.EntityFrameworkCore/EasyAbp.EShop.Plugins.Baskets.EntityFrameworkCore.csproj
index 235ab194d..1a83545ca 100644
--- a/plugins/Baskets/src/EasyAbp.EShop.Plugins.Baskets.EntityFrameworkCore/EasyAbp.EShop.Plugins.Baskets.EntityFrameworkCore.csproj
+++ b/plugins/Baskets/src/EasyAbp.EShop.Plugins.Baskets.EntityFrameworkCore/EasyAbp.EShop.Plugins.Baskets.EntityFrameworkCore.csproj
@@ -8,7 +8,7 @@
-
+
diff --git a/plugins/Baskets/src/EasyAbp.EShop.Plugins.Baskets.HttpApi.Client/EasyAbp.EShop.Plugins.Baskets.HttpApi.Client.csproj b/plugins/Baskets/src/EasyAbp.EShop.Plugins.Baskets.HttpApi.Client/EasyAbp.EShop.Plugins.Baskets.HttpApi.Client.csproj
index e63ab89f2..94f052bd4 100644
--- a/plugins/Baskets/src/EasyAbp.EShop.Plugins.Baskets.HttpApi.Client/EasyAbp.EShop.Plugins.Baskets.HttpApi.Client.csproj
+++ b/plugins/Baskets/src/EasyAbp.EShop.Plugins.Baskets.HttpApi.Client/EasyAbp.EShop.Plugins.Baskets.HttpApi.Client.csproj
@@ -8,7 +8,7 @@
-
+
diff --git a/plugins/Baskets/src/EasyAbp.EShop.Plugins.Baskets.HttpApi/EasyAbp.EShop.Plugins.Baskets.HttpApi.csproj b/plugins/Baskets/src/EasyAbp.EShop.Plugins.Baskets.HttpApi/EasyAbp.EShop.Plugins.Baskets.HttpApi.csproj
index a611e617f..2d8695f1b 100644
--- a/plugins/Baskets/src/EasyAbp.EShop.Plugins.Baskets.HttpApi/EasyAbp.EShop.Plugins.Baskets.HttpApi.csproj
+++ b/plugins/Baskets/src/EasyAbp.EShop.Plugins.Baskets.HttpApi/EasyAbp.EShop.Plugins.Baskets.HttpApi.csproj
@@ -8,7 +8,7 @@
-
+
diff --git a/plugins/Baskets/src/EasyAbp.EShop.Plugins.Baskets.MongoDB/EasyAbp.EShop.Plugins.Baskets.MongoDB.csproj b/plugins/Baskets/src/EasyAbp.EShop.Plugins.Baskets.MongoDB/EasyAbp.EShop.Plugins.Baskets.MongoDB.csproj
index e1468e3fe..80e11b349 100644
--- a/plugins/Baskets/src/EasyAbp.EShop.Plugins.Baskets.MongoDB/EasyAbp.EShop.Plugins.Baskets.MongoDB.csproj
+++ b/plugins/Baskets/src/EasyAbp.EShop.Plugins.Baskets.MongoDB/EasyAbp.EShop.Plugins.Baskets.MongoDB.csproj
@@ -8,7 +8,7 @@
-
+
diff --git a/plugins/Baskets/src/EasyAbp.EShop.Plugins.Baskets.Web/EasyAbp.EShop.Plugins.Baskets.Web.csproj b/plugins/Baskets/src/EasyAbp.EShop.Plugins.Baskets.Web/EasyAbp.EShop.Plugins.Baskets.Web.csproj
index 4cb1aba0b..65f6a0881 100644
--- a/plugins/Baskets/src/EasyAbp.EShop.Plugins.Baskets.Web/EasyAbp.EShop.Plugins.Baskets.Web.csproj
+++ b/plugins/Baskets/src/EasyAbp.EShop.Plugins.Baskets.Web/EasyAbp.EShop.Plugins.Baskets.Web.csproj
@@ -12,8 +12,8 @@
-
-
+
+
@@ -31,14 +31,6 @@
-
- true
- PreserveNewest
-
-
- true
- PreserveNewest
-
diff --git a/plugins/Baskets/test/EasyAbp.EShop.Plugins.Baskets.EntityFrameworkCore.Tests/EasyAbp.EShop.Plugins.Baskets.EntityFrameworkCore.Tests.csproj b/plugins/Baskets/test/EasyAbp.EShop.Plugins.Baskets.EntityFrameworkCore.Tests/EasyAbp.EShop.Plugins.Baskets.EntityFrameworkCore.Tests.csproj
index 6c1052192..f2419fac2 100644
--- a/plugins/Baskets/test/EasyAbp.EShop.Plugins.Baskets.EntityFrameworkCore.Tests/EasyAbp.EShop.Plugins.Baskets.EntityFrameworkCore.Tests.csproj
+++ b/plugins/Baskets/test/EasyAbp.EShop.Plugins.Baskets.EntityFrameworkCore.Tests/EasyAbp.EShop.Plugins.Baskets.EntityFrameworkCore.Tests.csproj
@@ -12,7 +12,7 @@
-
+
diff --git a/plugins/Baskets/test/EasyAbp.EShop.Plugins.Baskets.HttpApi.Client.ConsoleTestApp/EasyAbp.EShop.Plugins.Baskets.HttpApi.Client.ConsoleTestApp.csproj b/plugins/Baskets/test/EasyAbp.EShop.Plugins.Baskets.HttpApi.Client.ConsoleTestApp/EasyAbp.EShop.Plugins.Baskets.HttpApi.Client.ConsoleTestApp.csproj
index 9b345f739..55abdbb8c 100644
--- a/plugins/Baskets/test/EasyAbp.EShop.Plugins.Baskets.HttpApi.Client.ConsoleTestApp/EasyAbp.EShop.Plugins.Baskets.HttpApi.Client.ConsoleTestApp.csproj
+++ b/plugins/Baskets/test/EasyAbp.EShop.Plugins.Baskets.HttpApi.Client.ConsoleTestApp/EasyAbp.EShop.Plugins.Baskets.HttpApi.Client.ConsoleTestApp.csproj
@@ -7,7 +7,7 @@
-
+
diff --git a/plugins/Baskets/test/EasyAbp.EShop.Plugins.Baskets.TestBase/EasyAbp.EShop.Plugins.Baskets.TestBase.csproj b/plugins/Baskets/test/EasyAbp.EShop.Plugins.Baskets.TestBase/EasyAbp.EShop.Plugins.Baskets.TestBase.csproj
index 50ff44214..77e21e360 100644
--- a/plugins/Baskets/test/EasyAbp.EShop.Plugins.Baskets.TestBase/EasyAbp.EShop.Plugins.Baskets.TestBase.csproj
+++ b/plugins/Baskets/test/EasyAbp.EShop.Plugins.Baskets.TestBase/EasyAbp.EShop.Plugins.Baskets.TestBase.csproj
@@ -14,9 +14,9 @@
-
-
-
+
+
+
diff --git a/samples/EShopSample/angular/package.json b/samples/EShopSample/angular/package.json
index c3e1b804d..f97d754a9 100644
--- a/samples/EShopSample/angular/package.json
+++ b/samples/EShopSample/angular/package.json
@@ -11,11 +11,11 @@
},
"private": true,
"dependencies": {
- "@abp/ng.account": "~3.0.1",
- "@abp/ng.identity": "~3.0.1",
- "@abp/ng.setting-management": "~3.0.1",
- "@abp/ng.tenant-management": "~3.0.1",
- "@abp/ng.theme.basic": "~3.0.1",
+ "@abp/ng.account": "~3.0.4",
+ "@abp/ng.identity": "~3.0.4",
+ "@abp/ng.setting-management": "~3.0.4",
+ "@abp/ng.tenant-management": "~3.0.4",
+ "@abp/ng.theme.basic": "~3.0.4",
"@angular/animations": "~9.1.0",
"@angular/common": "~9.1.0",
"@angular/compiler": "~9.1.0",
diff --git a/samples/EShopSample/aspnet-core/src/EShopSample.Application.Contracts/EShopSample.Application.Contracts.csproj b/samples/EShopSample/aspnet-core/src/EShopSample.Application.Contracts/EShopSample.Application.Contracts.csproj
index 54faaa68e..105795fcb 100644
--- a/samples/EShopSample/aspnet-core/src/EShopSample.Application.Contracts/EShopSample.Application.Contracts.csproj
+++ b/samples/EShopSample/aspnet-core/src/EShopSample.Application.Contracts/EShopSample.Application.Contracts.csproj
@@ -14,14 +14,14 @@
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
diff --git a/samples/EShopSample/aspnet-core/src/EShopSample.Application/EShopSample.Application.csproj b/samples/EShopSample/aspnet-core/src/EShopSample.Application/EShopSample.Application.csproj
index 335b82253..2bbb5c1f5 100644
--- a/samples/EShopSample/aspnet-core/src/EShopSample.Application/EShopSample.Application.csproj
+++ b/samples/EShopSample/aspnet-core/src/EShopSample.Application/EShopSample.Application.csproj
@@ -15,13 +15,13 @@
-
-
-
-
-
-
-
+
+
+
+
+
+
+
diff --git a/samples/EShopSample/aspnet-core/src/EShopSample.DbMigrator/EShopSample.DbMigrator.csproj b/samples/EShopSample/aspnet-core/src/EShopSample.DbMigrator/EShopSample.DbMigrator.csproj
index 7f5fde501..d31831c4f 100644
--- a/samples/EShopSample/aspnet-core/src/EShopSample.DbMigrator/EShopSample.DbMigrator.csproj
+++ b/samples/EShopSample/aspnet-core/src/EShopSample.DbMigrator/EShopSample.DbMigrator.csproj
@@ -26,7 +26,7 @@
-
+
diff --git a/samples/EShopSample/aspnet-core/src/EShopSample.Domain.Shared/EShopSample.Domain.Shared.csproj b/samples/EShopSample/aspnet-core/src/EShopSample.Domain.Shared/EShopSample.Domain.Shared.csproj
index f27351c4e..1e97397c1 100644
--- a/samples/EShopSample/aspnet-core/src/EShopSample.Domain.Shared/EShopSample.Domain.Shared.csproj
+++ b/samples/EShopSample/aspnet-core/src/EShopSample.Domain.Shared/EShopSample.Domain.Shared.csproj
@@ -5,19 +5,20 @@
netstandard2.0
EShopSample
+ true
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
@@ -27,4 +28,8 @@
+
+
+
+
diff --git a/samples/EShopSample/aspnet-core/src/EShopSample.Domain.Shared/EShopSampleDomainSharedModule.cs b/samples/EShopSample/aspnet-core/src/EShopSample.Domain.Shared/EShopSampleDomainSharedModule.cs
index 01cd93612..2d63dd979 100644
--- a/samples/EShopSample/aspnet-core/src/EShopSample.Domain.Shared/EShopSampleDomainSharedModule.cs
+++ b/samples/EShopSample/aspnet-core/src/EShopSample.Domain.Shared/EShopSampleDomainSharedModule.cs
@@ -38,7 +38,7 @@ public override void ConfigureServices(ServiceConfigurationContext context)
{
Configure(options =>
{
- options.FileSets.AddEmbedded("EShopSample");
+ options.FileSets.AddEmbedded();
});
Configure(options =>
diff --git a/samples/EShopSample/aspnet-core/src/EShopSample.Domain/EShopSample.Domain.csproj b/samples/EShopSample/aspnet-core/src/EShopSample.Domain/EShopSample.Domain.csproj
index 40d701315..48305783a 100644
--- a/samples/EShopSample/aspnet-core/src/EShopSample.Domain/EShopSample.Domain.csproj
+++ b/samples/EShopSample/aspnet-core/src/EShopSample.Domain/EShopSample.Domain.csproj
@@ -14,18 +14,18 @@
-
-
+
+
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
diff --git a/samples/EShopSample/aspnet-core/src/EShopSample.EntityFrameworkCore.DbMigrations/Migrations/20200626115809_AddedProductTag.Designer.cs b/samples/EShopSample/aspnet-core/src/EShopSample.EntityFrameworkCore.DbMigrations/Migrations/20200626115809_AddedProductTag.Designer.cs
new file mode 100644
index 000000000..2b482eaf7
--- /dev/null
+++ b/samples/EShopSample/aspnet-core/src/EShopSample.EntityFrameworkCore.DbMigrations/Migrations/20200626115809_AddedProductTag.Designer.cs
@@ -0,0 +1,3740 @@
+//
+using System;
+using EShopSample.EntityFrameworkCore;
+using Microsoft.EntityFrameworkCore;
+using Microsoft.EntityFrameworkCore.Infrastructure;
+using Microsoft.EntityFrameworkCore.Metadata;
+using Microsoft.EntityFrameworkCore.Migrations;
+using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
+using Volo.Abp.EntityFrameworkCore;
+
+namespace EShopSample.Migrations
+{
+ [DbContext(typeof(EShopSampleMigrationsDbContext))]
+ [Migration("20200626115809_AddedProductTag")]
+ partial class AddedProductTag
+ {
+ protected override void BuildTargetModel(ModelBuilder modelBuilder)
+ {
+#pragma warning disable 612, 618
+ modelBuilder
+ .HasAnnotation("_Abp_DatabaseProvider", EfCoreDatabaseProvider.SqlServer)
+ .HasAnnotation("ProductVersion", "3.1.4")
+ .HasAnnotation("Relational:MaxIdentifierLength", 128)
+ .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
+
+ modelBuilder.Entity("EasyAbp.EShop.Orders.Orders.Order", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("CancelledTime")
+ .HasColumnType("datetime2");
+
+ b.Property("CompletionTime")
+ .HasColumnType("datetime2");
+
+ b.Property("ConcurrencyStamp")
+ .IsConcurrencyToken()
+ .HasColumnName("ConcurrencyStamp")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("CreationTime")
+ .HasColumnName("CreationTime")
+ .HasColumnType("datetime2");
+
+ b.Property("CreatorId")
+ .HasColumnName("CreatorId")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("Currency")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("CustomerRemark")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("CustomerUserId")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("DeleterId")
+ .HasColumnName("DeleterId")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("DeletionTime")
+ .HasColumnName("DeletionTime")
+ .HasColumnType("datetime2");
+
+ b.Property("ExtraProperties")
+ .HasColumnName("ExtraProperties")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("IsDeleted")
+ .ValueGeneratedOnAdd()
+ .HasColumnName("IsDeleted")
+ .HasColumnType("bit")
+ .HasDefaultValue(false);
+
+ b.Property("LastModificationTime")
+ .HasColumnName("LastModificationTime")
+ .HasColumnType("datetime2");
+
+ b.Property("LastModifierId")
+ .HasColumnName("LastModifierId")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("OrderNumber")
+ .HasColumnType("nvarchar(450)");
+
+ b.Property("OrderStatus")
+ .HasColumnType("int");
+
+ b.Property("PaidTime")
+ .HasColumnType("datetime2");
+
+ b.Property("PaymentId")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("ProductTotalPrice")
+ .HasColumnType("decimal(20,8)");
+
+ b.Property("ReducedInventoryAfterPaymentTime")
+ .HasColumnType("datetime2");
+
+ b.Property("ReducedInventoryAfterPlacingTime")
+ .HasColumnType("datetime2");
+
+ b.Property("RefundedAmount")
+ .HasColumnType("decimal(20,8)");
+
+ b.Property("StaffRemark")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("StoreId")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("TenantId")
+ .HasColumnName("TenantId")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("TotalDiscount")
+ .HasColumnType("decimal(20,8)");
+
+ b.Property("TotalPrice")
+ .HasColumnType("decimal(20,8)");
+
+ b.HasKey("Id");
+
+ b.HasIndex("OrderNumber")
+ .IsUnique()
+ .HasFilter("[OrderNumber] IS NOT NULL");
+
+ b.ToTable("EShopOrdersOrders");
+ });
+
+ modelBuilder.Entity("EasyAbp.EShop.Orders.Orders.OrderLine", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("CreationTime")
+ .HasColumnName("CreationTime")
+ .HasColumnType("datetime2");
+
+ b.Property("CreatorId")
+ .HasColumnName("CreatorId")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("Currency")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("DeleterId")
+ .HasColumnName("DeleterId")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("DeletionTime")
+ .HasColumnName("DeletionTime")
+ .HasColumnType("datetime2");
+
+ b.Property("IsDeleted")
+ .ValueGeneratedOnAdd()
+ .HasColumnName("IsDeleted")
+ .HasColumnType("bit")
+ .HasDefaultValue(false);
+
+ b.Property("LastModificationTime")
+ .HasColumnName("LastModificationTime")
+ .HasColumnType("datetime2");
+
+ b.Property("LastModifierId")
+ .HasColumnName("LastModifierId")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("MediaResources")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("OrderId")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("ProductDetailModificationTime")
+ .HasColumnType("datetime2");
+
+ b.Property("ProductId")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("ProductModificationTime")
+ .HasColumnType("datetime2");
+
+ b.Property("ProductName")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("ProductSkuId")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("Quantity")
+ .HasColumnType("int");
+
+ b.Property("SkuDescription")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("TotalDiscount")
+ .HasColumnType("decimal(20,8)");
+
+ b.Property("TotalPrice")
+ .HasColumnType("decimal(20,8)");
+
+ b.Property("UnitPrice")
+ .HasColumnType("decimal(20,8)");
+
+ b.HasKey("Id");
+
+ b.HasIndex("OrderId");
+
+ b.ToTable("EShopOrdersOrderLines");
+ });
+
+ modelBuilder.Entity("EasyAbp.EShop.Payments.Payments.Payment", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("ActualPaymentAmount")
+ .HasColumnType("decimal(20,8)");
+
+ b.Property("CancelledTime")
+ .HasColumnType("datetime2");
+
+ b.Property("CompletionTime")
+ .HasColumnType("datetime2");
+
+ b.Property("ConcurrencyStamp")
+ .IsConcurrencyToken()
+ .HasColumnName("ConcurrencyStamp")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("CreationTime")
+ .HasColumnName("CreationTime")
+ .HasColumnType("datetime2");
+
+ b.Property("CreatorId")
+ .HasColumnName("CreatorId")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("Currency")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("DeleterId")
+ .HasColumnName("DeleterId")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("DeletionTime")
+ .HasColumnName("DeletionTime")
+ .HasColumnType("datetime2");
+
+ b.Property("ExternalTradingCode")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("ExtraProperties")
+ .HasColumnName("ExtraProperties")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("IsDeleted")
+ .ValueGeneratedOnAdd()
+ .HasColumnName("IsDeleted")
+ .HasColumnType("bit")
+ .HasDefaultValue(false);
+
+ b.Property("LastModificationTime")
+ .HasColumnName("LastModificationTime")
+ .HasColumnType("datetime2");
+
+ b.Property("LastModifierId")
+ .HasColumnName("LastModifierId")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("OriginalPaymentAmount")
+ .HasColumnType("decimal(20,8)");
+
+ b.Property("PayeeAccount")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("PaymentDiscount")
+ .HasColumnType("decimal(20,8)");
+
+ b.Property("PaymentMethod")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("PendingRefundAmount")
+ .HasColumnType("decimal(20,8)");
+
+ b.Property("RefundAmount")
+ .HasColumnType("decimal(20,8)");
+
+ b.Property("StoreId")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("TenantId")
+ .HasColumnName("TenantId")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("UserId")
+ .HasColumnType("uniqueidentifier");
+
+ b.HasKey("Id");
+
+ b.ToTable("EShopPaymentsPayments");
+ });
+
+ modelBuilder.Entity("EasyAbp.EShop.Payments.Payments.PaymentItem", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("ActualPaymentAmount")
+ .HasColumnType("decimal(20,8)");
+
+ b.Property("CreationTime")
+ .HasColumnName("CreationTime")
+ .HasColumnType("datetime2");
+
+ b.Property("CreatorId")
+ .HasColumnName("CreatorId")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("Currency")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("DeleterId")
+ .HasColumnName("DeleterId")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("DeletionTime")
+ .HasColumnName("DeletionTime")
+ .HasColumnType("datetime2");
+
+ b.Property("IsDeleted")
+ .ValueGeneratedOnAdd()
+ .HasColumnName("IsDeleted")
+ .HasColumnType("bit")
+ .HasDefaultValue(false);
+
+ b.Property("ItemKey")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("ItemType")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("LastModificationTime")
+ .HasColumnName("LastModificationTime")
+ .HasColumnType("datetime2");
+
+ b.Property("LastModifierId")
+ .HasColumnName("LastModifierId")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("OriginalPaymentAmount")
+ .HasColumnType("decimal(20,8)");
+
+ b.Property("PaymentDiscount")
+ .HasColumnType("decimal(20,8)");
+
+ b.Property("PaymentId")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("PendingRefundAmount")
+ .HasColumnType("decimal(20,8)");
+
+ b.Property("RefundAmount")
+ .HasColumnType("decimal(20,8)");
+
+ b.HasKey("Id");
+
+ b.HasIndex("PaymentId");
+
+ b.ToTable("EShopPaymentsPaymentItems");
+ });
+
+ modelBuilder.Entity("EasyAbp.EShop.Payments.Refunds.Refund", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("CancelledTime")
+ .HasColumnType("datetime2");
+
+ b.Property("CompletedTime")
+ .HasColumnType("datetime2");
+
+ b.Property("ConcurrencyStamp")
+ .IsConcurrencyToken()
+ .HasColumnName("ConcurrencyStamp")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("CreationTime")
+ .HasColumnName("CreationTime")
+ .HasColumnType("datetime2");
+
+ b.Property("CreatorId")
+ .HasColumnName("CreatorId")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("Currency")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("CustomerRemark")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("DeleterId")
+ .HasColumnName("DeleterId")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("DeletionTime")
+ .HasColumnName("DeletionTime")
+ .HasColumnType("datetime2");
+
+ b.Property("ExternalTradingCode")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("ExtraProperties")
+ .HasColumnName("ExtraProperties")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("IsDeleted")
+ .ValueGeneratedOnAdd()
+ .HasColumnName("IsDeleted")
+ .HasColumnType("bit")
+ .HasDefaultValue(false);
+
+ b.Property("LastModificationTime")
+ .HasColumnName("LastModificationTime")
+ .HasColumnType("datetime2");
+
+ b.Property("LastModifierId")
+ .HasColumnName("LastModifierId")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("PaymentId")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("PaymentItemId")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("RefundAmount")
+ .HasColumnType("decimal(20,8)");
+
+ b.Property("RefundPaymentMethod")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("StaffRemark")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("StoreId")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("TenantId")
+ .HasColumnType("uniqueidentifier");
+
+ b.HasKey("Id");
+
+ b.ToTable("EShopPaymentsRefunds");
+ });
+
+ modelBuilder.Entity("EasyAbp.EShop.Products.Categories.Category", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("Code")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("ConcurrencyStamp")
+ .IsConcurrencyToken()
+ .HasColumnName("ConcurrencyStamp")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("CreationTime")
+ .HasColumnName("CreationTime")
+ .HasColumnType("datetime2");
+
+ b.Property("CreatorId")
+ .HasColumnName("CreatorId")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("DeleterId")
+ .HasColumnName("DeleterId")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("DeletionTime")
+ .HasColumnName("DeletionTime")
+ .HasColumnType("datetime2");
+
+ b.Property("Description")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("DisplayName")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("ExtraProperties")
+ .HasColumnName("ExtraProperties")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("IsDeleted")
+ .ValueGeneratedOnAdd()
+ .HasColumnName("IsDeleted")
+ .HasColumnType("bit")
+ .HasDefaultValue(false);
+
+ b.Property("IsHidden")
+ .HasColumnType("bit");
+
+ b.Property("LastModificationTime")
+ .HasColumnName("LastModificationTime")
+ .HasColumnType("datetime2");
+
+ b.Property("LastModifierId")
+ .HasColumnName("LastModifierId")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("Level")
+ .HasColumnType("int");
+
+ b.Property("MediaResources")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("ParentId")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("TenantId")
+ .HasColumnName("TenantId")
+ .HasColumnType("uniqueidentifier");
+
+ b.HasKey("Id");
+
+ b.HasIndex("ParentId");
+
+ b.ToTable("EShopProductsCategories");
+ });
+
+ modelBuilder.Entity("EasyAbp.EShop.Products.ProductCategories.ProductCategory", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("CategoryId")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("ConcurrencyStamp")
+ .IsConcurrencyToken()
+ .HasColumnName("ConcurrencyStamp")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("CreationTime")
+ .HasColumnName("CreationTime")
+ .HasColumnType("datetime2");
+
+ b.Property("CreatorId")
+ .HasColumnName("CreatorId")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("DisplayOrder")
+ .HasColumnType("int");
+
+ b.Property("ExtraProperties")
+ .HasColumnName("ExtraProperties")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("LastModificationTime")
+ .HasColumnName("LastModificationTime")
+ .HasColumnType("datetime2");
+
+ b.Property("LastModifierId")
+ .HasColumnName("LastModifierId")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("ProductId")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("TenantId")
+ .HasColumnName("TenantId")
+ .HasColumnType("uniqueidentifier");
+
+ b.HasKey("Id");
+
+ b.ToTable("EShopProductsProductCategories");
+ });
+
+ modelBuilder.Entity("EasyAbp.EShop.Products.ProductDetailHistories.ProductDetailHistory", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("ConcurrencyStamp")
+ .IsConcurrencyToken()
+ .HasColumnName("ConcurrencyStamp")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("ExtraProperties")
+ .HasColumnName("ExtraProperties")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("ModificationTime")
+ .HasColumnType("datetime2");
+
+ b.Property("ProductDetailId")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("SerializedEntityData")
+ .HasColumnType("nvarchar(max)");
+
+ b.HasKey("Id");
+
+ b.HasIndex("ModificationTime");
+
+ b.HasIndex("ProductDetailId");
+
+ b.ToTable("EShopProductsProductDetailHistories");
+ });
+
+ modelBuilder.Entity("EasyAbp.EShop.Products.ProductDetails.ProductDetail", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("ConcurrencyStamp")
+ .IsConcurrencyToken()
+ .HasColumnName("ConcurrencyStamp")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("CreationTime")
+ .HasColumnName("CreationTime")
+ .HasColumnType("datetime2");
+
+ b.Property("CreatorId")
+ .HasColumnName("CreatorId")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("DeleterId")
+ .HasColumnName("DeleterId")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("DeletionTime")
+ .HasColumnName("DeletionTime")
+ .HasColumnType("datetime2");
+
+ b.Property("Description")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("ExtraProperties")
+ .HasColumnName("ExtraProperties")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("IsDeleted")
+ .ValueGeneratedOnAdd()
+ .HasColumnName("IsDeleted")
+ .HasColumnType("bit")
+ .HasDefaultValue(false);
+
+ b.Property("LastModificationTime")
+ .HasColumnName("LastModificationTime")
+ .HasColumnType("datetime2");
+
+ b.Property("LastModifierId")
+ .HasColumnName("LastModifierId")
+ .HasColumnType("uniqueidentifier");
+
+ b.HasKey("Id");
+
+ b.ToTable("EShopProductsProductDetails");
+ });
+
+ modelBuilder.Entity("EasyAbp.EShop.Products.ProductHistories.ProductHistory", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("ConcurrencyStamp")
+ .IsConcurrencyToken()
+ .HasColumnName("ConcurrencyStamp")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("ExtraProperties")
+ .HasColumnName("ExtraProperties")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("ModificationTime")
+ .HasColumnType("datetime2");
+
+ b.Property("ProductId")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("SerializedEntityData")
+ .HasColumnType("nvarchar(max)");
+
+ b.HasKey("Id");
+
+ b.HasIndex("ModificationTime");
+
+ b.HasIndex("ProductId");
+
+ b.ToTable("EShopProductsProductHistories");
+ });
+
+ modelBuilder.Entity("EasyAbp.EShop.Products.ProductStores.ProductStore", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("ConcurrencyStamp")
+ .IsConcurrencyToken()
+ .HasColumnName("ConcurrencyStamp")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("CreationTime")
+ .HasColumnName("CreationTime")
+ .HasColumnType("datetime2");
+
+ b.Property("CreatorId")
+ .HasColumnName("CreatorId")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("DeleterId")
+ .HasColumnName("DeleterId")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("DeletionTime")
+ .HasColumnName("DeletionTime")
+ .HasColumnType("datetime2");
+
+ b.Property("ExtraProperties")
+ .HasColumnName("ExtraProperties")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("IsDeleted")
+ .ValueGeneratedOnAdd()
+ .HasColumnName("IsDeleted")
+ .HasColumnType("bit")
+ .HasDefaultValue(false);
+
+ b.Property("IsOwner")
+ .HasColumnType("bit");
+
+ b.Property("LastModificationTime")
+ .HasColumnName("LastModificationTime")
+ .HasColumnType("datetime2");
+
+ b.Property("LastModifierId")
+ .HasColumnName("LastModifierId")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("ProductId")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("StoreId")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("TenantId")
+ .HasColumnName("TenantId")
+ .HasColumnType("uniqueidentifier");
+
+ b.HasKey("Id");
+
+ b.ToTable("EShopProductsProductStores");
+ });
+
+ modelBuilder.Entity("EasyAbp.EShop.Products.ProductTags.ProductTag", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("ConcurrencyStamp")
+ .IsConcurrencyToken()
+ .HasColumnName("ConcurrencyStamp")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("CreationTime")
+ .HasColumnName("CreationTime")
+ .HasColumnType("datetime2");
+
+ b.Property("CreatorId")
+ .HasColumnName("CreatorId")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("DisplayOrder")
+ .HasColumnType("int");
+
+ b.Property("ExtraProperties")
+ .HasColumnName("ExtraProperties")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("LastModificationTime")
+ .HasColumnName("LastModificationTime")
+ .HasColumnType("datetime2");
+
+ b.Property("LastModifierId")
+ .HasColumnName("LastModifierId")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("ProductId")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("TagId")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("TenantId")
+ .HasColumnName("TenantId")
+ .HasColumnType("uniqueidentifier");
+
+ b.HasKey("Id");
+
+ b.HasIndex("ProductId");
+
+ b.HasIndex("TagId");
+
+ b.ToTable("EShopProductsProductTags");
+ });
+
+ modelBuilder.Entity("EasyAbp.EShop.Products.ProductTypes.ProductType", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("ConcurrencyStamp")
+ .IsConcurrencyToken()
+ .HasColumnName("ConcurrencyStamp")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("CreationTime")
+ .HasColumnName("CreationTime")
+ .HasColumnType("datetime2");
+
+ b.Property("CreatorId")
+ .HasColumnName("CreatorId")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("DeleterId")
+ .HasColumnName("DeleterId")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("DeletionTime")
+ .HasColumnName("DeletionTime")
+ .HasColumnType("datetime2");
+
+ b.Property("Description")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("DisplayName")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("ExtraProperties")
+ .HasColumnName("ExtraProperties")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("IsDeleted")
+ .ValueGeneratedOnAdd()
+ .HasColumnName("IsDeleted")
+ .HasColumnType("bit")
+ .HasDefaultValue(false);
+
+ b.Property("LastModificationTime")
+ .HasColumnName("LastModificationTime")
+ .HasColumnType("datetime2");
+
+ b.Property("LastModifierId")
+ .HasColumnName("LastModifierId")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("MultiTenancySide")
+ .HasColumnType("int");
+
+ b.Property("Name")
+ .HasColumnType("nvarchar(max)");
+
+ b.HasKey("Id");
+
+ b.ToTable("EShopProductsProductTypes");
+ });
+
+ modelBuilder.Entity("EasyAbp.EShop.Products.Products.Product", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("Code")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("ConcurrencyStamp")
+ .IsConcurrencyToken()
+ .HasColumnName("ConcurrencyStamp")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("CreationTime")
+ .HasColumnName("CreationTime")
+ .HasColumnType("datetime2");
+
+ b.Property("CreatorId")
+ .HasColumnName("CreatorId")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("DeleterId")
+ .HasColumnName("DeleterId")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("DeletionTime")
+ .HasColumnName("DeletionTime")
+ .HasColumnType("datetime2");
+
+ b.Property("DisplayName")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("DisplayOrder")
+ .HasColumnType("int");
+
+ b.Property("ExtraProperties")
+ .HasColumnName("ExtraProperties")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("InventoryStrategy")
+ .HasColumnType("int");
+
+ b.Property("IsDeleted")
+ .ValueGeneratedOnAdd()
+ .HasColumnName("IsDeleted")
+ .HasColumnType("bit")
+ .HasDefaultValue(false);
+
+ b.Property("IsHidden")
+ .HasColumnType("bit");
+
+ b.Property("IsPublished")
+ .HasColumnType("bit");
+
+ b.Property("IsStatic")
+ .HasColumnType("bit");
+
+ b.Property("LastModificationTime")
+ .HasColumnName("LastModificationTime")
+ .HasColumnType("datetime2");
+
+ b.Property("LastModifierId")
+ .HasColumnName("LastModifierId")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("MediaResources")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("ProductDetailId")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("ProductTypeId")
+ .HasColumnType("uniqueidentifier");
+
+ b.HasKey("Id");
+
+ b.ToTable("EShopProductsProducts");
+ });
+
+ modelBuilder.Entity("EasyAbp.EShop.Products.Products.ProductAttribute", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("CreationTime")
+ .HasColumnName("CreationTime")
+ .HasColumnType("datetime2");
+
+ b.Property("CreatorId")
+ .HasColumnName("CreatorId")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("DeleterId")
+ .HasColumnName("DeleterId")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("DeletionTime")
+ .HasColumnName("DeletionTime")
+ .HasColumnType("datetime2");
+
+ b.Property("Description")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("DisplayName")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("DisplayOrder")
+ .HasColumnType("int");
+
+ b.Property("IsDeleted")
+ .ValueGeneratedOnAdd()
+ .HasColumnName("IsDeleted")
+ .HasColumnType("bit")
+ .HasDefaultValue(false);
+
+ b.Property("LastModificationTime")
+ .HasColumnName("LastModificationTime")
+ .HasColumnType("datetime2");
+
+ b.Property("LastModifierId")
+ .HasColumnName("LastModifierId")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("ProductId")
+ .HasColumnType("uniqueidentifier");
+
+ b.HasKey("Id");
+
+ b.HasIndex("ProductId");
+
+ b.ToTable("EShopProductsProductAttributes");
+ });
+
+ modelBuilder.Entity("EasyAbp.EShop.Products.Products.ProductAttributeOption", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("CreationTime")
+ .HasColumnName("CreationTime")
+ .HasColumnType("datetime2");
+
+ b.Property("CreatorId")
+ .HasColumnName("CreatorId")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("DeleterId")
+ .HasColumnName("DeleterId")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("DeletionTime")
+ .HasColumnName("DeletionTime")
+ .HasColumnType("datetime2");
+
+ b.Property("Description")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("DisplayName")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("DisplayOrder")
+ .HasColumnType("int");
+
+ b.Property("IsDeleted")
+ .ValueGeneratedOnAdd()
+ .HasColumnName("IsDeleted")
+ .HasColumnType("bit")
+ .HasDefaultValue(false);
+
+ b.Property("LastModificationTime")
+ .HasColumnName("LastModificationTime")
+ .HasColumnType("datetime2");
+
+ b.Property("LastModifierId")
+ .HasColumnName("LastModifierId")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("ProductAttributeId")
+ .HasColumnType("uniqueidentifier");
+
+ b.HasKey("Id");
+
+ b.HasIndex("ProductAttributeId");
+
+ b.ToTable("EShopProductsProductAttributeOptions");
+ });
+
+ modelBuilder.Entity("EasyAbp.EShop.Products.Products.ProductSku", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("Code")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property