diff --git a/.github/workflows/publish-docs.yml b/.github/workflows/publish-docs.yml
index 875e20d46..85b0cc357 100644
--- a/.github/workflows/publish-docs.yml
+++ b/.github/workflows/publish-docs.yml
@@ -3,7 +3,6 @@ on:
push:
branches:
- master
- - main
jobs:
publish:
runs-on: ubuntu-latest
@@ -33,7 +32,6 @@ jobs:
cp -rf ../docs/ docs/.vuepress/public/modules/${{ github.event.repository.name }}
git add --all
echo "##[set-output name=diff;]$(git diff --staged)"
-
- name: Commit files
if: steps.change.outputs.diff
run: |
@@ -42,7 +40,6 @@ jobs:
git config --local user.email "action@github.com"
git config --local user.name "GitHub Action"
git commit -m "Update the docs of ${{ github.event.repository.name }}" -a
-
- name: Push changes
if: steps.change.outputs.diff
uses: ad-m/github-push-action@master
diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml
index a77494e47..36b0a77dc 100644
--- a/.github/workflows/publish.yml
+++ b/.github/workflows/publish.yml
@@ -10,6 +10,9 @@ jobs:
steps:
- uses: actions/checkout@v2
- uses: NuGet/setup-nuget@v1.0.5
+ - uses: actions/setup-dotnet@v1
+ with:
+ dotnet-version: '6.0.x'
- name: read common.props
id: commonProps
@@ -39,8 +42,16 @@ jobs:
cd dest
del * -Exclude EasyAbp.*
del * -Exclude *.${{ steps.getVersion.outputs.first_match }}.nupkg
- del *.HttpApi.Client.ConsoleTestApp*
- del *.Host.Shared*
+ del *.Blazor.Host.*
+ del *.Blazor.Server.Host.*
+ del *.Host.Shared.*
+ del *.HttpApi.Host.*
+ del *.IdentityServer.*
+ del *.Web.Host.*
+ del *.Web.Unified.*
+ del *.HttpApi.Client.ConsoleTestApp.*
+ del *.Tests.*
+ del *.TestBase.*
dir -name
- name: dotnet nuget push to GitHub
diff --git a/Directory.Build.props b/Directory.Build.props
index 565a3ed14..414889041 100644
--- a/Directory.Build.props
+++ b/Directory.Build.props
@@ -1,10 +1,10 @@
- 4.4.0
- 2.4.0
- 1.10.3
- 0.7.1
+ 5.0.1
+ 2.5.1
+ 2.0.1
+ 0.8.1
\ No newline at end of file
diff --git a/azure-pipelines.yml b/azure-pipelines.yml
index 330868f17..a9ff706d1 100644
--- a/azure-pipelines.yml
+++ b/azure-pipelines.yml
@@ -26,7 +26,7 @@ stages:
- task: UseDotNet@2
inputs:
packageType: 'sdk'
- version: '5.0.102'
+ version: '6.x'
- task: DotNetCoreCLI@2
displayName: 'restore'
@@ -94,7 +94,7 @@ stages:
- task: UseDotNet@2
inputs:
packageType: 'sdk'
- version: '5.x'
+ version: '6.x'
- task: CmdLine@2
displayName: 'install dotnet-ef'
diff --git a/common.props b/common.props
index e711ad93a..0c5ba6172 100644
--- a/common.props
+++ b/common.props
@@ -1,7 +1,7 @@
latest
- 2.3.2
+ 2.4.0
$(NoWarn);CS1591
true
EasyAbp Team
@@ -20,7 +20,7 @@
-
+
all
runtime; build; native; contentfiles; analyzers
diff --git a/docs/README.md b/docs/README.md
index 1f5552833..07f4d69e9 100644
--- a/docs/README.md
+++ b/docs/README.md
@@ -3,6 +3,7 @@
[![ABP version](https://img.shields.io/badge/dynamic/xml?style=flat-square&color=yellow&label=abp&query=%2F%2FProject%2FPropertyGroup%2FAbpVersion&url=https%3A%2F%2Fraw.githubusercontent.com%2FEasyAbp%2FEShop%2Fmaster%2FDirectory.Build.props)](https://abp.io)
[![NuGet](https://img.shields.io/nuget/v/EasyAbp.EShop.Domain.Shared.svg?style=flat-square)](https://www.nuget.org/packages/EasyAbp.EShop.Domain.Shared)
[![NuGet Download](https://img.shields.io/nuget/dt/EasyAbp.EShop.Domain.Shared.svg?style=flat-square)](https://www.nuget.org/packages/EasyAbp.EShop.Domain.Shared)
+[![Discord online](https://badgen.net/discord/online-members/S6QaezrCRq?label=Discord)](https://discord.gg/S6QaezrCRq)
[![GitHub stars](https://img.shields.io/github/stars/EasyAbp/EShop?style=social)](https://www.github.com/EasyAbp/EShop)
An abp application module group that provides basic e-shop service.
diff --git a/integration/EasyAbp.EShop/src/EasyAbp.EShop.Application.Contracts/EasyAbp/EShop/EShopRemoteServiceConsts.cs b/integration/EasyAbp.EShop/src/EasyAbp.EShop.Application.Contracts/EasyAbp/EShop/EShopRemoteServiceConsts.cs
new file mode 100644
index 000000000..e7b34b0cc
--- /dev/null
+++ b/integration/EasyAbp.EShop/src/EasyAbp.EShop.Application.Contracts/EasyAbp/EShop/EShopRemoteServiceConsts.cs
@@ -0,0 +1,8 @@
+namespace EasyAbp.EShop;
+
+public class EShopRemoteServiceConsts
+{
+ public const string RemoteServiceName = "EasyAbpEShop";
+
+ public const string ModuleName = "easyAbpEShop";
+}
\ No newline at end of file
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 3fce27de7..d89e7aee7 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
@@ -23,7 +23,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 75aad6bcc..2ebbd0052 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
@@ -3,7 +3,7 @@
- netstandard2.1
+ net6.0
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 94f36fd0c..38293e176 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
@@ -17,4 +17,9 @@
+
+
+
+
+
diff --git a/integration/EasyAbp.EShop/src/EasyAbp.EShop.HttpApi.Client/EasyAbp/EShop/EShopHttpApiClientModule.cs b/integration/EasyAbp.EShop/src/EasyAbp.EShop.HttpApi.Client/EasyAbp/EShop/EShopHttpApiClientModule.cs
index c75412702..d4c0b88a1 100644
--- a/integration/EasyAbp.EShop/src/EasyAbp.EShop.HttpApi.Client/EasyAbp/EShop/EShopHttpApiClientModule.cs
+++ b/integration/EasyAbp.EShop/src/EasyAbp.EShop.HttpApi.Client/EasyAbp/EShop/EShopHttpApiClientModule.cs
@@ -6,6 +6,7 @@
using Microsoft.Extensions.DependencyInjection;
using Volo.Abp.Http.Client;
using Volo.Abp.Modularity;
+using Volo.Abp.VirtualFileSystem;
namespace EasyAbp.EShop
{
@@ -20,7 +21,7 @@ namespace EasyAbp.EShop
)]
public class EShopHttpApiClientModule : AbpModule
{
- public const string RemoteServiceName = "EShop";
+ public const string RemoteServiceName = EShopRemoteServiceConsts.RemoteServiceName;
public override void ConfigureServices(ServiceConfigurationContext context)
{
@@ -28,6 +29,11 @@ public override void ConfigureServices(ServiceConfigurationContext context)
typeof(EShopApplicationContractsModule).Assembly,
RemoteServiceName
);
+
+ Configure(options =>
+ {
+ options.FileSets.AddEmbedded();
+ });
}
}
}
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 949357eb0..bc403f4dd 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
@@ -3,7 +3,7 @@
- net5.0
+ net6.0
diff --git a/integration/EasyAbp.EShop/src/EasyAbp.EShop.HttpApi/EasyAbp/EShop/EShopController.cs b/integration/EasyAbp.EShop/src/EasyAbp.EShop.HttpApi/EasyAbp/EShop/EShopController.cs
index ec54a7f24..4a8c58e48 100644
--- a/integration/EasyAbp.EShop/src/EasyAbp.EShop.HttpApi/EasyAbp/EShop/EShopController.cs
+++ b/integration/EasyAbp.EShop/src/EasyAbp.EShop.HttpApi/EasyAbp/EShop/EShopController.cs
@@ -1,9 +1,11 @@
using EasyAbp.EShop.Localization;
+using Microsoft.AspNetCore.Mvc;
using Volo.Abp.AspNetCore.Mvc;
namespace EasyAbp.EShop
{
- public abstract class EShopController : AbpController
+ [Area(EShopRemoteServiceConsts.ModuleName)]
+ public abstract class EShopController : AbpControllerBase
{
protected EShopController()
{
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 68bb8f032..2045e7480 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
@@ -3,7 +3,7 @@
- net5.0
+ net6.0
diff --git a/integration/EasyAbp.EShop/src/EasyAbp.EShop.Web/EShopWebModule.cs b/integration/EasyAbp.EShop/src/EasyAbp.EShop.Web/EShopWebModule.cs
index da8f396f7..4514591cb 100644
--- a/integration/EasyAbp.EShop/src/EasyAbp.EShop.Web/EShopWebModule.cs
+++ b/integration/EasyAbp.EShop/src/EasyAbp.EShop.Web/EShopWebModule.cs
@@ -17,7 +17,7 @@
namespace EasyAbp.EShop.Web
{
[DependsOn(
- typeof(EShopHttpApiModule),
+ typeof(EShopApplicationContractsModule),
typeof(AbpAspNetCoreMvcUiThemeSharedModule),
typeof(AbpAutoMapperModule),
typeof(EShopOrdersWebModule),
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 d51b3c0dc..4aa640cb6 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
@@ -3,7 +3,7 @@
- net5.0
+ net6.0
$(AssetTargetFallback);portable-net45+win8+wp8+wpa81;
true
Library
@@ -22,11 +22,11 @@
-
+
-
+
diff --git a/integration/EasyAbp.EShop/test/EasyAbp.EShop.Application.Tests/EasyAbp.EShop.Application.Tests.csproj b/integration/EasyAbp.EShop/test/EasyAbp.EShop.Application.Tests/EasyAbp.EShop.Application.Tests.csproj
index 86ca570ed..91017aa44 100644
--- a/integration/EasyAbp.EShop/test/EasyAbp.EShop.Application.Tests/EasyAbp.EShop.Application.Tests.csproj
+++ b/integration/EasyAbp.EShop/test/EasyAbp.EShop.Application.Tests/EasyAbp.EShop.Application.Tests.csproj
@@ -1,16 +1,14 @@
-
-
- net5.0
+ net6.0
-
+
diff --git a/integration/EasyAbp.EShop/test/EasyAbp.EShop.Domain.Tests/EasyAbp.EShop.Domain.Tests.csproj b/integration/EasyAbp.EShop/test/EasyAbp.EShop.Domain.Tests/EasyAbp.EShop.Domain.Tests.csproj
index bd17801dd..f8a722de3 100644
--- a/integration/EasyAbp.EShop/test/EasyAbp.EShop.Domain.Tests/EasyAbp.EShop.Domain.Tests.csproj
+++ b/integration/EasyAbp.EShop/test/EasyAbp.EShop.Domain.Tests/EasyAbp.EShop.Domain.Tests.csproj
@@ -1,14 +1,12 @@
-
-
- net5.0
+ net6.0
-
+
diff --git a/integration/EasyAbp.EShop/test/EasyAbp.EShop.EntityFrameworkCore.Tests/EasyAbp.EShop.EntityFrameworkCore.Tests.csproj b/integration/EasyAbp.EShop/test/EasyAbp.EShop.EntityFrameworkCore.Tests/EasyAbp.EShop.EntityFrameworkCore.Tests.csproj
index b1f444eb2..aae461566 100644
--- a/integration/EasyAbp.EShop/test/EasyAbp.EShop.EntityFrameworkCore.Tests/EasyAbp.EShop.EntityFrameworkCore.Tests.csproj
+++ b/integration/EasyAbp.EShop/test/EasyAbp.EShop.EntityFrameworkCore.Tests/EasyAbp.EShop.EntityFrameworkCore.Tests.csproj
@@ -1,17 +1,15 @@
-
-
- net5.0
+ net6.0
-
-
-
-
+
+
+
+
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 7ce7db12b..cfb606b6b 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
@@ -2,7 +2,7 @@
Exe
- net5.0
+ net6.0
@@ -20,7 +20,7 @@
-
+
diff --git a/integration/EasyAbp.EShop/test/EasyAbp.EShop.MongoDB.Tests/EasyAbp.EShop.MongoDB.Tests.csproj b/integration/EasyAbp.EShop/test/EasyAbp.EShop.MongoDB.Tests/EasyAbp.EShop.MongoDB.Tests.csproj
index d66f2a9d7..f3e2cc049 100644
--- a/integration/EasyAbp.EShop/test/EasyAbp.EShop.MongoDB.Tests/EasyAbp.EShop.MongoDB.Tests.csproj
+++ b/integration/EasyAbp.EShop/test/EasyAbp.EShop.MongoDB.Tests/EasyAbp.EShop.MongoDB.Tests.csproj
@@ -1,15 +1,13 @@
-
-
- net5.0
+ net6.0
-
-
+
+
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 293f881e7..2e031b84d 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
@@ -1,14 +1,12 @@
-
-
- net5.0
+ net6.0
-
+
diff --git a/modules/EasyAbp.EShop.Orders/src/EasyAbp.EShop.Orders.Application.Contracts/EasyAbp/EShop/Orders/EShopOrdersRemoteServiceConsts.cs b/modules/EasyAbp.EShop.Orders/src/EasyAbp.EShop.Orders.Application.Contracts/EasyAbp/EShop/Orders/EShopOrdersRemoteServiceConsts.cs
new file mode 100644
index 000000000..2f4da5098
--- /dev/null
+++ b/modules/EasyAbp.EShop.Orders/src/EasyAbp.EShop.Orders.Application.Contracts/EasyAbp/EShop/Orders/EShopOrdersRemoteServiceConsts.cs
@@ -0,0 +1,8 @@
+namespace EasyAbp.EShop.Orders;
+
+public class EShopOrdersRemoteServiceConsts
+{
+ public const string RemoteServiceName = "EasyAbpEShopOrders";
+
+ public const string ModuleName = "easyAbpEShopOrders";
+}
\ No newline at end of file
diff --git a/modules/EasyAbp.EShop.Orders/src/EasyAbp.EShop.Orders.Application/EasyAbp/EShop/Orders/Orders/OrderAppService.cs b/modules/EasyAbp.EShop.Orders/src/EasyAbp.EShop.Orders.Application/EasyAbp/EShop/Orders/Orders/OrderAppService.cs
index f22406f59..c63969f8f 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
@@ -106,7 +106,7 @@ await AuthorizationService.CheckAsync(
protected virtual async Task DiscountOrderAsync(Order order, Dictionary productDict)
{
- foreach (var provider in ServiceProvider.GetServices())
+ foreach (var provider in LazyServiceProvider.LazyGetService>())
{
await provider.DiscountAsync(order, productDict);
}
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 56d46bed8..cee825f54 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
@@ -10,6 +10,7 @@
+
@@ -20,7 +21,7 @@
-
+
diff --git a/modules/EasyAbp.EShop.Orders/src/EasyAbp.EShop.Orders.Domain.Shared/EasyAbp/EShop/Orders/EShopOrdersDomainSharedModule.cs b/modules/EasyAbp.EShop.Orders/src/EasyAbp.EShop.Orders.Domain.Shared/EasyAbp/EShop/Orders/EShopOrdersDomainSharedModule.cs
index e372e6589..2bf5fdd1b 100644
--- a/modules/EasyAbp.EShop.Orders/src/EasyAbp.EShop.Orders.Domain.Shared/EasyAbp/EShop/Orders/EShopOrdersDomainSharedModule.cs
+++ b/modules/EasyAbp.EShop.Orders/src/EasyAbp.EShop.Orders.Domain.Shared/EasyAbp/EShop/Orders/EShopOrdersDomainSharedModule.cs
@@ -3,6 +3,7 @@
using EasyAbp.EShop.Orders.Localization;
using EasyAbp.EShop.Payments;
using EasyAbp.EShop.Stores;
+using Volo.Abp.Auditing;
using Volo.Abp.Localization.ExceptionHandling;
using Volo.Abp.Validation;
using Volo.Abp.Validation.Localization;
@@ -12,6 +13,7 @@ namespace EasyAbp.EShop.Orders
{
[DependsOn(
typeof(AbpValidationModule),
+ typeof(AbpAuditingContractsModule),
typeof(EShopStoresDomainSharedModule),
typeof(EShopPaymentsDomainSharedModule)
)]
diff --git a/modules/EasyAbp.EShop.Orders/src/EasyAbp.EShop.Orders.Domain.Shared/EasyAbp/EShop/Orders/Orders/OrderEto.cs b/modules/EasyAbp.EShop.Orders/src/EasyAbp.EShop.Orders.Domain.Shared/EasyAbp/EShop/Orders/Orders/OrderEto.cs
index bc9ed6e05..c2e3e26e1 100644
--- a/modules/EasyAbp.EShop.Orders/src/EasyAbp.EShop.Orders.Domain.Shared/EasyAbp/EShop/Orders/Orders/OrderEto.cs
+++ b/modules/EasyAbp.EShop.Orders/src/EasyAbp.EShop.Orders.Domain.Shared/EasyAbp/EShop/Orders/Orders/OrderEto.cs
@@ -1,12 +1,13 @@
using System;
using System.Collections.Generic;
+using Volo.Abp.Auditing;
using Volo.Abp.Data;
using Volo.Abp.MultiTenancy;
namespace EasyAbp.EShop.Orders.Orders
{
[Serializable]
- public class OrderEto : IOrder, IMultiTenant
+ public class OrderEto : IOrder, IFullAuditedObject, IMultiTenant
{
public Guid Id { get; set; }
@@ -55,5 +56,18 @@ public class OrderEto : IOrder, IMultiTenant
public List OrderLines { get; set; }
public ExtraPropertyDictionary ExtraProperties { get; set; }
+ public DateTime CreationTime { get; set; }
+
+ public Guid? CreatorId { get; set; }
+
+ public DateTime? LastModificationTime { get; set; }
+
+ public Guid? LastModifierId { get; set; }
+
+ public bool IsDeleted { get; set; }
+
+ public DateTime? DeletionTime { get; set; }
+
+ public Guid? DeleterId { get; set; }
}
}
\ No newline at end of file
diff --git a/modules/EasyAbp.EShop.Orders/src/EasyAbp.EShop.Orders.Domain/EasyAbp/EShop/Orders/Orders/DefaultUnpaidOrderAutoCancelProvider.cs b/modules/EasyAbp.EShop.Orders/src/EasyAbp.EShop.Orders.Domain/EasyAbp/EShop/Orders/Orders/DefaultUnpaidOrderAutoCancelProvider.cs
deleted file mode 100644
index e8adf131c..000000000
--- a/modules/EasyAbp.EShop.Orders/src/EasyAbp.EShop.Orders.Domain/EasyAbp/EShop/Orders/Orders/DefaultUnpaidOrderAutoCancelProvider.cs
+++ /dev/null
@@ -1,66 +0,0 @@
-using System.Threading.Tasks;
-using Volo.Abp.BackgroundJobs;
-using Volo.Abp.DependencyInjection;
-using Volo.Abp.Domain.Entities.Events;
-using Volo.Abp.EventBus;
-using Volo.Abp.EventBus.Distributed;
-using Volo.Abp.Timing;
-using Volo.Abp.Uow;
-
-namespace EasyAbp.EShop.Orders.Orders
-{
- [Dependency(TryRegister = true)]
- [UnitOfWork]
- public class DefaultUnpaidOrderAutoCancelProvider :
- IUnpaidOrderAutoCancelProvider,
- ILocalEventHandler>,
- ILocalEventHandler,
- ITransientDependency
- {
- private readonly IClock _clock;
- private readonly IOrderManager _orderManager;
- private readonly IBackgroundJobManager _backgroundJobManager;
-
- public DefaultUnpaidOrderAutoCancelProvider(
- IClock clock,
- IOrderManager orderManager,
- IBackgroundJobManager backgroundJobManager)
- {
- _clock = clock;
- _orderManager = orderManager;
- _backgroundJobManager = backgroundJobManager;
- }
-
- public virtual async Task HandleEventAsync(EntityCreatedEventData eventData)
- {
- if (!eventData.Entity.PaymentExpiration.HasValue)
- {
- return;
- }
-
- var args = new UnpaidOrderAutoCancelArgs
- {
- TenantId = eventData.Entity.TenantId,
- OrderId = eventData.Entity.Id
- };
-
- await _backgroundJobManager.EnqueueAsync(
- args: args,
- delay: eventData.Entity.PaymentExpiration.Value.Subtract(_clock.Now) // Todo: use a absolute time.
- );
- }
-
- public virtual async Task HandleEventAsync(OrderPaymentIdChangedEto eventData)
- {
- if (!eventData.Order.PaymentExpiration.HasValue || eventData.ToPaymentId.HasValue)
- {
- return;
- }
-
- if (_clock.Now > eventData.Order.PaymentExpiration.Value && !eventData.Order.CanceledTime.HasValue)
- {
- await _orderManager.CancelAsync(eventData.Order, OrdersConsts.CancellationReason);
- }
- }
- }
-}
\ No newline at end of file
diff --git a/modules/EasyAbp.EShop.Orders/src/EasyAbp.EShop.Orders.Domain/EasyAbp/EShop/Orders/Orders/IUnpaidOrderAutoCancelProvider.cs b/modules/EasyAbp.EShop.Orders/src/EasyAbp.EShop.Orders.Domain/EasyAbp/EShop/Orders/Orders/IUnpaidOrderAutoCancelProvider.cs
deleted file mode 100644
index 1fd31320f..000000000
--- a/modules/EasyAbp.EShop.Orders/src/EasyAbp.EShop.Orders.Domain/EasyAbp/EShop/Orders/Orders/IUnpaidOrderAutoCancelProvider.cs
+++ /dev/null
@@ -1,7 +0,0 @@
-namespace EasyAbp.EShop.Orders.Orders
-{
- public interface IUnpaidOrderAutoCancelProvider
- {
-
- }
-}
\ No newline at end of file
diff --git a/modules/EasyAbp.EShop.Orders/src/EasyAbp.EShop.Orders.Domain/EasyAbp/EShop/Orders/Orders/Order.cs b/modules/EasyAbp.EShop.Orders/src/EasyAbp.EShop.Orders.Domain/EasyAbp/EShop/Orders/Orders/Order.cs
index 4c038fd02..317a16dc7 100644
--- a/modules/EasyAbp.EShop.Orders/src/EasyAbp.EShop.Orders.Domain/EasyAbp/EShop/Orders/Orders/Order.cs
+++ b/modules/EasyAbp.EShop.Orders/src/EasyAbp.EShop.Orders.Domain/EasyAbp/EShop/Orders/Orders/Order.cs
@@ -127,8 +127,6 @@ public void SetPaymentExpiration(DateTime? paymentExpiration)
public void SetPaymentId(Guid? paymentId)
{
- AddLocalEvent(new OrderPaymentIdChangedEto(TenantId, this, PaymentId, paymentId));
-
PaymentId = paymentId;
}
diff --git a/modules/EasyAbp.EShop.Orders/src/EasyAbp.EShop.Orders.Domain/EasyAbp/EShop/Orders/Orders/OrderAutoCancelOnCreatedHandler.cs b/modules/EasyAbp.EShop.Orders/src/EasyAbp.EShop.Orders.Domain/EasyAbp/EShop/Orders/Orders/OrderAutoCancelOnCreatedHandler.cs
new file mode 100644
index 000000000..69ad84f79
--- /dev/null
+++ b/modules/EasyAbp.EShop.Orders/src/EasyAbp.EShop.Orders.Domain/EasyAbp/EShop/Orders/Orders/OrderAutoCancelOnCreatedHandler.cs
@@ -0,0 +1,40 @@
+using System.Threading.Tasks;
+using Volo.Abp.BackgroundJobs;
+using Volo.Abp.DependencyInjection;
+using Volo.Abp.Domain.Entities.Events.Distributed;
+using Volo.Abp.EventBus.Distributed;
+
+namespace EasyAbp.EShop.Orders.Orders
+{
+ public class OrderAutoCancelOnCreatedHandler :
+ IDistributedEventHandler>,
+ ITransientDependency
+ {
+ private readonly IBackgroundJobManager _backgroundJobManager;
+
+ public OrderAutoCancelOnCreatedHandler(
+ IBackgroundJobManager backgroundJobManager)
+ {
+ _backgroundJobManager = backgroundJobManager;
+ }
+
+ public virtual async Task HandleEventAsync(EntityCreatedEto eventData)
+ {
+ if (!eventData.Entity.PaymentExpiration.HasValue)
+ {
+ return;
+ }
+
+ var args = new UnpaidOrderAutoCancelArgs
+ {
+ TenantId = eventData.Entity.TenantId,
+ OrderId = eventData.Entity.Id
+ };
+
+ await _backgroundJobManager.EnqueueAsync(
+ args: args,
+ delay: eventData.Entity.PaymentExpiration.Value.Subtract(eventData.Entity.CreationTime) // Todo: use a absolute time.
+ );
+ }
+ }
+}
\ No newline at end of file
diff --git a/modules/EasyAbp.EShop.Orders/src/EasyAbp.EShop.Orders.Domain/EasyAbp/EShop/Orders/Orders/OrderAutoCancelOnUpdatedHandler.cs b/modules/EasyAbp.EShop.Orders/src/EasyAbp.EShop.Orders.Domain/EasyAbp/EShop/Orders/Orders/OrderAutoCancelOnUpdatedHandler.cs
new file mode 100644
index 000000000..93d77f0d7
--- /dev/null
+++ b/modules/EasyAbp.EShop.Orders/src/EasyAbp.EShop.Orders.Domain/EasyAbp/EShop/Orders/Orders/OrderAutoCancelOnUpdatedHandler.cs
@@ -0,0 +1,39 @@
+using System.Threading.Tasks;
+using Volo.Abp.DependencyInjection;
+using Volo.Abp.Domain.Entities.Events;
+using Volo.Abp.EventBus;
+using Volo.Abp.Timing;
+using Volo.Abp.Uow;
+
+namespace EasyAbp.EShop.Orders.Orders
+{
+ public class OrderAutoCancelOnUpdatedHandler :
+ ILocalEventHandler>,
+ ITransientDependency
+ {
+ private readonly IClock _clock;
+ private readonly IOrderManager _orderManager;
+
+ public OrderAutoCancelOnUpdatedHandler(
+ IClock clock,
+ IOrderManager orderManager)
+ {
+ _clock = clock;
+ _orderManager = orderManager;
+ }
+
+ [UnitOfWork(true)]
+ public virtual async Task HandleEventAsync(EntityUpdatedEventData eventData)
+ {
+ if (!eventData.Entity.PaymentExpiration.HasValue || eventData.Entity.PaymentId.HasValue)
+ {
+ return;
+ }
+
+ if (_clock.Now > eventData.Entity.PaymentExpiration.Value && !eventData.Entity.CanceledTime.HasValue)
+ {
+ await _orderManager.CancelAsync(eventData.Entity, OrdersConsts.CancellationReason);
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/modules/EasyAbp.EShop.Orders/src/EasyAbp.EShop.Orders.Domain/EasyAbp/EShop/Orders/Orders/OrderManager.cs b/modules/EasyAbp.EShop.Orders/src/EasyAbp.EShop.Orders.Domain/EasyAbp/EShop/Orders/Orders/OrderManager.cs
index 7bd698312..9d9fdc91f 100644
--- a/modules/EasyAbp.EShop.Orders/src/EasyAbp.EShop.Orders.Domain/EasyAbp/EShop/Orders/Orders/OrderManager.cs
+++ b/modules/EasyAbp.EShop.Orders/src/EasyAbp.EShop.Orders.Domain/EasyAbp/EShop/Orders/Orders/OrderManager.cs
@@ -1,4 +1,5 @@
-using System.Threading.Tasks;
+using System.Collections.Generic;
+using System.Threading.Tasks;
using Microsoft.Extensions.DependencyInjection;
using Volo.Abp.Domain.Services;
using Volo.Abp.EventBus.Distributed;
@@ -30,6 +31,7 @@ public OrderManager(
_orderRepository = orderRepository;
}
+ [UnitOfWork]
public virtual async Task CompleteAsync(Order order)
{
if (order.CompletionTime.HasValue || !order.ReducedInventoryAfterPaymentTime.HasValue)
@@ -37,10 +39,8 @@ public virtual async Task CompleteAsync(Order order)
throw new OrderIsInWrongStageException(order.Id);
}
- var providers = ServiceProvider.GetServices();
+ var providers = LazyServiceProvider.LazyGetService>();
- using var uow = _unitOfWorkManager.Begin(isTransactional: true);
-
foreach (var provider in providers)
{
await provider.CheckAsync(order);
@@ -49,17 +49,15 @@ public virtual async Task CompleteAsync(Order order)
order.SetCompletionTime(_clock.Now);
order.SetOrderStatus(OrderStatus.Completed);
- uow.OnCompleted(async () =>
- await _distributedEventBus.PublishAsync(
- new OrderCompletedEto(_objectMapper.Map(order))));
-
await _orderRepository.UpdateAsync(order, true);
- await uow.CompleteAsync();
-
+ await _distributedEventBus.PublishAsync(new OrderCompletedEto(_objectMapper.Map(order)));
+
return order;
}
+ // Todo: should handler the inventory rollback.
+ [UnitOfWork]
public virtual async Task CancelAsync(Order order, string cancellationReason)
{
if (order.CanceledTime.HasValue)
@@ -72,18 +70,12 @@ public virtual async Task CancelAsync(Order order, string cancellationRea
throw new OrderIsInWrongStageException(order.Id);
}
- using var uow = _unitOfWorkManager.Begin(isTransactional: true);
-
order.SetCanceled(_clock.Now, cancellationReason);
order.SetOrderStatus(OrderStatus.Canceled);
-
- uow.OnCompleted(async () =>
- await _distributedEventBus.PublishAsync(
- new OrderCanceledEto(_objectMapper.Map(order))));
-
+
await _orderRepository.UpdateAsync(order, true);
-
- await uow.CompleteAsync();
+
+ await _distributedEventBus.PublishAsync(new OrderCanceledEto(_objectMapper.Map(order)));
return order;
}
diff --git a/modules/EasyAbp.EShop.Orders/src/EasyAbp.EShop.Orders.Domain/EasyAbp/EShop/Orders/Orders/OrderPaymentIdChangedEto.cs b/modules/EasyAbp.EShop.Orders/src/EasyAbp.EShop.Orders.Domain/EasyAbp/EShop/Orders/Orders/OrderPaymentIdChangedEto.cs
deleted file mode 100644
index 53bb92a24..000000000
--- a/modules/EasyAbp.EShop.Orders/src/EasyAbp.EShop.Orders.Domain/EasyAbp/EShop/Orders/Orders/OrderPaymentIdChangedEto.cs
+++ /dev/null
@@ -1,25 +0,0 @@
-using System;
-using Volo.Abp.MultiTenancy;
-
-namespace EasyAbp.EShop.Orders.Orders
-{
- [Serializable]
- public class OrderPaymentIdChangedEto : IMultiTenant
- {
- public Guid? TenantId { get; set; }
-
- public Order Order { get; set; }
-
- public Guid? FromPaymentId { get; set; }
-
- public Guid? ToPaymentId { get; set; }
-
- public OrderPaymentIdChangedEto(Guid? tenantId, Order order, Guid? fromPaymentId, Guid? toPaymentId)
- {
- TenantId = tenantId;
- Order = order;
- FromPaymentId = fromPaymentId;
- ToPaymentId = toPaymentId;
- }
- }
-}
\ No newline at end of file
diff --git a/modules/EasyAbp.EShop.Orders/src/EasyAbp.EShop.Orders.Domain/EasyAbp/EShop/Orders/Orders/PaymentCanceledEventHandler.cs b/modules/EasyAbp.EShop.Orders/src/EasyAbp.EShop.Orders.Domain/EasyAbp/EShop/Orders/Orders/PaymentCanceledEventHandler.cs
index 01d9125a8..827ad8461 100644
--- a/modules/EasyAbp.EShop.Orders/src/EasyAbp.EShop.Orders.Domain/EasyAbp/EShop/Orders/Orders/PaymentCanceledEventHandler.cs
+++ b/modules/EasyAbp.EShop.Orders/src/EasyAbp.EShop.Orders.Domain/EasyAbp/EShop/Orders/Orders/PaymentCanceledEventHandler.cs
@@ -33,6 +33,11 @@ public virtual async Task HandleEventAsync(EShopPaymentCanceledEto eventData)
{
var order = await _orderRepository.GetAsync(Guid.Parse(paymentItem.ItemKey));
+ if (order.PaymentId != eventData.Payment.Id)
+ {
+ continue;
+ }
+
order.SetPaymentId(null);
await _orderRepository.UpdateAsync(order, true);
diff --git a/modules/EasyAbp.EShop.Orders/src/EasyAbp.EShop.Orders.Domain/EasyAbp/EShop/Orders/Orders/PaymentCompletedEventHandler.cs b/modules/EasyAbp.EShop.Orders/src/EasyAbp.EShop.Orders.Domain/EasyAbp/EShop/Orders/Orders/PaymentCompletedEventHandler.cs
index cdfbe6690..321b76e7c 100644
--- a/modules/EasyAbp.EShop.Orders/src/EasyAbp.EShop.Orders.Domain/EasyAbp/EShop/Orders/Orders/PaymentCompletedEventHandler.cs
+++ b/modules/EasyAbp.EShop.Orders/src/EasyAbp.EShop.Orders.Domain/EasyAbp/EShop/Orders/Orders/PaymentCompletedEventHandler.cs
@@ -17,7 +17,6 @@ public class PaymentCompletedEventHandler : IPaymentCompletedEventHandler, ITran
private readonly IClock _clock;
private readonly ICurrentTenant _currentTenant;
private readonly IObjectMapper _objectMapper;
- private readonly IUnitOfWorkManager _unitOfWorkManager;
private readonly IOrderPaymentChecker _orderPaymentChecker;
private readonly IDistributedEventBus _distributedEventBus;
private readonly IOrderRepository _orderRepository;
@@ -26,7 +25,6 @@ public PaymentCompletedEventHandler(
IClock clock,
ICurrentTenant currentTenant,
IObjectMapper objectMapper,
- IUnitOfWorkManager unitOfWorkManager,
IOrderPaymentChecker orderPaymentChecker,
IDistributedEventBus distributedEventBus,
IOrderRepository orderRepository)
@@ -34,12 +32,12 @@ public PaymentCompletedEventHandler(
_clock = clock;
_currentTenant = currentTenant;
_objectMapper = objectMapper;
- _unitOfWorkManager = unitOfWorkManager;
_orderPaymentChecker = orderPaymentChecker;
_distributedEventBus = distributedEventBus;
_orderRepository = orderRepository;
}
+ [UnitOfWork(true)]
public virtual async Task HandleEventAsync(EShopPaymentCompletedEto eventData)
{
var payment = eventData.Payment;
@@ -49,8 +47,6 @@ public virtual async Task HandleEventAsync(EShopPaymentCompletedEto eventData)
return;
}
- using var uow = _unitOfWorkManager.Begin(isTransactional: true);
-
using var currentTenant = _currentTenant.Change(payment.TenantId);
foreach (var item in payment.PaymentItems.Where(item => item.ItemType == PaymentsConsts.PaymentItemType))
@@ -75,12 +71,9 @@ public virtual async Task HandleEventAsync(EShopPaymentCompletedEto eventData)
await _orderRepository.UpdateAsync(order, true);
- uow.OnCompleted(async () =>
- await _distributedEventBus.PublishAsync(new OrderPaidEto(_objectMapper.Map(order),
- payment.Id, item.Id)));
+ await _distributedEventBus.PublishAsync(new OrderPaidEto(_objectMapper.Map(order),
+ payment.Id, item.Id));
}
-
- await uow.CompleteAsync();
}
}
}
\ No newline at end of file
diff --git a/modules/EasyAbp.EShop.Orders/src/EasyAbp.EShop.Orders.Domain/EasyAbp/EShop/Orders/Orders/RefundCompletedEventHandler.cs b/modules/EasyAbp.EShop.Orders/src/EasyAbp.EShop.Orders.Domain/EasyAbp/EShop/Orders/Orders/RefundCompletedEventHandler.cs
index c84d9bb49..6420926aa 100644
--- a/modules/EasyAbp.EShop.Orders/src/EasyAbp.EShop.Orders.Domain/EasyAbp/EShop/Orders/Orders/RefundCompletedEventHandler.cs
+++ b/modules/EasyAbp.EShop.Orders/src/EasyAbp.EShop.Orders.Domain/EasyAbp/EShop/Orders/Orders/RefundCompletedEventHandler.cs
@@ -13,32 +13,29 @@ public class RefundCompletedEventHandler : IDistributedEventHandler await _distributedEventBus.PublishAsync(
- new OrderRefundedEto(_objectMapper.Map(order), eventData.Refund))
- );
+ await _distributedEventBus.PublishAsync(
+ new OrderRefundedEto(_objectMapper.Map(order), eventData.Refund));
}
-
- await uow.CompleteAsync();
}
}
}
\ No newline at end of file
diff --git a/modules/EasyAbp.EShop.Orders/src/EasyAbp.EShop.Orders.Domain/EasyAbp/EShop/Orders/Orders/UnpaidOrderAutoCancelJob.cs b/modules/EasyAbp.EShop.Orders/src/EasyAbp.EShop.Orders.Domain/EasyAbp/EShop/Orders/Orders/UnpaidOrderAutoCancelJob.cs
index 69250252e..7fd788881 100644
--- a/modules/EasyAbp.EShop.Orders/src/EasyAbp.EShop.Orders.Domain/EasyAbp/EShop/Orders/Orders/UnpaidOrderAutoCancelJob.cs
+++ b/modules/EasyAbp.EShop.Orders/src/EasyAbp.EShop.Orders.Domain/EasyAbp/EShop/Orders/Orders/UnpaidOrderAutoCancelJob.cs
@@ -27,7 +27,7 @@ public UnpaidOrderAutoCancelJob(
_distributedEventBus = distributedEventBus;
}
- [UnitOfWork]
+ [UnitOfWork(true)]
public override async Task ExecuteAsync(UnpaidOrderAutoCancelArgs args)
{
using var changeTenant = _currentTenant.Change(args.TenantId);
@@ -41,7 +41,7 @@ public override async Task ExecuteAsync(UnpaidOrderAutoCancelArgs args)
if (order.IsInPayment())
{
- // Cancel the payment and cancel the order in EasyAbp.EShop.Orders.Orders.PaymentCanceledEventHandler
+ // Cancel the payment and then cancel the order in EasyAbp.EShop.Orders.Orders.PaymentCanceledEventHandler
await _distributedEventBus.PublishAsync(new CancelPaymentEto(args.TenantId, order.PaymentId!.Value));
}
else
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 eff808281..8d522e526 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
@@ -3,7 +3,7 @@
- netstandard2.1
+ net6.0
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 446d64ea2..a6afac2a2 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
@@ -12,4 +12,9 @@
+
+
+
+
+
diff --git a/modules/EasyAbp.EShop.Orders/src/EasyAbp.EShop.Orders.HttpApi.Client/EasyAbp/EShop/Orders/EShopOrdersHttpApiClientModule.cs b/modules/EasyAbp.EShop.Orders/src/EasyAbp.EShop.Orders.HttpApi.Client/EasyAbp/EShop/Orders/EShopOrdersHttpApiClientModule.cs
index 121aa4316..3ef1c9403 100644
--- a/modules/EasyAbp.EShop.Orders/src/EasyAbp.EShop.Orders.HttpApi.Client/EasyAbp/EShop/Orders/EShopOrdersHttpApiClientModule.cs
+++ b/modules/EasyAbp.EShop.Orders/src/EasyAbp.EShop.Orders.HttpApi.Client/EasyAbp/EShop/Orders/EShopOrdersHttpApiClientModule.cs
@@ -1,6 +1,7 @@
using Microsoft.Extensions.DependencyInjection;
using Volo.Abp.Http.Client;
using Volo.Abp.Modularity;
+using Volo.Abp.VirtualFileSystem;
namespace EasyAbp.EShop.Orders
{
@@ -9,7 +10,7 @@ namespace EasyAbp.EShop.Orders
typeof(AbpHttpClientModule))]
public class EShopOrdersHttpApiClientModule : AbpModule
{
- public const string RemoteServiceName = "EShopOrders";
+ public const string RemoteServiceName = EShopOrdersRemoteServiceConsts.RemoteServiceName;
public override void ConfigureServices(ServiceConfigurationContext context)
{
@@ -17,6 +18,11 @@ public override void ConfigureServices(ServiceConfigurationContext context)
typeof(EShopOrdersApplicationContractsModule).Assembly,
RemoteServiceName
);
+
+ Configure(options =>
+ {
+ options.FileSets.AddEmbedded();
+ });
}
}
}
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 84e16e2ca..5d5abf6cd 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
@@ -3,7 +3,7 @@
- net5.0
+ net6.0
diff --git a/modules/EasyAbp.EShop.Orders/src/EasyAbp.EShop.Orders.HttpApi/EasyAbp/EShop/Orders/Orders/OrderController.cs b/modules/EasyAbp.EShop.Orders/src/EasyAbp.EShop.Orders.HttpApi/EasyAbp/EShop/Orders/Orders/OrderController.cs
index 68ba2aa5e..7e38bc60e 100644
--- a/modules/EasyAbp.EShop.Orders/src/EasyAbp.EShop.Orders.HttpApi/EasyAbp/EShop/Orders/Orders/OrderController.cs
+++ b/modules/EasyAbp.EShop.Orders/src/EasyAbp.EShop.Orders.HttpApi/EasyAbp/EShop/Orders/Orders/OrderController.cs
@@ -7,7 +7,7 @@
namespace EasyAbp.EShop.Orders.Orders
{
- [RemoteService(Name = "EasyAbpEShopOrders")]
+ [RemoteService(Name = EShopOrdersRemoteServiceConsts.RemoteServiceName)]
[Route("/api/e-shop/orders/order")]
public class OrderController : OrdersController, IOrderAppService
{
diff --git a/modules/EasyAbp.EShop.Orders/src/EasyAbp.EShop.Orders.HttpApi/EasyAbp/EShop/Orders/OrdersController.cs b/modules/EasyAbp.EShop.Orders/src/EasyAbp.EShop.Orders.HttpApi/EasyAbp/EShop/Orders/OrdersController.cs
index 11355b0fb..d20ecd1c1 100644
--- a/modules/EasyAbp.EShop.Orders/src/EasyAbp.EShop.Orders.HttpApi/EasyAbp/EShop/Orders/OrdersController.cs
+++ b/modules/EasyAbp.EShop.Orders/src/EasyAbp.EShop.Orders.HttpApi/EasyAbp/EShop/Orders/OrdersController.cs
@@ -1,9 +1,11 @@
using EasyAbp.EShop.Orders.Localization;
+using Microsoft.AspNetCore.Mvc;
using Volo.Abp.AspNetCore.Mvc;
namespace EasyAbp.EShop.Orders
{
- public abstract class OrdersController : AbpController
+ [Area(EShopOrdersRemoteServiceConsts.ModuleName)]
+ public abstract class OrdersController : AbpControllerBase
{
protected OrdersController()
{
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 9b9c37f94..3206c0f89 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
@@ -3,7 +3,7 @@
- net5.0
+ net6.0
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 da82c00e5..d652dd5b8 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
@@ -12,7 +12,7 @@
namespace EasyAbp.EShop.Orders.Web
{
[DependsOn(
- typeof(EShopOrdersHttpApiModule),
+ typeof(EShopOrdersApplicationContractsModule),
typeof(AbpAspNetCoreMvcUiThemeSharedModule),
typeof(AbpAutoMapperModule)
)]
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 ccad2db5f..f6fc5d77a 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
@@ -3,7 +3,7 @@
- net5.0
+ net6.0
$(AssetTargetFallback);portable-net45+win8+wp8+wpa81;
true
Library
@@ -17,12 +17,12 @@
-
+
-
+
diff --git a/modules/EasyAbp.EShop.Orders/test/EasyAbp.EShop.Orders.Application.Tests/EasyAbp.EShop.Orders.Application.Tests.csproj b/modules/EasyAbp.EShop.Orders/test/EasyAbp.EShop.Orders.Application.Tests/EasyAbp.EShop.Orders.Application.Tests.csproj
index 642bd5a39..769592639 100644
--- a/modules/EasyAbp.EShop.Orders/test/EasyAbp.EShop.Orders.Application.Tests/EasyAbp.EShop.Orders.Application.Tests.csproj
+++ b/modules/EasyAbp.EShop.Orders/test/EasyAbp.EShop.Orders.Application.Tests/EasyAbp.EShop.Orders.Application.Tests.csproj
@@ -1,16 +1,14 @@
-
-
- net5.0
+ net6.0
-
+
diff --git a/modules/EasyAbp.EShop.Orders/test/EasyAbp.EShop.Orders.Domain.Tests/EasyAbp.EShop.Orders.Domain.Tests.csproj b/modules/EasyAbp.EShop.Orders/test/EasyAbp.EShop.Orders.Domain.Tests/EasyAbp.EShop.Orders.Domain.Tests.csproj
index 6eff20078..b1396ae37 100644
--- a/modules/EasyAbp.EShop.Orders/test/EasyAbp.EShop.Orders.Domain.Tests/EasyAbp.EShop.Orders.Domain.Tests.csproj
+++ b/modules/EasyAbp.EShop.Orders/test/EasyAbp.EShop.Orders.Domain.Tests/EasyAbp.EShop.Orders.Domain.Tests.csproj
@@ -1,14 +1,12 @@
-
-
- net5.0
+ net6.0
-
+
diff --git a/modules/EasyAbp.EShop.Orders/test/EasyAbp.EShop.Orders.EntityFrameworkCore.Tests/EasyAbp.EShop.Orders.EntityFrameworkCore.Tests.csproj b/modules/EasyAbp.EShop.Orders/test/EasyAbp.EShop.Orders.EntityFrameworkCore.Tests/EasyAbp.EShop.Orders.EntityFrameworkCore.Tests.csproj
index f9d1fc243..3048a2593 100644
--- a/modules/EasyAbp.EShop.Orders/test/EasyAbp.EShop.Orders.EntityFrameworkCore.Tests/EasyAbp.EShop.Orders.EntityFrameworkCore.Tests.csproj
+++ b/modules/EasyAbp.EShop.Orders/test/EasyAbp.EShop.Orders.EntityFrameworkCore.Tests/EasyAbp.EShop.Orders.EntityFrameworkCore.Tests.csproj
@@ -1,17 +1,15 @@
-
-
- net5.0
+ net6.0
-
-
-
-
+
+
+
+
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 1690a18f6..bab44caab 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
@@ -2,7 +2,7 @@
Exe
- net5.0
+ net6.0
@@ -20,7 +20,7 @@
-
+
diff --git a/modules/EasyAbp.EShop.Orders/test/EasyAbp.EShop.Orders.MongoDB.Tests/EasyAbp.EShop.Orders.MongoDB.Tests.csproj b/modules/EasyAbp.EShop.Orders/test/EasyAbp.EShop.Orders.MongoDB.Tests/EasyAbp.EShop.Orders.MongoDB.Tests.csproj
index 301ccaaa5..c0fd900bf 100644
--- a/modules/EasyAbp.EShop.Orders/test/EasyAbp.EShop.Orders.MongoDB.Tests/EasyAbp.EShop.Orders.MongoDB.Tests.csproj
+++ b/modules/EasyAbp.EShop.Orders/test/EasyAbp.EShop.Orders.MongoDB.Tests/EasyAbp.EShop.Orders.MongoDB.Tests.csproj
@@ -1,15 +1,13 @@
-
-
- net5.0
+ net6.0
-
-
+
+
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 298da666d..18f15e515 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
@@ -1,14 +1,12 @@
-
-
- net5.0
+ net6.0
-
+
diff --git a/modules/EasyAbp.EShop.Payments/src/EasyAbp.EShop.Payments.Application.Contracts/EasyAbp/EShop/Payments/EShopPaymentsRemoteServiceConsts.cs b/modules/EasyAbp.EShop.Payments/src/EasyAbp.EShop.Payments.Application.Contracts/EasyAbp/EShop/Payments/EShopPaymentsRemoteServiceConsts.cs
new file mode 100644
index 000000000..45cdcabe9
--- /dev/null
+++ b/modules/EasyAbp.EShop.Payments/src/EasyAbp.EShop.Payments.Application.Contracts/EasyAbp/EShop/Payments/EShopPaymentsRemoteServiceConsts.cs
@@ -0,0 +1,8 @@
+namespace EasyAbp.EShop.Payments;
+
+public class EShopPaymentsRemoteServiceConsts
+{
+ public const string RemoteServiceName = "EasyAbpEShopPayments";
+
+ public const string ModuleName = "easyAbpEShopPayments";
+}
\ No newline at end of file
diff --git a/modules/EasyAbp.EShop.Payments/src/EasyAbp.EShop.Payments.Application/EasyAbp/EShop/Payments/Refunds/RefundAppService.cs b/modules/EasyAbp.EShop.Payments/src/EasyAbp.EShop.Payments.Application/EasyAbp/EShop/Payments/Refunds/RefundAppService.cs
index 5001b4438..d0cf6de54 100644
--- a/modules/EasyAbp.EShop.Payments/src/EasyAbp.EShop.Payments.Application/EasyAbp/EShop/Payments/Refunds/RefundAppService.cs
+++ b/modules/EasyAbp.EShop.Payments/src/EasyAbp.EShop.Payments.Application/EasyAbp/EShop/Payments/Refunds/RefundAppService.cs
@@ -65,7 +65,7 @@ protected override async Task> CreateFilteredQueryAsync(GetRe
{
return input.UserId.HasValue
? await _repository.GetQueryableByUserIdAsync(input.UserId.Value)
- : _repository;
+ : await _repository.GetQueryableAsync();
}
// Todo: should a store owner user see orders of other stores in the same payment/refund?
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 757fff5d2..2eb080d34 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
@@ -19,7 +19,7 @@
-
+
diff --git a/modules/EasyAbp.EShop.Payments/src/EasyAbp.EShop.Payments.Domain/EasyAbp/EShop/Payments/Payments/PaymentSynchronizer.cs b/modules/EasyAbp.EShop.Payments/src/EasyAbp.EShop.Payments.Domain/EasyAbp/EShop/Payments/Payments/PaymentSynchronizer.cs
index 5ddc34432..9e039f17a 100644
--- a/modules/EasyAbp.EShop.Payments/src/EasyAbp.EShop.Payments.Domain/EasyAbp/EShop/Payments/Payments/PaymentSynchronizer.cs
+++ b/modules/EasyAbp.EShop.Payments/src/EasyAbp.EShop.Payments.Domain/EasyAbp/EShop/Payments/Payments/PaymentSynchronizer.cs
@@ -22,24 +22,22 @@ public class PaymentSynchronizer :
{
private readonly IObjectMapper _objectMapper;
private readonly ICurrentTenant _currentTenant;
- private readonly IUnitOfWorkManager _unitOfWorkManager;
private readonly IPaymentRepository _paymentRepository;
private readonly IDistributedEventBus _distributedEventBus;
public PaymentSynchronizer(
IObjectMapper objectMapper,
ICurrentTenant currentTenant,
- IUnitOfWorkManager unitOfWorkManager,
IPaymentRepository paymentRepository,
IDistributedEventBus distributedEventBus)
{
_objectMapper = objectMapper;
_currentTenant = currentTenant;
- _unitOfWorkManager = unitOfWorkManager;
_paymentRepository = paymentRepository;
_distributedEventBus = distributedEventBus;
}
+ [UnitOfWork(true)]
public virtual async Task HandleEventAsync(EntityCreatedEto eventData)
{
if (eventData.Entity.PaymentItems.All(item => item.ItemType != PaymentsConsts.PaymentItemType))
@@ -47,8 +45,6 @@ public virtual async Task HandleEventAsync(EntityCreatedEto eventDat
return;
}
- using var uow = _unitOfWorkManager.Begin(isTransactional: true);
-
using var changeTenant = _currentTenant.Change(eventData.Entity.TenantId);
var payment = await _paymentRepository.FindAsync(eventData.Entity.Id);
@@ -69,35 +65,28 @@ public virtual async Task HandleEventAsync(EntityCreatedEto eventDat
if (payment.CompletionTime.HasValue)
{
- PublishPaymentCompletedEventOnUowCompleted(uow, payment);
+ await PublishPaymentCompletedEventAsync(payment);
}
if (payment.CanceledTime.HasValue)
{
- PublishPaymentCanceledEventOnUowCompleted(uow, payment);
+ await PublishPaymentCanceledEventAsync(payment);
}
-
- await uow.CompleteAsync();
}
- protected virtual void PublishPaymentCanceledEventOnUowCompleted(IUnitOfWork uow, Payment payment)
+ protected virtual async Task PublishPaymentCanceledEventAsync(Payment payment)
{
- uow.OnCompleted(async () =>
- {
- await _distributedEventBus.PublishAsync(
- new EShopPaymentCanceledEto(_objectMapper.Map(payment)));
- });
+ await _distributedEventBus.PublishAsync(
+ new EShopPaymentCanceledEto(_objectMapper.Map(payment)));
}
- protected virtual void PublishPaymentCompletedEventOnUowCompleted(IUnitOfWork uow, Payment payment)
+ protected virtual async Task PublishPaymentCompletedEventAsync(Payment payment)
{
- uow.OnCompleted(async () =>
- {
- await _distributedEventBus.PublishAsync(
- new EShopPaymentCompletedEto(_objectMapper.Map(payment)));
- });
+ await _distributedEventBus.PublishAsync(
+ new EShopPaymentCompletedEto(_objectMapper.Map(payment)));
}
+ [UnitOfWork(true)]
public virtual async Task HandleEventAsync(EntityUpdatedEto eventData)
{
if (eventData.Entity.PaymentItems.All(item => item.ItemType != PaymentsConsts.PaymentItemType))
@@ -105,8 +94,6 @@ public virtual async Task HandleEventAsync(EntityUpdatedEto eventDat
return;
}
- using var uow = _unitOfWorkManager.Begin(isTransactional: true);
-
using var changeTenant = _currentTenant.Change(eventData.Entity.TenantId);
var payment = await _paymentRepository.FindAsync(eventData.Entity.Id);
@@ -115,17 +102,11 @@ public virtual async Task HandleEventAsync(EntityUpdatedEto eventDat
{
return;
}
-
- if (eventData.Entity.CompletionTime.HasValue && !payment.CompletionTime.HasValue)
- {
- PublishPaymentCompletedEventOnUowCompleted(uow, payment);
- }
-
- if (eventData.Entity.CanceledTime.HasValue && !payment.CanceledTime.HasValue)
- {
- PublishPaymentCanceledEventOnUowCompleted(uow, payment);
- }
-
+
+ var publishCompletedEvent = eventData.Entity.CompletionTime.HasValue && !payment.CompletionTime.HasValue;
+
+ var publishCanceledEvent = eventData.Entity.CanceledTime.HasValue && !payment.CanceledTime.HasValue;
+
_objectMapper.Map(eventData.Entity, payment);
foreach (var etoItem in eventData.Entity.PaymentItems)
@@ -151,8 +132,16 @@ public virtual async Task HandleEventAsync(EntityUpdatedEto eventDat
payment.PaymentItems.RemoveAll(i => !etoPaymentItemIds.Contains(i.Id));
await _paymentRepository.UpdateAsync(payment, true);
-
- await uow.CompleteAsync();
+
+ if (publishCompletedEvent)
+ {
+ await PublishPaymentCompletedEventAsync(payment);
+ }
+
+ if (publishCanceledEvent)
+ {
+ await PublishPaymentCanceledEventAsync(payment);
+ }
}
protected virtual void FillPaymentItemStoreId(PaymentItem item)
@@ -165,10 +154,9 @@ protected virtual void FillPaymentItemStoreId(PaymentItem item)
item.SetStoreId(storeId);
}
+ [UnitOfWork(true)]
public virtual async Task HandleEventAsync(EntityDeletedEto eventData)
{
- using var uow = _unitOfWorkManager.Begin(isTransactional: true);
-
using var changeTenant = _currentTenant.Change(eventData.Entity.TenantId);
var payment = await _paymentRepository.FindAsync(eventData.Entity.Id);
@@ -179,8 +167,6 @@ public virtual async Task HandleEventAsync(EntityDeletedEto eventDat
}
await _paymentRepository.DeleteAsync(payment, true);
-
- await uow.CompleteAsync();
}
}
}
diff --git a/modules/EasyAbp.EShop.Payments/src/EasyAbp.EShop.Payments.Domain/EasyAbp/EShop/Payments/Refunds/RefundSynchronizer.cs b/modules/EasyAbp.EShop.Payments/src/EasyAbp.EShop.Payments.Domain/EasyAbp/EShop/Payments/Refunds/RefundSynchronizer.cs
index 8acb4530d..6b4491634 100644
--- a/modules/EasyAbp.EShop.Payments/src/EasyAbp.EShop.Payments.Domain/EasyAbp/EShop/Payments/Refunds/RefundSynchronizer.cs
+++ b/modules/EasyAbp.EShop.Payments/src/EasyAbp.EShop.Payments.Domain/EasyAbp/EShop/Payments/Refunds/RefundSynchronizer.cs
@@ -27,7 +27,6 @@ public class RefundSynchronizer :
private readonly ICurrentTenant _currentTenant;
private readonly IGuidGenerator _guidGenerator;
private readonly IJsonSerializer _jsonSerializer;
- private readonly IUnitOfWorkManager _unitOfWorkManager;
private readonly IDistributedEventBus _distributedEventBus;
private readonly IPaymentRepository _paymentRepository;
private readonly IRefundRepository _refundRepository;
@@ -37,7 +36,6 @@ public RefundSynchronizer(
ICurrentTenant currentTenant,
IGuidGenerator guidGenerator,
IJsonSerializer jsonSerializer,
- IUnitOfWorkManager unitOfWorkManager,
IDistributedEventBus distributedEventBus,
IPaymentRepository paymentRepository,
IRefundRepository refundRepository)
@@ -46,16 +44,14 @@ public RefundSynchronizer(
_currentTenant = currentTenant;
_guidGenerator = guidGenerator;
_jsonSerializer = jsonSerializer;
- _unitOfWorkManager = unitOfWorkManager;
_distributedEventBus = distributedEventBus;
_paymentRepository = paymentRepository;
_refundRepository = refundRepository;
}
+ [UnitOfWork(true)]
public virtual async Task HandleEventAsync(EntityCreatedEto eventData)
{
- using var uow = _unitOfWorkManager.Begin(isTransactional: true);
-
using var changeTenant = _currentTenant.Change(eventData.Entity.TenantId);
var refund = await _refundRepository.FindAsync(eventData.Entity.Id);
@@ -89,19 +85,16 @@ public virtual async Task HandleEventAsync(EntityCreatedEto eventData
if (refund.CompletedTime.HasValue)
{
- uow.OnCompleted(async () => await _distributedEventBus.PublishAsync(new EShopRefundCompletedEto
+ await _distributedEventBus.PublishAsync(new EShopRefundCompletedEto
{
Refund = _objectMapper.Map(refund)
- }));
+ });
}
-
- await uow.CompleteAsync();
}
+ [UnitOfWork(true)]
public virtual async Task HandleEventAsync(EntityUpdatedEto eventData)
{
- using var uow = _unitOfWorkManager.Begin(isTransactional: true);
-
using var changeTenant = _currentTenant.Change(eventData.Entity.TenantId);
var refund = await _refundRepository.FindAsync(eventData.Entity.Id);
@@ -111,13 +104,7 @@ public virtual async Task HandleEventAsync(EntityUpdatedEto eventData
return;
}
- if (eventData.Entity.CompletedTime.HasValue && !refund.CompletedTime.HasValue)
- {
- uow.OnCompleted(async () => await _distributedEventBus.PublishAsync(new EShopRefundCompletedEto
- {
- Refund = _objectMapper.Map(refund)
- }));
- }
+ var publishRefundCompleted = eventData.Entity.CompletedTime.HasValue && !refund.CompletedTime.HasValue;
_objectMapper.Map(eventData.Entity, refund);
@@ -148,7 +135,13 @@ public virtual async Task HandleEventAsync(EntityUpdatedEto eventData
await _refundRepository.UpdateAsync(refund, true);
- await uow.CompleteAsync();
+ if (publishRefundCompleted)
+ {
+ await _distributedEventBus.PublishAsync(new EShopRefundCompletedEto
+ {
+ Refund = _objectMapper.Map(refund)
+ });
+ }
}
protected virtual void FillRefundItemOrderLines(Refund refund)
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 432b7e0d9..98774f789 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
@@ -3,7 +3,7 @@
- netstandard2.1
+ net6.0
@@ -12,8 +12,4 @@
-
-
-
-
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 31360ebfa..e518a73f3 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
@@ -12,4 +12,9 @@
+
+
+
+
+
diff --git a/modules/EasyAbp.EShop.Payments/src/EasyAbp.EShop.Payments.HttpApi.Client/EasyAbp/EShop/Payments/EShopPaymentsHttpApiClientModule.cs b/modules/EasyAbp.EShop.Payments/src/EasyAbp.EShop.Payments.HttpApi.Client/EasyAbp/EShop/Payments/EShopPaymentsHttpApiClientModule.cs
index 274b166ab..8b9d26d69 100644
--- a/modules/EasyAbp.EShop.Payments/src/EasyAbp.EShop.Payments.HttpApi.Client/EasyAbp/EShop/Payments/EShopPaymentsHttpApiClientModule.cs
+++ b/modules/EasyAbp.EShop.Payments/src/EasyAbp.EShop.Payments.HttpApi.Client/EasyAbp/EShop/Payments/EShopPaymentsHttpApiClientModule.cs
@@ -1,6 +1,7 @@
using Microsoft.Extensions.DependencyInjection;
using Volo.Abp.Http.Client;
using Volo.Abp.Modularity;
+using Volo.Abp.VirtualFileSystem;
namespace EasyAbp.EShop.Payments
{
@@ -10,7 +11,7 @@ namespace EasyAbp.EShop.Payments
)]
public class EShopPaymentsHttpApiClientModule : AbpModule
{
- public const string RemoteServiceName = "EShopPayments";
+ public const string RemoteServiceName = EShopPaymentsRemoteServiceConsts.RemoteServiceName;
public override void ConfigureServices(ServiceConfigurationContext context)
{
@@ -18,6 +19,11 @@ public override void ConfigureServices(ServiceConfigurationContext context)
typeof(EShopPaymentsApplicationContractsModule).Assembly,
RemoteServiceName
);
+
+ Configure(options =>
+ {
+ options.FileSets.AddEmbedded();
+ });
}
}
}
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 33d1f71df..fa9af4ab9 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
@@ -3,7 +3,7 @@
- net5.0
+ net6.0
diff --git a/modules/EasyAbp.EShop.Payments/src/EasyAbp.EShop.Payments.HttpApi/EasyAbp/EShop/Payments/Payments/PaymentController.cs b/modules/EasyAbp.EShop.Payments/src/EasyAbp.EShop.Payments.HttpApi/EasyAbp/EShop/Payments/Payments/PaymentController.cs
index b0eb0baae..d3d35bcb7 100644
--- a/modules/EasyAbp.EShop.Payments/src/EasyAbp.EShop.Payments.HttpApi/EasyAbp/EShop/Payments/Payments/PaymentController.cs
+++ b/modules/EasyAbp.EShop.Payments/src/EasyAbp.EShop.Payments.HttpApi/EasyAbp/EShop/Payments/Payments/PaymentController.cs
@@ -7,7 +7,7 @@
namespace EasyAbp.EShop.Payments.Payments
{
- [RemoteService(Name = "EasyAbpEShopPayments")]
+ [RemoteService(Name = EShopPaymentsRemoteServiceConsts.RemoteServiceName)]
[Route("/api/e-shop/payments/payment")]
public class PaymentController : PaymentsController, IPaymentAppService
{
diff --git a/modules/EasyAbp.EShop.Payments/src/EasyAbp.EShop.Payments.HttpApi/EasyAbp/EShop/Payments/PaymentsController.cs b/modules/EasyAbp.EShop.Payments/src/EasyAbp.EShop.Payments.HttpApi/EasyAbp/EShop/Payments/PaymentsController.cs
index c2de04146..163419049 100644
--- a/modules/EasyAbp.EShop.Payments/src/EasyAbp.EShop.Payments.HttpApi/EasyAbp/EShop/Payments/PaymentsController.cs
+++ b/modules/EasyAbp.EShop.Payments/src/EasyAbp.EShop.Payments.HttpApi/EasyAbp/EShop/Payments/PaymentsController.cs
@@ -1,9 +1,11 @@
using EasyAbp.EShop.Payments.Localization;
+using Microsoft.AspNetCore.Mvc;
using Volo.Abp.AspNetCore.Mvc;
namespace EasyAbp.EShop.Payments
{
- public abstract class PaymentsController : AbpController
+ [Area(EShopPaymentsRemoteServiceConsts.ModuleName)]
+ public abstract class PaymentsController : AbpControllerBase
{
protected PaymentsController()
{
diff --git a/modules/EasyAbp.EShop.Payments/src/EasyAbp.EShop.Payments.HttpApi/EasyAbp/EShop/Payments/Refunds/RefundController.cs b/modules/EasyAbp.EShop.Payments/src/EasyAbp.EShop.Payments.HttpApi/EasyAbp/EShop/Payments/Refunds/RefundController.cs
index 963e7c502..14304a650 100644
--- a/modules/EasyAbp.EShop.Payments/src/EasyAbp.EShop.Payments.HttpApi/EasyAbp/EShop/Payments/Refunds/RefundController.cs
+++ b/modules/EasyAbp.EShop.Payments/src/EasyAbp.EShop.Payments.HttpApi/EasyAbp/EShop/Payments/Refunds/RefundController.cs
@@ -7,7 +7,7 @@
namespace EasyAbp.EShop.Payments.Refunds
{
- [RemoteService(Name = "EasyAbpEShopPayments")]
+ [RemoteService(Name = EShopPaymentsRemoteServiceConsts.RemoteServiceName)]
[Route("/api/e-shop/payments/refund")]
public class RefundController : PaymentsController, IRefundAppService
{
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 067e5861d..b9a14891b 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
@@ -3,7 +3,7 @@
- net5.0
+ net6.0
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 540ee34ae..a0c0258f9 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
@@ -12,7 +12,7 @@
namespace EasyAbp.EShop.Payments.Web
{
[DependsOn(
- typeof(EShopPaymentsHttpApiModule),
+ typeof(EShopPaymentsApplicationContractsModule),
typeof(AbpAspNetCoreMvcUiThemeSharedModule),
typeof(AbpAutoMapperModule)
)]
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 0cfdabfc4..f19da4b47 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
@@ -3,7 +3,7 @@
- net5.0
+ net6.0
$(AssetTargetFallback);portable-net45+win8+wp8+wpa81;
true
Library
@@ -18,11 +18,11 @@
-
+
-
+
diff --git a/modules/EasyAbp.EShop.Payments/test/EasyAbp.EShop.Payments.Application.Tests/EasyAbp.EShop.Payments.Application.Tests.csproj b/modules/EasyAbp.EShop.Payments/test/EasyAbp.EShop.Payments.Application.Tests/EasyAbp.EShop.Payments.Application.Tests.csproj
index ca5062960..9ab756c91 100644
--- a/modules/EasyAbp.EShop.Payments/test/EasyAbp.EShop.Payments.Application.Tests/EasyAbp.EShop.Payments.Application.Tests.csproj
+++ b/modules/EasyAbp.EShop.Payments/test/EasyAbp.EShop.Payments.Application.Tests/EasyAbp.EShop.Payments.Application.Tests.csproj
@@ -1,16 +1,14 @@
-
-
- net5.0
-
+ net6.0
+ EasyAbp.EShop.Payments
-
+
diff --git a/modules/EasyAbp.EShop.Payments/test/EasyAbp.EShop.Payments.Application.Tests/Refunds/TestRefundPaymentEventHandler.cs b/modules/EasyAbp.EShop.Payments/test/EasyAbp.EShop.Payments.Application.Tests/Refunds/TestRefundPaymentEventHandler.cs
index 6451d7c9f..316d84e85 100644
--- a/modules/EasyAbp.EShop.Payments/test/EasyAbp.EShop.Payments.Application.Tests/Refunds/TestRefundPaymentEventHandler.cs
+++ b/modules/EasyAbp.EShop.Payments/test/EasyAbp.EShop.Payments.Application.Tests/Refunds/TestRefundPaymentEventHandler.cs
@@ -3,7 +3,7 @@
using Volo.Abp.DependencyInjection;
using Volo.Abp.EventBus.Distributed;
-namespace EasyAbp.EShop.Payments.Payments
+namespace EasyAbp.EShop.Payments.Refunds
{
public class TestRefundPaymentEventHandler : IDistributedEventHandler, ISingletonDependency
{
diff --git a/modules/EasyAbp.EShop.Payments/test/EasyAbp.EShop.Payments.Domain.Tests/EasyAbp.EShop.Payments.Domain.Tests.csproj b/modules/EasyAbp.EShop.Payments/test/EasyAbp.EShop.Payments.Domain.Tests/EasyAbp.EShop.Payments.Domain.Tests.csproj
index db4857e2d..47e96b995 100644
--- a/modules/EasyAbp.EShop.Payments/test/EasyAbp.EShop.Payments.Domain.Tests/EasyAbp.EShop.Payments.Domain.Tests.csproj
+++ b/modules/EasyAbp.EShop.Payments/test/EasyAbp.EShop.Payments.Domain.Tests/EasyAbp.EShop.Payments.Domain.Tests.csproj
@@ -1,14 +1,12 @@
-
-
- net5.0
-
+ net6.0
+ EasyAbp.EShop.Payments
-
+
diff --git a/modules/EasyAbp.EShop.Payments/test/EasyAbp.EShop.Payments.EntityFrameworkCore.Tests/EasyAbp.EShop.Payments.EntityFrameworkCore.Tests.csproj b/modules/EasyAbp.EShop.Payments/test/EasyAbp.EShop.Payments.EntityFrameworkCore.Tests/EasyAbp.EShop.Payments.EntityFrameworkCore.Tests.csproj
index 4b49c58b2..0ec7a8dfa 100644
--- a/modules/EasyAbp.EShop.Payments/test/EasyAbp.EShop.Payments.EntityFrameworkCore.Tests/EasyAbp.EShop.Payments.EntityFrameworkCore.Tests.csproj
+++ b/modules/EasyAbp.EShop.Payments/test/EasyAbp.EShop.Payments.EntityFrameworkCore.Tests/EasyAbp.EShop.Payments.EntityFrameworkCore.Tests.csproj
@@ -1,17 +1,15 @@
-
-
- net5.0
-
+ net6.0
+ EasyAbp.EShop.Payments
-
-
-
-
+
+
+
+
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 d708f01c1..3bdb37683 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
@@ -2,8 +2,8 @@
Exe
- net5.0
-
+ net6.0
+ EasyAbp.EShop.Payments
@@ -20,7 +20,7 @@
-
+
diff --git a/modules/EasyAbp.EShop.Payments/test/EasyAbp.EShop.Payments.MongoDB.Tests/EasyAbp.EShop.Payments.MongoDB.Tests.csproj b/modules/EasyAbp.EShop.Payments/test/EasyAbp.EShop.Payments.MongoDB.Tests/EasyAbp.EShop.Payments.MongoDB.Tests.csproj
index 1e6274878..0dfb729df 100644
--- a/modules/EasyAbp.EShop.Payments/test/EasyAbp.EShop.Payments.MongoDB.Tests/EasyAbp.EShop.Payments.MongoDB.Tests.csproj
+++ b/modules/EasyAbp.EShop.Payments/test/EasyAbp.EShop.Payments.MongoDB.Tests/EasyAbp.EShop.Payments.MongoDB.Tests.csproj
@@ -1,15 +1,13 @@
-
-
- net5.0
-
+ net6.0
+ EasyAbp.EShop.Payments
-
-
+
+
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 c6b5ee307..12bba3fdf 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
@@ -1,14 +1,12 @@
-
-
- net5.0
-
+ net6.0
+ EasyAbp.EShop.Payments
-
+
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 6ec4db7b2..19dc419d5 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
@@ -4,7 +4,7 @@
netstandard2.0
- EasyAbp.EShop.Plugins
+
diff --git a/modules/EasyAbp.EShop.Plugins/src/EasyAbp.EShop.Plugins.Application.Contracts/Authorization/PluginsPermissionDefinitionProvider.cs b/modules/EasyAbp.EShop.Plugins/src/EasyAbp.EShop.Plugins.Application.Contracts/EasyAbp/EShop/Plugins/Authorization/PluginsPermissionDefinitionProvider.cs
similarity index 100%
rename from modules/EasyAbp.EShop.Plugins/src/EasyAbp.EShop.Plugins.Application.Contracts/Authorization/PluginsPermissionDefinitionProvider.cs
rename to modules/EasyAbp.EShop.Plugins/src/EasyAbp.EShop.Plugins.Application.Contracts/EasyAbp/EShop/Plugins/Authorization/PluginsPermissionDefinitionProvider.cs
diff --git a/modules/EasyAbp.EShop.Plugins/src/EasyAbp.EShop.Plugins.Application.Contracts/Authorization/PluginsPermissions.cs b/modules/EasyAbp.EShop.Plugins/src/EasyAbp.EShop.Plugins.Application.Contracts/EasyAbp/EShop/Plugins/Authorization/PluginsPermissions.cs
similarity index 100%
rename from modules/EasyAbp.EShop.Plugins/src/EasyAbp.EShop.Plugins.Application.Contracts/Authorization/PluginsPermissions.cs
rename to modules/EasyAbp.EShop.Plugins/src/EasyAbp.EShop.Plugins.Application.Contracts/EasyAbp/EShop/Plugins/Authorization/PluginsPermissions.cs
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/EasyAbp/EShop/Plugins/EShopPluginsApplicationContractsModule.cs
similarity index 100%
rename from modules/EasyAbp.EShop.Plugins/src/EasyAbp.EShop.Plugins.Application.Contracts/EShopPluginsApplicationContractsModule.cs
rename to modules/EasyAbp.EShop.Plugins/src/EasyAbp.EShop.Plugins.Application.Contracts/EasyAbp/EShop/Plugins/EShopPluginsApplicationContractsModule.cs
diff --git a/modules/EasyAbp.EShop.Plugins/src/EasyAbp.EShop.Plugins.Application.Contracts/EasyAbp/EShop/Plugins/EShopPluginsRemoteServiceConsts.cs b/modules/EasyAbp.EShop.Plugins/src/EasyAbp.EShop.Plugins.Application.Contracts/EasyAbp/EShop/Plugins/EShopPluginsRemoteServiceConsts.cs
new file mode 100644
index 000000000..9df5b1362
--- /dev/null
+++ b/modules/EasyAbp.EShop.Plugins/src/EasyAbp.EShop.Plugins.Application.Contracts/EasyAbp/EShop/Plugins/EShopPluginsRemoteServiceConsts.cs
@@ -0,0 +1,8 @@
+namespace EasyAbp.EShop.Plugins;
+
+public class EShopPluginsRemoteServiceConsts
+{
+ public const string RemoteServiceName = "EasyAbpEShopPlugins";
+
+ public const string ModuleName = "easyAbpEShopPlugins";
+}
\ No newline at end of file
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 4e1bb478e..399a7d0b0 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
@@ -4,7 +4,7 @@
netstandard2.0
- EasyAbp.EShop.Plugins
+
diff --git a/modules/EasyAbp.EShop.Plugins/src/EasyAbp.EShop.Plugins.Application/EShopPluginsApplicationModule.cs b/modules/EasyAbp.EShop.Plugins/src/EasyAbp.EShop.Plugins.Application/EasyAbp/EShop/Plugins/EShopPluginsApplicationModule.cs
similarity index 100%
rename from modules/EasyAbp.EShop.Plugins/src/EasyAbp.EShop.Plugins.Application/EShopPluginsApplicationModule.cs
rename to modules/EasyAbp.EShop.Plugins/src/EasyAbp.EShop.Plugins.Application/EasyAbp/EShop/Plugins/EShopPluginsApplicationModule.cs
diff --git a/modules/EasyAbp.EShop.Plugins/src/EasyAbp.EShop.Plugins.Application/PluginsAppService.cs b/modules/EasyAbp.EShop.Plugins/src/EasyAbp.EShop.Plugins.Application/EasyAbp/EShop/Plugins/PluginsAppService.cs
similarity index 100%
rename from modules/EasyAbp.EShop.Plugins/src/EasyAbp.EShop.Plugins.Application/PluginsAppService.cs
rename to modules/EasyAbp.EShop.Plugins/src/EasyAbp.EShop.Plugins.Application/EasyAbp/EShop/Plugins/PluginsAppService.cs
diff --git a/modules/EasyAbp.EShop.Plugins/src/EasyAbp.EShop.Plugins.Application/PluginsApplicationAutoMapperProfile.cs b/modules/EasyAbp.EShop.Plugins/src/EasyAbp.EShop.Plugins.Application/EasyAbp/EShop/Plugins/PluginsApplicationAutoMapperProfile.cs
similarity index 100%
rename from modules/EasyAbp.EShop.Plugins/src/EasyAbp.EShop.Plugins.Application/PluginsApplicationAutoMapperProfile.cs
rename to modules/EasyAbp.EShop.Plugins/src/EasyAbp.EShop.Plugins.Application/EasyAbp/EShop/Plugins/PluginsApplicationAutoMapperProfile.cs
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 0536a2b13..f69b25caf 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
@@ -4,7 +4,7 @@
netstandard2.0
- EasyAbp.EShop.Plugins
+
true
@@ -13,12 +13,21 @@
+
+
+
+
+
+
+
+
+
-
+
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/EasyAbp/EShop/Plugins/EShopPluginsDomainSharedModule.cs
similarity index 100%
rename from modules/EasyAbp.EShop.Plugins/src/EasyAbp.EShop.Plugins.Domain.Shared/EShopPluginsDomainSharedModule.cs
rename to modules/EasyAbp.EShop.Plugins/src/EasyAbp.EShop.Plugins.Domain.Shared/EasyAbp/EShop/Plugins/EShopPluginsDomainSharedModule.cs
diff --git a/modules/EasyAbp.EShop.Plugins/src/EasyAbp.EShop.Plugins.Domain.Shared/Localization/Plugins/cs.json b/modules/EasyAbp.EShop.Plugins/src/EasyAbp.EShop.Plugins.Domain.Shared/EasyAbp/EShop/Plugins/Localization/Plugins/cs.json
similarity index 100%
rename from modules/EasyAbp.EShop.Plugins/src/EasyAbp.EShop.Plugins.Domain.Shared/Localization/Plugins/cs.json
rename to modules/EasyAbp.EShop.Plugins/src/EasyAbp.EShop.Plugins.Domain.Shared/EasyAbp/EShop/Plugins/Localization/Plugins/cs.json
diff --git a/modules/EasyAbp.EShop.Plugins/src/EasyAbp.EShop.Plugins.Domain.Shared/Localization/Plugins/en.json b/modules/EasyAbp.EShop.Plugins/src/EasyAbp.EShop.Plugins.Domain.Shared/EasyAbp/EShop/Plugins/Localization/Plugins/en.json
similarity index 100%
rename from modules/EasyAbp.EShop.Plugins/src/EasyAbp.EShop.Plugins.Domain.Shared/Localization/Plugins/en.json
rename to modules/EasyAbp.EShop.Plugins/src/EasyAbp.EShop.Plugins.Domain.Shared/EasyAbp/EShop/Plugins/Localization/Plugins/en.json
diff --git a/modules/EasyAbp.EShop.Plugins/src/EasyAbp.EShop.Plugins.Domain.Shared/Localization/Plugins/pl.json b/modules/EasyAbp.EShop.Plugins/src/EasyAbp.EShop.Plugins.Domain.Shared/EasyAbp/EShop/Plugins/Localization/Plugins/pl.json
similarity index 100%
rename from modules/EasyAbp.EShop.Plugins/src/EasyAbp.EShop.Plugins.Domain.Shared/Localization/Plugins/pl.json
rename to modules/EasyAbp.EShop.Plugins/src/EasyAbp.EShop.Plugins.Domain.Shared/EasyAbp/EShop/Plugins/Localization/Plugins/pl.json
diff --git a/modules/EasyAbp.EShop.Plugins/src/EasyAbp.EShop.Plugins.Domain.Shared/Localization/Plugins/pt-BR.json b/modules/EasyAbp.EShop.Plugins/src/EasyAbp.EShop.Plugins.Domain.Shared/EasyAbp/EShop/Plugins/Localization/Plugins/pt-BR.json
similarity index 100%
rename from modules/EasyAbp.EShop.Plugins/src/EasyAbp.EShop.Plugins.Domain.Shared/Localization/Plugins/pt-BR.json
rename to modules/EasyAbp.EShop.Plugins/src/EasyAbp.EShop.Plugins.Domain.Shared/EasyAbp/EShop/Plugins/Localization/Plugins/pt-BR.json
diff --git a/modules/EasyAbp.EShop.Plugins/src/EasyAbp.EShop.Plugins.Domain.Shared/Localization/Plugins/sl.json b/modules/EasyAbp.EShop.Plugins/src/EasyAbp.EShop.Plugins.Domain.Shared/EasyAbp/EShop/Plugins/Localization/Plugins/sl.json
similarity index 100%
rename from modules/EasyAbp.EShop.Plugins/src/EasyAbp.EShop.Plugins.Domain.Shared/Localization/Plugins/sl.json
rename to modules/EasyAbp.EShop.Plugins/src/EasyAbp.EShop.Plugins.Domain.Shared/EasyAbp/EShop/Plugins/Localization/Plugins/sl.json
diff --git a/modules/EasyAbp.EShop.Plugins/src/EasyAbp.EShop.Plugins.Domain.Shared/Localization/Plugins/tr.json b/modules/EasyAbp.EShop.Plugins/src/EasyAbp.EShop.Plugins.Domain.Shared/EasyAbp/EShop/Plugins/Localization/Plugins/tr.json
similarity index 100%
rename from modules/EasyAbp.EShop.Plugins/src/EasyAbp.EShop.Plugins.Domain.Shared/Localization/Plugins/tr.json
rename to modules/EasyAbp.EShop.Plugins/src/EasyAbp.EShop.Plugins.Domain.Shared/EasyAbp/EShop/Plugins/Localization/Plugins/tr.json
diff --git a/modules/EasyAbp.EShop.Plugins/src/EasyAbp.EShop.Plugins.Domain.Shared/Localization/Plugins/vi.json b/modules/EasyAbp.EShop.Plugins/src/EasyAbp.EShop.Plugins.Domain.Shared/EasyAbp/EShop/Plugins/Localization/Plugins/vi.json
similarity index 100%
rename from modules/EasyAbp.EShop.Plugins/src/EasyAbp.EShop.Plugins.Domain.Shared/Localization/Plugins/vi.json
rename to modules/EasyAbp.EShop.Plugins/src/EasyAbp.EShop.Plugins.Domain.Shared/EasyAbp/EShop/Plugins/Localization/Plugins/vi.json
diff --git a/modules/EasyAbp.EShop.Plugins/src/EasyAbp.EShop.Plugins.Domain.Shared/Localization/Plugins/zh-Hans.json b/modules/EasyAbp.EShop.Plugins/src/EasyAbp.EShop.Plugins.Domain.Shared/EasyAbp/EShop/Plugins/Localization/Plugins/zh-Hans.json
similarity index 100%
rename from modules/EasyAbp.EShop.Plugins/src/EasyAbp.EShop.Plugins.Domain.Shared/Localization/Plugins/zh-Hans.json
rename to modules/EasyAbp.EShop.Plugins/src/EasyAbp.EShop.Plugins.Domain.Shared/EasyAbp/EShop/Plugins/Localization/Plugins/zh-Hans.json
diff --git a/modules/EasyAbp.EShop.Plugins/src/EasyAbp.EShop.Plugins.Domain.Shared/Localization/Plugins/zh-Hant.json b/modules/EasyAbp.EShop.Plugins/src/EasyAbp.EShop.Plugins.Domain.Shared/EasyAbp/EShop/Plugins/Localization/Plugins/zh-Hant.json
similarity index 100%
rename from modules/EasyAbp.EShop.Plugins/src/EasyAbp.EShop.Plugins.Domain.Shared/Localization/Plugins/zh-Hant.json
rename to modules/EasyAbp.EShop.Plugins/src/EasyAbp.EShop.Plugins.Domain.Shared/EasyAbp/EShop/Plugins/Localization/Plugins/zh-Hant.json
diff --git a/modules/EasyAbp.EShop.Plugins/src/EasyAbp.EShop.Plugins.Domain.Shared/Localization/PluginsResource.cs b/modules/EasyAbp.EShop.Plugins/src/EasyAbp.EShop.Plugins.Domain.Shared/EasyAbp/EShop/Plugins/Localization/PluginsResource.cs
similarity index 100%
rename from modules/EasyAbp.EShop.Plugins/src/EasyAbp.EShop.Plugins.Domain.Shared/Localization/PluginsResource.cs
rename to modules/EasyAbp.EShop.Plugins/src/EasyAbp.EShop.Plugins.Domain.Shared/EasyAbp/EShop/Plugins/Localization/PluginsResource.cs
diff --git a/modules/EasyAbp.EShop.Plugins/src/EasyAbp.EShop.Plugins.Domain.Shared/PluginsErrorCodes.cs b/modules/EasyAbp.EShop.Plugins/src/EasyAbp.EShop.Plugins.Domain.Shared/EasyAbp/EShop/Plugins/PluginsErrorCodes.cs
similarity index 100%
rename from modules/EasyAbp.EShop.Plugins/src/EasyAbp.EShop.Plugins.Domain.Shared/PluginsErrorCodes.cs
rename to modules/EasyAbp.EShop.Plugins/src/EasyAbp.EShop.Plugins.Domain.Shared/EasyAbp/EShop/Plugins/PluginsErrorCodes.cs
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 dc94a55f6..f55df891d 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
@@ -4,7 +4,7 @@
netstandard2.0
- EasyAbp.EShop.Plugins
+
diff --git a/modules/EasyAbp.EShop.Plugins/src/EasyAbp.EShop.Plugins.Domain/EShopPluginsDomainModule.cs b/modules/EasyAbp.EShop.Plugins/src/EasyAbp.EShop.Plugins.Domain/EasyAbp/EShop/Plugins/EShopPluginsDomainModule.cs
similarity index 100%
rename from modules/EasyAbp.EShop.Plugins/src/EasyAbp.EShop.Plugins.Domain/EShopPluginsDomainModule.cs
rename to modules/EasyAbp.EShop.Plugins/src/EasyAbp.EShop.Plugins.Domain/EasyAbp/EShop/Plugins/EShopPluginsDomainModule.cs
diff --git a/modules/EasyAbp.EShop.Plugins/src/EasyAbp.EShop.Plugins.Domain/PluginsDbProperties.cs b/modules/EasyAbp.EShop.Plugins/src/EasyAbp.EShop.Plugins.Domain/EasyAbp/EShop/Plugins/PluginsDbProperties.cs
similarity index 100%
rename from modules/EasyAbp.EShop.Plugins/src/EasyAbp.EShop.Plugins.Domain/PluginsDbProperties.cs
rename to modules/EasyAbp.EShop.Plugins/src/EasyAbp.EShop.Plugins.Domain/EasyAbp/EShop/Plugins/PluginsDbProperties.cs
diff --git a/modules/EasyAbp.EShop.Plugins/src/EasyAbp.EShop.Plugins.Domain/Settings/PluginsSettingDefinitionProvider.cs b/modules/EasyAbp.EShop.Plugins/src/EasyAbp.EShop.Plugins.Domain/EasyAbp/EShop/Plugins/Settings/PluginsSettingDefinitionProvider.cs
similarity index 100%
rename from modules/EasyAbp.EShop.Plugins/src/EasyAbp.EShop.Plugins.Domain/Settings/PluginsSettingDefinitionProvider.cs
rename to modules/EasyAbp.EShop.Plugins/src/EasyAbp.EShop.Plugins.Domain/EasyAbp/EShop/Plugins/Settings/PluginsSettingDefinitionProvider.cs
diff --git a/modules/EasyAbp.EShop.Plugins/src/EasyAbp.EShop.Plugins.Domain/Settings/PluginsSettings.cs b/modules/EasyAbp.EShop.Plugins/src/EasyAbp.EShop.Plugins.Domain/EasyAbp/EShop/Plugins/Settings/PluginsSettings.cs
similarity index 100%
rename from modules/EasyAbp.EShop.Plugins/src/EasyAbp.EShop.Plugins.Domain/Settings/PluginsSettings.cs
rename to modules/EasyAbp.EShop.Plugins/src/EasyAbp.EShop.Plugins.Domain/EasyAbp/EShop/Plugins/Settings/PluginsSettings.cs
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 5eb62b9bf..f29560c2d 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
@@ -3,8 +3,8 @@
- netstandard2.1
- EasyAbp.EShop.Plugins
+ net6.0
+
@@ -12,4 +12,8 @@
+
+
+
+
diff --git a/modules/EasyAbp.EShop.Plugins/src/EasyAbp.EShop.Plugins.EntityFrameworkCore/EntityFrameworkCore/EShopPluginsEntityFrameworkCoreModule.cs b/modules/EasyAbp.EShop.Plugins/src/EasyAbp.EShop.Plugins.EntityFrameworkCore/EasyAbp/EShop/Plugins/EntityFrameworkCore/EShopPluginsEntityFrameworkCoreModule.cs
similarity index 100%
rename from modules/EasyAbp.EShop.Plugins/src/EasyAbp.EShop.Plugins.EntityFrameworkCore/EntityFrameworkCore/EShopPluginsEntityFrameworkCoreModule.cs
rename to modules/EasyAbp.EShop.Plugins/src/EasyAbp.EShop.Plugins.EntityFrameworkCore/EasyAbp/EShop/Plugins/EntityFrameworkCore/EShopPluginsEntityFrameworkCoreModule.cs
diff --git a/modules/EasyAbp.EShop.Plugins/src/EasyAbp.EShop.Plugins.EntityFrameworkCore/EntityFrameworkCore/IPluginsDbContext.cs b/modules/EasyAbp.EShop.Plugins/src/EasyAbp.EShop.Plugins.EntityFrameworkCore/EasyAbp/EShop/Plugins/EntityFrameworkCore/IPluginsDbContext.cs
similarity index 100%
rename from modules/EasyAbp.EShop.Plugins/src/EasyAbp.EShop.Plugins.EntityFrameworkCore/EntityFrameworkCore/IPluginsDbContext.cs
rename to modules/EasyAbp.EShop.Plugins/src/EasyAbp.EShop.Plugins.EntityFrameworkCore/EasyAbp/EShop/Plugins/EntityFrameworkCore/IPluginsDbContext.cs
diff --git a/modules/EasyAbp.EShop.Plugins/src/EasyAbp.EShop.Plugins.EntityFrameworkCore/EntityFrameworkCore/PluginsDbContext.cs b/modules/EasyAbp.EShop.Plugins/src/EasyAbp.EShop.Plugins.EntityFrameworkCore/EasyAbp/EShop/Plugins/EntityFrameworkCore/PluginsDbContext.cs
similarity index 100%
rename from modules/EasyAbp.EShop.Plugins/src/EasyAbp.EShop.Plugins.EntityFrameworkCore/EntityFrameworkCore/PluginsDbContext.cs
rename to modules/EasyAbp.EShop.Plugins/src/EasyAbp.EShop.Plugins.EntityFrameworkCore/EasyAbp/EShop/Plugins/EntityFrameworkCore/PluginsDbContext.cs
diff --git a/modules/EasyAbp.EShop.Plugins/src/EasyAbp.EShop.Plugins.EntityFrameworkCore/EntityFrameworkCore/PluginsDbContextModelCreatingExtensions.cs b/modules/EasyAbp.EShop.Plugins/src/EasyAbp.EShop.Plugins.EntityFrameworkCore/EasyAbp/EShop/Plugins/EntityFrameworkCore/PluginsDbContextModelCreatingExtensions.cs
similarity index 100%
rename from modules/EasyAbp.EShop.Plugins/src/EasyAbp.EShop.Plugins.EntityFrameworkCore/EntityFrameworkCore/PluginsDbContextModelCreatingExtensions.cs
rename to modules/EasyAbp.EShop.Plugins/src/EasyAbp.EShop.Plugins.EntityFrameworkCore/EasyAbp/EShop/Plugins/EntityFrameworkCore/PluginsDbContextModelCreatingExtensions.cs
diff --git a/modules/EasyAbp.EShop.Plugins/src/EasyAbp.EShop.Plugins.EntityFrameworkCore/EntityFrameworkCore/PluginsModelBuilderConfigurationOptions.cs b/modules/EasyAbp.EShop.Plugins/src/EasyAbp.EShop.Plugins.EntityFrameworkCore/EasyAbp/EShop/Plugins/EntityFrameworkCore/PluginsModelBuilderConfigurationOptions.cs
similarity index 100%
rename from modules/EasyAbp.EShop.Plugins/src/EasyAbp.EShop.Plugins.EntityFrameworkCore/EntityFrameworkCore/PluginsModelBuilderConfigurationOptions.cs
rename to modules/EasyAbp.EShop.Plugins/src/EasyAbp.EShop.Plugins.EntityFrameworkCore/EasyAbp/EShop/Plugins/EntityFrameworkCore/PluginsModelBuilderConfigurationOptions.cs
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 ef46b739e..52d8468fd 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
@@ -4,7 +4,7 @@
netstandard2.0
- EasyAbp.EShop.Plugins
+
@@ -12,4 +12,9 @@
+
+
+
+
+
diff --git a/modules/EasyAbp.EShop.Plugins/src/EasyAbp.EShop.Plugins.HttpApi.Client/EShopPluginsHttpApiClientModule.cs b/modules/EasyAbp.EShop.Plugins/src/EasyAbp.EShop.Plugins.HttpApi.Client/EasyAbp/EShop/Plugins/EShopPluginsHttpApiClientModule.cs
similarity index 64%
rename from modules/EasyAbp.EShop.Plugins/src/EasyAbp.EShop.Plugins.HttpApi.Client/EShopPluginsHttpApiClientModule.cs
rename to modules/EasyAbp.EShop.Plugins/src/EasyAbp.EShop.Plugins.HttpApi.Client/EasyAbp/EShop/Plugins/EShopPluginsHttpApiClientModule.cs
index 200d8a51c..c41146dbc 100644
--- a/modules/EasyAbp.EShop.Plugins/src/EasyAbp.EShop.Plugins.HttpApi.Client/EShopPluginsHttpApiClientModule.cs
+++ b/modules/EasyAbp.EShop.Plugins/src/EasyAbp.EShop.Plugins.HttpApi.Client/EasyAbp/EShop/Plugins/EShopPluginsHttpApiClientModule.cs
@@ -1,6 +1,7 @@
using Microsoft.Extensions.DependencyInjection;
using Volo.Abp.Http.Client;
using Volo.Abp.Modularity;
+using Volo.Abp.VirtualFileSystem;
namespace EasyAbp.EShop.Plugins
{
@@ -9,7 +10,7 @@ namespace EasyAbp.EShop.Plugins
typeof(AbpHttpClientModule))]
public class EShopPluginsHttpApiClientModule : AbpModule
{
- public const string RemoteServiceName = "EShopPlugins";
+ public const string RemoteServiceName = EShopPluginsRemoteServiceConsts.RemoteServiceName;
public override void ConfigureServices(ServiceConfigurationContext context)
{
@@ -17,6 +18,11 @@ public override void ConfigureServices(ServiceConfigurationContext context)
typeof(EShopPluginsApplicationContractsModule).Assembly,
RemoteServiceName
);
+
+ Configure(options =>
+ {
+ options.FileSets.AddEmbedded();
+ });
}
}
}
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 a57687db2..6dba711c5 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
@@ -3,8 +3,8 @@
- net5.0
- EasyAbp.EShop.Plugins
+ net6.0
+
diff --git a/modules/EasyAbp.EShop.Plugins/src/EasyAbp.EShop.Plugins.HttpApi/EShopPluginsHttpApiModule.cs b/modules/EasyAbp.EShop.Plugins/src/EasyAbp.EShop.Plugins.HttpApi/EasyAbp/EShop/Plugins/EShopPluginsHttpApiModule.cs
similarity index 100%
rename from modules/EasyAbp.EShop.Plugins/src/EasyAbp.EShop.Plugins.HttpApi/EShopPluginsHttpApiModule.cs
rename to modules/EasyAbp.EShop.Plugins/src/EasyAbp.EShop.Plugins.HttpApi/EasyAbp/EShop/Plugins/EShopPluginsHttpApiModule.cs
diff --git a/modules/EasyAbp.EShop.Plugins/src/EasyAbp.EShop.Plugins.HttpApi/PluginsController.cs b/modules/EasyAbp.EShop.Plugins/src/EasyAbp.EShop.Plugins.HttpApi/EasyAbp/EShop/Plugins/PluginsController.cs
similarity index 61%
rename from modules/EasyAbp.EShop.Plugins/src/EasyAbp.EShop.Plugins.HttpApi/PluginsController.cs
rename to modules/EasyAbp.EShop.Plugins/src/EasyAbp.EShop.Plugins.HttpApi/EasyAbp/EShop/Plugins/PluginsController.cs
index 25cc9b63d..dbb8ffde3 100644
--- a/modules/EasyAbp.EShop.Plugins/src/EasyAbp.EShop.Plugins.HttpApi/PluginsController.cs
+++ b/modules/EasyAbp.EShop.Plugins/src/EasyAbp.EShop.Plugins.HttpApi/EasyAbp/EShop/Plugins/PluginsController.cs
@@ -1,9 +1,11 @@
using EasyAbp.EShop.Plugins.Localization;
+using Microsoft.AspNetCore.Mvc;
using Volo.Abp.AspNetCore.Mvc;
namespace EasyAbp.EShop.Plugins
{
- public abstract class PluginsController : AbpController
+ [Area(EShopPluginsRemoteServiceConsts.ModuleName)]
+ public abstract class PluginsController : AbpControllerBase
{
protected PluginsController()
{
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 ae14d0c12..aed4de42d 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
@@ -3,8 +3,8 @@
- net5.0
- EasyAbp.EShop.Plugins
+ net6.0
+
@@ -12,4 +12,8 @@
+
+
+
+
diff --git a/modules/EasyAbp.EShop.Plugins/src/EasyAbp.EShop.Plugins.MongoDB/MongoDB/EShopPluginsMongoDbModule.cs b/modules/EasyAbp.EShop.Plugins/src/EasyAbp.EShop.Plugins.MongoDB/EasyAbp/EShop/Plugins/MongoDB/EShopPluginsMongoDbModule.cs
similarity index 100%
rename from modules/EasyAbp.EShop.Plugins/src/EasyAbp.EShop.Plugins.MongoDB/MongoDB/EShopPluginsMongoDbModule.cs
rename to modules/EasyAbp.EShop.Plugins/src/EasyAbp.EShop.Plugins.MongoDB/EasyAbp/EShop/Plugins/MongoDB/EShopPluginsMongoDbModule.cs
diff --git a/modules/EasyAbp.EShop.Plugins/src/EasyAbp.EShop.Plugins.MongoDB/MongoDB/IPluginsMongoDbContext.cs b/modules/EasyAbp.EShop.Plugins/src/EasyAbp.EShop.Plugins.MongoDB/EasyAbp/EShop/Plugins/MongoDB/IPluginsMongoDbContext.cs
similarity index 100%
rename from modules/EasyAbp.EShop.Plugins/src/EasyAbp.EShop.Plugins.MongoDB/MongoDB/IPluginsMongoDbContext.cs
rename to modules/EasyAbp.EShop.Plugins/src/EasyAbp.EShop.Plugins.MongoDB/EasyAbp/EShop/Plugins/MongoDB/IPluginsMongoDbContext.cs
diff --git a/modules/EasyAbp.EShop.Plugins/src/EasyAbp.EShop.Plugins.MongoDB/MongoDB/PluginsMongoDbContext.cs b/modules/EasyAbp.EShop.Plugins/src/EasyAbp.EShop.Plugins.MongoDB/EasyAbp/EShop/Plugins/MongoDB/PluginsMongoDbContext.cs
similarity index 100%
rename from modules/EasyAbp.EShop.Plugins/src/EasyAbp.EShop.Plugins.MongoDB/MongoDB/PluginsMongoDbContext.cs
rename to modules/EasyAbp.EShop.Plugins/src/EasyAbp.EShop.Plugins.MongoDB/EasyAbp/EShop/Plugins/MongoDB/PluginsMongoDbContext.cs
diff --git a/modules/EasyAbp.EShop.Plugins/src/EasyAbp.EShop.Plugins.MongoDB/MongoDB/PluginsMongoDbContextExtensions.cs b/modules/EasyAbp.EShop.Plugins/src/EasyAbp.EShop.Plugins.MongoDB/EasyAbp/EShop/Plugins/MongoDB/PluginsMongoDbContextExtensions.cs
similarity index 100%
rename from modules/EasyAbp.EShop.Plugins/src/EasyAbp.EShop.Plugins.MongoDB/MongoDB/PluginsMongoDbContextExtensions.cs
rename to modules/EasyAbp.EShop.Plugins/src/EasyAbp.EShop.Plugins.MongoDB/EasyAbp/EShop/Plugins/MongoDB/PluginsMongoDbContextExtensions.cs
diff --git a/modules/EasyAbp.EShop.Plugins/src/EasyAbp.EShop.Plugins.MongoDB/MongoDB/PluginsMongoModelBuilderConfigurationOptions.cs b/modules/EasyAbp.EShop.Plugins/src/EasyAbp.EShop.Plugins.MongoDB/EasyAbp/EShop/Plugins/MongoDB/PluginsMongoModelBuilderConfigurationOptions.cs
similarity index 100%
rename from modules/EasyAbp.EShop.Plugins/src/EasyAbp.EShop.Plugins.MongoDB/MongoDB/PluginsMongoModelBuilderConfigurationOptions.cs
rename to modules/EasyAbp.EShop.Plugins/src/EasyAbp.EShop.Plugins.MongoDB/EasyAbp/EShop/Plugins/MongoDB/PluginsMongoModelBuilderConfigurationOptions.cs
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 2e0b249f2..0ce433c17 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
@@ -12,7 +12,7 @@
namespace EasyAbp.EShop.Plugins.Web
{
[DependsOn(
- typeof(EShopPluginsHttpApiModule),
+ typeof(EShopPluginsApplicationContractsModule),
typeof(AbpAspNetCoreMvcUiThemeSharedModule),
typeof(AbpAutoMapperModule)
)]
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 92117c65b..51f167465 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
@@ -3,7 +3,7 @@
- net5.0
+ net6.0
$(AssetTargetFallback);portable-net45+win8+wp8+wpa81;
true
Library
@@ -17,11 +17,11 @@
-
+
-
+
diff --git a/modules/EasyAbp.EShop.Plugins/test/EasyAbp.EShop.Plugins.Application.Tests/EasyAbp.EShop.Plugins.Application.Tests.csproj b/modules/EasyAbp.EShop.Plugins/test/EasyAbp.EShop.Plugins.Application.Tests/EasyAbp.EShop.Plugins.Application.Tests.csproj
index e02139120..c2d98e785 100644
--- a/modules/EasyAbp.EShop.Plugins/test/EasyAbp.EShop.Plugins.Application.Tests/EasyAbp.EShop.Plugins.Application.Tests.csproj
+++ b/modules/EasyAbp.EShop.Plugins/test/EasyAbp.EShop.Plugins.Application.Tests/EasyAbp.EShop.Plugins.Application.Tests.csproj
@@ -1,16 +1,14 @@
-
-
- net5.0
- EasyAbp.EShop.Plugins
+ net6.0
+
-
+
diff --git a/modules/EasyAbp.EShop.Plugins/test/EasyAbp.EShop.Plugins.Domain.Tests/EasyAbp.EShop.Plugins.Domain.Tests.csproj b/modules/EasyAbp.EShop.Plugins/test/EasyAbp.EShop.Plugins.Domain.Tests/EasyAbp.EShop.Plugins.Domain.Tests.csproj
index 2f9f9af4a..fbfe6f314 100644
--- a/modules/EasyAbp.EShop.Plugins/test/EasyAbp.EShop.Plugins.Domain.Tests/EasyAbp.EShop.Plugins.Domain.Tests.csproj
+++ b/modules/EasyAbp.EShop.Plugins/test/EasyAbp.EShop.Plugins.Domain.Tests/EasyAbp.EShop.Plugins.Domain.Tests.csproj
@@ -1,14 +1,12 @@
-
-
- net5.0
- EasyAbp.EShop.Plugins
+ net6.0
+
-
+
diff --git a/modules/EasyAbp.EShop.Plugins/test/EasyAbp.EShop.Plugins.EntityFrameworkCore.Tests/EasyAbp.EShop.Plugins.EntityFrameworkCore.Tests.csproj b/modules/EasyAbp.EShop.Plugins/test/EasyAbp.EShop.Plugins.EntityFrameworkCore.Tests/EasyAbp.EShop.Plugins.EntityFrameworkCore.Tests.csproj
index 7711237b9..7c0c36fcb 100644
--- a/modules/EasyAbp.EShop.Plugins/test/EasyAbp.EShop.Plugins.EntityFrameworkCore.Tests/EasyAbp.EShop.Plugins.EntityFrameworkCore.Tests.csproj
+++ b/modules/EasyAbp.EShop.Plugins/test/EasyAbp.EShop.Plugins.EntityFrameworkCore.Tests/EasyAbp.EShop.Plugins.EntityFrameworkCore.Tests.csproj
@@ -1,17 +1,15 @@
-
-
- net5.0
- EasyAbp.EShop.Plugins
+ net6.0
+
-
-
-
-
+
+
+
+
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 9b7ff319b..b33856c07 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
@@ -2,8 +2,8 @@
Exe
- net5.0
- EasyAbp.EShop.Plugins
+ net6.0
+
@@ -20,7 +20,7 @@
-
+
diff --git a/modules/EasyAbp.EShop.Plugins/test/EasyAbp.EShop.Plugins.MongoDB.Tests/EasyAbp.EShop.Plugins.MongoDB.Tests.csproj b/modules/EasyAbp.EShop.Plugins/test/EasyAbp.EShop.Plugins.MongoDB.Tests/EasyAbp.EShop.Plugins.MongoDB.Tests.csproj
index 56a1dfe68..0bd211372 100644
--- a/modules/EasyAbp.EShop.Plugins/test/EasyAbp.EShop.Plugins.MongoDB.Tests/EasyAbp.EShop.Plugins.MongoDB.Tests.csproj
+++ b/modules/EasyAbp.EShop.Plugins/test/EasyAbp.EShop.Plugins.MongoDB.Tests/EasyAbp.EShop.Plugins.MongoDB.Tests.csproj
@@ -1,15 +1,13 @@
-
-
- net5.0
- EasyAbp.EShop.Plugins
+ net6.0
+
-
-
+
+
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 f115e6cc4..17502565a 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
@@ -1,14 +1,12 @@
-
-
- net5.0
- EasyAbp.EShop.Plugins
+ net6.0
+
-
+
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 b1255bd3f..aea5504c4 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
@@ -11,6 +11,7 @@
+
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 390d57d14..91621948e 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
@@ -3,6 +3,7 @@
using Volo.Abp.Modularity;
using Volo.Abp.VirtualFileSystem;
using Volo.Abp.Authorization;
+using Volo.Abp.Json;
namespace EasyAbp.EShop.Products
{
@@ -10,6 +11,7 @@ namespace EasyAbp.EShop.Products
typeof(EShopProductsDomainSharedModule),
typeof(AbpDddApplicationContractsModule),
typeof(AbpAuthorizationModule),
+ typeof(AbpJsonModule),
typeof(AbpTreesApplicationContractsModule)
)]
public class EShopProductsApplicationContractsModule : AbpModule
diff --git a/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Application.Contracts/EasyAbp/EShop/Products/EShopProductsRemoteServiceConsts.cs b/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Application.Contracts/EasyAbp/EShop/Products/EShopProductsRemoteServiceConsts.cs
new file mode 100644
index 000000000..2e3536d6f
--- /dev/null
+++ b/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Application.Contracts/EasyAbp/EShop/Products/EShopProductsRemoteServiceConsts.cs
@@ -0,0 +1,8 @@
+namespace EasyAbp.EShop.Products;
+
+public class EShopProductsRemoteServiceConsts
+{
+ public const string RemoteServiceName = "EasyAbpEShopProducts";
+
+ public const string ModuleName = "easyAbpEShopProducts";
+}
\ No newline at end of file
diff --git a/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Application/EasyAbp/EShop/Products/Categories/CategoryAppService.cs b/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Application/EasyAbp/EShop/Products/Categories/CategoryAppService.cs
index 530b7b4d7..02475ec3c 100644
--- a/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Application/EasyAbp/EShop/Products/Categories/CategoryAppService.cs
+++ b/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Application/EasyAbp/EShop/Products/Categories/CategoryAppService.cs
@@ -64,7 +64,7 @@ public virtual async Task> GetSummaryListAsyn
{
await CheckGetListPolicyAsync();
- var query = _repository.AsQueryable();
+ var query = await _repository.GetQueryableAsync();
var totalCount = await AsyncExecuter.CountAsync(query);
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 9e63008d7..761dc2b85 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
@@ -22,7 +22,7 @@ public ProductCategoryAppService(IProductCategoryRepository repository) : base(r
protected override async Task> CreateFilteredQueryAsync(GetProductCategoryListDto input)
{
- var queryable = Repository.AsQueryable();
+ var queryable = await Repository.GetQueryableAsync();
if (input.CategoryId.HasValue)
{
diff --git a/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Application/EasyAbp/EShop/Products/ProductDetails/ProductDetailAppService.cs b/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Application/EasyAbp/EShop/Products/ProductDetails/ProductDetailAppService.cs
index 0758d7840..826590890 100644
--- a/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Application/EasyAbp/EShop/Products/ProductDetails/ProductDetailAppService.cs
+++ b/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Application/EasyAbp/EShop/Products/ProductDetails/ProductDetailAppService.cs
@@ -32,7 +32,8 @@ public ProductDetailAppService(
protected override async Task> CreateFilteredQueryAsync(GetProductDetailListInput input)
{
- return _repository.WhereIf(input.StoreId.HasValue, x => x.StoreId == input.StoreId.Value);
+ return (await _repository.GetQueryableAsync())
+ .WhereIf(input.StoreId.HasValue, x => x.StoreId == input.StoreId.Value);
}
public override async Task> GetListAsync(GetProductDetailListInput input)
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 dfc301b6a..b83fdfd0b 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
@@ -20,7 +20,7 @@
-
+
diff --git a/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Domain/EasyAbp/EShop/Products/ProductDetailHistories/IProductDetailHistoryRecorder.cs b/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Domain/EasyAbp/EShop/Products/ProductDetailHistories/IProductDetailHistoryRecorder.cs
index eb1f6dfc8..be342fb3e 100644
--- a/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Domain/EasyAbp/EShop/Products/ProductDetailHistories/IProductDetailHistoryRecorder.cs
+++ b/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Domain/EasyAbp/EShop/Products/ProductDetailHistories/IProductDetailHistoryRecorder.cs
@@ -1,10 +1,6 @@
-using EasyAbp.EShop.Products.ProductDetails;
-using Volo.Abp.Domain.Entities.Events;
-using Volo.Abp.EventBus;
-
-namespace EasyAbp.EShop.Products.ProductDetailHistories
+namespace EasyAbp.EShop.Products.ProductDetailHistories
{
- public interface IProductDetailHistoryRecorder : ILocalEventHandler>
+ public interface IProductDetailHistoryRecorder
{
}
diff --git a/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Domain/EasyAbp/EShop/Products/ProductDetailHistories/ProductDetailHistoryRecorder.cs b/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Domain/EasyAbp/EShop/Products/ProductDetailHistories/ProductDetailHistoryRecorder.cs
index a528ebc65..3bea7bb4c 100644
--- a/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Domain/EasyAbp/EShop/Products/ProductDetailHistories/ProductDetailHistoryRecorder.cs
+++ b/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Domain/EasyAbp/EShop/Products/ProductDetailHistories/ProductDetailHistoryRecorder.cs
@@ -2,6 +2,7 @@
using EasyAbp.EShop.Products.ProductDetails;
using Volo.Abp.DependencyInjection;
using Volo.Abp.Domain.Entities.Events;
+using Volo.Abp.EventBus;
using Volo.Abp.Guids;
using Volo.Abp.Json;
using Volo.Abp.MultiTenancy;
@@ -9,7 +10,10 @@
namespace EasyAbp.EShop.Products.ProductDetailHistories
{
- public class ProductDetailHistoryRecorder : IProductDetailHistoryRecorder, ITransientDependency
+ public class ProductDetailHistoryRecorder :
+ IProductDetailHistoryRecorder,
+ ILocalEventHandler>,
+ ITransientDependency
{
private readonly IGuidGenerator _guidGenerator;
private readonly ICurrentTenant _currentTenant;
diff --git a/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Domain/EasyAbp/EShop/Products/Products/DefaultProductInventoryProvider.cs b/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Domain/EasyAbp/EShop/Products/Products/DefaultProductInventoryProvider.cs
index 5fe15f24d..cf2cb9619 100644
--- a/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Domain/EasyAbp/EShop/Products/Products/DefaultProductInventoryProvider.cs
+++ b/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Domain/EasyAbp/EShop/Products/Products/DefaultProductInventoryProvider.cs
@@ -26,11 +26,13 @@ public DefaultProductInventoryProvider(
_productInventoryRepository = productInventoryRepository;
}
+ [UnitOfWork]
public virtual async Task GetInventoryDataAsync(Product product, ProductSku productSku)
{
return await _productInventoryRepository.GetInventoryDataAsync(productSku.Id);
}
+ [UnitOfWork]
public virtual async Task> GetInventoryDataDictionaryAsync(Product product)
{
var dict = await _productInventoryRepository.GetInventoryDataDictionaryAsync(product.ProductSkus
@@ -44,6 +46,7 @@ public virtual async Task> GetInventoryData
return dict;
}
+ [UnitOfWork(true)]
public virtual async Task TryIncreaseInventoryAsync(Product product, ProductSku productSku, int quantity, bool decreaseSold)
{
var productInventory = await _productInventoryRepository.GetAsync(x => x.ProductSkuId == productSku.Id);
@@ -51,6 +54,7 @@ public virtual async Task TryIncreaseInventoryAsync(Product product, Produ
return await TryIncreaseInventoryAsync(product, productInventory, quantity, decreaseSold);
}
+ [UnitOfWork(true)]
public virtual async Task TryReduceInventoryAsync(Product product, ProductSku productSku, int quantity, bool increaseSold)
{
var productInventory = await _productInventoryRepository.GetAsync(x => x.ProductSkuId == productSku.Id);
@@ -58,6 +62,7 @@ public virtual async Task TryReduceInventoryAsync(Product product, Product
return await TryReduceInventoryAsync(product, productInventory, quantity, increaseSold);
}
+ [UnitOfWork(true)]
public virtual async Task TryIncreaseInventoryAsync(Product product, ProductInventory productInventory, int quantity, bool decreaseSold)
{
if (quantity < 0)
@@ -72,19 +77,16 @@ public virtual async Task TryIncreaseInventoryAsync(Product product, Produ
return false;
}
- using var uow = _unitOfWorkManager.Begin(isTransactional: true);
-
await _productInventoryRepository.UpdateAsync(productInventory, true);
- PublishInventoryChangedEventOnUowCompleted(uow, product.TenantId, product.StoreId,
+ await PublishInventoryChangedEventAsync(product.TenantId, product.StoreId,
productInventory.ProductId, productInventory.ProductSkuId, originalInventory,
productInventory.Inventory, productInventory.Sold);
-
- await uow.CompleteAsync();
return true;
}
+ [UnitOfWork(true)]
public virtual async Task TryReduceInventoryAsync(Product product, ProductInventory productInventory, int quantity, bool increaseSold)
{
if (quantity < 0)
@@ -99,30 +101,27 @@ public virtual async Task TryReduceInventoryAsync(Product product, Product
return false;
}
- using var uow = _unitOfWorkManager.Begin(isTransactional: true);
-
await _productInventoryRepository.UpdateAsync(productInventory, true);
- PublishInventoryChangedEventOnUowCompleted(uow, product.TenantId, product.StoreId,
+ await PublishInventoryChangedEventAsync(product.TenantId, product.StoreId,
productInventory.ProductId, productInventory.ProductSkuId, originalInventory,
productInventory.Inventory, productInventory.Sold);
- await uow.CompleteAsync();
-
return true;
}
- protected virtual void PublishInventoryChangedEventOnUowCompleted(IUnitOfWork uow, Guid? tenantId, Guid storeId,
+ [UnitOfWork]
+ protected virtual async Task PublishInventoryChangedEventAsync(Guid? tenantId, Guid storeId,
Guid productId, Guid productSkuId, int originalInventory, int newInventory, long sold)
{
- uow.OnCompleted(async () => await _distributedEventBus.PublishAsync(new ProductInventoryChangedEto(
+ await _distributedEventBus.PublishAsync(new ProductInventoryChangedEto(
tenantId,
storeId,
productId,
productSkuId,
originalInventory,
newInventory,
- sold)));
+ sold));
}
}
}
\ No newline at end of file
diff --git a/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Domain/EasyAbp/EShop/Products/Products/IOrderCreatedEventHandler.cs b/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Domain/EasyAbp/EShop/Products/Products/IOrderCreatedEventHandler.cs
deleted file mode 100644
index f3205abbb..000000000
--- a/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Domain/EasyAbp/EShop/Products/Products/IOrderCreatedEventHandler.cs
+++ /dev/null
@@ -1,11 +0,0 @@
-using EasyAbp.EShop.Orders.Orders;
-using Volo.Abp.Domain.Entities.Events.Distributed;
-using Volo.Abp.EventBus.Distributed;
-
-namespace EasyAbp.EShop.Products.Products
-{
- public interface IOrderCreatedEventHandler : IDistributedEventHandler>
- {
-
- }
-}
\ No newline at end of file
diff --git a/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Domain/EasyAbp/EShop/Products/Products/OrderCreatedEventHandler.cs b/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Domain/EasyAbp/EShop/Products/Products/OrderCreatedEventHandler.cs
index 2cbd51770..4c5f24da2 100644
--- a/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Domain/EasyAbp/EShop/Products/Products/OrderCreatedEventHandler.cs
+++ b/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Domain/EasyAbp/EShop/Products/Products/OrderCreatedEventHandler.cs
@@ -10,7 +10,7 @@
namespace EasyAbp.EShop.Products.Products
{
- public class OrderCreatedEventHandler : IOrderCreatedEventHandler, ITransientDependency
+ public class OrderCreatedEventHandler : IDistributedEventHandler>, ITransientDependency
{
private readonly ICurrentTenant _currentTenant;
private readonly IUnitOfWorkManager _unitOfWorkManager;
@@ -32,10 +32,9 @@ public OrderCreatedEventHandler(
_productManager = productManager;
}
+ [UnitOfWork(true)]
public virtual async Task HandleEventAsync(EntityCreatedEto eventData)
{
- using var uow = _unitOfWorkManager.Begin(isTransactional: true);
-
using var changeTenant = _currentTenant.Change(eventData.Entity.TenantId);
var models = new List();
@@ -49,7 +48,7 @@ public virtual async Task HandleEventAsync(EntityCreatedEto eventData)
if (productSku == null)
{
- await PublishResultEventAsync(eventData, false);
+ await PublishInventoryReductionResultEventAsync(eventData, false);
return;
}
@@ -61,7 +60,7 @@ public virtual async Task HandleEventAsync(EntityCreatedEto eventData)
if (!await _productManager.IsInventorySufficientAsync(product, productSku, orderLine.Quantity))
{
- await PublishResultEventAsync(eventData, false);
+ await PublishInventoryReductionResultEventAsync(eventData, false);
return;
}
@@ -82,26 +81,25 @@ public virtual async Task HandleEventAsync(EntityCreatedEto eventData)
continue;
}
- await uow.RollbackAsync();
+ // Todo: should release unused inventory since (external) inventory providers may not be transactional.
+ await _unitOfWorkManager.Current.RollbackAsync();
- await PublishResultEventAsync(eventData, false);
+ await PublishInventoryReductionResultEventAsync(eventData, false, true);
return;
}
- await uow.CompleteAsync();
-
- await PublishResultEventAsync(eventData, true);
+ await PublishInventoryReductionResultEventAsync(eventData, true);
}
- protected virtual async Task PublishResultEventAsync(EntityCreatedEto orderCreatedEto, bool isSuccess)
+ protected virtual async Task PublishInventoryReductionResultEventAsync(EntityCreatedEto orderCreatedEto, bool isSuccess, bool publishNow = false)
{
await _distributedEventBus.PublishAsync(new ProductInventoryReductionAfterOrderPlacedResultEto
{
TenantId = orderCreatedEto.Entity.TenantId,
OrderId = orderCreatedEto.Entity.Id,
IsSuccess = isSuccess
- });
+ }, !publishNow, !publishNow);
}
}
}
\ No newline at end of file
diff --git a/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Domain/EasyAbp/EShop/Products/Products/OrderPaidEventHandler.cs b/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Domain/EasyAbp/EShop/Products/Products/OrderPaidEventHandler.cs
index 46069cdba..3f561dd67 100644
--- a/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Domain/EasyAbp/EShop/Products/Products/OrderPaidEventHandler.cs
+++ b/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Domain/EasyAbp/EShop/Products/Products/OrderPaidEventHandler.cs
@@ -31,10 +31,9 @@ public OrderPaidEventHandler(
_productManager = productManager;
}
+ [UnitOfWork(true)]
public virtual async Task HandleEventAsync(OrderPaidEto eventData)
{
- using var uow = _unitOfWorkManager.Begin(isTransactional: true);
-
using var changeTenant = _currentTenant.Change(eventData.Order.TenantId);
var models = new List();
@@ -48,7 +47,7 @@ public virtual async Task HandleEventAsync(OrderPaidEto eventData)
if (productSku == null)
{
- await PublishResultEventAsync(eventData, false);
+ await PublishInventoryReductionResultEventAsync(eventData, false);
return;
}
@@ -60,7 +59,7 @@ public virtual async Task HandleEventAsync(OrderPaidEto eventData)
if (!await _productManager.IsInventorySufficientAsync(product, productSku, orderLine.Quantity))
{
- await PublishResultEventAsync(eventData, false);
+ await PublishInventoryReductionResultEventAsync(eventData, false);
return;
}
@@ -81,19 +80,17 @@ public virtual async Task HandleEventAsync(OrderPaidEto eventData)
continue;
}
- await uow.RollbackAsync();
+ await _unitOfWorkManager.Current.RollbackAsync();
- await PublishResultEventAsync(eventData, false);
+ await PublishInventoryReductionResultEventAsync(eventData, false, true);
return;
}
- await uow.CompleteAsync();
-
- await PublishResultEventAsync(eventData, true);
+ await PublishInventoryReductionResultEventAsync(eventData, true);
}
- protected virtual async Task PublishResultEventAsync(OrderPaidEto orderPaidEto, bool isSuccess)
+ protected virtual async Task PublishInventoryReductionResultEventAsync(OrderPaidEto orderPaidEto, bool isSuccess, bool publishNow = false)
{
await _distributedEventBus.PublishAsync(new ProductInventoryReductionAfterOrderPaidResultEto
{
@@ -102,7 +99,7 @@ await _distributedEventBus.PublishAsync(new ProductInventoryReductionAfterOrderP
PaymentId = orderPaidEto.PaymentId,
PaymentItemId = orderPaidEto.PaymentItemId,
IsSuccess = isSuccess
- });
+ }, !publishNow, !publishNow);
}
}
}
\ No newline at end of file
diff --git a/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Domain/EasyAbp/EShop/Products/Products/ProductManager.cs b/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Domain/EasyAbp/EShop/Products/Products/ProductManager.cs
index f748f5d74..b91af8b56 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
@@ -6,6 +6,7 @@
using EasyAbp.EShop.Products.ProductCategories;
using Microsoft.Extensions.DependencyInjection;
using Volo.Abp.Domain.Services;
+using Volo.Abp.Uow;
namespace EasyAbp.EShop.Products.Products
{
@@ -31,6 +32,7 @@ public ProductManager(
_productGroupConfigurationProvider = productGroupConfigurationProvider;
}
+ [UnitOfWork(true)]
public virtual async Task CreateAsync(Product product, IEnumerable categoryIds = null)
{
product.TrimUniqueName();
@@ -58,6 +60,7 @@ protected virtual Task CheckProductGroupNameAsync(Product product)
return Task.CompletedTask;
}
+ [UnitOfWork(true)]
public virtual async Task UpdateAsync(Product product, IEnumerable categoryIds = null)
{
await CheckProductGroupNameAsync(product);
@@ -73,6 +76,7 @@ public virtual async Task UpdateAsync(Product product, IEnumerable x.ProductId.Equals(product.Id));
@@ -80,6 +84,7 @@ public virtual async Task DeleteAsync(Product product)
await _productRepository.DeleteAsync(product, true);
}
+ [UnitOfWork(true)]
public virtual async Task DeleteAsync(Guid id)
{
await _productCategoryRepository.DeleteAsync(x => x.ProductId.Equals(id));
@@ -87,6 +92,7 @@ public virtual async Task DeleteAsync(Guid id)
await _productRepository.DeleteAsync(id, true);
}
+ [UnitOfWork]
public virtual async Task CreateSkuAsync(Product product, ProductSku productSku)
{
// productSku.SetSerializedAttributeOptionIds(await _attributeOptionIdsSerializer.FormatAsync(productSku.SerializedAttributeOptionIds));
@@ -129,6 +135,7 @@ protected virtual Task CheckSkuAttributeOptionsAsync(Product product, ProductSku
return Task.CompletedTask;
}
+ [UnitOfWork]
public virtual async Task UpdateSkuAsync(Product product, ProductSku productSku)
{
await CheckProductSkuNameUniqueAsync(product, productSku);
@@ -136,6 +143,7 @@ public virtual async Task UpdateSkuAsync(Product product, ProductSku pr
return await _productRepository.UpdateAsync(product, true);
}
+ [UnitOfWork]
public virtual async Task DeleteSkuAsync(Product product, ProductSku productSku)
{
product.ProductSkus.Remove(productSku);
@@ -143,11 +151,13 @@ public virtual async Task DeleteSkuAsync(Product product, ProductSku pr
return await _productRepository.UpdateAsync(product, true);
}
+ [UnitOfWork]
protected virtual async Task CheckProductUniqueNameAsync(Product product)
{
await _productRepository.CheckUniqueNameAsync(product);
}
+ [UnitOfWork]
protected virtual async Task CheckProductDetailAvailableAsync(Guid currentProductId, Guid desiredProductDetailId)
{
var otherOwner = await _productRepository.FindAsync(x =>
@@ -161,6 +171,7 @@ protected virtual async Task CheckProductDetailAvailableAsync(Guid currentProduc
}
}
+ [UnitOfWork(true)]
protected virtual async Task UpdateProductCategoriesAsync(Guid productId, IEnumerable categoryIds)
{
await _productCategoryRepository.DeleteAsync(x => x.ProductId.Equals(productId));
@@ -199,13 +210,14 @@ public virtual async Task TryReduceInventoryAsync(Product product, Product
return await _productInventoryProvider.TryReduceInventoryAsync(product, productSku, quantity, increaseSold);
}
+ [UnitOfWork]
public virtual async Task GetProductPriceAsync(Product product, ProductSku productSku)
{
var price = await _productPriceProvider.GetPriceAsync(product, productSku);
var discountedPrice = price;
- foreach (var provider in ServiceProvider.GetServices())
+ foreach (var provider in LazyServiceProvider.LazyGetService>())
{
discountedPrice = await provider.GetDiscountedPriceAsync(product, productSku, discountedPrice);
}
diff --git a/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Domain/EasyAbp/EShop/Products/Products/ProductViewSoldDataUpdater.cs b/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Domain/EasyAbp/EShop/Products/Products/ProductViewSoldDataUpdater.cs
index 1b3e4ff10..c87aca441 100644
--- a/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Domain/EasyAbp/EShop/Products/Products/ProductViewSoldDataUpdater.cs
+++ b/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Domain/EasyAbp/EShop/Products/Products/ProductViewSoldDataUpdater.cs
@@ -8,8 +8,10 @@
namespace EasyAbp.EShop.Products.Products
{
- public class ProductViewSoldDataUpdater : IDistributedEventHandler,
- IProductViewSoldDataUpdater, ITransientDependency
+ public class ProductViewSoldDataUpdater :
+ IDistributedEventHandler,
+ IProductViewSoldDataUpdater,
+ ITransientDependency
{
private readonly IProductViewCacheKeyProvider _productViewCacheKeyProvider;
private readonly IDistributedCache _cache;
@@ -22,7 +24,7 @@ public ProductViewSoldDataUpdater(
_cache = cache;
}
- public async Task HandleEventAsync(ProductInventoryChangedEto eventData)
+ public virtual async Task HandleEventAsync(ProductInventoryChangedEto eventData)
{
await ClearProductViewCacheAsync(eventData.StoreId);
}
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 f28636d31..7304fc66c 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
@@ -3,7 +3,7 @@
- netstandard2.1
+ net6.0
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 438a5714c..22e835f5d 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
@@ -12,4 +12,9 @@
+
+
+
+
+
diff --git a/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.HttpApi.Client/EasyAbp/EShop/Products/EShopProductsHttpApiClientModule.cs b/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.HttpApi.Client/EasyAbp/EShop/Products/EShopProductsHttpApiClientModule.cs
index 1c1b48b73..ee2211335 100644
--- a/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.HttpApi.Client/EasyAbp/EShop/Products/EShopProductsHttpApiClientModule.cs
+++ b/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.HttpApi.Client/EasyAbp/EShop/Products/EShopProductsHttpApiClientModule.cs
@@ -1,6 +1,7 @@
using Microsoft.Extensions.DependencyInjection;
using Volo.Abp.Http.Client;
using Volo.Abp.Modularity;
+using Volo.Abp.VirtualFileSystem;
namespace EasyAbp.EShop.Products
{
@@ -9,7 +10,7 @@ namespace EasyAbp.EShop.Products
typeof(AbpHttpClientModule))]
public class EShopProductsHttpApiClientModule : AbpModule
{
- public const string RemoteServiceName = "EShopProducts";
+ public const string RemoteServiceName = EShopProductsRemoteServiceConsts.RemoteServiceName;
public override void ConfigureServices(ServiceConfigurationContext context)
{
@@ -17,6 +18,11 @@ public override void ConfigureServices(ServiceConfigurationContext context)
typeof(EShopProductsApplicationContractsModule).Assembly,
RemoteServiceName
);
+
+ Configure(options =>
+ {
+ options.FileSets.AddEmbedded();
+ });
}
}
}
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 fef92f155..26f0e3930 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
@@ -3,7 +3,7 @@
- net5.0
+ net6.0
diff --git a/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.HttpApi/EasyAbp/EShop/Products/Categories/CategoryController.cs b/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.HttpApi/EasyAbp/EShop/Products/Categories/CategoryController.cs
index c60c88e47..9b1efca7a 100644
--- a/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.HttpApi/EasyAbp/EShop/Products/Categories/CategoryController.cs
+++ b/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.HttpApi/EasyAbp/EShop/Products/Categories/CategoryController.cs
@@ -7,7 +7,7 @@
namespace EasyAbp.EShop.Products.Categories
{
- [RemoteService(Name = "EasyAbpEShopProducts")]
+ [RemoteService(Name = EShopProductsRemoteServiceConsts.RemoteServiceName)]
[Route(ProductsConsts.CategoryRouteBase)]
public class CategoryController : ProductsController, ICategoryAppService
{
diff --git a/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.HttpApi/EasyAbp/EShop/Products/ProductCategories/ProductCategoryController.cs b/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.HttpApi/EasyAbp/EShop/Products/ProductCategories/ProductCategoryController.cs
index 349b64625..3eb194229 100644
--- a/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.HttpApi/EasyAbp/EShop/Products/ProductCategories/ProductCategoryController.cs
+++ b/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.HttpApi/EasyAbp/EShop/Products/ProductCategories/ProductCategoryController.cs
@@ -7,7 +7,7 @@
namespace EasyAbp.EShop.Products.ProductCategories
{
- [RemoteService(Name = "EasyAbpEShopProducts")]
+ [RemoteService(Name = EShopProductsRemoteServiceConsts.RemoteServiceName)]
[Route("/api/e-shop/products/product-category")]
public class ProductCategoryController : ProductsController, IProductCategoryAppService
{
diff --git a/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.HttpApi/EasyAbp/EShop/Products/ProductDetailHistories/ProductDetailHistoryController.cs b/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.HttpApi/EasyAbp/EShop/Products/ProductDetailHistories/ProductDetailHistoryController.cs
index 73a02e4e7..02f63cf3e 100644
--- a/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.HttpApi/EasyAbp/EShop/Products/ProductDetailHistories/ProductDetailHistoryController.cs
+++ b/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.HttpApi/EasyAbp/EShop/Products/ProductDetailHistories/ProductDetailHistoryController.cs
@@ -7,7 +7,7 @@
namespace EasyAbp.EShop.Products.ProductDetailHistories
{
- [RemoteService(Name = "EasyAbpEShopProducts")]
+ [RemoteService(Name = EShopProductsRemoteServiceConsts.RemoteServiceName)]
[Route("/api/e-shop/products/product-detail-history")]
public class ProductDetailHistoryController : ProductsController, IProductDetailHistoryAppService
{
diff --git a/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.HttpApi/EasyAbp/EShop/Products/ProductDetails/ProductDetailController.cs b/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.HttpApi/EasyAbp/EShop/Products/ProductDetails/ProductDetailController.cs
index d45a52c69..d5401cd06 100644
--- a/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.HttpApi/EasyAbp/EShop/Products/ProductDetails/ProductDetailController.cs
+++ b/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.HttpApi/EasyAbp/EShop/Products/ProductDetails/ProductDetailController.cs
@@ -7,7 +7,7 @@
namespace EasyAbp.EShop.Products.ProductDetails
{
- [RemoteService(Name = "EasyAbpEShopProducts")]
+ [RemoteService(Name = EShopProductsRemoteServiceConsts.RemoteServiceName)]
[Route("/api/e-shop/products/product-detail")]
public class ProductDetailController : ProductsController, IProductDetailAppService
{
diff --git a/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.HttpApi/EasyAbp/EShop/Products/ProductHistories/ProductHistoryController.cs b/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.HttpApi/EasyAbp/EShop/Products/ProductHistories/ProductHistoryController.cs
index 8ffb50a10..8c7f00e9c 100644
--- a/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.HttpApi/EasyAbp/EShop/Products/ProductHistories/ProductHistoryController.cs
+++ b/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.HttpApi/EasyAbp/EShop/Products/ProductHistories/ProductHistoryController.cs
@@ -7,7 +7,7 @@
namespace EasyAbp.EShop.Products.ProductHistories
{
- [RemoteService(Name = "EasyAbpEShopProducts")]
+ [RemoteService(Name = EShopProductsRemoteServiceConsts.RemoteServiceName)]
[Route("/api/e-shop/products/product-history")]
public class ProductHistoryController : ProductsController, IProductHistoryAppService
{
diff --git a/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.HttpApi/EasyAbp/EShop/Products/ProductInventories/ProductInventoryController.cs b/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.HttpApi/EasyAbp/EShop/Products/ProductInventories/ProductInventoryController.cs
index 2bb17e42d..375e5b48a 100644
--- a/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.HttpApi/EasyAbp/EShop/Products/ProductInventories/ProductInventoryController.cs
+++ b/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.HttpApi/EasyAbp/EShop/Products/ProductInventories/ProductInventoryController.cs
@@ -7,7 +7,7 @@
namespace EasyAbp.EShop.Products.ProductInventories
{
- [RemoteService(Name = "EasyAbpEShopProducts")]
+ [RemoteService(Name = EShopProductsRemoteServiceConsts.RemoteServiceName)]
[Route("/api/e-shop/products/product-inventory")]
public class ProductInventoryController : ProductsController, IProductInventoryAppService
{
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 caf717483..58bb6e852 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
@@ -7,7 +7,7 @@
namespace EasyAbp.EShop.Products.Products
{
- [RemoteService(Name = "EasyAbpEShopProducts")]
+ [RemoteService(Name = EShopProductsRemoteServiceConsts.RemoteServiceName)]
[Route("/api/e-shop/products/product")]
public class ProductController : ProductsController, IProductAppService
{
diff --git a/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.HttpApi/EasyAbp/EShop/Products/Products/ProductViewController.cs b/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.HttpApi/EasyAbp/EShop/Products/Products/ProductViewController.cs
index 0886ce572..93a3682f2 100644
--- a/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.HttpApi/EasyAbp/EShop/Products/Products/ProductViewController.cs
+++ b/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.HttpApi/EasyAbp/EShop/Products/Products/ProductViewController.cs
@@ -8,7 +8,7 @@
namespace EasyAbp.EShop.Products.Products
{
- [RemoteService(Name = "EasyAbpEShopProducts")]
+ [RemoteService(Name = EShopProductsRemoteServiceConsts.RemoteServiceName)]
[Route("/api/e-shop/products/product/view")]
public class ProductViewController : ProductsController, IProductViewAppService
{
diff --git a/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.HttpApi/EasyAbp/EShop/Products/ProductsController.cs b/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.HttpApi/EasyAbp/EShop/Products/ProductsController.cs
index 17c0b0023..2a5bbf21e 100644
--- a/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.HttpApi/EasyAbp/EShop/Products/ProductsController.cs
+++ b/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.HttpApi/EasyAbp/EShop/Products/ProductsController.cs
@@ -1,9 +1,11 @@
using EasyAbp.EShop.Products.Localization;
+using Microsoft.AspNetCore.Mvc;
using Volo.Abp.AspNetCore.Mvc;
namespace EasyAbp.EShop.Products
{
- public abstract class ProductsController : AbpController
+ [Area(EShopProductsRemoteServiceConsts.ModuleName)]
+ public abstract class ProductsController : AbpControllerBase
{
protected ProductsController()
{
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 7bbdd0f03..43bd726db 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
@@ -3,7 +3,7 @@
- net5.0
+ net6.0
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 c1564bbfe..7be21c7d6 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
@@ -13,7 +13,7 @@
namespace EasyAbp.EShop.Products.Web
{
[DependsOn(
- typeof(EShopProductsHttpApiModule),
+ typeof(EShopProductsApplicationContractsModule),
typeof(AbpAspNetCoreMvcUiThemeSharedModule),
typeof(AbpAutoMapperModule),
typeof(AbpTagHelperPlusModule)
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 10ae63e20..7b92c7206 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
@@ -3,7 +3,7 @@
- net5.0
+ net6.0
$(AssetTargetFallback);portable-net45+win8+wp8+wpa81;
true
Library
@@ -19,11 +19,11 @@
-
+
-
+
diff --git a/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Web/Pages/EShop/Products/Categories/Category/Index.cshtml b/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Web/Pages/EShop/Products/Categories/Category/Index.cshtml
index eedd19ce5..02d519c1a 100644
--- a/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Web/Pages/EShop/Products/Categories/Category/Index.cshtml
+++ b/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Web/Pages/EShop/Products/Categories/Category/Index.cshtml
@@ -34,7 +34,7 @@
@L["Category"]@parentDisplayName
-
+
@L["Product"] - @Model.StoreName
-
+
@L["ProductSku"] - @Model.ProductDisplayName
-
+
@if (await Authorization.IsGrantedAsync(ProductsPermissions.Products.Create))
{
-
-
- net5.0
+ net6.0
EasyAbp.EShop.Products
-
+
diff --git a/modules/EasyAbp.EShop.Products/test/EasyAbp.EShop.Products.Domain.Tests/EasyAbp.EShop.Products.Domain.Tests.csproj b/modules/EasyAbp.EShop.Products/test/EasyAbp.EShop.Products.Domain.Tests/EasyAbp.EShop.Products.Domain.Tests.csproj
index e4fb8bb19..ad2d9eb95 100644
--- a/modules/EasyAbp.EShop.Products/test/EasyAbp.EShop.Products.Domain.Tests/EasyAbp.EShop.Products.Domain.Tests.csproj
+++ b/modules/EasyAbp.EShop.Products/test/EasyAbp.EShop.Products.Domain.Tests/EasyAbp.EShop.Products.Domain.Tests.csproj
@@ -1,14 +1,12 @@
-
-
- net5.0
+ net6.0
EasyAbp.EShop.Products
-
+
diff --git a/modules/EasyAbp.EShop.Products/test/EasyAbp.EShop.Products.EntityFrameworkCore.Tests/EasyAbp.EShop.Products.EntityFrameworkCore.Tests.csproj b/modules/EasyAbp.EShop.Products/test/EasyAbp.EShop.Products.EntityFrameworkCore.Tests/EasyAbp.EShop.Products.EntityFrameworkCore.Tests.csproj
index d7def459a..b76d02759 100644
--- a/modules/EasyAbp.EShop.Products/test/EasyAbp.EShop.Products.EntityFrameworkCore.Tests/EasyAbp.EShop.Products.EntityFrameworkCore.Tests.csproj
+++ b/modules/EasyAbp.EShop.Products/test/EasyAbp.EShop.Products.EntityFrameworkCore.Tests/EasyAbp.EShop.Products.EntityFrameworkCore.Tests.csproj
@@ -1,17 +1,15 @@
-
-
- net5.0
+ net6.0
EasyAbp.EShop.Products
-
-
-
-
+
+
+
+
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 3e2eb82fe..fb9060d09 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
@@ -2,7 +2,7 @@
Exe
- net5.0
+ net6.0
EasyAbp.EShop.Products
@@ -20,7 +20,7 @@
-
+
diff --git a/modules/EasyAbp.EShop.Products/test/EasyAbp.EShop.Products.MongoDB.Tests/EasyAbp.EShop.Products.MongoDB.Tests.csproj b/modules/EasyAbp.EShop.Products/test/EasyAbp.EShop.Products.MongoDB.Tests/EasyAbp.EShop.Products.MongoDB.Tests.csproj
index 9a766b614..ceaeb52f5 100644
--- a/modules/EasyAbp.EShop.Products/test/EasyAbp.EShop.Products.MongoDB.Tests/EasyAbp.EShop.Products.MongoDB.Tests.csproj
+++ b/modules/EasyAbp.EShop.Products/test/EasyAbp.EShop.Products.MongoDB.Tests/EasyAbp.EShop.Products.MongoDB.Tests.csproj
@@ -1,15 +1,13 @@
-
-
- net5.0
+ net6.0
EasyAbp.EShop.Products
-
-
+
+
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 eafe0752d..b6f12f049 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
@@ -1,14 +1,12 @@
-
-
- net5.0
+ net6.0
EasyAbp.EShop.Products
-
+
diff --git a/modules/EasyAbp.EShop.Stores/src/EasyAbp.EShop.Stores.Application.Contracts/EasyAbp/EShop/Stores/EShopStoresRemoteServiceConsts.cs b/modules/EasyAbp.EShop.Stores/src/EasyAbp.EShop.Stores.Application.Contracts/EasyAbp/EShop/Stores/EShopStoresRemoteServiceConsts.cs
new file mode 100644
index 000000000..a1837996e
--- /dev/null
+++ b/modules/EasyAbp.EShop.Stores/src/EasyAbp.EShop.Stores.Application.Contracts/EasyAbp/EShop/Stores/EShopStoresRemoteServiceConsts.cs
@@ -0,0 +1,8 @@
+namespace EasyAbp.EShop.Stores;
+
+public class EShopStoresRemoteServiceConsts
+{
+ public const string RemoteServiceName = "EasyAbpEShopStores";
+
+ public const string ModuleName = "easyAbpEShopStores";
+}
\ No newline at end of file
diff --git a/modules/EasyAbp.EShop.Stores/src/EasyAbp.EShop.Stores.Application/EasyAbp/EShop/Stores/StoreOwners/StoreOwnerAppService.cs b/modules/EasyAbp.EShop.Stores/src/EasyAbp.EShop.Stores.Application/EasyAbp/EShop/Stores/StoreOwners/StoreOwnerAppService.cs
index b539e3d4c..b8aac6ee6 100644
--- a/modules/EasyAbp.EShop.Stores/src/EasyAbp.EShop.Stores.Application/EasyAbp/EShop/Stores/StoreOwners/StoreOwnerAppService.cs
+++ b/modules/EasyAbp.EShop.Stores/src/EasyAbp.EShop.Stores.Application/EasyAbp/EShop/Stores/StoreOwners/StoreOwnerAppService.cs
@@ -74,7 +74,7 @@ public override async Task> GetListAsync(GetStoreO
protected override async Task> CreateFilteredQueryAsync(GetStoreOwnerListDto input)
{
- var queryable = Repository.AsQueryable();
+ var queryable = await Repository.GetQueryableAsync();
if (input.OwnerUserId.HasValue)
{
diff --git a/modules/EasyAbp.EShop.Stores/src/EasyAbp.EShop.Stores.Application/EasyAbp/EShop/Stores/Stores/StoreAppService.cs b/modules/EasyAbp.EShop.Stores/src/EasyAbp.EShop.Stores.Application/EasyAbp/EShop/Stores/Stores/StoreAppService.cs
index 37d1f0be0..bad244122 100644
--- a/modules/EasyAbp.EShop.Stores/src/EasyAbp.EShop.Stores.Application/EasyAbp/EShop/Stores/Stores/StoreAppService.cs
+++ b/modules/EasyAbp.EShop.Stores/src/EasyAbp.EShop.Stores.Application/EasyAbp/EShop/Stores/Stores/StoreAppService.cs
@@ -33,7 +33,7 @@ protected override async Task> CreateFilteredQueryAsync(GetSto
{
if (!input.OnlyManageable || await _permissionChecker.IsGrantedAsync(StoresPermissions.Stores.CrossStore))
{
- return _repository.AsQueryable();
+ return await _repository.GetQueryableAsync();
}
return await _repository.GetQueryableOnlyOwnStoreAsync(CurrentUser.GetId());
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 73d72f6dc..298a376f3 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
@@ -18,7 +18,7 @@
-
+
diff --git a/modules/EasyAbp.EShop.Stores/src/EasyAbp.EShop.Stores.Domain/EasyAbp/EShop/Stores/StoreOwners/StoreOwnerCacheItemInvalidator.cs b/modules/EasyAbp.EShop.Stores/src/EasyAbp.EShop.Stores.Domain/EasyAbp/EShop/Stores/StoreOwners/StoreOwnerCacheItemInvalidator.cs
index 7d96a3c62..525bd3390 100644
--- a/modules/EasyAbp.EShop.Stores/src/EasyAbp.EShop.Stores.Domain/EasyAbp/EShop/Stores/StoreOwners/StoreOwnerCacheItemInvalidator.cs
+++ b/modules/EasyAbp.EShop.Stores/src/EasyAbp.EShop.Stores.Domain/EasyAbp/EShop/Stores/StoreOwners/StoreOwnerCacheItemInvalidator.cs
@@ -8,7 +8,10 @@
namespace EasyAbp.EShop.Stores.StoreOwners
{
- public class StoreOwnerCacheItemInvalidator : ILocalEventHandler>, ITransientDependency
+ // Todo: should use distributed event.
+ public class StoreOwnerCacheItemInvalidator :
+ ILocalEventHandler>,
+ ITransientDependency
{
protected ICurrentTenant CurrentTenant { get; }
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 ca0f89caa..9af5c50c2 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
@@ -3,7 +3,7 @@
- netstandard2.1
+ net6.0
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 cf333ee2b..795ff2d27 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
@@ -12,4 +12,9 @@
+
+
+
+
+
diff --git a/modules/EasyAbp.EShop.Stores/src/EasyAbp.EShop.Stores.HttpApi.Client/EasyAbp/EShop/Stores/EShopStoresHttpApiClientModule.cs b/modules/EasyAbp.EShop.Stores/src/EasyAbp.EShop.Stores.HttpApi.Client/EasyAbp/EShop/Stores/EShopStoresHttpApiClientModule.cs
index 97cfdbc6c..42e8a2cff 100644
--- a/modules/EasyAbp.EShop.Stores/src/EasyAbp.EShop.Stores.HttpApi.Client/EasyAbp/EShop/Stores/EShopStoresHttpApiClientModule.cs
+++ b/modules/EasyAbp.EShop.Stores/src/EasyAbp.EShop.Stores.HttpApi.Client/EasyAbp/EShop/Stores/EShopStoresHttpApiClientModule.cs
@@ -1,6 +1,7 @@
using Microsoft.Extensions.DependencyInjection;
using Volo.Abp.Http.Client;
using Volo.Abp.Modularity;
+using Volo.Abp.VirtualFileSystem;
namespace EasyAbp.EShop.Stores
{
@@ -9,7 +10,7 @@ namespace EasyAbp.EShop.Stores
typeof(AbpHttpClientModule))]
public class EShopStoresHttpApiClientModule : AbpModule
{
- public const string RemoteServiceName = "EShopStores";
+ public const string RemoteServiceName = EShopStoresRemoteServiceConsts.RemoteServiceName;
public override void ConfigureServices(ServiceConfigurationContext context)
{
@@ -17,6 +18,11 @@ public override void ConfigureServices(ServiceConfigurationContext context)
typeof(EShopStoresApplicationContractsModule).Assembly,
RemoteServiceName
);
+
+ Configure(options =>
+ {
+ options.FileSets.AddEmbedded();
+ });
}
}
}
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 41ad998b1..4e58cbd75 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
@@ -3,7 +3,7 @@
- net5.0
+ net6.0
diff --git a/modules/EasyAbp.EShop.Stores/src/EasyAbp.EShop.Stores.HttpApi/EasyAbp/EShop/Stores/StoreOwners/StoreOwnerController.cs b/modules/EasyAbp.EShop.Stores/src/EasyAbp.EShop.Stores.HttpApi/EasyAbp/EShop/Stores/StoreOwners/StoreOwnerController.cs
index 18b003117..8732a351d 100644
--- a/modules/EasyAbp.EShop.Stores/src/EasyAbp.EShop.Stores.HttpApi/EasyAbp/EShop/Stores/StoreOwners/StoreOwnerController.cs
+++ b/modules/EasyAbp.EShop.Stores/src/EasyAbp.EShop.Stores.HttpApi/EasyAbp/EShop/Stores/StoreOwners/StoreOwnerController.cs
@@ -7,7 +7,7 @@
namespace EasyAbp.EShop.Stores.StoreOwners
{
- [RemoteService(Name = "EasyAbpEShopStores")]
+ [RemoteService(Name = EShopStoresRemoteServiceConsts.RemoteServiceName)]
[Route("/api/e-shop/stores/store-owner")]
public class StoreOwnerController : StoresController
{
diff --git a/modules/EasyAbp.EShop.Stores/src/EasyAbp.EShop.Stores.HttpApi/EasyAbp/EShop/Stores/Stores/StoreController.cs b/modules/EasyAbp.EShop.Stores/src/EasyAbp.EShop.Stores.HttpApi/EasyAbp/EShop/Stores/Stores/StoreController.cs
index 69e8413c0..2fba8f142 100644
--- a/modules/EasyAbp.EShop.Stores/src/EasyAbp.EShop.Stores.HttpApi/EasyAbp/EShop/Stores/Stores/StoreController.cs
+++ b/modules/EasyAbp.EShop.Stores/src/EasyAbp.EShop.Stores.HttpApi/EasyAbp/EShop/Stores/Stores/StoreController.cs
@@ -7,7 +7,7 @@
namespace EasyAbp.EShop.Stores.Stores
{
- [RemoteService(Name = "EasyAbpEShopStores")]
+ [RemoteService(Name = EShopStoresRemoteServiceConsts.RemoteServiceName)]
[Route(StoresConsts.StoreRouteBase)]
public class StoreController : StoresController, IStoreAppService
{
diff --git a/modules/EasyAbp.EShop.Stores/src/EasyAbp.EShop.Stores.HttpApi/EasyAbp/EShop/Stores/StoresController.cs b/modules/EasyAbp.EShop.Stores/src/EasyAbp.EShop.Stores.HttpApi/EasyAbp/EShop/Stores/StoresController.cs
index f080ec569..8c7f320f1 100644
--- a/modules/EasyAbp.EShop.Stores/src/EasyAbp.EShop.Stores.HttpApi/EasyAbp/EShop/Stores/StoresController.cs
+++ b/modules/EasyAbp.EShop.Stores/src/EasyAbp.EShop.Stores.HttpApi/EasyAbp/EShop/Stores/StoresController.cs
@@ -1,9 +1,11 @@
using EasyAbp.EShop.Stores.Localization;
+using Microsoft.AspNetCore.Mvc;
using Volo.Abp.AspNetCore.Mvc;
namespace EasyAbp.EShop.Stores
{
- public abstract class StoresController : AbpController
+ [Area(EShopStoresRemoteServiceConsts.ModuleName)]
+ public abstract class StoresController : AbpControllerBase
{
protected StoresController()
{
diff --git a/modules/EasyAbp.EShop.Stores/src/EasyAbp.EShop.Stores.HttpApi/EasyAbp/EShop/Stores/Transactions/TransactionController.cs b/modules/EasyAbp.EShop.Stores/src/EasyAbp.EShop.Stores.HttpApi/EasyAbp/EShop/Stores/Transactions/TransactionController.cs
index fe8664985..9f2931271 100644
--- a/modules/EasyAbp.EShop.Stores/src/EasyAbp.EShop.Stores.HttpApi/EasyAbp/EShop/Stores/Transactions/TransactionController.cs
+++ b/modules/EasyAbp.EShop.Stores/src/EasyAbp.EShop.Stores.HttpApi/EasyAbp/EShop/Stores/Transactions/TransactionController.cs
@@ -7,7 +7,7 @@
namespace EasyAbp.EShop.Stores.Transactions
{
- [RemoteService(Name = "EasyAbpEShopStores")]
+ [RemoteService(Name = EShopStoresRemoteServiceConsts.RemoteServiceName)]
[Route("/api/e-shop/stores/transaction")]
public class TransactionController : StoresController, ITransactionAppService
{
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 07ca24994..5790595e7 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
@@ -3,7 +3,7 @@
- net5.0
+ net6.0
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 b3b02af47..d687eb2ab 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
@@ -14,7 +14,7 @@
namespace EasyAbp.EShop.Stores.Web
{
[DependsOn(
- typeof(EShopStoresHttpApiModule),
+ typeof(EShopStoresApplicationContractsModule),
typeof(AbpAspNetCoreMvcUiThemeSharedModule),
typeof(AbpAutoMapperModule),
typeof(AbpIdentityApplicationContractsModule),
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 9f84ccbff..fc321acd2 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
@@ -3,7 +3,7 @@
- net5.0
+ net6.0
$(AssetTargetFallback);portable-net45+win8+wp8+wpa81;
true
Library
@@ -19,11 +19,11 @@
-
+
-
+
diff --git a/modules/EasyAbp.EShop.Stores/src/EasyAbp.EShop.Stores.Web/Pages/EShop/Stores/StoreOwners/StoreOwner/Index.cshtml b/modules/EasyAbp.EShop.Stores/src/EasyAbp.EShop.Stores.Web/Pages/EShop/Stores/StoreOwners/StoreOwner/Index.cshtml
index b5c90bf7f..c411dc19a 100644
--- a/modules/EasyAbp.EShop.Stores/src/EasyAbp.EShop.Stores.Web/Pages/EShop/Stores/StoreOwners/StoreOwner/Index.cshtml
+++ b/modules/EasyAbp.EShop.Stores/src/EasyAbp.EShop.Stores.Web/Pages/EShop/Stores/StoreOwners/StoreOwner/Index.cshtml
@@ -36,7 +36,7 @@
@L["StoreOwner"]
-
+
@if (await Authorization.IsGrantedAsync(StoresPermissions.Stores.Manage))
{
@L["Store"]
-
+
@if (await Authorization.IsGrantedAsync(StoresPermissions.Stores.Create))
{
@L["Transaction"]
-
+
@if (await Authorization.IsGrantedAsync(StoresPermissions.Transaction.Create))
{
-
-
- net5.0
+ net6.0
EasyAbp.EShop.Stores
-
+
diff --git a/modules/EasyAbp.EShop.Stores/test/EasyAbp.EShop.Stores.Domain.Tests/EasyAbp.EShop.Stores.Domain.Tests.csproj b/modules/EasyAbp.EShop.Stores/test/EasyAbp.EShop.Stores.Domain.Tests/EasyAbp.EShop.Stores.Domain.Tests.csproj
index 31e564de7..17785934f 100644
--- a/modules/EasyAbp.EShop.Stores/test/EasyAbp.EShop.Stores.Domain.Tests/EasyAbp.EShop.Stores.Domain.Tests.csproj
+++ b/modules/EasyAbp.EShop.Stores/test/EasyAbp.EShop.Stores.Domain.Tests/EasyAbp.EShop.Stores.Domain.Tests.csproj
@@ -1,14 +1,12 @@
-
-
- net5.0
+ net6.0
EasyAbp.EShop.Stores
-
+
diff --git a/modules/EasyAbp.EShop.Stores/test/EasyAbp.EShop.Stores.EntityFrameworkCore.Tests/EasyAbp.EShop.Stores.EntityFrameworkCore.Tests.csproj b/modules/EasyAbp.EShop.Stores/test/EasyAbp.EShop.Stores.EntityFrameworkCore.Tests/EasyAbp.EShop.Stores.EntityFrameworkCore.Tests.csproj
index 938a312a2..4e4cab490 100644
--- a/modules/EasyAbp.EShop.Stores/test/EasyAbp.EShop.Stores.EntityFrameworkCore.Tests/EasyAbp.EShop.Stores.EntityFrameworkCore.Tests.csproj
+++ b/modules/EasyAbp.EShop.Stores/test/EasyAbp.EShop.Stores.EntityFrameworkCore.Tests/EasyAbp.EShop.Stores.EntityFrameworkCore.Tests.csproj
@@ -1,17 +1,15 @@
-
-
- net5.0
+ net6.0
EasyAbp.EShop.Stores
-
-
-
-
+
+
+
+
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 65061573f..725eb601f 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
@@ -2,7 +2,7 @@
Exe
- net5.0
+ net6.0
EasyAbp.EShop.Stores
@@ -20,7 +20,7 @@
-
+
diff --git a/modules/EasyAbp.EShop.Stores/test/EasyAbp.EShop.Stores.MongoDB.Tests/EasyAbp.EShop.Stores.MongoDB.Tests.csproj b/modules/EasyAbp.EShop.Stores/test/EasyAbp.EShop.Stores.MongoDB.Tests/EasyAbp.EShop.Stores.MongoDB.Tests.csproj
index f169a8e91..f0a682827 100644
--- a/modules/EasyAbp.EShop.Stores/test/EasyAbp.EShop.Stores.MongoDB.Tests/EasyAbp.EShop.Stores.MongoDB.Tests.csproj
+++ b/modules/EasyAbp.EShop.Stores/test/EasyAbp.EShop.Stores.MongoDB.Tests/EasyAbp.EShop.Stores.MongoDB.Tests.csproj
@@ -1,15 +1,13 @@
-
-
- net5.0
+ net6.0
EasyAbp.EShop.Stores
-
-
+
+
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 a2c16f35b..50b46ad0b 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
@@ -1,14 +1,12 @@
-
-
- net5.0
+ net6.0
EasyAbp.EShop.Stores
-
+
diff --git a/plugins/Baskets/src/EasyAbp.EShop.Plugins.Baskets.Application.Contracts/EasyAbp/EShop/Plugins/Baskets/EShopPluginsBasketsRemoteServiceConsts.cs b/plugins/Baskets/src/EasyAbp.EShop.Plugins.Baskets.Application.Contracts/EasyAbp/EShop/Plugins/Baskets/EShopPluginsBasketsRemoteServiceConsts.cs
new file mode 100644
index 000000000..0d32e4d26
--- /dev/null
+++ b/plugins/Baskets/src/EasyAbp.EShop.Plugins.Baskets.Application.Contracts/EasyAbp/EShop/Plugins/Baskets/EShopPluginsBasketsRemoteServiceConsts.cs
@@ -0,0 +1,8 @@
+namespace EasyAbp.EShop.Plugins.Baskets;
+
+public class EShopPluginsBasketsRemoteServiceConsts
+{
+ public const string RemoteServiceName = "EasyAbpEShopPluginsBaskets";
+
+ public const string ModuleName = "easyAbpEShopPluginsBaskets";
+}
\ No newline at end of file
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 1b7ec73cf..0fbf76da8 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
@@ -174,7 +174,8 @@ protected override async Task> CreateFilteredQueryAsync(G
{
var userId = input.UserId ?? CurrentUser.GetId();
- return ReadOnlyRepository.Where(item => item.UserId == userId && item.BasketName == input.BasketName);
+ return (await ReadOnlyRepository.GetQueryableAsync())
+ .Where(item => item.UserId == userId && item.BasketName == input.BasketName);
}
public override async Task CreateAsync(CreateBasketItemDto 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 193ed0cf5..754384cf2 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
@@ -13,7 +13,7 @@
-
+
diff --git a/plugins/Baskets/src/EasyAbp.EShop.Plugins.Baskets.Domain/EasyAbp/EShop/Plugins/Baskets/BasketItems/IProductUpdateRecorder.cs b/plugins/Baskets/src/EasyAbp.EShop.Plugins.Baskets.Domain/EasyAbp/EShop/Plugins/Baskets/BasketItems/IProductUpdateRecorder.cs
index e470e0dc8..3dfdc29b5 100644
--- a/plugins/Baskets/src/EasyAbp.EShop.Plugins.Baskets.Domain/EasyAbp/EShop/Plugins/Baskets/BasketItems/IProductUpdateRecorder.cs
+++ b/plugins/Baskets/src/EasyAbp.EShop.Plugins.Baskets.Domain/EasyAbp/EShop/Plugins/Baskets/BasketItems/IProductUpdateRecorder.cs
@@ -5,9 +5,7 @@
namespace EasyAbp.EShop.Plugins.Baskets.BasketItems
{
- public interface IProductUpdateRecorder :
- IDistributedEventHandler>,
- IDistributedEventHandler
+ public interface IProductUpdateRecorder
{
}
diff --git a/plugins/Baskets/src/EasyAbp.EShop.Plugins.Baskets.Domain/EasyAbp/EShop/Plugins/Baskets/BasketItems/ProductUpdateRecorder.cs b/plugins/Baskets/src/EasyAbp.EShop.Plugins.Baskets.Domain/EasyAbp/EShop/Plugins/Baskets/BasketItems/ProductUpdateRecorder.cs
index 303ccf212..673171efb 100644
--- a/plugins/Baskets/src/EasyAbp.EShop.Plugins.Baskets.Domain/EasyAbp/EShop/Plugins/Baskets/BasketItems/ProductUpdateRecorder.cs
+++ b/plugins/Baskets/src/EasyAbp.EShop.Plugins.Baskets.Domain/EasyAbp/EShop/Plugins/Baskets/BasketItems/ProductUpdateRecorder.cs
@@ -6,13 +6,18 @@
using EasyAbp.EShop.Products.Products;
using Volo.Abp.DependencyInjection;
using Volo.Abp.Domain.Entities.Events.Distributed;
+using Volo.Abp.EventBus.Distributed;
using Volo.Abp.Guids;
using Volo.Abp.MultiTenancy;
using Volo.Abp.Uow;
namespace EasyAbp.EShop.Plugins.Baskets.BasketItems
{
- public class ProductUpdateRecorder : IProductUpdateRecorder, ITransientDependency
+ public class ProductUpdateRecorder :
+ IProductUpdateRecorder,
+ IDistributedEventHandler>,
+ IDistributedEventHandler,
+ ITransientDependency
{
private readonly IGuidGenerator _guidGenerator;
private readonly ICurrentTenant _currentTenant;
@@ -43,6 +48,7 @@ public virtual async Task HandleEventAsync(ProductInventoryChangedEto eventData)
await UpdateAsync(eventData.ProductSkuId);
}
+ [UnitOfWork(true)]
protected virtual async Task UpdateAsync(Guid skuId)
{
var entity = await _productUpdateRepository.FindAsync(x => x.ProductSkuId == skuId);
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 60676fe87..24e534015 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
@@ -3,7 +3,7 @@
- netstandard2.1
+ net6.0
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 94be55e4f..dce8bd7b0 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
@@ -12,4 +12,9 @@
+
+
+
+
+
diff --git a/plugins/Baskets/src/EasyAbp.EShop.Plugins.Baskets.HttpApi.Client/EasyAbp/EShop/Plugins/Baskets/EShopPluginsBasketsHttpApiClientModule.cs b/plugins/Baskets/src/EasyAbp.EShop.Plugins.Baskets.HttpApi.Client/EasyAbp/EShop/Plugins/Baskets/EShopPluginsBasketsHttpApiClientModule.cs
index 6d38c5d92..30a073c56 100644
--- a/plugins/Baskets/src/EasyAbp.EShop.Plugins.Baskets.HttpApi.Client/EasyAbp/EShop/Plugins/Baskets/EShopPluginsBasketsHttpApiClientModule.cs
+++ b/plugins/Baskets/src/EasyAbp.EShop.Plugins.Baskets.HttpApi.Client/EasyAbp/EShop/Plugins/Baskets/EShopPluginsBasketsHttpApiClientModule.cs
@@ -1,6 +1,7 @@
using Microsoft.Extensions.DependencyInjection;
using Volo.Abp.Http.Client;
using Volo.Abp.Modularity;
+using Volo.Abp.VirtualFileSystem;
namespace EasyAbp.EShop.Plugins.Baskets
{
@@ -9,7 +10,7 @@ namespace EasyAbp.EShop.Plugins.Baskets
typeof(AbpHttpClientModule))]
public class EShopPluginsBasketsHttpApiClientModule : AbpModule
{
- public const string RemoteServiceName = "EShopPluginsBaskets";
+ public const string RemoteServiceName = EShopPluginsBasketsRemoteServiceConsts.RemoteServiceName;
public override void ConfigureServices(ServiceConfigurationContext context)
{
@@ -17,6 +18,11 @@ public override void ConfigureServices(ServiceConfigurationContext context)
typeof(EShopPluginsBasketsApplicationContractsModule).Assembly,
RemoteServiceName
);
+
+ Configure(options =>
+ {
+ options.FileSets.AddEmbedded();
+ });
}
}
}
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 dbc04ae3e..dc70e4f13 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
@@ -3,7 +3,7 @@
- net5.0
+ net6.0
diff --git a/plugins/Baskets/src/EasyAbp.EShop.Plugins.Baskets.HttpApi/EasyAbp/EShop/Plugins/Baskets/BasketItems/BasketItemController.cs b/plugins/Baskets/src/EasyAbp.EShop.Plugins.Baskets.HttpApi/EasyAbp/EShop/Plugins/Baskets/BasketItems/BasketItemController.cs
index fa571fe11..e4db27ff4 100644
--- a/plugins/Baskets/src/EasyAbp.EShop.Plugins.Baskets.HttpApi/EasyAbp/EShop/Plugins/Baskets/BasketItems/BasketItemController.cs
+++ b/plugins/Baskets/src/EasyAbp.EShop.Plugins.Baskets.HttpApi/EasyAbp/EShop/Plugins/Baskets/BasketItems/BasketItemController.cs
@@ -8,7 +8,7 @@
namespace EasyAbp.EShop.Plugins.Baskets.BasketItems
{
- [RemoteService(Name = "EasyAbpEShopPluginsBaskets")]
+ [RemoteService(Name = EShopPluginsBasketsRemoteServiceConsts.RemoteServiceName)]
[Route("/api/e-shop/plugins/baskets/basket-item")]
public class BasketItemController : BasketsController, IBasketItemAppService
{
diff --git a/plugins/Baskets/src/EasyAbp.EShop.Plugins.Baskets.HttpApi/EasyAbp/EShop/Plugins/Baskets/BasketsController.cs b/plugins/Baskets/src/EasyAbp.EShop.Plugins.Baskets.HttpApi/EasyAbp/EShop/Plugins/Baskets/BasketsController.cs
index eda99e5ce..a0a810f7e 100644
--- a/plugins/Baskets/src/EasyAbp.EShop.Plugins.Baskets.HttpApi/EasyAbp/EShop/Plugins/Baskets/BasketsController.cs
+++ b/plugins/Baskets/src/EasyAbp.EShop.Plugins.Baskets.HttpApi/EasyAbp/EShop/Plugins/Baskets/BasketsController.cs
@@ -1,9 +1,11 @@
using EasyAbp.EShop.Plugins.Baskets.Localization;
+using Microsoft.AspNetCore.Mvc;
using Volo.Abp.AspNetCore.Mvc;
namespace EasyAbp.EShop.Plugins.Baskets
{
- public abstract class BasketsController : AbpController
+ [Area(EShopPluginsBasketsRemoteServiceConsts.ModuleName)]
+ public abstract class BasketsController : AbpControllerBase
{
protected BasketsController()
{
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 9468ebade..63f486603 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
@@ -3,7 +3,7 @@
- net5.0
+ net6.0
diff --git a/plugins/Baskets/src/EasyAbp.EShop.Plugins.Baskets.Web/EShopPluginsBasketsWebModule.cs b/plugins/Baskets/src/EasyAbp.EShop.Plugins.Baskets.Web/EShopPluginsBasketsWebModule.cs
index 682c5de76..f796a22b0 100644
--- a/plugins/Baskets/src/EasyAbp.EShop.Plugins.Baskets.Web/EShopPluginsBasketsWebModule.cs
+++ b/plugins/Baskets/src/EasyAbp.EShop.Plugins.Baskets.Web/EShopPluginsBasketsWebModule.cs
@@ -13,7 +13,7 @@
namespace EasyAbp.EShop.Plugins.Baskets.Web
{
[DependsOn(
- typeof(EShopPluginsBasketsHttpApiModule),
+ typeof(EShopPluginsBasketsApplicationContractsModule),
typeof(AbpAspNetCoreMvcUiThemeSharedModule),
typeof(AbpAutoMapperModule)
)]
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 855959a94..26f20ae25 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
@@ -3,7 +3,7 @@
- net5.0
+ net6.0
$(AssetTargetFallback);portable-net45+win8+wp8+wpa81;
true
Library
@@ -17,11 +17,11 @@
-
+
-
+
diff --git a/plugins/Baskets/src/EasyAbp.EShop.Plugins.Baskets.Web/Pages/EShop/Plugins/Baskets/BasketItems/BasketItem/Index.cshtml b/plugins/Baskets/src/EasyAbp.EShop.Plugins.Baskets.Web/Pages/EShop/Plugins/Baskets/BasketItems/BasketItem/Index.cshtml
index 4563be3f4..3913cbfd9 100644
--- a/plugins/Baskets/src/EasyAbp.EShop.Plugins.Baskets.Web/Pages/EShop/Plugins/Baskets/BasketItems/BasketItem/Index.cshtml
+++ b/plugins/Baskets/src/EasyAbp.EShop.Plugins.Baskets.Web/Pages/EShop/Plugins/Baskets/BasketItems/BasketItem/Index.cshtml
@@ -35,7 +35,7 @@
@L["BasketItem"]
-
+
@if (await Authorization.IsGrantedAsync(BasketsPermissions.BasketItem.Create))
{
-
-
- net5.0
+ net6.0
-
+
diff --git a/plugins/Baskets/test/EasyAbp.EShop.Plugins.Baskets.Domain.Tests/EasyAbp.EShop.Plugins.Baskets.Domain.Tests.csproj b/plugins/Baskets/test/EasyAbp.EShop.Plugins.Baskets.Domain.Tests/EasyAbp.EShop.Plugins.Baskets.Domain.Tests.csproj
index 5366aaaf9..5507ab9f5 100644
--- a/plugins/Baskets/test/EasyAbp.EShop.Plugins.Baskets.Domain.Tests/EasyAbp.EShop.Plugins.Baskets.Domain.Tests.csproj
+++ b/plugins/Baskets/test/EasyAbp.EShop.Plugins.Baskets.Domain.Tests/EasyAbp.EShop.Plugins.Baskets.Domain.Tests.csproj
@@ -1,14 +1,12 @@
-
-
- net5.0
+ net6.0
-
+
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 508061766..a264936cf 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
@@ -1,15 +1,13 @@
-
-
- net5.0
+ net6.0
-
-
+
+
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 514823016..9b7ed16df 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
@@ -2,7 +2,7 @@
Exe
- net5.0
+ net6.0
@@ -20,7 +20,7 @@
-
+
diff --git a/plugins/Baskets/test/EasyAbp.EShop.Plugins.Baskets.MongoDB.Tests/EasyAbp.EShop.Plugins.Baskets.MongoDB.Tests.csproj b/plugins/Baskets/test/EasyAbp.EShop.Plugins.Baskets.MongoDB.Tests/EasyAbp.EShop.Plugins.Baskets.MongoDB.Tests.csproj
index 1084e942f..412686e28 100644
--- a/plugins/Baskets/test/EasyAbp.EShop.Plugins.Baskets.MongoDB.Tests/EasyAbp.EShop.Plugins.Baskets.MongoDB.Tests.csproj
+++ b/plugins/Baskets/test/EasyAbp.EShop.Plugins.Baskets.MongoDB.Tests/EasyAbp.EShop.Plugins.Baskets.MongoDB.Tests.csproj
@@ -1,15 +1,13 @@
-
-
- net5.0
+ net6.0
-
-
+
+
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 c8cf8da99..9e739e0ea 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
@@ -1,14 +1,12 @@
-
-
- net5.0
+ net6.0
-
+
diff --git a/plugins/Coupons/src/EasyAbp.EShop.Orders.Plugins.Coupons/EasyAbp.EShop.Orders.Plugins.Coupons.csproj b/plugins/Coupons/src/EasyAbp.EShop.Orders.Plugins.Coupons/EasyAbp.EShop.Orders.Plugins.Coupons.csproj
index 7059a36da..3f5a9e1a3 100644
--- a/plugins/Coupons/src/EasyAbp.EShop.Orders.Plugins.Coupons/EasyAbp.EShop.Orders.Plugins.Coupons.csproj
+++ b/plugins/Coupons/src/EasyAbp.EShop.Orders.Plugins.Coupons/EasyAbp.EShop.Orders.Plugins.Coupons.csproj
@@ -3,7 +3,7 @@
- net5.0
+ net6.0
diff --git a/plugins/Coupons/src/EasyAbp.EShop.Plugins.Coupons.Application.Contracts/EasyAbp/EShop/Plugins/Coupons/EShopPluginsCouponsRemoteServiceConsts.cs b/plugins/Coupons/src/EasyAbp.EShop.Plugins.Coupons.Application.Contracts/EasyAbp/EShop/Plugins/Coupons/EShopPluginsCouponsRemoteServiceConsts.cs
new file mode 100644
index 000000000..77e1e7c73
--- /dev/null
+++ b/plugins/Coupons/src/EasyAbp.EShop.Plugins.Coupons.Application.Contracts/EasyAbp/EShop/Plugins/Coupons/EShopPluginsCouponsRemoteServiceConsts.cs
@@ -0,0 +1,8 @@
+namespace EasyAbp.EShop.Plugins.Coupons;
+
+public class EShopPluginsCouponsRemoteServiceConsts
+{
+ public const string RemoteServiceName = "EasyAbpEShopPluginsCoupons";
+
+ public const string ModuleName = "easyAbpEShopPluginsCoupons";
+}
\ No newline at end of file
diff --git a/plugins/Coupons/src/EasyAbp.EShop.Plugins.Coupons.Application/EasyAbp/EShop/Plugins/Coupons/Coupons/CouponAppService.cs b/plugins/Coupons/src/EasyAbp.EShop.Plugins.Coupons.Application/EasyAbp/EShop/Plugins/Coupons/Coupons/CouponAppService.cs
index 665197a61..58f83f38f 100644
--- a/plugins/Coupons/src/EasyAbp.EShop.Plugins.Coupons.Application/EasyAbp/EShop/Plugins/Coupons/Coupons/CouponAppService.cs
+++ b/plugins/Coupons/src/EasyAbp.EShop.Plugins.Coupons.Application/EasyAbp/EShop/Plugins/Coupons/Coupons/CouponAppService.cs
@@ -37,10 +37,13 @@ public CouponAppService(
protected override async Task> CreateFilteredQueryAsync(GetCouponListInput input)
{
- return (input.AvailableOnly ? _repository.GetAvailableCouponQueryable(Clock) : _repository.AsQueryable())
+ return (input.AvailableOnly
+ ? _repository.GetAvailableCouponQueryable(Clock)
+ : await _repository.GetQueryableAsync())
.WhereIf(input.UserId.HasValue, x => x.UserId == input.UserId.Value)
.WhereIf(!input.AvailableOnly && !input.IncludesUsed, x => !x.UsedTime.HasValue)
- .WhereIf(!input.AvailableOnly && !input.IncludesExpired, x => !x.ExpirationTime.HasValue || x.ExpirationTime.Value > Clock.Now);
+ .WhereIf(!input.AvailableOnly && !input.IncludesExpired,
+ x => !x.ExpirationTime.HasValue || x.ExpirationTime.Value > Clock.Now);
}
protected virtual CouponDto FillCouponTemplateData(CouponDto couponDto, CouponTemplate couponTemplate)
diff --git a/plugins/Coupons/src/EasyAbp.EShop.Plugins.Coupons.Domain.Shared/EasyAbp.EShop.Plugins.Coupons.Domain.Shared.csproj b/plugins/Coupons/src/EasyAbp.EShop.Plugins.Coupons.Domain.Shared/EasyAbp.EShop.Plugins.Coupons.Domain.Shared.csproj
index 47853532f..7fddf934a 100644
--- a/plugins/Coupons/src/EasyAbp.EShop.Plugins.Coupons.Domain.Shared/EasyAbp.EShop.Plugins.Coupons.Domain.Shared.csproj
+++ b/plugins/Coupons/src/EasyAbp.EShop.Plugins.Coupons.Domain.Shared/EasyAbp.EShop.Plugins.Coupons.Domain.Shared.csproj
@@ -14,7 +14,7 @@
-
+
diff --git a/plugins/Coupons/src/EasyAbp.EShop.Plugins.Coupons.EntityFrameworkCore/EasyAbp.EShop.Plugins.Coupons.EntityFrameworkCore.csproj b/plugins/Coupons/src/EasyAbp.EShop.Plugins.Coupons.EntityFrameworkCore/EasyAbp.EShop.Plugins.Coupons.EntityFrameworkCore.csproj
index afbf73666..9acb4f2f5 100644
--- a/plugins/Coupons/src/EasyAbp.EShop.Plugins.Coupons.EntityFrameworkCore/EasyAbp.EShop.Plugins.Coupons.EntityFrameworkCore.csproj
+++ b/plugins/Coupons/src/EasyAbp.EShop.Plugins.Coupons.EntityFrameworkCore/EasyAbp.EShop.Plugins.Coupons.EntityFrameworkCore.csproj
@@ -3,7 +3,7 @@
- netstandard2.1
+ net6.0
diff --git a/plugins/Coupons/src/EasyAbp.EShop.Plugins.Coupons.HttpApi.Client/EasyAbp.EShop.Plugins.Coupons.HttpApi.Client.csproj b/plugins/Coupons/src/EasyAbp.EShop.Plugins.Coupons.HttpApi.Client/EasyAbp.EShop.Plugins.Coupons.HttpApi.Client.csproj
index 15adbb34f..48feb5aad 100644
--- a/plugins/Coupons/src/EasyAbp.EShop.Plugins.Coupons.HttpApi.Client/EasyAbp.EShop.Plugins.Coupons.HttpApi.Client.csproj
+++ b/plugins/Coupons/src/EasyAbp.EShop.Plugins.Coupons.HttpApi.Client/EasyAbp.EShop.Plugins.Coupons.HttpApi.Client.csproj
@@ -13,4 +13,9 @@
+
+
+
+
+
diff --git a/plugins/Coupons/src/EasyAbp.EShop.Plugins.Coupons.HttpApi.Client/EasyAbp/EShop/Plugins/Coupons/EShopPluginsCouponsHttpApiClientModule.cs b/plugins/Coupons/src/EasyAbp.EShop.Plugins.Coupons.HttpApi.Client/EasyAbp/EShop/Plugins/Coupons/EShopPluginsCouponsHttpApiClientModule.cs
index 9f6b1c666..8e8af8995 100644
--- a/plugins/Coupons/src/EasyAbp.EShop.Plugins.Coupons.HttpApi.Client/EasyAbp/EShop/Plugins/Coupons/EShopPluginsCouponsHttpApiClientModule.cs
+++ b/plugins/Coupons/src/EasyAbp.EShop.Plugins.Coupons.HttpApi.Client/EasyAbp/EShop/Plugins/Coupons/EShopPluginsCouponsHttpApiClientModule.cs
@@ -2,6 +2,7 @@
using Volo.Abp.AutoMapper;
using Volo.Abp.Http.Client;
using Volo.Abp.Modularity;
+using Volo.Abp.VirtualFileSystem;
namespace EasyAbp.EShop.Plugins.Coupons
{
@@ -12,7 +13,7 @@ namespace EasyAbp.EShop.Plugins.Coupons
)]
public class EShopPluginsCouponsHttpApiClientModule : AbpModule
{
- public const string RemoteServiceName = "EasyAbpEShopPluginsCoupons";
+ public const string RemoteServiceName = EShopPluginsCouponsRemoteServiceConsts.RemoteServiceName;
public override void ConfigureServices(ServiceConfigurationContext context)
{
@@ -26,6 +27,11 @@ public override void ConfigureServices(ServiceConfigurationContext context)
typeof(EShopPluginsCouponsApplicationContractsModule).Assembly,
RemoteServiceName
);
+
+ Configure(options =>
+ {
+ options.FileSets.AddEmbedded();
+ });
}
}
}
diff --git a/plugins/Coupons/src/EasyAbp.EShop.Plugins.Coupons.HttpApi/EasyAbp.EShop.Plugins.Coupons.HttpApi.csproj b/plugins/Coupons/src/EasyAbp.EShop.Plugins.Coupons.HttpApi/EasyAbp.EShop.Plugins.Coupons.HttpApi.csproj
index 895c7b73c..428034c6c 100644
--- a/plugins/Coupons/src/EasyAbp.EShop.Plugins.Coupons.HttpApi/EasyAbp.EShop.Plugins.Coupons.HttpApi.csproj
+++ b/plugins/Coupons/src/EasyAbp.EShop.Plugins.Coupons.HttpApi/EasyAbp.EShop.Plugins.Coupons.HttpApi.csproj
@@ -3,7 +3,7 @@
- net5.0
+ net6.0
diff --git a/plugins/Coupons/src/EasyAbp.EShop.Plugins.Coupons.HttpApi/EasyAbp/EShop/Plugins/Coupons/CouponTemplates/CouponTemplateController.cs b/plugins/Coupons/src/EasyAbp.EShop.Plugins.Coupons.HttpApi/EasyAbp/EShop/Plugins/Coupons/CouponTemplates/CouponTemplateController.cs
index 1e61ebb06..a0d5fe960 100644
--- a/plugins/Coupons/src/EasyAbp.EShop.Plugins.Coupons.HttpApi/EasyAbp/EShop/Plugins/Coupons/CouponTemplates/CouponTemplateController.cs
+++ b/plugins/Coupons/src/EasyAbp.EShop.Plugins.Coupons.HttpApi/EasyAbp/EShop/Plugins/Coupons/CouponTemplates/CouponTemplateController.cs
@@ -8,7 +8,7 @@
namespace EasyAbp.EShop.Plugins.Coupons.CouponTemplates
{
- [RemoteService(Name = "EasyAbpEShopPluginsCoupons")]
+ [RemoteService(Name = EShopPluginsCouponsRemoteServiceConsts.RemoteServiceName)]
[Route("/api/e-shop/plugins/coupons/coupon-template")]
public class CouponTemplateController : CouponsController, ICouponTemplateAppService
{
diff --git a/plugins/Coupons/src/EasyAbp.EShop.Plugins.Coupons.HttpApi/EasyAbp/EShop/Plugins/Coupons/Coupons/CouponController.cs b/plugins/Coupons/src/EasyAbp.EShop.Plugins.Coupons.HttpApi/EasyAbp/EShop/Plugins/Coupons/Coupons/CouponController.cs
index 19df448fa..f92d26a17 100644
--- a/plugins/Coupons/src/EasyAbp.EShop.Plugins.Coupons.HttpApi/EasyAbp/EShop/Plugins/Coupons/Coupons/CouponController.cs
+++ b/plugins/Coupons/src/EasyAbp.EShop.Plugins.Coupons.HttpApi/EasyAbp/EShop/Plugins/Coupons/Coupons/CouponController.cs
@@ -8,7 +8,7 @@
namespace EasyAbp.EShop.Plugins.Coupons.Coupons
{
- [RemoteService(Name = "EasyAbpEShopPluginsCoupons")]
+ [RemoteService(Name = EShopPluginsCouponsRemoteServiceConsts.RemoteServiceName)]
[Route("/api/e-shop/plugins/coupons/coupon")]
public class CouponController : CouponsController, ICouponAppService
{
diff --git a/plugins/Coupons/src/EasyAbp.EShop.Plugins.Coupons.HttpApi/EasyAbp/EShop/Plugins/Coupons/CouponsController.cs b/plugins/Coupons/src/EasyAbp.EShop.Plugins.Coupons.HttpApi/EasyAbp/EShop/Plugins/Coupons/CouponsController.cs
index 2991e8048..42c07f3bc 100644
--- a/plugins/Coupons/src/EasyAbp.EShop.Plugins.Coupons.HttpApi/EasyAbp/EShop/Plugins/Coupons/CouponsController.cs
+++ b/plugins/Coupons/src/EasyAbp.EShop.Plugins.Coupons.HttpApi/EasyAbp/EShop/Plugins/Coupons/CouponsController.cs
@@ -1,9 +1,11 @@
using EasyAbp.EShop.Plugins.Coupons.Localization;
+using Microsoft.AspNetCore.Mvc;
using Volo.Abp.AspNetCore.Mvc;
namespace EasyAbp.EShop.Plugins.Coupons
{
- public abstract class CouponsController : AbpController
+ [Area(EShopPluginsCouponsRemoteServiceConsts.ModuleName)]
+ public abstract class CouponsController : AbpControllerBase
{
protected CouponsController()
{
diff --git a/plugins/Coupons/src/EasyAbp.EShop.Plugins.Coupons.Web/EShopPluginsCouponsWebModule.cs b/plugins/Coupons/src/EasyAbp.EShop.Plugins.Coupons.Web/EShopPluginsCouponsWebModule.cs
index 81444ab69..2365392f0 100644
--- a/plugins/Coupons/src/EasyAbp.EShop.Plugins.Coupons.Web/EShopPluginsCouponsWebModule.cs
+++ b/plugins/Coupons/src/EasyAbp.EShop.Plugins.Coupons.Web/EShopPluginsCouponsWebModule.cs
@@ -13,7 +13,7 @@
namespace EasyAbp.EShop.Plugins.Coupons.Web
{
[DependsOn(
- typeof(EShopPluginsCouponsHttpApiModule),
+ typeof(EShopPluginsCouponsApplicationContractsModule),
typeof(AbpAspNetCoreMvcUiThemeSharedModule),
typeof(AbpAutoMapperModule)
)]
diff --git a/plugins/Coupons/src/EasyAbp.EShop.Plugins.Coupons.Web/EasyAbp.EShop.Plugins.Coupons.Web.csproj b/plugins/Coupons/src/EasyAbp.EShop.Plugins.Coupons.Web/EasyAbp.EShop.Plugins.Coupons.Web.csproj
index 4efd2cea1..0164bf686 100644
--- a/plugins/Coupons/src/EasyAbp.EShop.Plugins.Coupons.Web/EasyAbp.EShop.Plugins.Coupons.Web.csproj
+++ b/plugins/Coupons/src/EasyAbp.EShop.Plugins.Coupons.Web/EasyAbp.EShop.Plugins.Coupons.Web.csproj
@@ -3,7 +3,7 @@
- net5.0
+ net6.0
$(AssetTargetFallback);portable-net45+win8+wp8+wpa81;
true
Library
@@ -17,11 +17,11 @@
-
+
-
+
diff --git a/plugins/Coupons/src/EasyAbp.EShop.Plugins.Coupons.Web/Pages/EShop/Plugins/Coupons/CouponTemplates/CouponTemplate/Index.cshtml b/plugins/Coupons/src/EasyAbp.EShop.Plugins.Coupons.Web/Pages/EShop/Plugins/Coupons/CouponTemplates/CouponTemplate/Index.cshtml
index 202cf3940..e6de9826f 100644
--- a/plugins/Coupons/src/EasyAbp.EShop.Plugins.Coupons.Web/Pages/EShop/Plugins/Coupons/CouponTemplates/CouponTemplate/Index.cshtml
+++ b/plugins/Coupons/src/EasyAbp.EShop.Plugins.Coupons.Web/Pages/EShop/Plugins/Coupons/CouponTemplates/CouponTemplate/Index.cshtml
@@ -31,7 +31,7 @@
@L["CouponTemplate"]
-
+
@if (await Authorization.IsGrantedAsync(CouponsPermissions.CouponTemplate.Create))
{
@L["CouponTemplateScope"]
-
+
@if (await Authorization.IsGrantedAsync(CouponsPermissions.CouponTemplate.Update))
{
@L["Coupon"]
-
+
@if (await Authorization.IsGrantedAsync(CouponsPermissions.Coupon.Create))
{
-
-
- net5.0
+ net6.0
-
+
diff --git a/plugins/Coupons/test/EasyAbp.EShop.Plugins.Coupons.Domain.Tests/EasyAbp.EShop.Plugins.Coupons.Domain.Tests.csproj b/plugins/Coupons/test/EasyAbp.EShop.Plugins.Coupons.Domain.Tests/EasyAbp.EShop.Plugins.Coupons.Domain.Tests.csproj
index 40ffd9a58..5a8911d6e 100644
--- a/plugins/Coupons/test/EasyAbp.EShop.Plugins.Coupons.Domain.Tests/EasyAbp.EShop.Plugins.Coupons.Domain.Tests.csproj
+++ b/plugins/Coupons/test/EasyAbp.EShop.Plugins.Coupons.Domain.Tests/EasyAbp.EShop.Plugins.Coupons.Domain.Tests.csproj
@@ -1,14 +1,12 @@
-
-
- net5.0
+ net6.0
-
+
diff --git a/plugins/Coupons/test/EasyAbp.EShop.Plugins.Coupons.EntityFrameworkCore.Tests/EasyAbp.EShop.Plugins.Coupons.EntityFrameworkCore.Tests.csproj b/plugins/Coupons/test/EasyAbp.EShop.Plugins.Coupons.EntityFrameworkCore.Tests/EasyAbp.EShop.Plugins.Coupons.EntityFrameworkCore.Tests.csproj
index 8293481f3..064fe1d5d 100644
--- a/plugins/Coupons/test/EasyAbp.EShop.Plugins.Coupons.EntityFrameworkCore.Tests/EasyAbp.EShop.Plugins.Coupons.EntityFrameworkCore.Tests.csproj
+++ b/plugins/Coupons/test/EasyAbp.EShop.Plugins.Coupons.EntityFrameworkCore.Tests/EasyAbp.EShop.Plugins.Coupons.EntityFrameworkCore.Tests.csproj
@@ -1,15 +1,13 @@
-
-
- net5.0
+ net6.0
-
-
+
+
diff --git a/plugins/Coupons/test/EasyAbp.EShop.Plugins.Coupons.HttpApi.Client.ConsoleTestApp/EasyAbp.EShop.Plugins.Coupons.HttpApi.Client.ConsoleTestApp.csproj b/plugins/Coupons/test/EasyAbp.EShop.Plugins.Coupons.HttpApi.Client.ConsoleTestApp/EasyAbp.EShop.Plugins.Coupons.HttpApi.Client.ConsoleTestApp.csproj
index bb16819e2..8bd5823c7 100644
--- a/plugins/Coupons/test/EasyAbp.EShop.Plugins.Coupons.HttpApi.Client.ConsoleTestApp/EasyAbp.EShop.Plugins.Coupons.HttpApi.Client.ConsoleTestApp.csproj
+++ b/plugins/Coupons/test/EasyAbp.EShop.Plugins.Coupons.HttpApi.Client.ConsoleTestApp/EasyAbp.EShop.Plugins.Coupons.HttpApi.Client.ConsoleTestApp.csproj
@@ -2,7 +2,7 @@
Exe
- net5.0
+ net6.0
@@ -20,7 +20,7 @@
-
+
diff --git a/plugins/Coupons/test/EasyAbp.EShop.Plugins.Coupons.MongoDB.Tests/EasyAbp.EShop.Plugins.Coupons.MongoDB.Tests.csproj b/plugins/Coupons/test/EasyAbp.EShop.Plugins.Coupons.MongoDB.Tests/EasyAbp.EShop.Plugins.Coupons.MongoDB.Tests.csproj
index 5ece86ac4..36d08b946 100644
--- a/plugins/Coupons/test/EasyAbp.EShop.Plugins.Coupons.MongoDB.Tests/EasyAbp.EShop.Plugins.Coupons.MongoDB.Tests.csproj
+++ b/plugins/Coupons/test/EasyAbp.EShop.Plugins.Coupons.MongoDB.Tests/EasyAbp.EShop.Plugins.Coupons.MongoDB.Tests.csproj
@@ -1,15 +1,13 @@
-
-
- net5.0
+ net6.0
-
-
+
+
diff --git a/plugins/Coupons/test/EasyAbp.EShop.Plugins.Coupons.TestBase/EasyAbp.EShop.Plugins.Coupons.TestBase.csproj b/plugins/Coupons/test/EasyAbp.EShop.Plugins.Coupons.TestBase/EasyAbp.EShop.Plugins.Coupons.TestBase.csproj
index 27ddc1819..d8570f094 100644
--- a/plugins/Coupons/test/EasyAbp.EShop.Plugins.Coupons.TestBase/EasyAbp.EShop.Plugins.Coupons.TestBase.csproj
+++ b/plugins/Coupons/test/EasyAbp.EShop.Plugins.Coupons.TestBase/EasyAbp.EShop.Plugins.Coupons.TestBase.csproj
@@ -1,14 +1,12 @@
-
-
- net5.0
+ net6.0
-
+
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 b12619acc..6889685b2 100644
--- a/samples/EShopSample/aspnet-core/src/EShopSample.Application/EShopSample.Application.csproj
+++ b/samples/EShopSample/aspnet-core/src/EShopSample.Application/EShopSample.Application.csproj
@@ -3,7 +3,7 @@
- net5.0
+ net6.0
EShopSample
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 a3453e24f..6d7ea54fb 100644
--- a/samples/EShopSample/aspnet-core/src/EShopSample.DbMigrator/EShopSample.DbMigrator.csproj
+++ b/samples/EShopSample/aspnet-core/src/EShopSample.DbMigrator/EShopSample.DbMigrator.csproj
@@ -4,7 +4,7 @@
Exe
- net5.0
+ net6.0
@@ -20,9 +20,9 @@
-
-
-
+
+
+
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 a850c9c46..011d48d8e 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
@@ -31,7 +31,7 @@
-
+
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 5ffb22d25..b9eb99bff 100644
--- a/samples/EShopSample/aspnet-core/src/EShopSample.Domain/EShopSample.Domain.csproj
+++ b/samples/EShopSample/aspnet-core/src/EShopSample.Domain/EShopSample.Domain.csproj
@@ -3,7 +3,7 @@
- net5.0
+ net6.0
EShopSample
diff --git a/samples/EShopSample/aspnet-core/src/EShopSample.Domain/EShopSampleDomainModule.cs b/samples/EShopSample/aspnet-core/src/EShopSample.Domain/EShopSampleDomainModule.cs
index d35390be1..4d4014311 100644
--- a/samples/EShopSample/aspnet-core/src/EShopSample.Domain/EShopSampleDomainModule.cs
+++ b/samples/EShopSample/aspnet-core/src/EShopSample.Domain/EShopSampleDomainModule.cs
@@ -2,6 +2,7 @@
using EasyAbp.EShop.Plugins.Baskets;
using EasyAbp.EShop.Plugins.Coupons;
using EasyAbp.PaymentService;
+using EasyAbp.PaymentService.Options;
using EasyAbp.PaymentService.Payments;
using EasyAbp.PaymentService.Prepayment;
using EasyAbp.PaymentService.Prepayment.Options;
@@ -57,16 +58,18 @@ public override void ConfigureServices(ServiceConfigurationContext context)
options.IsEnabled = MultiTenancyConsts.IsEnabled;
});
+ ConfigurePaymentService();
ConfigurePaymentServicePrepayment();
}
-
- public override void OnApplicationInitialization(ApplicationInitializationContext context)
- {
- var resolver = context.ServiceProvider.GetService();
- resolver.TryRegisterProvider(FreePaymentServiceProvider.PaymentMethod, typeof(FreePaymentServiceProvider));
- resolver.TryRegisterProvider(WeChatPayPaymentServiceProvider.PaymentMethod, typeof(WeChatPayPaymentServiceProvider));
- resolver.TryRegisterProvider(PrepaymentPaymentServiceProvider.PaymentMethod, typeof(PrepaymentPaymentServiceProvider));
+ private void ConfigurePaymentService()
+ {
+ Configure(options =>
+ {
+ options.Providers.Configure(FreePaymentServiceProvider.PaymentMethod);
+ options.Providers.Configure(WeChatPayPaymentServiceProvider.PaymentMethod);
+ options.Providers.Configure(PrepaymentPaymentServiceProvider.PaymentMethod);
+ });
}
private void ConfigurePaymentServicePrepayment()
diff --git a/samples/EShopSample/aspnet-core/src/EShopSample.EntityFrameworkCore/EShopSample.EntityFrameworkCore.csproj b/samples/EShopSample/aspnet-core/src/EShopSample.EntityFrameworkCore/EShopSample.EntityFrameworkCore.csproj
index 45c23e7d1..bd724e092 100644
--- a/samples/EShopSample/aspnet-core/src/EShopSample.EntityFrameworkCore/EShopSample.EntityFrameworkCore.csproj
+++ b/samples/EShopSample/aspnet-core/src/EShopSample.EntityFrameworkCore/EShopSample.EntityFrameworkCore.csproj
@@ -3,7 +3,7 @@
- net5.0
+ net6.0
EShopSample
@@ -27,7 +27,7 @@
-
+
runtime; build; native; contentfiles; analyzers
compile; contentFiles; build; buildMultitargeting; buildTransitive; analyzers; native
diff --git a/samples/EShopSample/aspnet-core/src/EShopSample.EntityFrameworkCore/Migrations/20210826122922_Initial440.Designer.cs b/samples/EShopSample/aspnet-core/src/EShopSample.EntityFrameworkCore/Migrations/20210826122922_Initial440.Designer.cs
deleted file mode 100644
index a72e32e5b..000000000
--- a/samples/EShopSample/aspnet-core/src/EShopSample.EntityFrameworkCore/Migrations/20210826122922_Initial440.Designer.cs
+++ /dev/null
@@ -1,5098 +0,0 @@
-//
-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(EShopSampleDbContext))]
- [Migration("20210826122922_Initial440")]
- partial class Initial440
- {
- protected override void BuildTargetModel(ModelBuilder modelBuilder)
- {
-#pragma warning disable 612, 618
- modelBuilder
- .HasAnnotation("_Abp_DatabaseProvider", EfCoreDatabaseProvider.SqlServer)
- .HasAnnotation("Relational:MaxIdentifierLength", 128)
- .HasAnnotation("ProductVersion", "5.0.9")
- .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
-
- modelBuilder.Entity("EasyAbp.EShop.Orders.Orders.Order", b =>
- {
- b.Property("Id")
- .ValueGeneratedOnAdd()
- .HasColumnType("uniqueidentifier");
-
- b.Property("ActualTotalPrice")
- .HasColumnType("decimal(20,8)");
-
- b.Property("CanceledTime")
- .HasColumnType("datetime2");
-
- b.Property("CancellationReason")
- .HasColumnType("nvarchar(max)");
-
- b.Property("CompletionTime")
- .HasColumnType("datetime2");
-
- b.Property("ConcurrencyStamp")
- .IsConcurrencyToken()
- .HasMaxLength(40)
- .HasColumnType("nvarchar(40)")
- .HasColumnName("ConcurrencyStamp");
-
- b.Property("CreationTime")
- .HasColumnType("datetime2")
- .HasColumnName("CreationTime");
-
- b.Property("CreatorId")
- .HasColumnType("uniqueidentifier")
- .HasColumnName("CreatorId");
-
- b.Property("Currency")
- .HasColumnType("nvarchar(max)");
-
- b.Property("CustomerRemark")
- .HasColumnType("nvarchar(max)");
-
- b.Property("CustomerUserId")
- .HasColumnType("uniqueidentifier");
-
- b.Property("DeleterId")
- .HasColumnType("uniqueidentifier")
- .HasColumnName("DeleterId");
-
- b.Property("DeletionTime")
- .HasColumnType("datetime2")
- .HasColumnName("DeletionTime");
-
- b.Property("ExtraProperties")
- .HasColumnType("nvarchar(max)")
- .HasColumnName("ExtraProperties");
-
- b.Property("IsDeleted")
- .ValueGeneratedOnAdd()
- .HasColumnType("bit")
- .HasDefaultValue(false)
- .HasColumnName("IsDeleted");
-
- b.Property("LastModificationTime")
- .HasColumnType("datetime2")
- .HasColumnName("LastModificationTime");
-
- b.Property("LastModifierId")
- .HasColumnType("uniqueidentifier")
- .HasColumnName("LastModifierId");
-
- 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("RefundAmount")
- .HasColumnType("decimal(20,8)");
-
- b.Property("StaffRemark")
- .HasColumnType("nvarchar(max)");
-
- b.Property("StoreId")
- .HasColumnType("uniqueidentifier");
-
- b.Property("TenantId")
- .HasColumnType("uniqueidentifier")
- .HasColumnName("TenantId");
-
- 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("EasyAbpEShopOrdersOrders");
- });
-
- modelBuilder.Entity("EasyAbp.EShop.Orders.Orders.OrderExtraFee", b =>
- {
- b.Property("OrderId")
- .HasColumnType("uniqueidentifier");
-
- b.Property("Name")
- .HasColumnType("nvarchar(450)");
-
- b.Property("Key")
- .HasColumnType("nvarchar(450)");
-
- b.Property("Fee")
- .HasColumnType("decimal(20,8)");
-
- b.HasKey("OrderId", "Name", "Key");
-
- b.ToTable("EasyAbpEShopOrdersOrderExtraFees");
- });
-
- modelBuilder.Entity("EasyAbp.EShop.Orders.Orders.OrderLine", b =>
- {
- b.Property("Id")
- .ValueGeneratedOnAdd()
- .HasColumnType("uniqueidentifier");
-
- b.Property("ActualTotalPrice")
- .HasColumnType("decimal(20,8)");
-
- b.Property("CreationTime")
- .HasColumnType("datetime2")
- .HasColumnName("CreationTime");
-
- b.Property("CreatorId")
- .HasColumnType("uniqueidentifier")
- .HasColumnName("CreatorId");
-
- b.Property("Currency")
- .HasColumnType("nvarchar(max)");
-
- b.Property("DeleterId")
- .HasColumnType("uniqueidentifier")
- .HasColumnName("DeleterId");
-
- b.Property("DeletionTime")
- .HasColumnType("datetime2")
- .HasColumnName("DeletionTime");
-
- b.Property("ExtraProperties")
- .HasColumnType("nvarchar(max)")
- .HasColumnName("ExtraProperties");
-
- b.Property("IsDeleted")
- .ValueGeneratedOnAdd()
- .HasColumnType("bit")
- .HasDefaultValue(false)
- .HasColumnName("IsDeleted");
-
- b.Property("LastModificationTime")
- .HasColumnType("datetime2")
- .HasColumnName("LastModificationTime");
-
- b.Property("LastModifierId")
- .HasColumnType("uniqueidentifier")
- .HasColumnName("LastModifierId");
-
- b.Property("MediaResources")
- .HasColumnType("nvarchar(max)");
-
- b.Property("OrderId")
- .HasColumnType("uniqueidentifier");
-
- b.Property("ProductDetailModificationTime")
- .HasColumnType("datetime2");
-
- b.Property("ProductDisplayName")
- .HasColumnType("nvarchar(max)");
-
- b.Property("ProductGroupDisplayName")
- .HasColumnType("nvarchar(max)");
-
- b.Property("ProductGroupName")
- .HasColumnType("nvarchar(max)");
-
- b.Property("ProductId")
- .HasColumnType("uniqueidentifier");
-
- b.Property("ProductModificationTime")
- .HasColumnType("datetime2");
-
- b.Property("ProductSkuId")
- .HasColumnType("uniqueidentifier");
-
- b.Property("ProductUniqueName")
- .HasColumnType("nvarchar(max)");
-
- b.Property("Quantity")
- .HasColumnType("int");
-
- b.Property("RefundAmount")
- .HasColumnType("decimal(20,8)");
-
- b.Property("RefundedQuantity")
- .HasColumnType("int");
-
- b.Property("SkuDescription")
- .HasColumnType("nvarchar(max)");
-
- b.Property("SkuName")
- .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("EasyAbpEShopOrdersOrderLines");
- });
-
- modelBuilder.Entity("EasyAbp.EShop.Payments.Payments.Payment", b =>
- {
- b.Property("Id")
- .ValueGeneratedOnAdd()
- .HasColumnType("uniqueidentifier");
-
- b.Property("ActualPaymentAmount")
- .HasColumnType("decimal(20,8)");
-
- b.Property("CanceledTime")
- .HasColumnType("datetime2");
-
- b.Property("CompletionTime")
- .HasColumnType("datetime2");
-
- b.Property("ConcurrencyStamp")
- .IsConcurrencyToken()
- .HasMaxLength(40)
- .HasColumnType("nvarchar(40)")
- .HasColumnName("ConcurrencyStamp");
-
- b.Property("CreationTime")
- .HasColumnType("datetime2")
- .HasColumnName("CreationTime");
-
- b.Property("CreatorId")
- .HasColumnType("uniqueidentifier")
- .HasColumnName("CreatorId");
-
- b.Property("Currency")
- .HasColumnType("nvarchar(max)");
-
- b.Property("DeleterId")
- .HasColumnType("uniqueidentifier")
- .HasColumnName("DeleterId");
-
- b.Property("DeletionTime")
- .HasColumnType("datetime2")
- .HasColumnName("DeletionTime");
-
- b.Property("ExternalTradingCode")
- .HasColumnType("nvarchar(max)");
-
- b.Property("ExtraProperties")
- .HasColumnType("nvarchar(max)")
- .HasColumnName("ExtraProperties");
-
- b.Property("IsDeleted")
- .ValueGeneratedOnAdd()
- .HasColumnType("bit")
- .HasDefaultValue(false)
- .HasColumnName("IsDeleted");
-
- b.Property("LastModificationTime")
- .HasColumnType("datetime2")
- .HasColumnName("LastModificationTime");
-
- b.Property("LastModifierId")
- .HasColumnType("uniqueidentifier")
- .HasColumnName("LastModifierId");
-
- 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("TenantId")
- .HasColumnType("uniqueidentifier")
- .HasColumnName("TenantId");
-
- b.Property("UserId")
- .HasColumnType("uniqueidentifier");
-
- b.HasKey("Id");
-
- b.ToTable("EasyAbpEShopPaymentsPayments");
- });
-
- modelBuilder.Entity("EasyAbp.EShop.Payments.Payments.PaymentItem", b =>
- {
- b.Property("Id")
- .ValueGeneratedOnAdd()
- .HasColumnType("uniqueidentifier");
-
- b.Property("ActualPaymentAmount")
- .HasColumnType("decimal(20,8)");
-
- b.Property("CreationTime")
- .HasColumnType("datetime2")
- .HasColumnName("CreationTime");
-
- b.Property("CreatorId")
- .HasColumnType("uniqueidentifier")
- .HasColumnName("CreatorId");
-
- b.Property("DeleterId")
- .HasColumnType("uniqueidentifier")
- .HasColumnName("DeleterId");
-
- b.Property("DeletionTime")
- .HasColumnType("datetime2")
- .HasColumnName("DeletionTime");
-
- b.Property("ExtraProperties")
- .HasColumnType("nvarchar(max)")
- .HasColumnName("ExtraProperties");
-
- b.Property("IsDeleted")
- .ValueGeneratedOnAdd()
- .HasColumnType("bit")
- .HasDefaultValue(false)
- .HasColumnName("IsDeleted");
-
- b.Property("ItemKey")
- .HasColumnType("nvarchar(max)");
-
- b.Property("ItemType")
- .HasColumnType("nvarchar(max)");
-
- b.Property("LastModificationTime")
- .HasColumnType("datetime2")
- .HasColumnName("LastModificationTime");
-
- b.Property("LastModifierId")
- .HasColumnType("uniqueidentifier")
- .HasColumnName("LastModifierId");
-
- 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.Property("StoreId")
- .HasColumnType("uniqueidentifier");
-
- b.HasKey("Id");
-
- b.HasIndex("PaymentId");
-
- b.ToTable("EasyAbpEShopPaymentsPaymentItems");
- });
-
- modelBuilder.Entity("EasyAbp.EShop.Payments.Refunds.Refund", b =>
- {
- b.Property("Id")
- .ValueGeneratedOnAdd()
- .HasColumnType("uniqueidentifier");
-
- b.Property("CanceledTime")
- .HasColumnType("datetime2");
-
- b.Property("CompletedTime")
- .HasColumnType("datetime2");
-
- b.Property("ConcurrencyStamp")
- .IsConcurrencyToken()
- .HasMaxLength(40)
- .HasColumnType("nvarchar(40)")
- .HasColumnName("ConcurrencyStamp");
-
- b.Property("CreationTime")
- .HasColumnType("datetime2")
- .HasColumnName("CreationTime");
-
- b.Property("CreatorId")
- .HasColumnType("uniqueidentifier")
- .HasColumnName("CreatorId");
-
- b.Property("Currency")
- .HasColumnType("nvarchar(max)");
-
- b.Property("CustomerRemark")
- .HasColumnType("nvarchar(max)");
-
- b.Property("DeleterId")
- .HasColumnType("uniqueidentifier")
- .HasColumnName("DeleterId");
-
- b.Property("DeletionTime")
- .HasColumnType("datetime2")
- .HasColumnName("DeletionTime");
-
- b.Property("DisplayReason")
- .HasColumnType("nvarchar(max)");
-
- b.Property("ExternalTradingCode")
- .HasColumnType("nvarchar(max)");
-
- b.Property("ExtraProperties")
- .HasColumnType("nvarchar(max)")
- .HasColumnName("ExtraProperties");
-
- b.Property("IsDeleted")
- .ValueGeneratedOnAdd()
- .HasColumnType("bit")
- .HasDefaultValue(false)
- .HasColumnName("IsDeleted");
-
- b.Property("LastModificationTime")
- .HasColumnType("datetime2")
- .HasColumnName("LastModificationTime");
-
- b.Property("LastModifierId")
- .HasColumnType("uniqueidentifier")
- .HasColumnName("LastModifierId");
-
- b.Property("PaymentId")
- .HasColumnType("uniqueidentifier");
-
- b.Property("RefundAmount")
- .HasColumnType("decimal(20,8)");
-
- b.Property("RefundPaymentMethod")
- .HasColumnType("nvarchar(max)");
-
- b.Property("StaffRemark")
- .HasColumnType("nvarchar(max)");
-
- b.Property("TenantId")
- .HasColumnType("uniqueidentifier")
- .HasColumnName("TenantId");
-
- b.HasKey("Id");
-
- b.ToTable("EasyAbpEShopPaymentsRefunds");
- });
-
- modelBuilder.Entity("EasyAbp.EShop.Payments.Refunds.RefundItem", b =>
- {
- b.Property("Id")
- .ValueGeneratedOnAdd()
- .HasColumnType("uniqueidentifier");
-
- b.Property("CreationTime")
- .HasColumnType("datetime2")
- .HasColumnName("CreationTime");
-
- b.Property("CreatorId")
- .HasColumnType("uniqueidentifier")
- .HasColumnName("CreatorId");
-
- b.Property("CustomerRemark")
- .HasColumnType("nvarchar(max)");
-
- b.Property("DeleterId")
- .HasColumnType("uniqueidentifier")
- .HasColumnName("DeleterId");
-
- b.Property("DeletionTime")
- .HasColumnType("datetime2")
- .HasColumnName("DeletionTime");
-
- b.Property("ExtraProperties")
- .HasColumnType("nvarchar(max)")
- .HasColumnName("ExtraProperties");
-
- b.Property("IsDeleted")
- .ValueGeneratedOnAdd()
- .HasColumnType("bit")
- .HasDefaultValue(false)
- .HasColumnName("IsDeleted");
-
- b.Property("LastModificationTime")
- .HasColumnType("datetime2")
- .HasColumnName("LastModificationTime");
-
- b.Property("LastModifierId")
- .HasColumnType("uniqueidentifier")
- .HasColumnName("LastModifierId");
-
- b.Property("OrderId")
- .HasColumnType("uniqueidentifier");
-
- b.Property("PaymentItemId")
- .HasColumnType("uniqueidentifier");
-
- b.Property("RefundAmount")
- .HasColumnType("decimal(20,8)");
-
- b.Property("RefundId")
- .HasColumnType("uniqueidentifier");
-
- b.Property("StaffRemark")
- .HasColumnType("nvarchar(max)");
-
- b.Property("StoreId")
- .HasColumnType("uniqueidentifier");
-
- b.HasKey("Id");
-
- b.HasIndex("RefundId");
-
- b.ToTable("EasyAbpEShopPaymentsRefundItems");
- });
-
- modelBuilder.Entity("EasyAbp.EShop.Payments.Refunds.RefundItemOrderLine", b =>
- {
- b.Property("Id")
- .ValueGeneratedOnAdd()
- .HasColumnType("uniqueidentifier");
-
- b.Property("OrderLineId")
- .HasColumnType("uniqueidentifier");
-
- b.Property("RefundAmount")
- .HasColumnType("decimal(20,8)");
-
- b.Property("RefundItemId")
- .HasColumnType("uniqueidentifier");
-
- b.Property("RefundedQuantity")
- .HasColumnType("int");
-
- b.HasKey("Id");
-
- b.HasIndex("RefundItemId");
-
- b.ToTable("EasyAbpEShopPaymentsRefundItemOrderLines");
- });
-
- modelBuilder.Entity("EasyAbp.EShop.Plugins.Baskets.BasketItems.BasketItem", b =>
- {
- b.Property("Id")
- .ValueGeneratedOnAdd()
- .HasColumnType("uniqueidentifier");
-
- b.Property("BasketName")
- .HasColumnType("nvarchar(max)");
-
- b.Property("ConcurrencyStamp")
- .IsConcurrencyToken()
- .HasMaxLength(40)
- .HasColumnType("nvarchar(40)")
- .HasColumnName("ConcurrencyStamp");
-
- b.Property("CreationTime")
- .HasColumnType("datetime2")
- .HasColumnName("CreationTime");
-
- b.Property("CreatorId")
- .HasColumnType("uniqueidentifier")
- .HasColumnName("CreatorId");
-
- b.Property("Currency")
- .HasColumnType("nvarchar(max)");
-
- b.Property("ExtraProperties")
- .HasColumnType("nvarchar(max)")
- .HasColumnName("ExtraProperties");
-
- b.Property("Inventory")
- .HasColumnType("int");
-
- b.Property("IsInvalid")
- .HasColumnType("bit");
-
- b.Property("LastModificationTime")
- .HasColumnType("datetime2")
- .HasColumnName("LastModificationTime");
-
- b.Property("LastModifierId")
- .HasColumnType("uniqueidentifier")
- .HasColumnName("LastModifierId");
-
- b.Property("MediaResources")
- .HasColumnType("nvarchar(max)");
-
- b.Property("ProductDisplayName")
- .HasColumnType("nvarchar(max)");
-
- b.Property("ProductId")
- .HasColumnType("uniqueidentifier");
-
- b.Property("ProductSkuId")
- .HasColumnType("uniqueidentifier");
-
- b.Property("ProductUniqueName")
- .HasColumnType("nvarchar(max)");
-
- b.Property("Quantity")
- .HasColumnType("int");
-
- b.Property("SkuDescription")
- .HasColumnType("nvarchar(max)");
-
- b.Property("SkuName")
- .HasColumnType("nvarchar(max)");
-
- b.Property("StoreId")
- .HasColumnType("uniqueidentifier");
-
- b.Property("TenantId")
- .HasColumnType("uniqueidentifier")
- .HasColumnName("TenantId");
-
- b.Property("TotalDiscount")
- .HasColumnType("decimal(20,8)");
-
- b.Property("TotalPrice")
- .HasColumnType("decimal(20,8)");
-
- b.Property("UnitPrice")
- .HasColumnType("decimal(20,8)");
-
- b.Property("UserId")
- .HasColumnType("uniqueidentifier");
-
- b.HasKey("Id");
-
- b.HasIndex("UserId");
-
- b.ToTable("EasyAbpEShopPluginsBasketsBasketItems");
- });
-
- modelBuilder.Entity("EasyAbp.EShop.Plugins.Baskets.ProductUpdates.ProductUpdate", b =>
- {
- b.Property("Id")
- .ValueGeneratedOnAdd()
- .HasColumnType("uniqueidentifier");
-
- b.Property("ConcurrencyStamp")
- .IsConcurrencyToken()
- .HasMaxLength(40)
- .HasColumnType("nvarchar(40)")
- .HasColumnName("ConcurrencyStamp");
-
- b.Property("CreationTime")
- .HasColumnType("datetime2")
- .HasColumnName("CreationTime");
-
- b.Property("CreatorId")
- .HasColumnType("uniqueidentifier")
- .HasColumnName("CreatorId");
-
- b.Property("DeleterId")
- .HasColumnType("uniqueidentifier")
- .HasColumnName("DeleterId");
-
- b.Property("DeletionTime")
- .HasColumnType("datetime2")
- .HasColumnName("DeletionTime");
-
- b.Property("ExtraProperties")
- .HasColumnType("nvarchar(max)")
- .HasColumnName("ExtraProperties");
-
- b.Property("IsDeleted")
- .ValueGeneratedOnAdd()
- .HasColumnType("bit")
- .HasDefaultValue(false)
- .HasColumnName("IsDeleted");
-
- b.Property("LastModificationTime")
- .HasColumnType("datetime2")
- .HasColumnName("LastModificationTime");
-
- b.Property("LastModifierId")
- .HasColumnType("uniqueidentifier")
- .HasColumnName("LastModifierId");
-
- b.Property("ProductSkuId")
- .HasColumnType("uniqueidentifier");
-
- b.Property("TenantId")
- .HasColumnType("uniqueidentifier")
- .HasColumnName("TenantId");
-
- b.HasKey("Id");
-
- b.HasIndex("ProductSkuId");
-
- b.ToTable("EasyAbpEShopPluginsBasketsProductUpdates");
- });
-
- modelBuilder.Entity("EasyAbp.EShop.Plugins.Coupons.CouponTemplates.CouponTemplate", b =>
- {
- b.Property("Id")
- .ValueGeneratedOnAdd()
- .HasColumnType("uniqueidentifier");
-
- b.Property("ConcurrencyStamp")
- .IsConcurrencyToken()
- .HasMaxLength(40)
- .HasColumnType("nvarchar(40)")
- .HasColumnName("ConcurrencyStamp");
-
- b.Property("ConditionAmount")
- .HasColumnType("decimal(20,8)");
-
- b.Property("CouponType")
- .HasColumnType("int");
-
- b.Property("CreationTime")
- .HasColumnType("datetime2")
- .HasColumnName("CreationTime");
-
- b.Property("CreatorId")
- .HasColumnType("uniqueidentifier")
- .HasColumnName("CreatorId");
-
- b.Property("Currency")
- .HasColumnType("nvarchar(max)");
-
- b.Property("DeleterId")
- .HasColumnType("uniqueidentifier")
- .HasColumnName("DeleterId");
-
- b.Property("DeletionTime")
- .HasColumnType("datetime2")
- .HasColumnName("DeletionTime");
-
- b.Property("Description")
- .HasColumnType("nvarchar(max)");
-
- b.Property("DiscountAmount")
- .HasColumnType("decimal(20,8)");
-
- b.Property("DisplayName")
- .HasColumnType("nvarchar(max)");
-
- b.Property("ExtraProperties")
- .HasColumnType("nvarchar(max)")
- .HasColumnName("ExtraProperties");
-
- b.Property("IsDeleted")
- .ValueGeneratedOnAdd()
- .HasColumnType("bit")
- .HasDefaultValue(false)
- .HasColumnName("IsDeleted");
-
- b.Property("IsUnscoped")
- .HasColumnType("bit");
-
- b.Property("LastModificationTime")
- .HasColumnType("datetime2")
- .HasColumnName("LastModificationTime");
-
- b.Property("LastModifierId")
- .HasColumnType("uniqueidentifier")
- .HasColumnName("LastModifierId");
-
- b.Property("StoreId")
- .HasColumnType("uniqueidentifier");
-
- b.Property("TenantId")
- .HasColumnType("uniqueidentifier")
- .HasColumnName("TenantId");
-
- b.Property("UniqueName")
- .HasColumnType("nvarchar(max)");
-
- b.Property("UsableBeginTime")
- .HasColumnType("datetime2");
-
- b.Property("UsableDuration")
- .HasColumnType("time");
-
- b.Property("UsableEndTime")
- .HasColumnType("datetime2");
-
- b.HasKey("Id");
-
- b.ToTable("EasyAbpEShopPluginsCouponsCouponTemplates");
- });
-
- modelBuilder.Entity("EasyAbp.EShop.Plugins.Coupons.CouponTemplates.CouponTemplateScope", b =>
- {
- b.Property("Id")
- .ValueGeneratedOnAdd()
- .HasColumnType("uniqueidentifier");
-
- b.Property("CouponTemplateId")
- .HasColumnType("uniqueidentifier");
-
- b.Property("CreationTime")
- .HasColumnType("datetime2")
- .HasColumnName("CreationTime");
-
- b.Property("CreatorId")
- .HasColumnType("uniqueidentifier")
- .HasColumnName("CreatorId");
-
- b.Property("DeleterId")
- .HasColumnType("uniqueidentifier")
- .HasColumnName("DeleterId");
-
- b.Property("DeletionTime")
- .HasColumnType("datetime2")
- .HasColumnName("DeletionTime");
-
- b.Property("IsDeleted")
- .ValueGeneratedOnAdd()
- .HasColumnType("bit")
- .HasDefaultValue(false)
- .HasColumnName("IsDeleted");
-
- b.Property("LastModificationTime")
- .HasColumnType("datetime2")
- .HasColumnName("LastModificationTime");
-
- b.Property("LastModifierId")
- .HasColumnType("uniqueidentifier")
- .HasColumnName("LastModifierId");
-
- b.Property("ProductGroupName")
- .HasColumnType("nvarchar(max)");
-
- b.Property("ProductId")
- .HasColumnType("uniqueidentifier");
-
- b.Property("ProductSkuId")
- .HasColumnType("uniqueidentifier");
-
- b.Property("StoreId")
- .HasColumnType("uniqueidentifier");
-
- b.HasKey("Id");
-
- b.HasIndex("CouponTemplateId");
-
- b.ToTable("EasyAbpEShopPluginsCouponsCouponTemplateScopes");
- });
-
- modelBuilder.Entity("EasyAbp.EShop.Plugins.Coupons.Coupons.Coupon", b =>
- {
- b.Property("Id")
- .ValueGeneratedOnAdd()
- .HasColumnType("uniqueidentifier");
-
- b.Property("ConcurrencyStamp")
- .IsConcurrencyToken()
- .HasMaxLength(40)
- .HasColumnType("nvarchar(40)")
- .HasColumnName("ConcurrencyStamp");
-
- b.Property("CouponTemplateId")
- .HasColumnType("uniqueidentifier");
-
- b.Property("CreationTime")
- .HasColumnType("datetime2")
- .HasColumnName("CreationTime");
-
- b.Property("CreatorId")
- .HasColumnType("uniqueidentifier")
- .HasColumnName("CreatorId");
-
- b.Property("Currency")
- .HasColumnType("nvarchar(max)");
-
- b.Property("DeleterId")
- .HasColumnType("uniqueidentifier")
- .HasColumnName("DeleterId");
-
- b.Property("DeletionTime")
- .HasColumnType("datetime2")
- .HasColumnName("DeletionTime");
-
- b.Property("DiscountedAmount")
- .HasColumnType("decimal(20,8)");
-
- b.Property("ExpirationTime")
- .HasColumnType("datetime2");
-
- b.Property