From d407c5f917759eca92801d47425cc11598503a0d Mon Sep 17 00:00:00 2001 From: gdlcf88 Date: Fri, 29 May 2020 18:44:56 +0800 Subject: [PATCH] Close #39: Create a new module named "EShop" to integrate sub-modules. --- .github/workflows/publish.yml | 66 ++++- integration/EasyAbp.EShop/.gitattributes | 1 + integration/EasyAbp.EShop/.gitignore | 258 ++++++++++++++++++ integration/EasyAbp.EShop/EasyAbp.EShop.sln | 167 ++++++++++++ .../EasyAbp.EShop.sln.DotSettings | 23 ++ integration/EasyAbp.EShop/common.props | 28 ++ .../docker-compose.migrations.yml | 13 + .../EasyAbp.EShop/docker-compose.override.yml | 29 ++ integration/EasyAbp.EShop/docker-compose.yml | 25 ++ ...EasyAbp.EShop.Application.Contracts.csproj | 21 ++ .../EShopPermissionDefinitionProvider.cs | 19 ++ .../EShop/Authorization/EShopPermissions.cs | 14 + .../EShop/EShopApplicationContractsModule.cs | 33 +++ .../FodyWeavers.xml | 3 + .../FodyWeavers.xsd | 30 ++ .../EasyAbp.EShop.Application.csproj | 22 ++ .../EasyAbp/EShop/EShopAppService.cs | 14 + .../EShopApplicationAutoMapperProfile.cs | 14 + .../EasyAbp/EShop/EShopApplicationModule.cs | 35 +++ .../EasyAbp.EShop.Application/FodyWeavers.xml | 3 + .../EasyAbp.EShop.Application/FodyWeavers.xsd | 30 ++ .../EasyAbp.EShop.Domain.Shared.csproj | 24 ++ .../EasyAbp/EShop/EShopDomainSharedModule.cs | 47 ++++ .../EasyAbp/EShop/EShopErrorCodes.cs | 7 + .../EasyAbp/EShop/Localization/EShop/cs.json | 6 + .../EasyAbp/EShop/Localization/EShop/en.json | 6 + .../EShop/Localization/EShop/pl-PL.json | 6 + .../EShop/Localization/EShop/pt-BR.json | 6 + .../EasyAbp/EShop/Localization/EShop/sl.json | 6 + .../EasyAbp/EShop/Localization/EShop/tr.json | 6 + .../EasyAbp/EShop/Localization/EShop/vi.json | 6 + .../EShop/Localization/EShop/zh-Hans.json | 6 + .../EShop/Localization/EShop/zh-Hant.json | 6 + .../EShop/Localization/EShopResource.cs | 10 + .../FodyWeavers.xml | 3 + .../FodyWeavers.xsd | 30 ++ .../EasyAbp.EShop.Domain.csproj | 20 ++ .../EasyAbp/EShop/EShopDbProperties.cs | 11 + .../EasyAbp/EShop/EShopDomainModule.cs | 22 ++ .../EShopSettingDefinitionProvider.cs | 14 + .../EasyAbp/EShop/Settings/EShopSettings.cs | 11 + .../src/EasyAbp.EShop.Domain/FodyWeavers.xml | 3 + .../src/EasyAbp.EShop.Domain/FodyWeavers.xsd | 30 ++ .../EasyAbp.EShop.EntityFrameworkCore.csproj | 24 ++ .../EntityFrameworkCore/EShopDbContext.cs | 27 ++ .../EShopDbContextModelCreatingExtensions.cs | 54 ++++ .../EShopEntityFrameworkCoreModule.cs | 33 +++ .../EShopModelBuilderConfigurationOptions.cs | 18 ++ .../EntityFrameworkCore/IEShopDbContext.cs | 13 + .../FodyWeavers.xml | 3 + .../FodyWeavers.xsd | 30 ++ .../EasyAbp.EShop.HttpApi.Client.csproj | 20 ++ .../EasyAbp/EShop/EShopHttpApiClientModule.cs | 33 +++ .../FodyWeavers.xml | 3 + .../FodyWeavers.xsd | 30 ++ .../EasyAbp.EShop.HttpApi.csproj | 20 ++ .../EasyAbp/EShop/EShopController.cs | 13 + .../EasyAbp/EShop/EShopHttpApiModule.cs | 44 +++ .../src/EasyAbp.EShop.HttpApi/FodyWeavers.xml | 3 + .../src/EasyAbp.EShop.HttpApi/FodyWeavers.xsd | 30 ++ .../EasyAbp.EShop.MongoDB.csproj | 24 ++ .../EShop/MongoDB/EShopMongoDbContext.cs | 20 ++ .../MongoDB/EShopMongoDbContextExtensions.cs | 33 +++ .../EShop/MongoDB/EShopMongoDbModule.cs | 33 +++ ...opMongoModelBuilderConfigurationOptions.cs | 14 + .../EShop/MongoDB/IEShopMongoDbContext.cs | 13 + .../src/EasyAbp.EShop.MongoDB/FodyWeavers.xml | 3 + .../src/EasyAbp.EShop.MongoDB/FodyWeavers.xsd | 30 ++ .../EasyAbp.EShop.Web/EShopMenuContributor.cs | 23 ++ .../EShopWebAutoMapperProfile.cs | 14 + .../src/EasyAbp.EShop.Web/EShopWebModule.cs | 67 +++++ .../EasyAbp.EShop.Web.csproj | 47 ++++ .../src/EasyAbp.EShop.Web/FodyWeavers.xml | 3 + .../src/EasyAbp.EShop.Web/FodyWeavers.xsd | 30 ++ .../Pages/EShop/Index.cshtml | 7 + .../Pages/EShop/Index.cshtml.cs | 9 + .../Pages/EShop/_ViewImports.cshtml | 4 + .../src/EasyAbp.EShop.Web/Pages/EShopPage.cs | 16 ++ .../EasyAbp.EShop.Web/Pages/EShopPageModel.cs | 16 ++ .../Properties/launchSettings.json | 27 ++ .../EShopApplicationTestBase.cs | 10 + .../EShopApplicationTestModule.cs | 13 + .../EasyAbp.EShop.Application.Tests.csproj | 16 ++ .../FodyWeavers.xml | 3 + .../FodyWeavers.xsd | 30 ++ .../EShopDomainTestBase.cs | 10 + .../EShopDomainTestModule.cs | 17 ++ .../EasyAbp.EShop.Domain.Tests.csproj | 15 + .../FodyWeavers.xml | 3 + .../FodyWeavers.xsd | 30 ++ ...Abp.EShop.EntityFrameworkCore.Tests.csproj | 19 ++ .../EShopEntityFrameworkCoreTestBase.cs | 10 + .../EShopEntityFrameworkCoreTestModule.cs | 41 +++ .../FodyWeavers.xml | 3 + .../FodyWeavers.xsd | 30 ++ .../ClientDemoService.cs | 146 ++++++++++ .../ConsoleTestAppHostedService.cs | 26 ++ .../EShopConsoleApiClientModule.cs | 14 + ...EShop.HttpApi.Client.ConsoleTestApp.csproj | 26 ++ .../Program.cs | 21 ++ .../appsettings.json | 21 ++ .../EasyAbp.EShop.MongoDB.Tests.csproj | 17 ++ .../FodyWeavers.xml | 3 + .../FodyWeavers.xsd | 30 ++ .../MongoDB/EShopMongoDbTestBase.cs | 10 + .../MongoDB/EShopMongoDbTestModule.cs | 25 ++ .../MongoDB/MongoDbFixture.cs | 16 ++ .../MongoDB/MongoTestCollection.cs | 10 + .../EShopDataSeedContributor.cs | 27 ++ .../EasyAbp.EShop.TestBase/EShopTestBase.cs | 60 ++++ .../EShopTestBaseModule.cs | 42 +++ .../EasyAbp.EShop.TestBase.csproj | 23 ++ .../EasyAbp.EShop.TestBase/FodyWeavers.xml | 3 + .../EasyAbp.EShop.TestBase/FodyWeavers.xsd | 30 ++ .../Security/FakeCurrentPrincipalAccessor.cs | 43 +++ ...aymentsDbContextModelCreatingExtensions.cs | 2 - .../PaymentsMongoDbContextExtensions.cs | 3 + samples/EasyMall/aspnet-core/EasyMall.sln | 116 ++++++++ .../EasyMall.Application.Contracts.csproj | 6 +- .../EasyMallApplicationContractsModule.cs | 12 +- .../EasyMall.Application.csproj | 6 +- .../EasyMallApplicationModule.cs | 12 +- .../EasyMall.Domain.Shared.csproj | 9 +- .../EasyMallDomainSharedModule.cs | 12 +- .../EasyMall.Domain/EasyMall.Domain.csproj | 6 +- .../EasyMall.Domain/EasyMallDomainModule.cs | 12 +- .../EasyMall.EntityFrameworkCore.csproj | 6 +- .../EasyMallEntityFrameworkCoreModule.cs | 12 +- .../EasyMall.HttpApi.Client.csproj | 6 +- .../EasyMallHttpApiClientModule.cs | 12 +- .../EasyMall.HttpApi/EasyMall.HttpApi.csproj | 6 +- .../EasyMall.HttpApi/EasyMallHttpApiModule.cs | 12 +- .../src/EasyMall.Web/EasyMall.Web.csproj | 6 +- .../src/EasyMall.Web/EasyMallWebModule.cs | 7 +- 134 files changed, 2950 insertions(+), 121 deletions(-) create mode 100644 integration/EasyAbp.EShop/.gitattributes create mode 100644 integration/EasyAbp.EShop/.gitignore create mode 100644 integration/EasyAbp.EShop/EasyAbp.EShop.sln create mode 100644 integration/EasyAbp.EShop/EasyAbp.EShop.sln.DotSettings create mode 100644 integration/EasyAbp.EShop/common.props create mode 100644 integration/EasyAbp.EShop/docker-compose.migrations.yml create mode 100644 integration/EasyAbp.EShop/docker-compose.override.yml create mode 100644 integration/EasyAbp.EShop/docker-compose.yml create mode 100644 integration/EasyAbp.EShop/src/EasyAbp.EShop.Application.Contracts/EasyAbp.EShop.Application.Contracts.csproj create mode 100644 integration/EasyAbp.EShop/src/EasyAbp.EShop.Application.Contracts/EasyAbp/EShop/Authorization/EShopPermissionDefinitionProvider.cs create mode 100644 integration/EasyAbp.EShop/src/EasyAbp.EShop.Application.Contracts/EasyAbp/EShop/Authorization/EShopPermissions.cs create mode 100644 integration/EasyAbp.EShop/src/EasyAbp.EShop.Application.Contracts/EasyAbp/EShop/EShopApplicationContractsModule.cs create mode 100644 integration/EasyAbp.EShop/src/EasyAbp.EShop.Application.Contracts/FodyWeavers.xml create mode 100644 integration/EasyAbp.EShop/src/EasyAbp.EShop.Application.Contracts/FodyWeavers.xsd create mode 100644 integration/EasyAbp.EShop/src/EasyAbp.EShop.Application/EasyAbp.EShop.Application.csproj create mode 100644 integration/EasyAbp.EShop/src/EasyAbp.EShop.Application/EasyAbp/EShop/EShopAppService.cs create mode 100644 integration/EasyAbp.EShop/src/EasyAbp.EShop.Application/EasyAbp/EShop/EShopApplicationAutoMapperProfile.cs create mode 100644 integration/EasyAbp.EShop/src/EasyAbp.EShop.Application/EasyAbp/EShop/EShopApplicationModule.cs create mode 100644 integration/EasyAbp.EShop/src/EasyAbp.EShop.Application/FodyWeavers.xml create mode 100644 integration/EasyAbp.EShop/src/EasyAbp.EShop.Application/FodyWeavers.xsd create mode 100644 integration/EasyAbp.EShop/src/EasyAbp.EShop.Domain.Shared/EasyAbp.EShop.Domain.Shared.csproj create mode 100644 integration/EasyAbp.EShop/src/EasyAbp.EShop.Domain.Shared/EasyAbp/EShop/EShopDomainSharedModule.cs create mode 100644 integration/EasyAbp.EShop/src/EasyAbp.EShop.Domain.Shared/EasyAbp/EShop/EShopErrorCodes.cs create mode 100644 integration/EasyAbp.EShop/src/EasyAbp.EShop.Domain.Shared/EasyAbp/EShop/Localization/EShop/cs.json create mode 100644 integration/EasyAbp.EShop/src/EasyAbp.EShop.Domain.Shared/EasyAbp/EShop/Localization/EShop/en.json create mode 100644 integration/EasyAbp.EShop/src/EasyAbp.EShop.Domain.Shared/EasyAbp/EShop/Localization/EShop/pl-PL.json create mode 100644 integration/EasyAbp.EShop/src/EasyAbp.EShop.Domain.Shared/EasyAbp/EShop/Localization/EShop/pt-BR.json create mode 100644 integration/EasyAbp.EShop/src/EasyAbp.EShop.Domain.Shared/EasyAbp/EShop/Localization/EShop/sl.json create mode 100644 integration/EasyAbp.EShop/src/EasyAbp.EShop.Domain.Shared/EasyAbp/EShop/Localization/EShop/tr.json create mode 100644 integration/EasyAbp.EShop/src/EasyAbp.EShop.Domain.Shared/EasyAbp/EShop/Localization/EShop/vi.json create mode 100644 integration/EasyAbp.EShop/src/EasyAbp.EShop.Domain.Shared/EasyAbp/EShop/Localization/EShop/zh-Hans.json create mode 100644 integration/EasyAbp.EShop/src/EasyAbp.EShop.Domain.Shared/EasyAbp/EShop/Localization/EShop/zh-Hant.json create mode 100644 integration/EasyAbp.EShop/src/EasyAbp.EShop.Domain.Shared/EasyAbp/EShop/Localization/EShopResource.cs create mode 100644 integration/EasyAbp.EShop/src/EasyAbp.EShop.Domain.Shared/FodyWeavers.xml create mode 100644 integration/EasyAbp.EShop/src/EasyAbp.EShop.Domain.Shared/FodyWeavers.xsd create mode 100644 integration/EasyAbp.EShop/src/EasyAbp.EShop.Domain/EasyAbp.EShop.Domain.csproj create mode 100644 integration/EasyAbp.EShop/src/EasyAbp.EShop.Domain/EasyAbp/EShop/EShopDbProperties.cs create mode 100644 integration/EasyAbp.EShop/src/EasyAbp.EShop.Domain/EasyAbp/EShop/EShopDomainModule.cs create mode 100644 integration/EasyAbp.EShop/src/EasyAbp.EShop.Domain/EasyAbp/EShop/Settings/EShopSettingDefinitionProvider.cs create mode 100644 integration/EasyAbp.EShop/src/EasyAbp.EShop.Domain/EasyAbp/EShop/Settings/EShopSettings.cs create mode 100644 integration/EasyAbp.EShop/src/EasyAbp.EShop.Domain/FodyWeavers.xml create mode 100644 integration/EasyAbp.EShop/src/EasyAbp.EShop.Domain/FodyWeavers.xsd create mode 100644 integration/EasyAbp.EShop/src/EasyAbp.EShop.EntityFrameworkCore/EasyAbp.EShop.EntityFrameworkCore.csproj create mode 100644 integration/EasyAbp.EShop/src/EasyAbp.EShop.EntityFrameworkCore/EasyAbp/EShop/EntityFrameworkCore/EShopDbContext.cs create mode 100644 integration/EasyAbp.EShop/src/EasyAbp.EShop.EntityFrameworkCore/EasyAbp/EShop/EntityFrameworkCore/EShopDbContextModelCreatingExtensions.cs create mode 100644 integration/EasyAbp.EShop/src/EasyAbp.EShop.EntityFrameworkCore/EasyAbp/EShop/EntityFrameworkCore/EShopEntityFrameworkCoreModule.cs create mode 100644 integration/EasyAbp.EShop/src/EasyAbp.EShop.EntityFrameworkCore/EasyAbp/EShop/EntityFrameworkCore/EShopModelBuilderConfigurationOptions.cs create mode 100644 integration/EasyAbp.EShop/src/EasyAbp.EShop.EntityFrameworkCore/EasyAbp/EShop/EntityFrameworkCore/IEShopDbContext.cs create mode 100644 integration/EasyAbp.EShop/src/EasyAbp.EShop.EntityFrameworkCore/FodyWeavers.xml create mode 100644 integration/EasyAbp.EShop/src/EasyAbp.EShop.EntityFrameworkCore/FodyWeavers.xsd create mode 100644 integration/EasyAbp.EShop/src/EasyAbp.EShop.HttpApi.Client/EasyAbp.EShop.HttpApi.Client.csproj create mode 100644 integration/EasyAbp.EShop/src/EasyAbp.EShop.HttpApi.Client/EasyAbp/EShop/EShopHttpApiClientModule.cs create mode 100644 integration/EasyAbp.EShop/src/EasyAbp.EShop.HttpApi.Client/FodyWeavers.xml create mode 100644 integration/EasyAbp.EShop/src/EasyAbp.EShop.HttpApi.Client/FodyWeavers.xsd create mode 100644 integration/EasyAbp.EShop/src/EasyAbp.EShop.HttpApi/EasyAbp.EShop.HttpApi.csproj create mode 100644 integration/EasyAbp.EShop/src/EasyAbp.EShop.HttpApi/EasyAbp/EShop/EShopController.cs create mode 100644 integration/EasyAbp.EShop/src/EasyAbp.EShop.HttpApi/EasyAbp/EShop/EShopHttpApiModule.cs create mode 100644 integration/EasyAbp.EShop/src/EasyAbp.EShop.HttpApi/FodyWeavers.xml create mode 100644 integration/EasyAbp.EShop/src/EasyAbp.EShop.HttpApi/FodyWeavers.xsd create mode 100644 integration/EasyAbp.EShop/src/EasyAbp.EShop.MongoDB/EasyAbp.EShop.MongoDB.csproj create mode 100644 integration/EasyAbp.EShop/src/EasyAbp.EShop.MongoDB/EasyAbp/EShop/MongoDB/EShopMongoDbContext.cs create mode 100644 integration/EasyAbp.EShop/src/EasyAbp.EShop.MongoDB/EasyAbp/EShop/MongoDB/EShopMongoDbContextExtensions.cs create mode 100644 integration/EasyAbp.EShop/src/EasyAbp.EShop.MongoDB/EasyAbp/EShop/MongoDB/EShopMongoDbModule.cs create mode 100644 integration/EasyAbp.EShop/src/EasyAbp.EShop.MongoDB/EasyAbp/EShop/MongoDB/EShopMongoModelBuilderConfigurationOptions.cs create mode 100644 integration/EasyAbp.EShop/src/EasyAbp.EShop.MongoDB/EasyAbp/EShop/MongoDB/IEShopMongoDbContext.cs create mode 100644 integration/EasyAbp.EShop/src/EasyAbp.EShop.MongoDB/FodyWeavers.xml create mode 100644 integration/EasyAbp.EShop/src/EasyAbp.EShop.MongoDB/FodyWeavers.xsd create mode 100644 integration/EasyAbp.EShop/src/EasyAbp.EShop.Web/EShopMenuContributor.cs create mode 100644 integration/EasyAbp.EShop/src/EasyAbp.EShop.Web/EShopWebAutoMapperProfile.cs create mode 100644 integration/EasyAbp.EShop/src/EasyAbp.EShop.Web/EShopWebModule.cs create mode 100644 integration/EasyAbp.EShop/src/EasyAbp.EShop.Web/EasyAbp.EShop.Web.csproj create mode 100644 integration/EasyAbp.EShop/src/EasyAbp.EShop.Web/FodyWeavers.xml create mode 100644 integration/EasyAbp.EShop/src/EasyAbp.EShop.Web/FodyWeavers.xsd create mode 100644 integration/EasyAbp.EShop/src/EasyAbp.EShop.Web/Pages/EShop/Index.cshtml create mode 100644 integration/EasyAbp.EShop/src/EasyAbp.EShop.Web/Pages/EShop/Index.cshtml.cs create mode 100644 integration/EasyAbp.EShop/src/EasyAbp.EShop.Web/Pages/EShop/_ViewImports.cshtml create mode 100644 integration/EasyAbp.EShop/src/EasyAbp.EShop.Web/Pages/EShopPage.cs create mode 100644 integration/EasyAbp.EShop/src/EasyAbp.EShop.Web/Pages/EShopPageModel.cs create mode 100644 integration/EasyAbp.EShop/src/EasyAbp.EShop.Web/Properties/launchSettings.json create mode 100644 integration/EasyAbp.EShop/test/EasyAbp.EShop.Application.Tests/EShopApplicationTestBase.cs create mode 100644 integration/EasyAbp.EShop/test/EasyAbp.EShop.Application.Tests/EShopApplicationTestModule.cs create mode 100644 integration/EasyAbp.EShop/test/EasyAbp.EShop.Application.Tests/EasyAbp.EShop.Application.Tests.csproj create mode 100644 integration/EasyAbp.EShop/test/EasyAbp.EShop.Application.Tests/FodyWeavers.xml create mode 100644 integration/EasyAbp.EShop/test/EasyAbp.EShop.Application.Tests/FodyWeavers.xsd create mode 100644 integration/EasyAbp.EShop/test/EasyAbp.EShop.Domain.Tests/EShopDomainTestBase.cs create mode 100644 integration/EasyAbp.EShop/test/EasyAbp.EShop.Domain.Tests/EShopDomainTestModule.cs create mode 100644 integration/EasyAbp.EShop/test/EasyAbp.EShop.Domain.Tests/EasyAbp.EShop.Domain.Tests.csproj create mode 100644 integration/EasyAbp.EShop/test/EasyAbp.EShop.Domain.Tests/FodyWeavers.xml create mode 100644 integration/EasyAbp.EShop/test/EasyAbp.EShop.Domain.Tests/FodyWeavers.xsd create mode 100644 integration/EasyAbp.EShop/test/EasyAbp.EShop.EntityFrameworkCore.Tests/EasyAbp.EShop.EntityFrameworkCore.Tests.csproj create mode 100644 integration/EasyAbp.EShop/test/EasyAbp.EShop.EntityFrameworkCore.Tests/EntityFrameworkCore/EShopEntityFrameworkCoreTestBase.cs create mode 100644 integration/EasyAbp.EShop/test/EasyAbp.EShop.EntityFrameworkCore.Tests/EntityFrameworkCore/EShopEntityFrameworkCoreTestModule.cs create mode 100644 integration/EasyAbp.EShop/test/EasyAbp.EShop.EntityFrameworkCore.Tests/FodyWeavers.xml create mode 100644 integration/EasyAbp.EShop/test/EasyAbp.EShop.EntityFrameworkCore.Tests/FodyWeavers.xsd create mode 100644 integration/EasyAbp.EShop/test/EasyAbp.EShop.HttpApi.Client.ConsoleTestApp/ClientDemoService.cs create mode 100644 integration/EasyAbp.EShop/test/EasyAbp.EShop.HttpApi.Client.ConsoleTestApp/ConsoleTestAppHostedService.cs create mode 100644 integration/EasyAbp.EShop/test/EasyAbp.EShop.HttpApi.Client.ConsoleTestApp/EShopConsoleApiClientModule.cs create mode 100644 integration/EasyAbp.EShop/test/EasyAbp.EShop.HttpApi.Client.ConsoleTestApp/EasyAbp.EShop.HttpApi.Client.ConsoleTestApp.csproj create mode 100644 integration/EasyAbp.EShop/test/EasyAbp.EShop.HttpApi.Client.ConsoleTestApp/Program.cs create mode 100644 integration/EasyAbp.EShop/test/EasyAbp.EShop.HttpApi.Client.ConsoleTestApp/appsettings.json create mode 100644 integration/EasyAbp.EShop/test/EasyAbp.EShop.MongoDB.Tests/EasyAbp.EShop.MongoDB.Tests.csproj create mode 100644 integration/EasyAbp.EShop/test/EasyAbp.EShop.MongoDB.Tests/FodyWeavers.xml create mode 100644 integration/EasyAbp.EShop/test/EasyAbp.EShop.MongoDB.Tests/FodyWeavers.xsd create mode 100644 integration/EasyAbp.EShop/test/EasyAbp.EShop.MongoDB.Tests/MongoDB/EShopMongoDbTestBase.cs create mode 100644 integration/EasyAbp.EShop/test/EasyAbp.EShop.MongoDB.Tests/MongoDB/EShopMongoDbTestModule.cs create mode 100644 integration/EasyAbp.EShop/test/EasyAbp.EShop.MongoDB.Tests/MongoDB/MongoDbFixture.cs create mode 100644 integration/EasyAbp.EShop/test/EasyAbp.EShop.MongoDB.Tests/MongoDB/MongoTestCollection.cs create mode 100644 integration/EasyAbp.EShop/test/EasyAbp.EShop.TestBase/EShopDataSeedContributor.cs create mode 100644 integration/EasyAbp.EShop/test/EasyAbp.EShop.TestBase/EShopTestBase.cs create mode 100644 integration/EasyAbp.EShop/test/EasyAbp.EShop.TestBase/EShopTestBaseModule.cs create mode 100644 integration/EasyAbp.EShop/test/EasyAbp.EShop.TestBase/EasyAbp.EShop.TestBase.csproj create mode 100644 integration/EasyAbp.EShop/test/EasyAbp.EShop.TestBase/FodyWeavers.xml create mode 100644 integration/EasyAbp.EShop/test/EasyAbp.EShop.TestBase/FodyWeavers.xsd create mode 100644 integration/EasyAbp.EShop/test/EasyAbp.EShop.TestBase/Security/FakeCurrentPrincipalAccessor.cs diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 6db4be92..76a1a0fd 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -10,7 +10,7 @@ jobs: steps: - uses: actions/checkout@v2 - # Publish + # Publish modules - name: publish EasyAbp.EShop.Baskets.Application.dll uses: brandedoutcast/publish-nuget@v2 with: @@ -325,3 +325,67 @@ jobs: PROJECT_FILE_PATH: modules/EasyAbp.EShop.Stores/src/EasyAbp.EShop.Stores.Web/EasyAbp.EShop.Stores.Web.csproj VERSION_FILE_PATH: modules/EasyAbp.EShop.Stores/common.props NUGET_KEY: ${{secrets.NUGET_API_KEY}} + + # Publish the integration module + - name: publish EasyAbp.EShop.Application.dll + uses: brandedoutcast/publish-nuget@v2 + with: + PROJECT_FILE_PATH: modules/EasyAbp.EShop/src/EasyAbp.EShop.Application/EasyAbp.EShop.Application.csproj + VERSION_FILE_PATH: modules/EasyAbp.EShop/common.props + NUGET_KEY: ${{secrets.NUGET_API_KEY}} + + - name: publish EasyAbp.EShop.Application.Contracts.dll + uses: brandedoutcast/publish-nuget@v2 + with: + PROJECT_FILE_PATH: modules/EasyAbp.EShop/src/EasyAbp.EShop.Application.Contracts/EasyAbp.EShop.Application.Contracts.csproj + VERSION_FILE_PATH: modules/EasyAbp.EShop/common.props + NUGET_KEY: ${{secrets.NUGET_API_KEY}} + + - name: publish EasyAbp.EShop.Domain.dll + uses: brandedoutcast/publish-nuget@v2 + with: + PROJECT_FILE_PATH: modules/EasyAbp.EShop/src/EasyAbp.EShop.Domain/EasyAbp.EShop.Domain.csproj + VERSION_FILE_PATH: modules/EasyAbp.EShop/common.props + NUGET_KEY: ${{secrets.NUGET_API_KEY}} + + - name: publish EasyAbp.EShop.Domain.Shared.dll + uses: brandedoutcast/publish-nuget@v2 + with: + PROJECT_FILE_PATH: modules/EasyAbp.EShop/src/EasyAbp.EShop.Domain.Shared/EasyAbp.EShop.Domain.Shared.csproj + VERSION_FILE_PATH: modules/EasyAbp.EShop/common.props + NUGET_KEY: ${{secrets.NUGET_API_KEY}} + + - name: publish EasyAbp.EShop.EntityFrameworkCore.dll + uses: brandedoutcast/publish-nuget@v2 + with: + PROJECT_FILE_PATH: modules/EasyAbp.EShop/src/EasyAbp.EShop.EntityFrameworkCore/EasyAbp.EShop.EntityFrameworkCore.csproj + VERSION_FILE_PATH: modules/EasyAbp.EShop/common.props + NUGET_KEY: ${{secrets.NUGET_API_KEY}} + + - name: publish EasyAbp.EShop.HttpApi.dll + uses: brandedoutcast/publish-nuget@v2 + with: + PROJECT_FILE_PATH: modules/EasyAbp.EShop/src/EasyAbp.EShop.HttpApi/EasyAbp.EShop.HttpApi.csproj + VERSION_FILE_PATH: modules/EasyAbp.EShop/common.props + NUGET_KEY: ${{secrets.NUGET_API_KEY}} + + - name: publish EasyAbp.EShop.HttpApi.Client.dll + uses: brandedoutcast/publish-nuget@v2 + with: + PROJECT_FILE_PATH: modules/EasyAbp.EShop/src/EasyAbp.EShop.HttpApi.Client/EasyAbp.EShop.HttpApi.Client.csproj + VERSION_FILE_PATH: modules/EasyAbp.EShop/common.props + NUGET_KEY: ${{secrets.NUGET_API_KEY}} + + - name: publish EasyAbp.EShop.MongoDB.dll + uses: brandedoutcast/publish-nuget@v2 + with: + PROJECT_FILE_PATH: modules/EasyAbp.EShop/src/EasyAbp.EShop.MongoDB/EasyAbp.EShop.MongoDB.csproj + VERSION_FILE_PATH: modules/EasyAbp.EShop/common.props + NUGET_KEY: ${{secrets.NUGET_API_KEY}} + + - name: publish EasyAbp.EShop.Web.dll + uses: brandedoutcast/publish-nuget@v2 + with: + PROJECT_FILE_PATH: modules/EasyAbp.EShop/src/EasyAbp.EShop.Web/EasyAbp.EShop.Web.csproj + VERSION_FILE_PATH: modules/EasyAbp.EShop/common.props + NUGET_KEY: ${{secrets.NUGET_API_KEY}} \ No newline at end of file diff --git a/integration/EasyAbp.EShop/.gitattributes b/integration/EasyAbp.EShop/.gitattributes new file mode 100644 index 00000000..c941e526 --- /dev/null +++ b/integration/EasyAbp.EShop/.gitattributes @@ -0,0 +1 @@ +**/wwwroot/libs/** linguist-vendored diff --git a/integration/EasyAbp.EShop/.gitignore b/integration/EasyAbp.EShop/.gitignore new file mode 100644 index 00000000..4f8bc581 --- /dev/null +++ b/integration/EasyAbp.EShop/.gitignore @@ -0,0 +1,258 @@ +## Ignore Visual Studio temporary files, build results, and +## files generated by popular Visual Studio add-ons. + +# User-specific files +*.suo +*.user +*.userosscache +*.sln.docstates + +# User-specific files (MonoDevelop/Xamarin Studio) +*.userprefs + +# Build results +[Dd]ebug/ +[Dd]ebugPublic/ +[Rr]elease/ +[Rr]eleases/ +x64/ +x86/ +bld/ +[Bb]in/ +[Oo]bj/ +[Ll]og/ + +# Visual Studio 2015 cache/options directory +.vs/ +# Uncomment if you have tasks that create the project's static files in wwwroot +#wwwroot/ + +# MSTest test Results +[Tt]est[Rr]esult*/ +[Bb]uild[Ll]og.* + +# NUNIT +*.VisualState.xml +TestResult.xml + +# Build Results of an ATL Project +[Dd]ebugPS/ +[Rr]eleasePS/ +dlldata.c + +# DNX +project.lock.json +artifacts/ + +*_i.c +*_p.c +*_i.h +*.ilk +*.meta +*.obj +*.pch +*.pdb +*.pgc +*.pgd +*.rsp +*.sbr +*.tlb +*.tli +*.tlh +*.tmp +*.tmp_proj +*.log +*.vspscc +*.vssscc +.builds +*.pidb +*.svclog +*.scc + +# Chutzpah Test files +_Chutzpah* + +# Visual C++ cache files +ipch/ +*.aps +*.ncb +*.opendb +*.opensdf +*.sdf +*.cachefile +*.VC.db +*.VC.VC.opendb + +# Visual Studio profiler +*.psess +*.vsp +*.vspx +*.sap + +# TFS 2012 Local Workspace +$tf/ + +# Guidance Automation Toolkit +*.gpState + +# ReSharper is a .NET coding add-in +_ReSharper*/ +*.[Rr]e[Ss]harper +*.DotSettings.user + +# JustCode is a .NET coding add-in +.JustCode + +# TeamCity is a build add-in +_TeamCity* + +# DotCover is a Code Coverage Tool +*.dotCover + +# NCrunch +_NCrunch_* +.*crunch*.local.xml +nCrunchTemp_* + +# MightyMoose +*.mm.* +AutoTest.Net/ + +# Web workbench (sass) +.sass-cache/ + +# Installshield output folder +[Ee]xpress/ + +# DocProject is a documentation generator add-in +DocProject/buildhelp/ +DocProject/Help/*.HxT +DocProject/Help/*.HxC +DocProject/Help/*.hhc +DocProject/Help/*.hhk +DocProject/Help/*.hhp +DocProject/Help/Html2 +DocProject/Help/html + +# Click-Once directory +publish/ + +# Publish Web Output +*.[Pp]ublish.xml +*.azurePubxml +# TODO: Comment the next line if you want to checkin your web deploy settings +# but database connection strings (with potential passwords) will be unencrypted +*.pubxml +*.publishproj + +# Microsoft Azure Web App publish settings. Comment the next line if you want to +# checkin your Azure Web App publish settings, but sensitive information contained +# in these scripts will be unencrypted +PublishScripts/ + +# NuGet Packages +*.nupkg +# The packages folder can be ignored because of Package Restore +**/packages/* +# except build/, which is used as an MSBuild target. +!**/packages/build/ +# Uncomment if necessary however generally it will be regenerated when needed +#!**/packages/repositories.config +# NuGet v3's project.json files produces more ignoreable files +*.nuget.props +*.nuget.targets + +# Microsoft Azure Build Output +csx/ +*.build.csdef + +# Microsoft Azure Emulator +ecf/ +rcf/ + +# Windows Store app package directories and files +AppPackages/ +BundleArtifacts/ +Package.StoreAssociation.xml +_pkginfo.txt + +# Visual Studio cache files +# files ending in .cache can be ignored +*.[Cc]ache +# but keep track of directories ending in .cache +!*.[Cc]ache/ + +# Others +ClientBin/ +~$* +*~ +*.dbmdl +*.dbproj.schemaview +*.pfx +*.publishsettings +node_modules/ +orleans.codegen.cs + +# Since there are multiple workflows, uncomment next line to ignore bower_components +# (https://github.com/github/gitignore/pull/1529#issuecomment-104372622) +#bower_components/ + +# RIA/Silverlight projects +Generated_Code/ + +# Backup & report files from converting an old project file +# to a newer Visual Studio version. Backup files are not needed, +# because we have git ;-) +_UpgradeReport_Files/ +Backup*/ +UpgradeLog*.XML +UpgradeLog*.htm + +# SQL Server files +*.mdf +*.ldf + +# Business Intelligence projects +*.rdl.data +*.bim.layout +*.bim_*.settings + +# Microsoft Fakes +FakesAssemblies/ + +# GhostDoc plugin setting file +*.GhostDoc.xml + +# Node.js Tools for Visual Studio +.ntvs_analysis.dat + +# Visual Studio 6 build log +*.plg + +# Visual Studio 6 workspace options file +*.opt + +# Visual Studio LightSwitch build output +**/*.HTMLClient/GeneratedArtifacts +**/*.DesktopClient/GeneratedArtifacts +**/*.DesktopClient/ModelManifest.xml +**/*.Server/GeneratedArtifacts +**/*.Server/ModelManifest.xml +_Pvt_Extensions + +# Paket dependency manager +.paket/paket.exe +paket-files/ + +# FAKE - F# Make +.fake/ + +# JetBrains Rider +.idea/ +*.sln.iml + +# EShop +host/EasyAbp.EShop.IdentityServer/Logs/logs.txt +host/EasyAbp.EShop.HttpApi.Host/Logs/logs.txt +host/EasyAbp.EShop.Web.Host/Logs/logs.txt +host/EasyAbp.EShop.Web.Unified/Logs/logs.txt diff --git a/integration/EasyAbp.EShop/EasyAbp.EShop.sln b/integration/EasyAbp.EShop/EasyAbp.EShop.sln new file mode 100644 index 00000000..8c9940bc --- /dev/null +++ b/integration/EasyAbp.EShop/EasyAbp.EShop.sln @@ -0,0 +1,167 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 16 +VisualStudioVersion = 16.0.29001.49 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "EasyAbp.EShop.Domain.Shared", "src\EasyAbp.EShop.Domain.Shared\EasyAbp.EShop.Domain.Shared.csproj", "{D64C1577-4929-4B60-939E-96DE1534891A}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "EasyAbp.EShop.Domain", "src\EasyAbp.EShop.Domain\EasyAbp.EShop.Domain.csproj", "{F2840BC7-0188-4606-9126-DADD0F5ABF7A}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "EasyAbp.EShop.Application.Contracts", "src\EasyAbp.EShop.Application.Contracts\EasyAbp.EShop.Application.Contracts.csproj", "{BD65D04F-08D5-40C1-8C24-77CA0BACB877}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "EasyAbp.EShop.Application", "src\EasyAbp.EShop.Application\EasyAbp.EShop.Application.csproj", "{78040F9E-3501-4A40-82DF-00A597710F35}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{649A3FFA-182F-4E56-9717-E6A9A2BEC545}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "test", "test", "{CCD2960C-23CC-4AB4-B84D-60C7AAA52F4D}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "host", "host", "{E400416D-2895-4512-9D17-90681EEC7E0A}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "EasyAbp.EShop.EntityFrameworkCore", "src\EasyAbp.EShop.EntityFrameworkCore\EasyAbp.EShop.EntityFrameworkCore.csproj", "{0CE86223-D31D-4315-A1F5-87BA3EE1B844}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "EasyAbp.EShop.MongoDB", "src\EasyAbp.EShop.MongoDB\EasyAbp.EShop.MongoDB.csproj", "{F1C58097-4C08-4D88-8976-6B3389391481}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "EasyAbp.EShop.HttpApi", "src\EasyAbp.EShop.HttpApi\EasyAbp.EShop.HttpApi.csproj", "{077AA5F8-8B61-420C-A6B5-0150A66FDB34}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "EasyAbp.EShop.HttpApi.Client", "src\EasyAbp.EShop.HttpApi.Client\EasyAbp.EShop.HttpApi.Client.csproj", "{36E2735F-CEAB-44C8-A6D1-2CDAFF399751}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "EasyAbp.EShop.TestBase", "test\EasyAbp.EShop.TestBase\EasyAbp.EShop.TestBase.csproj", "{C5BB573D-3030-4BCB-88B7-F6A85C32766C}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "EasyAbp.EShop.EntityFrameworkCore.Tests", "test\EasyAbp.EShop.EntityFrameworkCore.Tests\EasyAbp.EShop.EntityFrameworkCore.Tests.csproj", "{527F645C-C1FC-406E-8479-81386C8ECF13}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "EasyAbp.EShop.MongoDB.Tests", "test\EasyAbp.EShop.MongoDB.Tests\EasyAbp.EShop.MongoDB.Tests.csproj", "{D0AD9179-125C-40B2-A8EE-CD4C1EE24BB6}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "EasyAbp.EShop.Domain.Tests", "test\EasyAbp.EShop.Domain.Tests\EasyAbp.EShop.Domain.Tests.csproj", "{E60895E5-79C4-447D-88B7-85CB5BA336A4}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "EasyAbp.EShop.Application.Tests", "test\EasyAbp.EShop.Application.Tests\EasyAbp.EShop.Application.Tests.csproj", "{90CB5DC4-C040-45C7-8900-9688B26405BC}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "EasyAbp.EShop.HttpApi.Host", "host\EasyAbp.EShop.HttpApi.Host\EasyAbp.EShop.HttpApi.Host.csproj", "{37B135B0-DAFE-4616-B25C-1BDF32FC44A2}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "EasyAbp.EShop.Web", "src\EasyAbp.EShop.Web\EasyAbp.EShop.Web.csproj", "{3B7B6317-1B85-4164-8E11-75574F80AE17}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "EasyAbp.EShop.HttpApi.Client.ConsoleTestApp", "test\EasyAbp.EShop.HttpApi.Client.ConsoleTestApp\EasyAbp.EShop.HttpApi.Client.ConsoleTestApp.csproj", "{1EDCD6D4-DF3A-4E3B-ABB6-C0D0B373EAB8}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "EasyAbp.EShop.Web.Host", "host\EasyAbp.EShop.Web.Host\EasyAbp.EShop.Web.Host.csproj", "{73513786-B6C6-4A21-89C5-0FBDD0A46107}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "EasyAbp.EShop.IdentityServer", "host\EasyAbp.EShop.IdentityServer\EasyAbp.EShop.IdentityServer.csproj", "{690203F4-3CD5-4569-88D9-EE831EEA5F5F}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "EasyAbp.EShop.Host.Shared", "host\EasyAbp.EShop.Host.Shared\EasyAbp.EShop.Host.Shared.csproj", "{F6AC8D4A-EDD7-4514-8E8A-5BCB019864DB}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "EasyAbp.EShop.Web.Unified", "host\EasyAbp.EShop.Web.Unified\EasyAbp.EShop.Web.Unified.csproj", "{3D872C41-E226-45C8-89C1-9D3DBD7C73F2}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {D64C1577-4929-4B60-939E-96DE1534891A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {D64C1577-4929-4B60-939E-96DE1534891A}.Debug|Any CPU.Build.0 = Debug|Any CPU + {D64C1577-4929-4B60-939E-96DE1534891A}.Release|Any CPU.ActiveCfg = Release|Any CPU + {D64C1577-4929-4B60-939E-96DE1534891A}.Release|Any CPU.Build.0 = Release|Any CPU + {F2840BC7-0188-4606-9126-DADD0F5ABF7A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {F2840BC7-0188-4606-9126-DADD0F5ABF7A}.Debug|Any CPU.Build.0 = Debug|Any CPU + {F2840BC7-0188-4606-9126-DADD0F5ABF7A}.Release|Any CPU.ActiveCfg = Release|Any CPU + {F2840BC7-0188-4606-9126-DADD0F5ABF7A}.Release|Any CPU.Build.0 = Release|Any CPU + {BD65D04F-08D5-40C1-8C24-77CA0BACB877}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {BD65D04F-08D5-40C1-8C24-77CA0BACB877}.Debug|Any CPU.Build.0 = Debug|Any CPU + {BD65D04F-08D5-40C1-8C24-77CA0BACB877}.Release|Any CPU.ActiveCfg = Release|Any CPU + {BD65D04F-08D5-40C1-8C24-77CA0BACB877}.Release|Any CPU.Build.0 = Release|Any CPU + {78040F9E-3501-4A40-82DF-00A597710F35}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {78040F9E-3501-4A40-82DF-00A597710F35}.Debug|Any CPU.Build.0 = Debug|Any CPU + {78040F9E-3501-4A40-82DF-00A597710F35}.Release|Any CPU.ActiveCfg = Release|Any CPU + {78040F9E-3501-4A40-82DF-00A597710F35}.Release|Any CPU.Build.0 = Release|Any CPU + {0CE86223-D31D-4315-A1F5-87BA3EE1B844}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {0CE86223-D31D-4315-A1F5-87BA3EE1B844}.Debug|Any CPU.Build.0 = Debug|Any CPU + {0CE86223-D31D-4315-A1F5-87BA3EE1B844}.Release|Any CPU.ActiveCfg = Release|Any CPU + {0CE86223-D31D-4315-A1F5-87BA3EE1B844}.Release|Any CPU.Build.0 = Release|Any CPU + {F1C58097-4C08-4D88-8976-6B3389391481}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {F1C58097-4C08-4D88-8976-6B3389391481}.Debug|Any CPU.Build.0 = Debug|Any CPU + {F1C58097-4C08-4D88-8976-6B3389391481}.Release|Any CPU.ActiveCfg = Release|Any CPU + {F1C58097-4C08-4D88-8976-6B3389391481}.Release|Any CPU.Build.0 = Release|Any CPU + {077AA5F8-8B61-420C-A6B5-0150A66FDB34}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {077AA5F8-8B61-420C-A6B5-0150A66FDB34}.Debug|Any CPU.Build.0 = Debug|Any CPU + {077AA5F8-8B61-420C-A6B5-0150A66FDB34}.Release|Any CPU.ActiveCfg = Release|Any CPU + {077AA5F8-8B61-420C-A6B5-0150A66FDB34}.Release|Any CPU.Build.0 = Release|Any CPU + {36E2735F-CEAB-44C8-A6D1-2CDAFF399751}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {36E2735F-CEAB-44C8-A6D1-2CDAFF399751}.Debug|Any CPU.Build.0 = Debug|Any CPU + {36E2735F-CEAB-44C8-A6D1-2CDAFF399751}.Release|Any CPU.ActiveCfg = Release|Any CPU + {36E2735F-CEAB-44C8-A6D1-2CDAFF399751}.Release|Any CPU.Build.0 = Release|Any CPU + {C5BB573D-3030-4BCB-88B7-F6A85C32766C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {C5BB573D-3030-4BCB-88B7-F6A85C32766C}.Debug|Any CPU.Build.0 = Debug|Any CPU + {C5BB573D-3030-4BCB-88B7-F6A85C32766C}.Release|Any CPU.ActiveCfg = Release|Any CPU + {C5BB573D-3030-4BCB-88B7-F6A85C32766C}.Release|Any CPU.Build.0 = Release|Any CPU + {527F645C-C1FC-406E-8479-81386C8ECF13}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {527F645C-C1FC-406E-8479-81386C8ECF13}.Debug|Any CPU.Build.0 = Debug|Any CPU + {527F645C-C1FC-406E-8479-81386C8ECF13}.Release|Any CPU.ActiveCfg = Release|Any CPU + {527F645C-C1FC-406E-8479-81386C8ECF13}.Release|Any CPU.Build.0 = Release|Any CPU + {D0AD9179-125C-40B2-A8EE-CD4C1EE24BB6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {D0AD9179-125C-40B2-A8EE-CD4C1EE24BB6}.Debug|Any CPU.Build.0 = Debug|Any CPU + {D0AD9179-125C-40B2-A8EE-CD4C1EE24BB6}.Release|Any CPU.ActiveCfg = Release|Any CPU + {D0AD9179-125C-40B2-A8EE-CD4C1EE24BB6}.Release|Any CPU.Build.0 = Release|Any CPU + {E60895E5-79C4-447D-88B7-85CB5BA336A4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {E60895E5-79C4-447D-88B7-85CB5BA336A4}.Debug|Any CPU.Build.0 = Debug|Any CPU + {E60895E5-79C4-447D-88B7-85CB5BA336A4}.Release|Any CPU.ActiveCfg = Release|Any CPU + {E60895E5-79C4-447D-88B7-85CB5BA336A4}.Release|Any CPU.Build.0 = Release|Any CPU + {90CB5DC4-C040-45C7-8900-9688B26405BC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {90CB5DC4-C040-45C7-8900-9688B26405BC}.Debug|Any CPU.Build.0 = Debug|Any CPU + {90CB5DC4-C040-45C7-8900-9688B26405BC}.Release|Any CPU.ActiveCfg = Release|Any CPU + {90CB5DC4-C040-45C7-8900-9688B26405BC}.Release|Any CPU.Build.0 = Release|Any CPU + {37B135B0-DAFE-4616-B25C-1BDF32FC44A2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {37B135B0-DAFE-4616-B25C-1BDF32FC44A2}.Debug|Any CPU.Build.0 = Debug|Any CPU + {37B135B0-DAFE-4616-B25C-1BDF32FC44A2}.Release|Any CPU.ActiveCfg = Release|Any CPU + {37B135B0-DAFE-4616-B25C-1BDF32FC44A2}.Release|Any CPU.Build.0 = Release|Any CPU + {3B7B6317-1B85-4164-8E11-75574F80AE17}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {3B7B6317-1B85-4164-8E11-75574F80AE17}.Debug|Any CPU.Build.0 = Debug|Any CPU + {3B7B6317-1B85-4164-8E11-75574F80AE17}.Release|Any CPU.ActiveCfg = Release|Any CPU + {3B7B6317-1B85-4164-8E11-75574F80AE17}.Release|Any CPU.Build.0 = Release|Any CPU + {1EDCD6D4-DF3A-4E3B-ABB6-C0D0B373EAB8}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {1EDCD6D4-DF3A-4E3B-ABB6-C0D0B373EAB8}.Debug|Any CPU.Build.0 = Debug|Any CPU + {1EDCD6D4-DF3A-4E3B-ABB6-C0D0B373EAB8}.Release|Any CPU.ActiveCfg = Release|Any CPU + {1EDCD6D4-DF3A-4E3B-ABB6-C0D0B373EAB8}.Release|Any CPU.Build.0 = Release|Any CPU + {73513786-B6C6-4A21-89C5-0FBDD0A46107}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {73513786-B6C6-4A21-89C5-0FBDD0A46107}.Debug|Any CPU.Build.0 = Debug|Any CPU + {73513786-B6C6-4A21-89C5-0FBDD0A46107}.Release|Any CPU.ActiveCfg = Release|Any CPU + {73513786-B6C6-4A21-89C5-0FBDD0A46107}.Release|Any CPU.Build.0 = Release|Any CPU + {690203F4-3CD5-4569-88D9-EE831EEA5F5F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {690203F4-3CD5-4569-88D9-EE831EEA5F5F}.Debug|Any CPU.Build.0 = Debug|Any CPU + {690203F4-3CD5-4569-88D9-EE831EEA5F5F}.Release|Any CPU.ActiveCfg = Release|Any CPU + {690203F4-3CD5-4569-88D9-EE831EEA5F5F}.Release|Any CPU.Build.0 = Release|Any CPU + {F6AC8D4A-EDD7-4514-8E8A-5BCB019864DB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {F6AC8D4A-EDD7-4514-8E8A-5BCB019864DB}.Debug|Any CPU.Build.0 = Debug|Any CPU + {F6AC8D4A-EDD7-4514-8E8A-5BCB019864DB}.Release|Any CPU.ActiveCfg = Release|Any CPU + {F6AC8D4A-EDD7-4514-8E8A-5BCB019864DB}.Release|Any CPU.Build.0 = Release|Any CPU + {3D872C41-E226-45C8-89C1-9D3DBD7C73F2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {3D872C41-E226-45C8-89C1-9D3DBD7C73F2}.Debug|Any CPU.Build.0 = Debug|Any CPU + {3D872C41-E226-45C8-89C1-9D3DBD7C73F2}.Release|Any CPU.ActiveCfg = Release|Any CPU + {3D872C41-E226-45C8-89C1-9D3DBD7C73F2}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(NestedProjects) = preSolution + {D64C1577-4929-4B60-939E-96DE1534891A} = {649A3FFA-182F-4E56-9717-E6A9A2BEC545} + {F2840BC7-0188-4606-9126-DADD0F5ABF7A} = {649A3FFA-182F-4E56-9717-E6A9A2BEC545} + {BD65D04F-08D5-40C1-8C24-77CA0BACB877} = {649A3FFA-182F-4E56-9717-E6A9A2BEC545} + {78040F9E-3501-4A40-82DF-00A597710F35} = {649A3FFA-182F-4E56-9717-E6A9A2BEC545} + {0CE86223-D31D-4315-A1F5-87BA3EE1B844} = {649A3FFA-182F-4E56-9717-E6A9A2BEC545} + {F1C58097-4C08-4D88-8976-6B3389391481} = {649A3FFA-182F-4E56-9717-E6A9A2BEC545} + {077AA5F8-8B61-420C-A6B5-0150A66FDB34} = {649A3FFA-182F-4E56-9717-E6A9A2BEC545} + {36E2735F-CEAB-44C8-A6D1-2CDAFF399751} = {649A3FFA-182F-4E56-9717-E6A9A2BEC545} + {C5BB573D-3030-4BCB-88B7-F6A85C32766C} = {CCD2960C-23CC-4AB4-B84D-60C7AAA52F4D} + {527F645C-C1FC-406E-8479-81386C8ECF13} = {CCD2960C-23CC-4AB4-B84D-60C7AAA52F4D} + {D0AD9179-125C-40B2-A8EE-CD4C1EE24BB6} = {CCD2960C-23CC-4AB4-B84D-60C7AAA52F4D} + {E60895E5-79C4-447D-88B7-85CB5BA336A4} = {CCD2960C-23CC-4AB4-B84D-60C7AAA52F4D} + {90CB5DC4-C040-45C7-8900-9688B26405BC} = {CCD2960C-23CC-4AB4-B84D-60C7AAA52F4D} + {37B135B0-DAFE-4616-B25C-1BDF32FC44A2} = {E400416D-2895-4512-9D17-90681EEC7E0A} + {3B7B6317-1B85-4164-8E11-75574F80AE17} = {649A3FFA-182F-4E56-9717-E6A9A2BEC545} + {1EDCD6D4-DF3A-4E3B-ABB6-C0D0B373EAB8} = {CCD2960C-23CC-4AB4-B84D-60C7AAA52F4D} + {73513786-B6C6-4A21-89C5-0FBDD0A46107} = {E400416D-2895-4512-9D17-90681EEC7E0A} + {690203F4-3CD5-4569-88D9-EE831EEA5F5F} = {E400416D-2895-4512-9D17-90681EEC7E0A} + {F6AC8D4A-EDD7-4514-8E8A-5BCB019864DB} = {E400416D-2895-4512-9D17-90681EEC7E0A} + {3D872C41-E226-45C8-89C1-9D3DBD7C73F2} = {E400416D-2895-4512-9D17-90681EEC7E0A} + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {4324B3B4-B60B-4E3C-91D8-59576B4E26DD} + EndGlobalSection +EndGlobal diff --git a/integration/EasyAbp.EShop/EasyAbp.EShop.sln.DotSettings b/integration/EasyAbp.EShop/EasyAbp.EShop.sln.DotSettings new file mode 100644 index 00000000..cb0b2c91 --- /dev/null +++ b/integration/EasyAbp.EShop/EasyAbp.EShop.sln.DotSettings @@ -0,0 +1,23 @@ + + True + WARNING + WARNING + WARNING + WARNING + WARNING + WARNING + WARNING + WARNING + Required + Required + Required + Required + False + True + False + False + True + False + False + SQL + \ No newline at end of file diff --git a/integration/EasyAbp.EShop/common.props b/integration/EasyAbp.EShop/common.props new file mode 100644 index 00000000..82adb982 --- /dev/null +++ b/integration/EasyAbp.EShop/common.props @@ -0,0 +1,28 @@ + + + latest + 0.1.20 + $(NoWarn);CS1591 + true + EasyAbp Team + An abp application module group that provides basic e-shop service. + https://github.com/EasyAbp/EShop + https://github.com/EasyAbp/EShop + abp module easyabp EShop shopping shop ordering product payment store mall + EasyAbp + MIT + + + + + + + + + + all + runtime; build; native; contentfiles; analyzers + + + + \ No newline at end of file diff --git a/integration/EasyAbp.EShop/docker-compose.migrations.yml b/integration/EasyAbp.EShop/docker-compose.migrations.yml new file mode 100644 index 00000000..9b9a1dee --- /dev/null +++ b/integration/EasyAbp.EShop/docker-compose.migrations.yml @@ -0,0 +1,13 @@ +version: '3.4' + +services: + migrations: + build: + context: ../../ + dockerfile: templates/service/database/Dockerfile + depends_on: + - sqlserver + environment: + - IdentityServer_DB=EShop_Identity + - EShop_DB=EShop_ModuleDb + - SA_PASSWORD=yourStrong(!)Password diff --git a/integration/EasyAbp.EShop/docker-compose.override.yml b/integration/EasyAbp.EShop/docker-compose.override.yml new file mode 100644 index 00000000..e87387ab --- /dev/null +++ b/integration/EasyAbp.EShop/docker-compose.override.yml @@ -0,0 +1,29 @@ +version: '3.4' + +services: + sqlserver: + environment: + - SA_PASSWORD=yourStrong(!)Password + - ACCEPT_EULA=Y + ports: + - "51599:1433" + + identity-server: + environment: + - ASPNETCORE_URLS=http://0.0.0.0:80 + - ConnectionStrings__Default=Server=sqlserver;Database=EShop_Identity;Trusted_Connection=True;MultipleActiveResultSets=true;User=sa;Password=yourStrong(!)Password;Integrated Security=false + - ConnectionStrings__SqlServerCache=Server=sqlserver;Database=EShop_Cache;Trusted_Connection=True;MultipleActiveResultSets=true;User=sa;Password=yourStrong(!)Password;Integrated Security=false + ports: + - "51600:80" + + e-shop: + environment: + - ASPNETCORE_URLS=http://0.0.0.0:80 + - ConnectionStrings__Default=Server=sqlserver;Database=EShop_ModuleDb;Trusted_Connection=True;MultipleActiveResultSets=true;User=sa;Password=yourStrong(!)Password;Integrated Security=false + - ConnectionStrings__AbpSettingManagement=Server=sqlserver;Database=EShop_Identity;Trusted_Connection=True;MultipleActiveResultSets=true;User=sa;Password=yourStrong(!)Password;Integrated Security=false + - ConnectionStrings__AbpPermissionManagement=Server=sqlserver;Database=EShop_Identity;Trusted_Connection=True;MultipleActiveResultSets=true;User=sa;Password=yourStrong(!)Password;Integrated Security=false + - ConnectionStrings__AbpAuditLogging=Server=sqlserver;Database=EShop_Identity;Trusted_Connection=True;MultipleActiveResultSets=true;User=sa;Password=yourStrong(!)Password;Integrated Security=false + - ConnectionStrings__SqlServerCache=Server=sqlserver;Database=EShop_Cache;Trusted_Connection=True;MultipleActiveResultSets=true;User=sa;Password=yourStrong(!)Password;Integrated Security=false + - AuthServer__Authority=http://identity-server + ports: + - "51601:80" \ No newline at end of file diff --git a/integration/EasyAbp.EShop/docker-compose.yml b/integration/EasyAbp.EShop/docker-compose.yml new file mode 100644 index 00000000..c6726dd7 --- /dev/null +++ b/integration/EasyAbp.EShop/docker-compose.yml @@ -0,0 +1,25 @@ +version: '3.4' + +services: + sqlserver: + image: mcr.microsoft.com/mssql/server + volumes: + - dbdata:/var/opt/mssql + + identity-server: + build: + context: ../../ + dockerfile: templates/service/host/IdentityServerHost/Dockerfile + depends_on: + - sqlserver + + e-shop: + build: + context: ../../ + dockerfile: templates/service/host/EasyAbp.EShop.Host/Dockerfile + depends_on: + - sqlserver + - identity-server + +volumes: + dbdata: \ No newline at end of file diff --git a/integration/EasyAbp.EShop/src/EasyAbp.EShop.Application.Contracts/EasyAbp.EShop.Application.Contracts.csproj b/integration/EasyAbp.EShop/src/EasyAbp.EShop.Application.Contracts/EasyAbp.EShop.Application.Contracts.csproj new file mode 100644 index 00000000..cf9bb503 --- /dev/null +++ b/integration/EasyAbp.EShop/src/EasyAbp.EShop.Application.Contracts/EasyAbp.EShop.Application.Contracts.csproj @@ -0,0 +1,21 @@ + + + + + + netstandard2.0 + + + + + + + + + + + + + + + diff --git a/integration/EasyAbp.EShop/src/EasyAbp.EShop.Application.Contracts/EasyAbp/EShop/Authorization/EShopPermissionDefinitionProvider.cs b/integration/EasyAbp.EShop/src/EasyAbp.EShop.Application.Contracts/EasyAbp/EShop/Authorization/EShopPermissionDefinitionProvider.cs new file mode 100644 index 00000000..6b1b7cd4 --- /dev/null +++ b/integration/EasyAbp.EShop/src/EasyAbp.EShop.Application.Contracts/EasyAbp/EShop/Authorization/EShopPermissionDefinitionProvider.cs @@ -0,0 +1,19 @@ +using EasyAbp.EShop.Localization; +using Volo.Abp.Authorization.Permissions; +using Volo.Abp.Localization; + +namespace EasyAbp.EShop.Authorization +{ + public class EShopPermissionDefinitionProvider : PermissionDefinitionProvider + { + public override void Define(IPermissionDefinitionContext context) + { + //var moduleGroup = context.AddGroup(EShopPermissions.GroupName, L("Permission:EShop")); + } + + private static LocalizableString L(string name) + { + return LocalizableString.Create(name); + } + } +} \ No newline at end of file diff --git a/integration/EasyAbp.EShop/src/EasyAbp.EShop.Application.Contracts/EasyAbp/EShop/Authorization/EShopPermissions.cs b/integration/EasyAbp.EShop/src/EasyAbp.EShop.Application.Contracts/EasyAbp/EShop/Authorization/EShopPermissions.cs new file mode 100644 index 00000000..78493ce0 --- /dev/null +++ b/integration/EasyAbp.EShop/src/EasyAbp.EShop.Application.Contracts/EasyAbp/EShop/Authorization/EShopPermissions.cs @@ -0,0 +1,14 @@ +using Volo.Abp.Reflection; + +namespace EasyAbp.EShop.Authorization +{ + public class EShopPermissions + { + public const string GroupName = "EasyAbp.EShop"; + + public static string[] GetAll() + { + return ReflectionHelper.GetPublicConstantsRecursively(typeof(EShopPermissions)); + } + } +} \ No newline at end of file diff --git a/integration/EasyAbp.EShop/src/EasyAbp.EShop.Application.Contracts/EasyAbp/EShop/EShopApplicationContractsModule.cs b/integration/EasyAbp.EShop/src/EasyAbp.EShop.Application.Contracts/EasyAbp/EShop/EShopApplicationContractsModule.cs new file mode 100644 index 00000000..77bcb583 --- /dev/null +++ b/integration/EasyAbp.EShop/src/EasyAbp.EShop.Application.Contracts/EasyAbp/EShop/EShopApplicationContractsModule.cs @@ -0,0 +1,33 @@ +using EasyAbp.EShop.Baskets; +using EasyAbp.EShop.Orders; +using EasyAbp.EShop.Payments; +using EasyAbp.EShop.Products; +using EasyAbp.EShop.Stores; +using Volo.Abp.Application; +using Volo.Abp.Modularity; +using Volo.Abp.VirtualFileSystem; +using Volo.Abp.Authorization; + +namespace EasyAbp.EShop +{ + [DependsOn( + typeof(EShopDomainSharedModule), + typeof(AbpDddApplicationContractsModule), + typeof(AbpAuthorizationModule), + typeof(EShopBasketsApplicationContractsModule), + typeof(EShopOrdersApplicationContractsModule), + typeof(EShopPaymentsApplicationContractsModule), + typeof(EShopProductsApplicationContractsModule), + typeof(EShopStoresApplicationContractsModule) + )] + public class EShopApplicationContractsModule : AbpModule + { + public override void ConfigureServices(ServiceConfigurationContext context) + { + Configure(options => + { + options.FileSets.AddEmbedded("EasyAbp.EShop"); + }); + } + } +} diff --git a/integration/EasyAbp.EShop/src/EasyAbp.EShop.Application.Contracts/FodyWeavers.xml b/integration/EasyAbp.EShop/src/EasyAbp.EShop.Application.Contracts/FodyWeavers.xml new file mode 100644 index 00000000..be0de3a9 --- /dev/null +++ b/integration/EasyAbp.EShop/src/EasyAbp.EShop.Application.Contracts/FodyWeavers.xml @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/integration/EasyAbp.EShop/src/EasyAbp.EShop.Application.Contracts/FodyWeavers.xsd b/integration/EasyAbp.EShop/src/EasyAbp.EShop.Application.Contracts/FodyWeavers.xsd new file mode 100644 index 00000000..3f3946e2 --- /dev/null +++ b/integration/EasyAbp.EShop/src/EasyAbp.EShop.Application.Contracts/FodyWeavers.xsd @@ -0,0 +1,30 @@ + + + + + + + + + + + + + + + 'true' to run assembly verification (PEVerify) on the target assembly after all weavers have been executed. + + + + + A comma-separated list of error codes that can be safely ignored in assembly verification. + + + + + 'false' to turn off automatic generation of the XML Schema file. + + + + + \ No newline at end of file diff --git a/integration/EasyAbp.EShop/src/EasyAbp.EShop.Application/EasyAbp.EShop.Application.csproj b/integration/EasyAbp.EShop/src/EasyAbp.EShop.Application/EasyAbp.EShop.Application.csproj new file mode 100644 index 00000000..3aa8ee03 --- /dev/null +++ b/integration/EasyAbp.EShop/src/EasyAbp.EShop.Application/EasyAbp.EShop.Application.csproj @@ -0,0 +1,22 @@ + + + + + + netstandard2.0 + + + + + + + + + + + + + + + + diff --git a/integration/EasyAbp.EShop/src/EasyAbp.EShop.Application/EasyAbp/EShop/EShopAppService.cs b/integration/EasyAbp.EShop/src/EasyAbp.EShop.Application/EasyAbp/EShop/EShopAppService.cs new file mode 100644 index 00000000..57929e1d --- /dev/null +++ b/integration/EasyAbp.EShop/src/EasyAbp.EShop.Application/EasyAbp/EShop/EShopAppService.cs @@ -0,0 +1,14 @@ +using EasyAbp.EShop.Localization; +using Volo.Abp.Application.Services; + +namespace EasyAbp.EShop +{ + public abstract class EShopAppService : ApplicationService + { + protected EShopAppService() + { + LocalizationResource = typeof(EShopResource); + ObjectMapperContext = typeof(EShopApplicationModule); + } + } +} diff --git a/integration/EasyAbp.EShop/src/EasyAbp.EShop.Application/EasyAbp/EShop/EShopApplicationAutoMapperProfile.cs b/integration/EasyAbp.EShop/src/EasyAbp.EShop.Application/EasyAbp/EShop/EShopApplicationAutoMapperProfile.cs new file mode 100644 index 00000000..b315681f --- /dev/null +++ b/integration/EasyAbp.EShop/src/EasyAbp.EShop.Application/EasyAbp/EShop/EShopApplicationAutoMapperProfile.cs @@ -0,0 +1,14 @@ +using AutoMapper; + +namespace EasyAbp.EShop +{ + public class EShopApplicationAutoMapperProfile : Profile + { + public EShopApplicationAutoMapperProfile() + { + /* You can configure your AutoMapper mapping configuration here. + * Alternatively, you can split your mapping configurations + * into multiple profile classes for a better organization. */ + } + } +} \ No newline at end of file diff --git a/integration/EasyAbp.EShop/src/EasyAbp.EShop.Application/EasyAbp/EShop/EShopApplicationModule.cs b/integration/EasyAbp.EShop/src/EasyAbp.EShop.Application/EasyAbp/EShop/EShopApplicationModule.cs new file mode 100644 index 00000000..20885409 --- /dev/null +++ b/integration/EasyAbp.EShop/src/EasyAbp.EShop.Application/EasyAbp/EShop/EShopApplicationModule.cs @@ -0,0 +1,35 @@ +using EasyAbp.EShop.Baskets; +using EasyAbp.EShop.Orders; +using EasyAbp.EShop.Payments; +using EasyAbp.EShop.Products; +using EasyAbp.EShop.Stores; +using Microsoft.Extensions.DependencyInjection; +using Volo.Abp.AutoMapper; +using Volo.Abp.Modularity; +using Volo.Abp.Application; + +namespace EasyAbp.EShop +{ + [DependsOn( + typeof(EShopDomainModule), + typeof(EShopApplicationContractsModule), + typeof(AbpDddApplicationModule), + typeof(AbpAutoMapperModule), + typeof(EShopBasketsApplicationModule), + typeof(EShopOrdersApplicationModule), + typeof(EShopPaymentsApplicationModule), + typeof(EShopProductsApplicationModule), + typeof(EShopStoresApplicationModule) + )] + public class EShopApplicationModule : AbpModule + { + public override void ConfigureServices(ServiceConfigurationContext context) + { + context.Services.AddAutoMapperObjectMapper(); + Configure(options => + { + options.AddMaps(validate: true); + }); + } + } +} diff --git a/integration/EasyAbp.EShop/src/EasyAbp.EShop.Application/FodyWeavers.xml b/integration/EasyAbp.EShop/src/EasyAbp.EShop.Application/FodyWeavers.xml new file mode 100644 index 00000000..be0de3a9 --- /dev/null +++ b/integration/EasyAbp.EShop/src/EasyAbp.EShop.Application/FodyWeavers.xml @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/integration/EasyAbp.EShop/src/EasyAbp.EShop.Application/FodyWeavers.xsd b/integration/EasyAbp.EShop/src/EasyAbp.EShop.Application/FodyWeavers.xsd new file mode 100644 index 00000000..3f3946e2 --- /dev/null +++ b/integration/EasyAbp.EShop/src/EasyAbp.EShop.Application/FodyWeavers.xsd @@ -0,0 +1,30 @@ + + + + + + + + + + + + + + + 'true' to run assembly verification (PEVerify) on the target assembly after all weavers have been executed. + + + + + A comma-separated list of error codes that can be safely ignored in assembly verification. + + + + + 'false' to turn off automatic generation of the XML Schema file. + + + + + \ 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 new file mode 100644 index 00000000..9ebc0831 --- /dev/null +++ b/integration/EasyAbp.EShop/src/EasyAbp.EShop.Domain.Shared/EasyAbp.EShop.Domain.Shared.csproj @@ -0,0 +1,24 @@ + + + + + + netstandard2.0 + + + + + + + + + + + + + + + + + + diff --git a/integration/EasyAbp.EShop/src/EasyAbp.EShop.Domain.Shared/EasyAbp/EShop/EShopDomainSharedModule.cs b/integration/EasyAbp.EShop/src/EasyAbp.EShop.Domain.Shared/EasyAbp/EShop/EShopDomainSharedModule.cs new file mode 100644 index 00000000..9a15c30b --- /dev/null +++ b/integration/EasyAbp.EShop/src/EasyAbp.EShop.Domain.Shared/EasyAbp/EShop/EShopDomainSharedModule.cs @@ -0,0 +1,47 @@ +using EasyAbp.EShop.Baskets; +using Volo.Abp.Modularity; +using Volo.Abp.Localization; +using EasyAbp.EShop.Localization; +using EasyAbp.EShop.Orders; +using EasyAbp.EShop.Payments; +using EasyAbp.EShop.Products; +using EasyAbp.EShop.Stores; +using Volo.Abp.Localization.ExceptionHandling; +using Volo.Abp.Validation; +using Volo.Abp.Validation.Localization; +using Volo.Abp.VirtualFileSystem; + +namespace EasyAbp.EShop +{ + [DependsOn( + typeof(AbpValidationModule), + typeof(EShopBasketsDomainSharedModule), + typeof(EShopOrdersDomainSharedModule), + typeof(EShopPaymentsDomainSharedModule), + typeof(EShopProductsDomainSharedModule), + typeof(EShopStoresDomainSharedModule) + )] + public class EShopDomainSharedModule : AbpModule + { + public override void ConfigureServices(ServiceConfigurationContext context) + { + Configure(options => + { + options.FileSets.AddEmbedded(); + }); + + Configure(options => + { + options.Resources + .Add("en") + .AddBaseTypes(typeof(AbpValidationResource)) + .AddVirtualJson("/EasyAbp/EShop/Localization/EShop"); + }); + + Configure(options => + { + options.MapCodeNamespace("EasyAbp.EShop", typeof(EShopResource)); + }); + } + } +} diff --git a/integration/EasyAbp.EShop/src/EasyAbp.EShop.Domain.Shared/EasyAbp/EShop/EShopErrorCodes.cs b/integration/EasyAbp.EShop/src/EasyAbp.EShop.Domain.Shared/EasyAbp/EShop/EShopErrorCodes.cs new file mode 100644 index 00000000..c3a83ee5 --- /dev/null +++ b/integration/EasyAbp.EShop/src/EasyAbp.EShop.Domain.Shared/EasyAbp/EShop/EShopErrorCodes.cs @@ -0,0 +1,7 @@ +namespace EasyAbp.EShop +{ + public static class EShopErrorCodes + { + //Add your business exception error codes here... + } +} diff --git a/integration/EasyAbp.EShop/src/EasyAbp.EShop.Domain.Shared/EasyAbp/EShop/Localization/EShop/cs.json b/integration/EasyAbp.EShop/src/EasyAbp.EShop.Domain.Shared/EasyAbp/EShop/Localization/EShop/cs.json new file mode 100644 index 00000000..6a060a54 --- /dev/null +++ b/integration/EasyAbp.EShop/src/EasyAbp.EShop.Domain.Shared/EasyAbp/EShop/Localization/EShop/cs.json @@ -0,0 +1,6 @@ +{ + "culture": "cs", + "texts": { + + } +} \ No newline at end of file diff --git a/integration/EasyAbp.EShop/src/EasyAbp.EShop.Domain.Shared/EasyAbp/EShop/Localization/EShop/en.json b/integration/EasyAbp.EShop/src/EasyAbp.EShop.Domain.Shared/EasyAbp/EShop/Localization/EShop/en.json new file mode 100644 index 00000000..171d9a12 --- /dev/null +++ b/integration/EasyAbp.EShop/src/EasyAbp.EShop.Domain.Shared/EasyAbp/EShop/Localization/EShop/en.json @@ -0,0 +1,6 @@ +{ + "culture": "en", + "texts": { + "ManageYourProfile": "Manage your profile" + } +} \ No newline at end of file diff --git a/integration/EasyAbp.EShop/src/EasyAbp.EShop.Domain.Shared/EasyAbp/EShop/Localization/EShop/pl-PL.json b/integration/EasyAbp.EShop/src/EasyAbp.EShop.Domain.Shared/EasyAbp/EShop/Localization/EShop/pl-PL.json new file mode 100644 index 00000000..3ea7b190 --- /dev/null +++ b/integration/EasyAbp.EShop/src/EasyAbp.EShop.Domain.Shared/EasyAbp/EShop/Localization/EShop/pl-PL.json @@ -0,0 +1,6 @@ +{ + "culture": "pl-PL", + "texts": { + + } +} \ No newline at end of file diff --git a/integration/EasyAbp.EShop/src/EasyAbp.EShop.Domain.Shared/EasyAbp/EShop/Localization/EShop/pt-BR.json b/integration/EasyAbp.EShop/src/EasyAbp.EShop.Domain.Shared/EasyAbp/EShop/Localization/EShop/pt-BR.json new file mode 100644 index 00000000..6d746df0 --- /dev/null +++ b/integration/EasyAbp.EShop/src/EasyAbp.EShop.Domain.Shared/EasyAbp/EShop/Localization/EShop/pt-BR.json @@ -0,0 +1,6 @@ +{ + "culture": "pt-BR", + "texts": { + + } +} \ No newline at end of file diff --git a/integration/EasyAbp.EShop/src/EasyAbp.EShop.Domain.Shared/EasyAbp/EShop/Localization/EShop/sl.json b/integration/EasyAbp.EShop/src/EasyAbp.EShop.Domain.Shared/EasyAbp/EShop/Localization/EShop/sl.json new file mode 100644 index 00000000..687d4257 --- /dev/null +++ b/integration/EasyAbp.EShop/src/EasyAbp.EShop.Domain.Shared/EasyAbp/EShop/Localization/EShop/sl.json @@ -0,0 +1,6 @@ +{ + "culture": "sl", + "texts": { + "ManageYourProfile": "Upravljajte svojim profilom" + } +} \ No newline at end of file diff --git a/integration/EasyAbp.EShop/src/EasyAbp.EShop.Domain.Shared/EasyAbp/EShop/Localization/EShop/tr.json b/integration/EasyAbp.EShop/src/EasyAbp.EShop.Domain.Shared/EasyAbp/EShop/Localization/EShop/tr.json new file mode 100644 index 00000000..2b481933 --- /dev/null +++ b/integration/EasyAbp.EShop/src/EasyAbp.EShop.Domain.Shared/EasyAbp/EShop/Localization/EShop/tr.json @@ -0,0 +1,6 @@ +{ + "culture": "tr", + "texts": { + "ManageYourProfile": "Profil ynetimi" + } +} \ No newline at end of file diff --git a/integration/EasyAbp.EShop/src/EasyAbp.EShop.Domain.Shared/EasyAbp/EShop/Localization/EShop/vi.json b/integration/EasyAbp.EShop/src/EasyAbp.EShop.Domain.Shared/EasyAbp/EShop/Localization/EShop/vi.json new file mode 100644 index 00000000..d8eb5f3c --- /dev/null +++ b/integration/EasyAbp.EShop/src/EasyAbp.EShop.Domain.Shared/EasyAbp/EShop/Localization/EShop/vi.json @@ -0,0 +1,6 @@ +{ + "culture": "vi", + "texts": { + + } +} diff --git a/integration/EasyAbp.EShop/src/EasyAbp.EShop.Domain.Shared/EasyAbp/EShop/Localization/EShop/zh-Hans.json b/integration/EasyAbp.EShop/src/EasyAbp.EShop.Domain.Shared/EasyAbp/EShop/Localization/EShop/zh-Hans.json new file mode 100644 index 00000000..99586f01 --- /dev/null +++ b/integration/EasyAbp.EShop/src/EasyAbp.EShop.Domain.Shared/EasyAbp/EShop/Localization/EShop/zh-Hans.json @@ -0,0 +1,6 @@ +{ + "culture": "zh-Hans", + "texts": { + "ManageYourProfile": "管理个人资料" + } +} \ No newline at end of file diff --git a/integration/EasyAbp.EShop/src/EasyAbp.EShop.Domain.Shared/EasyAbp/EShop/Localization/EShop/zh-Hant.json b/integration/EasyAbp.EShop/src/EasyAbp.EShop.Domain.Shared/EasyAbp/EShop/Localization/EShop/zh-Hant.json new file mode 100644 index 00000000..ceea0555 --- /dev/null +++ b/integration/EasyAbp.EShop/src/EasyAbp.EShop.Domain.Shared/EasyAbp/EShop/Localization/EShop/zh-Hant.json @@ -0,0 +1,6 @@ +{ + "culture": "zh-Hant", + "texts": { + "ManageYourProfile": "管理個人資料" + } +} \ No newline at end of file diff --git a/integration/EasyAbp.EShop/src/EasyAbp.EShop.Domain.Shared/EasyAbp/EShop/Localization/EShopResource.cs b/integration/EasyAbp.EShop/src/EasyAbp.EShop.Domain.Shared/EasyAbp/EShop/Localization/EShopResource.cs new file mode 100644 index 00000000..d98dabc8 --- /dev/null +++ b/integration/EasyAbp.EShop/src/EasyAbp.EShop.Domain.Shared/EasyAbp/EShop/Localization/EShopResource.cs @@ -0,0 +1,10 @@ +using Volo.Abp.Localization; + +namespace EasyAbp.EShop.Localization +{ + [LocalizationResourceName("EasyAbp.EShop")] + public class EShopResource + { + + } +} diff --git a/integration/EasyAbp.EShop/src/EasyAbp.EShop.Domain.Shared/FodyWeavers.xml b/integration/EasyAbp.EShop/src/EasyAbp.EShop.Domain.Shared/FodyWeavers.xml new file mode 100644 index 00000000..be0de3a9 --- /dev/null +++ b/integration/EasyAbp.EShop/src/EasyAbp.EShop.Domain.Shared/FodyWeavers.xml @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/integration/EasyAbp.EShop/src/EasyAbp.EShop.Domain.Shared/FodyWeavers.xsd b/integration/EasyAbp.EShop/src/EasyAbp.EShop.Domain.Shared/FodyWeavers.xsd new file mode 100644 index 00000000..3f3946e2 --- /dev/null +++ b/integration/EasyAbp.EShop/src/EasyAbp.EShop.Domain.Shared/FodyWeavers.xsd @@ -0,0 +1,30 @@ + + + + + + + + + + + + + + + 'true' to run assembly verification (PEVerify) on the target assembly after all weavers have been executed. + + + + + A comma-separated list of error codes that can be safely ignored in assembly verification. + + + + + 'false' to turn off automatic generation of the XML Schema file. + + + + + \ No newline at end of file diff --git a/integration/EasyAbp.EShop/src/EasyAbp.EShop.Domain/EasyAbp.EShop.Domain.csproj b/integration/EasyAbp.EShop/src/EasyAbp.EShop.Domain/EasyAbp.EShop.Domain.csproj new file mode 100644 index 00000000..7e48530e --- /dev/null +++ b/integration/EasyAbp.EShop/src/EasyAbp.EShop.Domain/EasyAbp.EShop.Domain.csproj @@ -0,0 +1,20 @@ + + + + + + netstandard2.0 + + + + + + + + + + + + + + diff --git a/integration/EasyAbp.EShop/src/EasyAbp.EShop.Domain/EasyAbp/EShop/EShopDbProperties.cs b/integration/EasyAbp.EShop/src/EasyAbp.EShop.Domain/EasyAbp/EShop/EShopDbProperties.cs new file mode 100644 index 00000000..af1cd11d --- /dev/null +++ b/integration/EasyAbp.EShop/src/EasyAbp.EShop.Domain/EasyAbp/EShop/EShopDbProperties.cs @@ -0,0 +1,11 @@ +namespace EasyAbp.EShop +{ + public static class EShopDbProperties + { + public static string DbTablePrefix { get; set; } = "EShop"; + + public static string DbSchema { get; set; } = null; + + public const string ConnectionStringName = "EShop"; + } +} diff --git a/integration/EasyAbp.EShop/src/EasyAbp.EShop.Domain/EasyAbp/EShop/EShopDomainModule.cs b/integration/EasyAbp.EShop/src/EasyAbp.EShop.Domain/EasyAbp/EShop/EShopDomainModule.cs new file mode 100644 index 00000000..0036ce9c --- /dev/null +++ b/integration/EasyAbp.EShop/src/EasyAbp.EShop.Domain/EasyAbp/EShop/EShopDomainModule.cs @@ -0,0 +1,22 @@ +using EasyAbp.EShop.Baskets; +using EasyAbp.EShop.Orders; +using EasyAbp.EShop.Payments; +using EasyAbp.EShop.Products; +using EasyAbp.EShop.Stores; +using Volo.Abp.Modularity; + +namespace EasyAbp.EShop +{ + [DependsOn( + typeof(EShopDomainSharedModule), + typeof(EShopBasketsDomainModule), + typeof(EShopOrdersDomainModule), + typeof(EShopPaymentsDomainModule), + typeof(EShopProductsDomainModule), + typeof(EShopStoresDomainModule) + )] + public class EShopDomainModule : AbpModule + { + + } +} diff --git a/integration/EasyAbp.EShop/src/EasyAbp.EShop.Domain/EasyAbp/EShop/Settings/EShopSettingDefinitionProvider.cs b/integration/EasyAbp.EShop/src/EasyAbp.EShop.Domain/EasyAbp/EShop/Settings/EShopSettingDefinitionProvider.cs new file mode 100644 index 00000000..f1f93118 --- /dev/null +++ b/integration/EasyAbp.EShop/src/EasyAbp.EShop.Domain/EasyAbp/EShop/Settings/EShopSettingDefinitionProvider.cs @@ -0,0 +1,14 @@ +using Volo.Abp.Settings; + +namespace EasyAbp.EShop.Settings +{ + public class EShopSettingDefinitionProvider : SettingDefinitionProvider + { + public override void Define(ISettingDefinitionContext context) + { + /* Define module settings here. + * Use names from EShopSettings class. + */ + } + } +} \ No newline at end of file diff --git a/integration/EasyAbp.EShop/src/EasyAbp.EShop.Domain/EasyAbp/EShop/Settings/EShopSettings.cs b/integration/EasyAbp.EShop/src/EasyAbp.EShop.Domain/EasyAbp/EShop/Settings/EShopSettings.cs new file mode 100644 index 00000000..a4e7dc72 --- /dev/null +++ b/integration/EasyAbp.EShop/src/EasyAbp.EShop.Domain/EasyAbp/EShop/Settings/EShopSettings.cs @@ -0,0 +1,11 @@ +namespace EasyAbp.EShop.Settings +{ + public static class EShopSettings + { + public const string GroupName = "EasyAbp.EShop"; + + /* Add constants for setting names. Example: + * public const string MySettingName = GroupName + ".MySettingName"; + */ + } +} \ No newline at end of file diff --git a/integration/EasyAbp.EShop/src/EasyAbp.EShop.Domain/FodyWeavers.xml b/integration/EasyAbp.EShop/src/EasyAbp.EShop.Domain/FodyWeavers.xml new file mode 100644 index 00000000..be0de3a9 --- /dev/null +++ b/integration/EasyAbp.EShop/src/EasyAbp.EShop.Domain/FodyWeavers.xml @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/integration/EasyAbp.EShop/src/EasyAbp.EShop.Domain/FodyWeavers.xsd b/integration/EasyAbp.EShop/src/EasyAbp.EShop.Domain/FodyWeavers.xsd new file mode 100644 index 00000000..3f3946e2 --- /dev/null +++ b/integration/EasyAbp.EShop/src/EasyAbp.EShop.Domain/FodyWeavers.xsd @@ -0,0 +1,30 @@ + + + + + + + + + + + + + + + 'true' to run assembly verification (PEVerify) on the target assembly after all weavers have been executed. + + + + + A comma-separated list of error codes that can be safely ignored in assembly verification. + + + + + 'false' to turn off automatic generation of the XML Schema file. + + + + + \ No newline at end of file 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 new file mode 100644 index 00000000..00782550 --- /dev/null +++ b/integration/EasyAbp.EShop/src/EasyAbp.EShop.EntityFrameworkCore/EasyAbp.EShop.EntityFrameworkCore.csproj @@ -0,0 +1,24 @@ + + + + + + netstandard2.0 + + + + + + + + + + + + + + + + + + diff --git a/integration/EasyAbp.EShop/src/EasyAbp.EShop.EntityFrameworkCore/EasyAbp/EShop/EntityFrameworkCore/EShopDbContext.cs b/integration/EasyAbp.EShop/src/EasyAbp.EShop.EntityFrameworkCore/EasyAbp/EShop/EntityFrameworkCore/EShopDbContext.cs new file mode 100644 index 00000000..ed12e8c5 --- /dev/null +++ b/integration/EasyAbp.EShop/src/EasyAbp.EShop.EntityFrameworkCore/EasyAbp/EShop/EntityFrameworkCore/EShopDbContext.cs @@ -0,0 +1,27 @@ +using Microsoft.EntityFrameworkCore; +using Volo.Abp.Data; +using Volo.Abp.EntityFrameworkCore; + +namespace EasyAbp.EShop.EntityFrameworkCore +{ + [ConnectionStringName(EShopDbProperties.ConnectionStringName)] + public class EShopDbContext : AbpDbContext, IEShopDbContext + { + /* Add DbSet for each Aggregate Root here. Example: + * public DbSet Questions { get; set; } + */ + + public EShopDbContext(DbContextOptions options) + : base(options) + { + + } + + protected override void OnModelCreating(ModelBuilder builder) + { + base.OnModelCreating(builder); + + builder.ConfigureEShop(); + } + } +} \ No newline at end of file diff --git a/integration/EasyAbp.EShop/src/EasyAbp.EShop.EntityFrameworkCore/EasyAbp/EShop/EntityFrameworkCore/EShopDbContextModelCreatingExtensions.cs b/integration/EasyAbp.EShop/src/EasyAbp.EShop.EntityFrameworkCore/EasyAbp/EShop/EntityFrameworkCore/EShopDbContextModelCreatingExtensions.cs new file mode 100644 index 00000000..09e6a1df --- /dev/null +++ b/integration/EasyAbp.EShop/src/EasyAbp.EShop.EntityFrameworkCore/EasyAbp/EShop/EntityFrameworkCore/EShopDbContextModelCreatingExtensions.cs @@ -0,0 +1,54 @@ +using System; +using EasyAbp.EShop.Baskets.EntityFrameworkCore; +using EasyAbp.EShop.Orders.EntityFrameworkCore; +using EasyAbp.EShop.Payments.EntityFrameworkCore; +using EasyAbp.EShop.Products.EntityFrameworkCore; +using EasyAbp.EShop.Stores.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore; +using Volo.Abp; + +namespace EasyAbp.EShop.EntityFrameworkCore +{ + public static class EShopDbContextModelCreatingExtensions + { + public static void ConfigureEShop( + this ModelBuilder builder, + Action optionsAction = null) + { + Check.NotNull(builder, nameof(builder)); + + var options = new EShopModelBuilderConfigurationOptions( + EShopDbProperties.DbTablePrefix, + EShopDbProperties.DbSchema + ); + + optionsAction?.Invoke(options); + + /* Configure all entities here. Example: + + builder.Entity(b => + { + //Configure table & schema name + b.ToTable(options.TablePrefix + "Questions", options.Schema); + + b.ConfigureByConvention(); + + //Properties + b.Property(q => q.Title).IsRequired().HasMaxLength(QuestionConsts.MaxTitleLength); + + //Relations + b.HasMany(question => question.Tags).WithOne().HasForeignKey(qt => qt.QuestionId); + + //Indexes + b.HasIndex(q => q.CreationTime); + }); + */ + + builder.ConfigureEShopBaskets(); + builder.ConfigureEShopOrders(); + builder.ConfigureEShopPayments(); + builder.ConfigureEShopProducts(); + builder.ConfigureEShopStores(); + } + } +} \ No newline at end of file diff --git a/integration/EasyAbp.EShop/src/EasyAbp.EShop.EntityFrameworkCore/EasyAbp/EShop/EntityFrameworkCore/EShopEntityFrameworkCoreModule.cs b/integration/EasyAbp.EShop/src/EasyAbp.EShop.EntityFrameworkCore/EasyAbp/EShop/EntityFrameworkCore/EShopEntityFrameworkCoreModule.cs new file mode 100644 index 00000000..b84e6574 --- /dev/null +++ b/integration/EasyAbp.EShop/src/EasyAbp.EShop.EntityFrameworkCore/EasyAbp/EShop/EntityFrameworkCore/EShopEntityFrameworkCoreModule.cs @@ -0,0 +1,33 @@ +using EasyAbp.EShop.Baskets.EntityFrameworkCore; +using EasyAbp.EShop.Orders.EntityFrameworkCore; +using EasyAbp.EShop.Payments.EntityFrameworkCore; +using EasyAbp.EShop.Products.EntityFrameworkCore; +using EasyAbp.EShop.Stores.EntityFrameworkCore; +using Microsoft.Extensions.DependencyInjection; +using Volo.Abp.EntityFrameworkCore; +using Volo.Abp.Modularity; + +namespace EasyAbp.EShop.EntityFrameworkCore +{ + [DependsOn( + typeof(EShopDomainModule), + typeof(AbpEntityFrameworkCoreModule), + typeof(EShopBasketsEntityFrameworkCoreModule), + typeof(EShopOrdersEntityFrameworkCoreModule), + typeof(EShopPaymentsEntityFrameworkCoreModule), + typeof(EShopProductsEntityFrameworkCoreModule), + typeof(EShopStoresEntityFrameworkCoreModule) + )] + public class EShopEntityFrameworkCoreModule : AbpModule + { + public override void ConfigureServices(ServiceConfigurationContext context) + { + context.Services.AddAbpDbContext(options => + { + /* Add custom repositories here. Example: + * options.AddRepository(); + */ + }); + } + } +} \ No newline at end of file diff --git a/integration/EasyAbp.EShop/src/EasyAbp.EShop.EntityFrameworkCore/EasyAbp/EShop/EntityFrameworkCore/EShopModelBuilderConfigurationOptions.cs b/integration/EasyAbp.EShop/src/EasyAbp.EShop.EntityFrameworkCore/EasyAbp/EShop/EntityFrameworkCore/EShopModelBuilderConfigurationOptions.cs new file mode 100644 index 00000000..bb0e670b --- /dev/null +++ b/integration/EasyAbp.EShop/src/EasyAbp.EShop.EntityFrameworkCore/EasyAbp/EShop/EntityFrameworkCore/EShopModelBuilderConfigurationOptions.cs @@ -0,0 +1,18 @@ +using JetBrains.Annotations; +using Volo.Abp.EntityFrameworkCore.Modeling; + +namespace EasyAbp.EShop.EntityFrameworkCore +{ + public class EShopModelBuilderConfigurationOptions : AbpModelBuilderConfigurationOptions + { + public EShopModelBuilderConfigurationOptions( + [NotNull] string tablePrefix = "", + [CanBeNull] string schema = null) + : base( + tablePrefix, + schema) + { + + } + } +} \ No newline at end of file diff --git a/integration/EasyAbp.EShop/src/EasyAbp.EShop.EntityFrameworkCore/EasyAbp/EShop/EntityFrameworkCore/IEShopDbContext.cs b/integration/EasyAbp.EShop/src/EasyAbp.EShop.EntityFrameworkCore/EasyAbp/EShop/EntityFrameworkCore/IEShopDbContext.cs new file mode 100644 index 00000000..bae7d1bb --- /dev/null +++ b/integration/EasyAbp.EShop/src/EasyAbp.EShop.EntityFrameworkCore/EasyAbp/EShop/EntityFrameworkCore/IEShopDbContext.cs @@ -0,0 +1,13 @@ +using Volo.Abp.Data; +using Volo.Abp.EntityFrameworkCore; + +namespace EasyAbp.EShop.EntityFrameworkCore +{ + [ConnectionStringName(EShopDbProperties.ConnectionStringName)] + public interface IEShopDbContext : IEfCoreDbContext + { + /* Add DbSet for each Aggregate Root here. Example: + * DbSet Questions { get; } + */ + } +} \ No newline at end of file diff --git a/integration/EasyAbp.EShop/src/EasyAbp.EShop.EntityFrameworkCore/FodyWeavers.xml b/integration/EasyAbp.EShop/src/EasyAbp.EShop.EntityFrameworkCore/FodyWeavers.xml new file mode 100644 index 00000000..be0de3a9 --- /dev/null +++ b/integration/EasyAbp.EShop/src/EasyAbp.EShop.EntityFrameworkCore/FodyWeavers.xml @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/integration/EasyAbp.EShop/src/EasyAbp.EShop.EntityFrameworkCore/FodyWeavers.xsd b/integration/EasyAbp.EShop/src/EasyAbp.EShop.EntityFrameworkCore/FodyWeavers.xsd new file mode 100644 index 00000000..3f3946e2 --- /dev/null +++ b/integration/EasyAbp.EShop/src/EasyAbp.EShop.EntityFrameworkCore/FodyWeavers.xsd @@ -0,0 +1,30 @@ + + + + + + + + + + + + + + + 'true' to run assembly verification (PEVerify) on the target assembly after all weavers have been executed. + + + + + A comma-separated list of error codes that can be safely ignored in assembly verification. + + + + + 'false' to turn off automatic generation of the XML Schema file. + + + + + \ No newline at end of file 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 new file mode 100644 index 00000000..ca4794a5 --- /dev/null +++ b/integration/EasyAbp.EShop/src/EasyAbp.EShop.HttpApi.Client/EasyAbp.EShop.HttpApi.Client.csproj @@ -0,0 +1,20 @@ + + + + + + netstandard2.0 + + + + + + + + + + + + + + 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 new file mode 100644 index 00000000..f6b68ca7 --- /dev/null +++ b/integration/EasyAbp.EShop/src/EasyAbp.EShop.HttpApi.Client/EasyAbp/EShop/EShopHttpApiClientModule.cs @@ -0,0 +1,33 @@ +using EasyAbp.EShop.Baskets; +using EasyAbp.EShop.Orders; +using EasyAbp.EShop.Payments; +using EasyAbp.EShop.Products; +using EasyAbp.EShop.Stores; +using Microsoft.Extensions.DependencyInjection; +using Volo.Abp.Http.Client; +using Volo.Abp.Modularity; + +namespace EasyAbp.EShop +{ + [DependsOn( + typeof(EShopApplicationContractsModule), + typeof(AbpHttpClientModule), + typeof(EShopBasketsHttpApiClientModule), + typeof(EShopOrdersHttpApiClientModule), + typeof(EShopPaymentsHttpApiClientModule), + typeof(EShopProductsHttpApiClientModule), + typeof(EShopStoresHttpApiClientModule) + )] + public class EShopHttpApiClientModule : AbpModule + { + public const string RemoteServiceName = "EShop"; + + public override void ConfigureServices(ServiceConfigurationContext context) + { + context.Services.AddHttpClientProxies( + typeof(EShopApplicationContractsModule).Assembly, + RemoteServiceName + ); + } + } +} diff --git a/integration/EasyAbp.EShop/src/EasyAbp.EShop.HttpApi.Client/FodyWeavers.xml b/integration/EasyAbp.EShop/src/EasyAbp.EShop.HttpApi.Client/FodyWeavers.xml new file mode 100644 index 00000000..be0de3a9 --- /dev/null +++ b/integration/EasyAbp.EShop/src/EasyAbp.EShop.HttpApi.Client/FodyWeavers.xml @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/integration/EasyAbp.EShop/src/EasyAbp.EShop.HttpApi.Client/FodyWeavers.xsd b/integration/EasyAbp.EShop/src/EasyAbp.EShop.HttpApi.Client/FodyWeavers.xsd new file mode 100644 index 00000000..3f3946e2 --- /dev/null +++ b/integration/EasyAbp.EShop/src/EasyAbp.EShop.HttpApi.Client/FodyWeavers.xsd @@ -0,0 +1,30 @@ + + + + + + + + + + + + + + + 'true' to run assembly verification (PEVerify) on the target assembly after all weavers have been executed. + + + + + A comma-separated list of error codes that can be safely ignored in assembly verification. + + + + + 'false' to turn off automatic generation of the XML Schema file. + + + + + \ No newline at end of file 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 new file mode 100644 index 00000000..cb4a3641 --- /dev/null +++ b/integration/EasyAbp.EShop/src/EasyAbp.EShop.HttpApi/EasyAbp.EShop.HttpApi.csproj @@ -0,0 +1,20 @@ + + + + + + netcoreapp3.1 + + + + + + + + + + + + + + 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 new file mode 100644 index 00000000..ec54a7f2 --- /dev/null +++ b/integration/EasyAbp.EShop/src/EasyAbp.EShop.HttpApi/EasyAbp/EShop/EShopController.cs @@ -0,0 +1,13 @@ +using EasyAbp.EShop.Localization; +using Volo.Abp.AspNetCore.Mvc; + +namespace EasyAbp.EShop +{ + public abstract class EShopController : AbpController + { + protected EShopController() + { + LocalizationResource = typeof(EShopResource); + } + } +} diff --git a/integration/EasyAbp.EShop/src/EasyAbp.EShop.HttpApi/EasyAbp/EShop/EShopHttpApiModule.cs b/integration/EasyAbp.EShop/src/EasyAbp.EShop.HttpApi/EasyAbp/EShop/EShopHttpApiModule.cs new file mode 100644 index 00000000..8b9fd5c5 --- /dev/null +++ b/integration/EasyAbp.EShop/src/EasyAbp.EShop.HttpApi/EasyAbp/EShop/EShopHttpApiModule.cs @@ -0,0 +1,44 @@ +using EasyAbp.EShop.Baskets; +using Localization.Resources.AbpUi; +using EasyAbp.EShop.Localization; +using EasyAbp.EShop.Orders; +using EasyAbp.EShop.Payments; +using EasyAbp.EShop.Products; +using EasyAbp.EShop.Stores; +using Volo.Abp.AspNetCore.Mvc; +using Volo.Abp.Localization; +using Volo.Abp.Modularity; +using Microsoft.Extensions.DependencyInjection; + +namespace EasyAbp.EShop +{ + [DependsOn( + typeof(EShopApplicationContractsModule), + typeof(AbpAspNetCoreMvcModule), + typeof(EShopBasketsHttpApiModule), + typeof(EShopOrdersHttpApiModule), + typeof(EShopPaymentsHttpApiModule), + typeof(EShopProductsHttpApiModule), + typeof(EShopStoresHttpApiModule) + )] + public class EShopHttpApiModule : AbpModule + { + public override void PreConfigureServices(ServiceConfigurationContext context) + { + PreConfigure(mvcBuilder => + { + mvcBuilder.AddApplicationPartIfNotExists(typeof(EShopHttpApiModule).Assembly); + }); + } + + public override void ConfigureServices(ServiceConfigurationContext context) + { + Configure(options => + { + options.Resources + .Get() + .AddBaseTypes(typeof(AbpUiResource)); + }); + } + } +} diff --git a/integration/EasyAbp.EShop/src/EasyAbp.EShop.HttpApi/FodyWeavers.xml b/integration/EasyAbp.EShop/src/EasyAbp.EShop.HttpApi/FodyWeavers.xml new file mode 100644 index 00000000..be0de3a9 --- /dev/null +++ b/integration/EasyAbp.EShop/src/EasyAbp.EShop.HttpApi/FodyWeavers.xml @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/integration/EasyAbp.EShop/src/EasyAbp.EShop.HttpApi/FodyWeavers.xsd b/integration/EasyAbp.EShop/src/EasyAbp.EShop.HttpApi/FodyWeavers.xsd new file mode 100644 index 00000000..3f3946e2 --- /dev/null +++ b/integration/EasyAbp.EShop/src/EasyAbp.EShop.HttpApi/FodyWeavers.xsd @@ -0,0 +1,30 @@ + + + + + + + + + + + + + + + 'true' to run assembly verification (PEVerify) on the target assembly after all weavers have been executed. + + + + + A comma-separated list of error codes that can be safely ignored in assembly verification. + + + + + 'false' to turn off automatic generation of the XML Schema file. + + + + + \ No newline at end of file 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 new file mode 100644 index 00000000..bbad3fb8 --- /dev/null +++ b/integration/EasyAbp.EShop/src/EasyAbp.EShop.MongoDB/EasyAbp.EShop.MongoDB.csproj @@ -0,0 +1,24 @@ + + + + + + netcoreapp3.1 + + + + + + + + + + + + + + + + + + diff --git a/integration/EasyAbp.EShop/src/EasyAbp.EShop.MongoDB/EasyAbp/EShop/MongoDB/EShopMongoDbContext.cs b/integration/EasyAbp.EShop/src/EasyAbp.EShop.MongoDB/EasyAbp/EShop/MongoDB/EShopMongoDbContext.cs new file mode 100644 index 00000000..c2f7df38 --- /dev/null +++ b/integration/EasyAbp.EShop/src/EasyAbp.EShop.MongoDB/EasyAbp/EShop/MongoDB/EShopMongoDbContext.cs @@ -0,0 +1,20 @@ +using Volo.Abp.Data; +using Volo.Abp.MongoDB; + +namespace EasyAbp.EShop.MongoDB +{ + [ConnectionStringName(EShopDbProperties.ConnectionStringName)] + public class EShopMongoDbContext : AbpMongoDbContext, IEShopMongoDbContext + { + /* Add mongo collections here. Example: + * public IMongoCollection Questions => Collection(); + */ + + protected override void CreateModel(IMongoModelBuilder modelBuilder) + { + base.CreateModel(modelBuilder); + + modelBuilder.ConfigureEShop(); + } + } +} \ No newline at end of file diff --git a/integration/EasyAbp.EShop/src/EasyAbp.EShop.MongoDB/EasyAbp/EShop/MongoDB/EShopMongoDbContextExtensions.cs b/integration/EasyAbp.EShop/src/EasyAbp.EShop.MongoDB/EasyAbp/EShop/MongoDB/EShopMongoDbContextExtensions.cs new file mode 100644 index 00000000..b94b611b --- /dev/null +++ b/integration/EasyAbp.EShop/src/EasyAbp.EShop.MongoDB/EasyAbp/EShop/MongoDB/EShopMongoDbContextExtensions.cs @@ -0,0 +1,33 @@ +using System; +using EasyAbp.EShop.Baskets.MongoDB; +using EasyAbp.EShop.Orders.MongoDB; +using EasyAbp.EShop.Payments.MongoDB; +using EasyAbp.EShop.Products.MongoDB; +using EasyAbp.EShop.Stores.MongoDB; +using Volo.Abp; +using Volo.Abp.MongoDB; + +namespace EasyAbp.EShop.MongoDB +{ + public static class EShopMongoDbContextExtensions + { + public static void ConfigureEShop( + this IMongoModelBuilder builder, + Action optionsAction = null) + { + Check.NotNull(builder, nameof(builder)); + + var options = new EShopMongoModelBuilderConfigurationOptions( + EShopDbProperties.DbTablePrefix + ); + + optionsAction?.Invoke(options); + + builder.ConfigureEShopBaskets(); + builder.ConfigureEShopOrders(); + builder.ConfigureEShopPayments(); + builder.ConfigureEShopProducts(); + builder.ConfigureEShopStores(); + } + } +} \ No newline at end of file diff --git a/integration/EasyAbp.EShop/src/EasyAbp.EShop.MongoDB/EasyAbp/EShop/MongoDB/EShopMongoDbModule.cs b/integration/EasyAbp.EShop/src/EasyAbp.EShop.MongoDB/EasyAbp/EShop/MongoDB/EShopMongoDbModule.cs new file mode 100644 index 00000000..96cf27e7 --- /dev/null +++ b/integration/EasyAbp.EShop/src/EasyAbp.EShop.MongoDB/EasyAbp/EShop/MongoDB/EShopMongoDbModule.cs @@ -0,0 +1,33 @@ +using EasyAbp.EShop.Baskets.MongoDB; +using EasyAbp.EShop.Orders.MongoDB; +using EasyAbp.EShop.Payments.MongoDB; +using EasyAbp.EShop.Products.MongoDB; +using EasyAbp.EShop.Stores.MongoDB; +using Microsoft.Extensions.DependencyInjection; +using Volo.Abp.Modularity; +using Volo.Abp.MongoDB; + +namespace EasyAbp.EShop.MongoDB +{ + [DependsOn( + typeof(EShopDomainModule), + typeof(AbpMongoDbModule), + typeof(EShopBasketsMongoDbModule), + typeof(EShopOrdersMongoDbModule), + typeof(EShopPaymentsMongoDbModule), + typeof(EShopProductsMongoDbModule), + typeof(EShopStoresMongoDbModule) + )] + public class EShopMongoDbModule : AbpModule + { + public override void ConfigureServices(ServiceConfigurationContext context) + { + context.Services.AddMongoDbContext(options => + { + /* Add custom repositories here. Example: + * options.AddRepository(); + */ + }); + } + } +} diff --git a/integration/EasyAbp.EShop/src/EasyAbp.EShop.MongoDB/EasyAbp/EShop/MongoDB/EShopMongoModelBuilderConfigurationOptions.cs b/integration/EasyAbp.EShop/src/EasyAbp.EShop.MongoDB/EasyAbp/EShop/MongoDB/EShopMongoModelBuilderConfigurationOptions.cs new file mode 100644 index 00000000..7d775a12 --- /dev/null +++ b/integration/EasyAbp.EShop/src/EasyAbp.EShop.MongoDB/EasyAbp/EShop/MongoDB/EShopMongoModelBuilderConfigurationOptions.cs @@ -0,0 +1,14 @@ +using JetBrains.Annotations; +using Volo.Abp.MongoDB; + +namespace EasyAbp.EShop.MongoDB +{ + public class EShopMongoModelBuilderConfigurationOptions : AbpMongoModelBuilderConfigurationOptions + { + public EShopMongoModelBuilderConfigurationOptions( + [NotNull] string collectionPrefix = "") + : base(collectionPrefix) + { + } + } +} \ No newline at end of file diff --git a/integration/EasyAbp.EShop/src/EasyAbp.EShop.MongoDB/EasyAbp/EShop/MongoDB/IEShopMongoDbContext.cs b/integration/EasyAbp.EShop/src/EasyAbp.EShop.MongoDB/EasyAbp/EShop/MongoDB/IEShopMongoDbContext.cs new file mode 100644 index 00000000..2846335c --- /dev/null +++ b/integration/EasyAbp.EShop/src/EasyAbp.EShop.MongoDB/EasyAbp/EShop/MongoDB/IEShopMongoDbContext.cs @@ -0,0 +1,13 @@ +using Volo.Abp.Data; +using Volo.Abp.MongoDB; + +namespace EasyAbp.EShop.MongoDB +{ + [ConnectionStringName(EShopDbProperties.ConnectionStringName)] + public interface IEShopMongoDbContext : IAbpMongoDbContext + { + /* Define mongo collections here. Example: + * IMongoCollection Questions { get; } + */ + } +} diff --git a/integration/EasyAbp.EShop/src/EasyAbp.EShop.MongoDB/FodyWeavers.xml b/integration/EasyAbp.EShop/src/EasyAbp.EShop.MongoDB/FodyWeavers.xml new file mode 100644 index 00000000..be0de3a9 --- /dev/null +++ b/integration/EasyAbp.EShop/src/EasyAbp.EShop.MongoDB/FodyWeavers.xml @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/integration/EasyAbp.EShop/src/EasyAbp.EShop.MongoDB/FodyWeavers.xsd b/integration/EasyAbp.EShop/src/EasyAbp.EShop.MongoDB/FodyWeavers.xsd new file mode 100644 index 00000000..3f3946e2 --- /dev/null +++ b/integration/EasyAbp.EShop/src/EasyAbp.EShop.MongoDB/FodyWeavers.xsd @@ -0,0 +1,30 @@ + + + + + + + + + + + + + + + 'true' to run assembly verification (PEVerify) on the target assembly after all weavers have been executed. + + + + + A comma-separated list of error codes that can be safely ignored in assembly verification. + + + + + 'false' to turn off automatic generation of the XML Schema file. + + + + + \ No newline at end of file diff --git a/integration/EasyAbp.EShop/src/EasyAbp.EShop.Web/EShopMenuContributor.cs b/integration/EasyAbp.EShop/src/EasyAbp.EShop.Web/EShopMenuContributor.cs new file mode 100644 index 00000000..f19bee41 --- /dev/null +++ b/integration/EasyAbp.EShop/src/EasyAbp.EShop.Web/EShopMenuContributor.cs @@ -0,0 +1,23 @@ +using System.Threading.Tasks; +using Volo.Abp.UI.Navigation; + +namespace EasyAbp.EShop.Web +{ + public class EShopMenuContributor : IMenuContributor + { + public async Task ConfigureMenuAsync(MenuConfigurationContext context) + { + if (context.Menu.Name == StandardMenus.Main) + { + await ConfigureMainMenu(context); + } + } + + private Task ConfigureMainMenu(MenuConfigurationContext context) + { + //Add main menu items. + + return Task.CompletedTask; + } + } +} \ No newline at end of file diff --git a/integration/EasyAbp.EShop/src/EasyAbp.EShop.Web/EShopWebAutoMapperProfile.cs b/integration/EasyAbp.EShop/src/EasyAbp.EShop.Web/EShopWebAutoMapperProfile.cs new file mode 100644 index 00000000..447c409d --- /dev/null +++ b/integration/EasyAbp.EShop/src/EasyAbp.EShop.Web/EShopWebAutoMapperProfile.cs @@ -0,0 +1,14 @@ +using AutoMapper; + +namespace EasyAbp.EShop.Web +{ + public class EShopWebAutoMapperProfile : Profile + { + public EShopWebAutoMapperProfile() + { + /* You can configure your AutoMapper mapping configuration here. + * Alternatively, you can split your mapping configurations + * into multiple profile classes for a better organization. */ + } + } +} \ No newline at end of file diff --git a/integration/EasyAbp.EShop/src/EasyAbp.EShop.Web/EShopWebModule.cs b/integration/EasyAbp.EShop/src/EasyAbp.EShop.Web/EShopWebModule.cs new file mode 100644 index 00000000..72d8a78a --- /dev/null +++ b/integration/EasyAbp.EShop/src/EasyAbp.EShop.Web/EShopWebModule.cs @@ -0,0 +1,67 @@ +using EasyAbp.EShop.Baskets.Web; +using Microsoft.AspNetCore.Mvc.RazorPages; +using Microsoft.Extensions.DependencyInjection; +using EasyAbp.EShop.Localization; +using EasyAbp.EShop.Orders.Web; +using EasyAbp.EShop.Payments.Web; +using EasyAbp.EShop.Products.Web; +using EasyAbp.EShop.Stores.Web; +using Volo.Abp.AspNetCore.Mvc.Localization; +using Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared; +using Volo.Abp.AutoMapper; +using Volo.Abp.Modularity; +using Volo.Abp.UI.Navigation; +using Volo.Abp.VirtualFileSystem; + +namespace EasyAbp.EShop.Web +{ + [DependsOn( + typeof(EShopHttpApiModule), + typeof(AbpAspNetCoreMvcUiThemeSharedModule), + typeof(AbpAutoMapperModule), + typeof(EShopBasketsWebModule), + typeof(EShopOrdersWebModule), + typeof(EShopPaymentsWebModule), + typeof(EShopProductsWebModule), + typeof(EShopStoresWebModule) + )] + public class EShopWebModule : AbpModule + { + public override void PreConfigureServices(ServiceConfigurationContext context) + { + context.Services.PreConfigure(options => + { + options.AddAssemblyResource(typeof(EShopResource), typeof(EShopWebModule).Assembly); + }); + + PreConfigure(mvcBuilder => + { + mvcBuilder.AddApplicationPartIfNotExists(typeof(EShopWebModule).Assembly); + }); + } + + public override void ConfigureServices(ServiceConfigurationContext context) + { + Configure(options => + { + options.MenuContributors.Add(new EShopMenuContributor()); + }); + + Configure(options => + { + options.FileSets.AddEmbedded("EasyAbp.EShop.Web"); + }); + + context.Services.AddAutoMapperObjectMapper(); + Configure(options => + { + options.AddMaps(validate: true); + }); + + Configure(options => + { + //Configure authorization. + }); + } + } +} 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 new file mode 100644 index 00000000..71399417 --- /dev/null +++ b/integration/EasyAbp.EShop/src/EasyAbp.EShop.Web/EasyAbp.EShop.Web.csproj @@ -0,0 +1,47 @@ + + + + + + netcoreapp3.1 + $(AssetTargetFallback);portable-net45+win8+wp8+wpa81; + true + Library + EasyAbp.EShop.Web + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/integration/EasyAbp.EShop/src/EasyAbp.EShop.Web/FodyWeavers.xml b/integration/EasyAbp.EShop/src/EasyAbp.EShop.Web/FodyWeavers.xml new file mode 100644 index 00000000..be0de3a9 --- /dev/null +++ b/integration/EasyAbp.EShop/src/EasyAbp.EShop.Web/FodyWeavers.xml @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/integration/EasyAbp.EShop/src/EasyAbp.EShop.Web/FodyWeavers.xsd b/integration/EasyAbp.EShop/src/EasyAbp.EShop.Web/FodyWeavers.xsd new file mode 100644 index 00000000..3f3946e2 --- /dev/null +++ b/integration/EasyAbp.EShop/src/EasyAbp.EShop.Web/FodyWeavers.xsd @@ -0,0 +1,30 @@ + + + + + + + + + + + + + + + 'true' to run assembly verification (PEVerify) on the target assembly after all weavers have been executed. + + + + + A comma-separated list of error codes that can be safely ignored in assembly verification. + + + + + 'false' to turn off automatic generation of the XML Schema file. + + + + + \ No newline at end of file diff --git a/integration/EasyAbp.EShop/src/EasyAbp.EShop.Web/Pages/EShop/Index.cshtml b/integration/EasyAbp.EShop/src/EasyAbp.EShop.Web/Pages/EShop/Index.cshtml new file mode 100644 index 00000000..0f183876 --- /dev/null +++ b/integration/EasyAbp.EShop/src/EasyAbp.EShop.Web/Pages/EShop/Index.cshtml @@ -0,0 +1,7 @@ +@page +@inherits EasyAbp.EShop.Web.Pages.EShopPage +@model EasyAbp.EShop.Web.Pages.EShop.IndexModel +@{ +} +

EShop

+

A sample page for the EShop module.

\ No newline at end of file diff --git a/integration/EasyAbp.EShop/src/EasyAbp.EShop.Web/Pages/EShop/Index.cshtml.cs b/integration/EasyAbp.EShop/src/EasyAbp.EShop.Web/Pages/EShop/Index.cshtml.cs new file mode 100644 index 00000000..cc81fd74 --- /dev/null +++ b/integration/EasyAbp.EShop/src/EasyAbp.EShop.Web/Pages/EShop/Index.cshtml.cs @@ -0,0 +1,9 @@ +namespace EasyAbp.EShop.Web.Pages.EShop +{ + public class IndexModel : EShopPageModel + { + public void OnGet() + { + } + } +} \ No newline at end of file diff --git a/integration/EasyAbp.EShop/src/EasyAbp.EShop.Web/Pages/EShop/_ViewImports.cshtml b/integration/EasyAbp.EShop/src/EasyAbp.EShop.Web/Pages/EShop/_ViewImports.cshtml new file mode 100644 index 00000000..c1da1f5f --- /dev/null +++ b/integration/EasyAbp.EShop/src/EasyAbp.EShop.Web/Pages/EShop/_ViewImports.cshtml @@ -0,0 +1,4 @@ +@addTagHelper *, Microsoft.AspNetCore.Mvc.TagHelpers +@addTagHelper *, Volo.Abp.AspNetCore.Mvc.UI +@addTagHelper *, Volo.Abp.AspNetCore.Mvc.UI.Bootstrap +@addTagHelper *, Volo.Abp.AspNetCore.Mvc.UI.Bundling \ No newline at end of file diff --git a/integration/EasyAbp.EShop/src/EasyAbp.EShop.Web/Pages/EShopPage.cs b/integration/EasyAbp.EShop/src/EasyAbp.EShop.Web/Pages/EShopPage.cs new file mode 100644 index 00000000..d6c1d550 --- /dev/null +++ b/integration/EasyAbp.EShop/src/EasyAbp.EShop.Web/Pages/EShopPage.cs @@ -0,0 +1,16 @@ +using Microsoft.AspNetCore.Mvc.Localization; +using Microsoft.AspNetCore.Mvc.Razor.Internal; +using EasyAbp.EShop.Localization; +using Volo.Abp.AspNetCore.Mvc.UI.RazorPages; + +namespace EasyAbp.EShop.Web.Pages +{ + /* Inherit your UI Pages from this class. To do that, add this line to your Pages (.cshtml files under the Page folder): + * @inherits EasyAbp.EShop.Web.Pages.EShopPage + */ + public abstract class EShopPage : AbpPage + { + [RazorInject] + public IHtmlLocalizer L { get; set; } + } +} diff --git a/integration/EasyAbp.EShop/src/EasyAbp.EShop.Web/Pages/EShopPageModel.cs b/integration/EasyAbp.EShop/src/EasyAbp.EShop.Web/Pages/EShopPageModel.cs new file mode 100644 index 00000000..299864b4 --- /dev/null +++ b/integration/EasyAbp.EShop/src/EasyAbp.EShop.Web/Pages/EShopPageModel.cs @@ -0,0 +1,16 @@ +using EasyAbp.EShop.Localization; +using Volo.Abp.AspNetCore.Mvc.UI.RazorPages; + +namespace EasyAbp.EShop.Web.Pages +{ + /* Inherit your PageModel classes from this class. + */ + public abstract class EShopPageModel : AbpPageModel + { + protected EShopPageModel() + { + LocalizationResourceType = typeof(EShopResource); + ObjectMapperContext = typeof(EShopWebModule); + } + } +} \ No newline at end of file diff --git a/integration/EasyAbp.EShop/src/EasyAbp.EShop.Web/Properties/launchSettings.json b/integration/EasyAbp.EShop/src/EasyAbp.EShop.Web/Properties/launchSettings.json new file mode 100644 index 00000000..229b3060 --- /dev/null +++ b/integration/EasyAbp.EShop/src/EasyAbp.EShop.Web/Properties/launchSettings.json @@ -0,0 +1,27 @@ +{ + "iisSettings": { + "windowsAuthentication": false, + "anonymousAuthentication": true, + "iisExpress": { + "applicationUrl": "http://localhost:56993/", + "sslPort": 0 + } + }, + "profiles": { + "IIS Express": { + "commandName": "IISExpress", + "launchBrowser": true, + "environmentVariables": { + "ASPNETCORE_ENVIRONMENT": "Development" + } + }, + "EasyAbp.EShop.Web": { + "commandName": "Project", + "launchBrowser": true, + "environmentVariables": { + "ASPNETCORE_ENVIRONMENT": "Development" + }, + "applicationUrl": "http://localhost:56994/" + } + } +} \ No newline at end of file diff --git a/integration/EasyAbp.EShop/test/EasyAbp.EShop.Application.Tests/EShopApplicationTestBase.cs b/integration/EasyAbp.EShop/test/EasyAbp.EShop.Application.Tests/EShopApplicationTestBase.cs new file mode 100644 index 00000000..de34584d --- /dev/null +++ b/integration/EasyAbp.EShop/test/EasyAbp.EShop.Application.Tests/EShopApplicationTestBase.cs @@ -0,0 +1,10 @@ +namespace EasyAbp.EShop +{ + /* Inherit from this class for your application layer tests. + * See SampleAppService_Tests for example. + */ + public abstract class EShopApplicationTestBase : EShopTestBase + { + + } +} \ No newline at end of file diff --git a/integration/EasyAbp.EShop/test/EasyAbp.EShop.Application.Tests/EShopApplicationTestModule.cs b/integration/EasyAbp.EShop/test/EasyAbp.EShop.Application.Tests/EShopApplicationTestModule.cs new file mode 100644 index 00000000..751feee7 --- /dev/null +++ b/integration/EasyAbp.EShop/test/EasyAbp.EShop.Application.Tests/EShopApplicationTestModule.cs @@ -0,0 +1,13 @@ +using Volo.Abp.Modularity; + +namespace EasyAbp.EShop +{ + [DependsOn( + typeof(EShopApplicationModule), + typeof(EShopDomainTestModule) + )] + public class EShopApplicationTestModule : AbpModule + { + + } +} 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 new file mode 100644 index 00000000..92c305f7 --- /dev/null +++ b/integration/EasyAbp.EShop/test/EasyAbp.EShop.Application.Tests/EasyAbp.EShop.Application.Tests.csproj @@ -0,0 +1,16 @@ + + + + + + netcoreapp3.1 + + + + + + + + + + diff --git a/integration/EasyAbp.EShop/test/EasyAbp.EShop.Application.Tests/FodyWeavers.xml b/integration/EasyAbp.EShop/test/EasyAbp.EShop.Application.Tests/FodyWeavers.xml new file mode 100644 index 00000000..be0de3a9 --- /dev/null +++ b/integration/EasyAbp.EShop/test/EasyAbp.EShop.Application.Tests/FodyWeavers.xml @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/integration/EasyAbp.EShop/test/EasyAbp.EShop.Application.Tests/FodyWeavers.xsd b/integration/EasyAbp.EShop/test/EasyAbp.EShop.Application.Tests/FodyWeavers.xsd new file mode 100644 index 00000000..3f3946e2 --- /dev/null +++ b/integration/EasyAbp.EShop/test/EasyAbp.EShop.Application.Tests/FodyWeavers.xsd @@ -0,0 +1,30 @@ + + + + + + + + + + + + + + + 'true' to run assembly verification (PEVerify) on the target assembly after all weavers have been executed. + + + + + A comma-separated list of error codes that can be safely ignored in assembly verification. + + + + + 'false' to turn off automatic generation of the XML Schema file. + + + + + \ No newline at end of file diff --git a/integration/EasyAbp.EShop/test/EasyAbp.EShop.Domain.Tests/EShopDomainTestBase.cs b/integration/EasyAbp.EShop/test/EasyAbp.EShop.Domain.Tests/EShopDomainTestBase.cs new file mode 100644 index 00000000..288b75c8 --- /dev/null +++ b/integration/EasyAbp.EShop/test/EasyAbp.EShop.Domain.Tests/EShopDomainTestBase.cs @@ -0,0 +1,10 @@ +namespace EasyAbp.EShop +{ + /* Inherit from this class for your domain layer tests. + * See SampleManager_Tests for example. + */ + public abstract class EShopDomainTestBase : EShopTestBase + { + + } +} \ No newline at end of file diff --git a/integration/EasyAbp.EShop/test/EasyAbp.EShop.Domain.Tests/EShopDomainTestModule.cs b/integration/EasyAbp.EShop/test/EasyAbp.EShop.Domain.Tests/EShopDomainTestModule.cs new file mode 100644 index 00000000..e39f7d09 --- /dev/null +++ b/integration/EasyAbp.EShop/test/EasyAbp.EShop.Domain.Tests/EShopDomainTestModule.cs @@ -0,0 +1,17 @@ +using EasyAbp.EShop.EntityFrameworkCore; +using Volo.Abp.Modularity; + +namespace EasyAbp.EShop +{ + /* Domain tests are configured to use the EF Core provider. + * You can switch to MongoDB, however your domain tests should be + * database independent anyway. + */ + [DependsOn( + typeof(EShopEntityFrameworkCoreTestModule) + )] + public class EShopDomainTestModule : AbpModule + { + + } +} 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 new file mode 100644 index 00000000..1987d539 --- /dev/null +++ b/integration/EasyAbp.EShop/test/EasyAbp.EShop.Domain.Tests/EasyAbp.EShop.Domain.Tests.csproj @@ -0,0 +1,15 @@ + + + + + + netcoreapp3.1 + + + + + + + + + diff --git a/integration/EasyAbp.EShop/test/EasyAbp.EShop.Domain.Tests/FodyWeavers.xml b/integration/EasyAbp.EShop/test/EasyAbp.EShop.Domain.Tests/FodyWeavers.xml new file mode 100644 index 00000000..be0de3a9 --- /dev/null +++ b/integration/EasyAbp.EShop/test/EasyAbp.EShop.Domain.Tests/FodyWeavers.xml @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/integration/EasyAbp.EShop/test/EasyAbp.EShop.Domain.Tests/FodyWeavers.xsd b/integration/EasyAbp.EShop/test/EasyAbp.EShop.Domain.Tests/FodyWeavers.xsd new file mode 100644 index 00000000..3f3946e2 --- /dev/null +++ b/integration/EasyAbp.EShop/test/EasyAbp.EShop.Domain.Tests/FodyWeavers.xsd @@ -0,0 +1,30 @@ + + + + + + + + + + + + + + + 'true' to run assembly verification (PEVerify) on the target assembly after all weavers have been executed. + + + + + A comma-separated list of error codes that can be safely ignored in assembly verification. + + + + + 'false' to turn off automatic generation of the XML Schema file. + + + + + \ No newline at end of file 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 new file mode 100644 index 00000000..a80709bb --- /dev/null +++ b/integration/EasyAbp.EShop/test/EasyAbp.EShop.EntityFrameworkCore.Tests/EasyAbp.EShop.EntityFrameworkCore.Tests.csproj @@ -0,0 +1,19 @@ + + + + + + netcoreapp3.1 + + + + + + + + + + + + + diff --git a/integration/EasyAbp.EShop/test/EasyAbp.EShop.EntityFrameworkCore.Tests/EntityFrameworkCore/EShopEntityFrameworkCoreTestBase.cs b/integration/EasyAbp.EShop/test/EasyAbp.EShop.EntityFrameworkCore.Tests/EntityFrameworkCore/EShopEntityFrameworkCoreTestBase.cs new file mode 100644 index 00000000..1a8eefdd --- /dev/null +++ b/integration/EasyAbp.EShop/test/EasyAbp.EShop.EntityFrameworkCore.Tests/EntityFrameworkCore/EShopEntityFrameworkCoreTestBase.cs @@ -0,0 +1,10 @@ +namespace EasyAbp.EShop.EntityFrameworkCore +{ + /* This class can be used as a base class for EF Core integration tests, + * while SampleRepository_Tests uses a different approach. + */ + public abstract class EShopEntityFrameworkCoreTestBase : EShopTestBase + { + + } +} \ No newline at end of file diff --git a/integration/EasyAbp.EShop/test/EasyAbp.EShop.EntityFrameworkCore.Tests/EntityFrameworkCore/EShopEntityFrameworkCoreTestModule.cs b/integration/EasyAbp.EShop/test/EasyAbp.EShop.EntityFrameworkCore.Tests/EntityFrameworkCore/EShopEntityFrameworkCoreTestModule.cs new file mode 100644 index 00000000..9b851b97 --- /dev/null +++ b/integration/EasyAbp.EShop/test/EasyAbp.EShop.EntityFrameworkCore.Tests/EntityFrameworkCore/EShopEntityFrameworkCoreTestModule.cs @@ -0,0 +1,41 @@ +using Microsoft.Data.Sqlite; +using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore.Infrastructure; +using Microsoft.EntityFrameworkCore.Storage; +using Volo.Abp.EntityFrameworkCore; +using Volo.Abp.Modularity; + +namespace EasyAbp.EShop.EntityFrameworkCore +{ + [DependsOn( + typeof(EShopTestBaseModule), + typeof(EShopEntityFrameworkCoreModule) + )] + public class EShopEntityFrameworkCoreTestModule : AbpModule + { + public override void ConfigureServices(ServiceConfigurationContext context) + { + var sqliteConnection = CreateDatabaseAndGetConnection(); + + Configure(options => + { + options.Configure(abpDbContextConfigurationContext => + { + abpDbContextConfigurationContext.DbContextOptions.UseSqlite(sqliteConnection); + }); + }); + } + + private static SqliteConnection CreateDatabaseAndGetConnection() + { + var connection = new SqliteConnection("Data Source=:memory:"); + connection.Open(); + + new EShopDbContext( + new DbContextOptionsBuilder().UseSqlite(connection).Options + ).GetService().CreateTables(); + + return connection; + } + } +} diff --git a/integration/EasyAbp.EShop/test/EasyAbp.EShop.EntityFrameworkCore.Tests/FodyWeavers.xml b/integration/EasyAbp.EShop/test/EasyAbp.EShop.EntityFrameworkCore.Tests/FodyWeavers.xml new file mode 100644 index 00000000..be0de3a9 --- /dev/null +++ b/integration/EasyAbp.EShop/test/EasyAbp.EShop.EntityFrameworkCore.Tests/FodyWeavers.xml @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/integration/EasyAbp.EShop/test/EasyAbp.EShop.EntityFrameworkCore.Tests/FodyWeavers.xsd b/integration/EasyAbp.EShop/test/EasyAbp.EShop.EntityFrameworkCore.Tests/FodyWeavers.xsd new file mode 100644 index 00000000..3f3946e2 --- /dev/null +++ b/integration/EasyAbp.EShop/test/EasyAbp.EShop.EntityFrameworkCore.Tests/FodyWeavers.xsd @@ -0,0 +1,30 @@ + + + + + + + + + + + + + + + 'true' to run assembly verification (PEVerify) on the target assembly after all weavers have been executed. + + + + + A comma-separated list of error codes that can be safely ignored in assembly verification. + + + + + 'false' to turn off automatic generation of the XML Schema file. + + + + + \ No newline at end of file diff --git a/integration/EasyAbp.EShop/test/EasyAbp.EShop.HttpApi.Client.ConsoleTestApp/ClientDemoService.cs b/integration/EasyAbp.EShop/test/EasyAbp.EShop.HttpApi.Client.ConsoleTestApp/ClientDemoService.cs new file mode 100644 index 00000000..c6a00a2a --- /dev/null +++ b/integration/EasyAbp.EShop/test/EasyAbp.EShop.HttpApi.Client.ConsoleTestApp/ClientDemoService.cs @@ -0,0 +1,146 @@ +using System; +using System.Net.Http; +using System.Threading.Tasks; +using IdentityModel.Client; +using Microsoft.Extensions.Configuration; +using Volo.Abp.DependencyInjection; +using Volo.Abp.IdentityModel; + +namespace EasyAbp.EShop +{ + public class ClientDemoService : ITransientDependency + { + private readonly IIdentityModelAuthenticationService _authenticationService; + private readonly IConfiguration _configuration; + + public ClientDemoService( + IIdentityModelAuthenticationService authenticationService, + IConfiguration configuration) + { + _authenticationService = authenticationService; + _configuration = configuration; + } + + public async Task RunAsync() + { + await TestWithDynamicProxiesAsync(); + await TestWithHttpClientAndIdentityModelAuthenticationServiceAsync(); + await TestAllManuallyAsync(); + } + + /* Shows how to perform an HTTP request to the API using ABP's dynamic c# proxy + * feature. It is just simple as calling a local service method. + * Authorization and HTTP request details are handled by the ABP framework. + */ + private async Task TestWithDynamicProxiesAsync() + { + Console.WriteLine(); + Console.WriteLine($"***** {nameof(TestWithDynamicProxiesAsync)} *****"); + } + + /* Shows how to use HttpClient to perform a request to the HTTP API. + * It uses ABP's IIdentityModelAuthenticationService to simplify obtaining access tokens. + */ + private async Task TestWithHttpClientAndIdentityModelAuthenticationServiceAsync() + { + Console.WriteLine(); + Console.WriteLine($"***** {nameof(TestWithHttpClientAndIdentityModelAuthenticationServiceAsync)} *****"); + + //Get access token using ABP's IIdentityModelAuthenticationService + + var accessToken = await _authenticationService.GetAccessTokenAsync( + new IdentityClientConfiguration( + _configuration["IdentityClients:Default:Authority"], + _configuration["IdentityClients:Default:Scope"], + _configuration["IdentityClients:Default:ClientId"], + _configuration["IdentityClients:Default:ClientSecret"], + _configuration["IdentityClients:Default:GrantType"], + _configuration["IdentityClients:Default:UserName"], + _configuration["IdentityClients:Default:UserPassword"] + ) + ); + + //Perform the actual HTTP request + + using (var httpClient = new HttpClient()) + { + httpClient.SetBearerToken(accessToken); + + var url = _configuration["RemoteServices:EShop:BaseUrl"] + + "api/EShop/sample/authorized"; + + var responseMessage = await httpClient.GetAsync(url); + if (responseMessage.IsSuccessStatusCode) + { + var responseString = await responseMessage.Content.ReadAsStringAsync(); + Console.WriteLine("Result: " + responseString); + } + else + { + throw new Exception("Remote server returns error code: " + responseMessage.StatusCode); + } + } + } + + /* Shows how to use HttpClient to perform a request to the HTTP API. + * It obtains access token using IdentityServer's API. See its documentation: + * https://identityserver4.readthedocs.io/en/latest/quickstarts/2_resource_owner_passwords.html + */ + private async Task TestAllManuallyAsync() + { + Console.WriteLine(); + Console.WriteLine($"***** {nameof(TestAllManuallyAsync)} *****"); + + //Obtain access token from the IDS4 server + + // discover endpoints from metadata + var client = new HttpClient(); + var disco = await client.GetDiscoveryDocumentAsync(_configuration["IdentityClients:Default:Authority"]); + if (disco.IsError) + { + Console.WriteLine(disco.Error); + return; + } + + // request token + var tokenResponse = await client.RequestPasswordTokenAsync(new PasswordTokenRequest + { + Address = disco.TokenEndpoint, + ClientId = _configuration["IdentityClients:Default:ClientId"], + ClientSecret = _configuration["IdentityClients:Default:ClientSecret"], + UserName = _configuration["IdentityClients:Default:UserName"], + Password = _configuration["IdentityClients:Default:UserPassword"], + Scope = _configuration["IdentityClients:Default:Scope"] + }); + + if (tokenResponse.IsError) + { + Console.WriteLine(tokenResponse.Error); + return; + } + + Console.WriteLine(tokenResponse.Json); + + //Perform the actual HTTP request + + using (var httpClient = new HttpClient()) + { + httpClient.SetBearerToken(tokenResponse.AccessToken); + + var url = _configuration["RemoteServices:EShop:BaseUrl"] + + "api/EShop/sample/authorized"; + + var responseMessage = await httpClient.GetAsync(url); + if (responseMessage.IsSuccessStatusCode) + { + var responseString = await responseMessage.Content.ReadAsStringAsync(); + Console.WriteLine("Result: " + responseString); + } + else + { + throw new Exception("Remote server returns error code: " + responseMessage.StatusCode); + } + } + } + } +} \ No newline at end of file diff --git a/integration/EasyAbp.EShop/test/EasyAbp.EShop.HttpApi.Client.ConsoleTestApp/ConsoleTestAppHostedService.cs b/integration/EasyAbp.EShop/test/EasyAbp.EShop.HttpApi.Client.ConsoleTestApp/ConsoleTestAppHostedService.cs new file mode 100644 index 00000000..4e1fbee7 --- /dev/null +++ b/integration/EasyAbp.EShop/test/EasyAbp.EShop.HttpApi.Client.ConsoleTestApp/ConsoleTestAppHostedService.cs @@ -0,0 +1,26 @@ +using Microsoft.Extensions.Hosting; +using System.Threading; +using System.Threading.Tasks; +using Microsoft.Extensions.DependencyInjection; +using Volo.Abp; + +namespace EasyAbp.EShop.HttpApi.Client.ConsoleTestApp +{ + public class ConsoleTestAppHostedService : IHostedService + { + public async Task StartAsync(CancellationToken cancellationToken) + { + using (var application = AbpApplicationFactory.Create()) + { + application.Initialize(); + + var demo = application.ServiceProvider.GetRequiredService(); + await demo.RunAsync(); + + application.Shutdown(); + } + } + + public Task StopAsync(CancellationToken cancellationToken) => Task.CompletedTask; + } +} diff --git a/integration/EasyAbp.EShop/test/EasyAbp.EShop.HttpApi.Client.ConsoleTestApp/EShopConsoleApiClientModule.cs b/integration/EasyAbp.EShop/test/EasyAbp.EShop.HttpApi.Client.ConsoleTestApp/EShopConsoleApiClientModule.cs new file mode 100644 index 00000000..8c91e48f --- /dev/null +++ b/integration/EasyAbp.EShop/test/EasyAbp.EShop.HttpApi.Client.ConsoleTestApp/EShopConsoleApiClientModule.cs @@ -0,0 +1,14 @@ +using Volo.Abp.Http.Client.IdentityModel; +using Volo.Abp.Modularity; + +namespace EasyAbp.EShop +{ + [DependsOn( + typeof(EShopHttpApiClientModule), + typeof(AbpHttpClientIdentityModelModule) + )] + public class EShopConsoleApiClientModule : AbpModule + { + + } +} 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 new file mode 100644 index 00000000..ae81ad8c --- /dev/null +++ b/integration/EasyAbp.EShop/test/EasyAbp.EShop.HttpApi.Client.ConsoleTestApp/EasyAbp.EShop.HttpApi.Client.ConsoleTestApp.csproj @@ -0,0 +1,26 @@ + + + + Exe + netcoreapp3.1 + + + + + + + + + + + + PreserveNewest + Always + + + + + + + + diff --git a/integration/EasyAbp.EShop/test/EasyAbp.EShop.HttpApi.Client.ConsoleTestApp/Program.cs b/integration/EasyAbp.EShop/test/EasyAbp.EShop.HttpApi.Client.ConsoleTestApp/Program.cs new file mode 100644 index 00000000..4f8126c1 --- /dev/null +++ b/integration/EasyAbp.EShop/test/EasyAbp.EShop.HttpApi.Client.ConsoleTestApp/Program.cs @@ -0,0 +1,21 @@ +using System.Threading.Tasks; +using Microsoft.Extensions.DependencyInjection; +using Microsoft.Extensions.Hosting; + +namespace EasyAbp.EShop.HttpApi.Client.ConsoleTestApp +{ + class Program + { + static async Task Main(string[] args) + { + await CreateHostBuilder(args).RunConsoleAsync(); + } + + public static IHostBuilder CreateHostBuilder(string[] args) => + Host.CreateDefaultBuilder(args) + .ConfigureServices((hostContext, services) => + { + services.AddHostedService(); + }); + } +} diff --git a/integration/EasyAbp.EShop/test/EasyAbp.EShop.HttpApi.Client.ConsoleTestApp/appsettings.json b/integration/EasyAbp.EShop/test/EasyAbp.EShop.HttpApi.Client.ConsoleTestApp/appsettings.json new file mode 100644 index 00000000..85db7a2c --- /dev/null +++ b/integration/EasyAbp.EShop/test/EasyAbp.EShop.HttpApi.Client.ConsoleTestApp/appsettings.json @@ -0,0 +1,21 @@ +{ + "RemoteServices": { + "Default": { + "BaseUrl": "https://localhost:44317/" + }, + "EShop": { + "BaseUrl": "https://localhost:44365/" + } + }, + "IdentityClients": { + "Default": { + "GrantType": "password", + "ClientId": "EShop_ConsoleTestApp", + "ClientSecret": "1q2w3e*", + "UserName": "admin", + "UserPassword": "1q2w3E*", + "Authority": "https://localhost:44317/", + "Scope": "EShop" + } + } +} \ No newline at end of file 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 new file mode 100644 index 00000000..167b9956 --- /dev/null +++ b/integration/EasyAbp.EShop/test/EasyAbp.EShop.MongoDB.Tests/EasyAbp.EShop.MongoDB.Tests.csproj @@ -0,0 +1,17 @@ + + + + + + netcoreapp3.1 + + + + + + + + + + + diff --git a/integration/EasyAbp.EShop/test/EasyAbp.EShop.MongoDB.Tests/FodyWeavers.xml b/integration/EasyAbp.EShop/test/EasyAbp.EShop.MongoDB.Tests/FodyWeavers.xml new file mode 100644 index 00000000..be0de3a9 --- /dev/null +++ b/integration/EasyAbp.EShop/test/EasyAbp.EShop.MongoDB.Tests/FodyWeavers.xml @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/integration/EasyAbp.EShop/test/EasyAbp.EShop.MongoDB.Tests/FodyWeavers.xsd b/integration/EasyAbp.EShop/test/EasyAbp.EShop.MongoDB.Tests/FodyWeavers.xsd new file mode 100644 index 00000000..3f3946e2 --- /dev/null +++ b/integration/EasyAbp.EShop/test/EasyAbp.EShop.MongoDB.Tests/FodyWeavers.xsd @@ -0,0 +1,30 @@ + + + + + + + + + + + + + + + 'true' to run assembly verification (PEVerify) on the target assembly after all weavers have been executed. + + + + + A comma-separated list of error codes that can be safely ignored in assembly verification. + + + + + 'false' to turn off automatic generation of the XML Schema file. + + + + + \ No newline at end of file diff --git a/integration/EasyAbp.EShop/test/EasyAbp.EShop.MongoDB.Tests/MongoDB/EShopMongoDbTestBase.cs b/integration/EasyAbp.EShop/test/EasyAbp.EShop.MongoDB.Tests/MongoDB/EShopMongoDbTestBase.cs new file mode 100644 index 00000000..79defdf1 --- /dev/null +++ b/integration/EasyAbp.EShop/test/EasyAbp.EShop.MongoDB.Tests/MongoDB/EShopMongoDbTestBase.cs @@ -0,0 +1,10 @@ +namespace EasyAbp.EShop.MongoDB +{ + /* This class can be used as a base class for MongoDB integration tests, + * while SampleRepository_Tests uses a different approach. + */ + public abstract class EShopMongoDbTestBase : EShopTestBase + { + + } +} \ No newline at end of file diff --git a/integration/EasyAbp.EShop/test/EasyAbp.EShop.MongoDB.Tests/MongoDB/EShopMongoDbTestModule.cs b/integration/EasyAbp.EShop/test/EasyAbp.EShop.MongoDB.Tests/MongoDB/EShopMongoDbTestModule.cs new file mode 100644 index 00000000..ba951989 --- /dev/null +++ b/integration/EasyAbp.EShop/test/EasyAbp.EShop.MongoDB.Tests/MongoDB/EShopMongoDbTestModule.cs @@ -0,0 +1,25 @@ +using System; +using Volo.Abp.Data; +using Volo.Abp.Modularity; + +namespace EasyAbp.EShop.MongoDB +{ + [DependsOn( + typeof(EShopTestBaseModule), + typeof(EShopMongoDbModule) + )] + public class EShopMongoDbTestModule : AbpModule + { + public override void ConfigureServices(ServiceConfigurationContext context) + { + var connectionString = MongoDbFixture.ConnectionString.EnsureEndsWith('/') + + "Db_" + + Guid.NewGuid().ToString("N"); + + Configure(options => + { + options.ConnectionStrings.Default = connectionString; + }); + } + } +} \ No newline at end of file diff --git a/integration/EasyAbp.EShop/test/EasyAbp.EShop.MongoDB.Tests/MongoDB/MongoDbFixture.cs b/integration/EasyAbp.EShop/test/EasyAbp.EShop.MongoDB.Tests/MongoDB/MongoDbFixture.cs new file mode 100644 index 00000000..3e1693ac --- /dev/null +++ b/integration/EasyAbp.EShop/test/EasyAbp.EShop.MongoDB.Tests/MongoDB/MongoDbFixture.cs @@ -0,0 +1,16 @@ +using System; +using Mongo2Go; + +namespace EasyAbp.EShop.MongoDB +{ + public class MongoDbFixture : IDisposable + { + private static readonly MongoDbRunner MongoDbRunner = MongoDbRunner.Start(); + public static readonly string ConnectionString = MongoDbRunner.ConnectionString; + + public void Dispose() + { + MongoDbRunner?.Dispose(); + } + } +} \ No newline at end of file diff --git a/integration/EasyAbp.EShop/test/EasyAbp.EShop.MongoDB.Tests/MongoDB/MongoTestCollection.cs b/integration/EasyAbp.EShop/test/EasyAbp.EShop.MongoDB.Tests/MongoDB/MongoTestCollection.cs new file mode 100644 index 00000000..7209acba --- /dev/null +++ b/integration/EasyAbp.EShop/test/EasyAbp.EShop.MongoDB.Tests/MongoDB/MongoTestCollection.cs @@ -0,0 +1,10 @@ +using Xunit; + +namespace EasyAbp.EShop.MongoDB +{ + [CollectionDefinition(Name)] + public class MongoTestCollection : ICollectionFixture + { + public const string Name = "MongoDB Collection"; + } +} \ No newline at end of file diff --git a/integration/EasyAbp.EShop/test/EasyAbp.EShop.TestBase/EShopDataSeedContributor.cs b/integration/EasyAbp.EShop/test/EasyAbp.EShop.TestBase/EShopDataSeedContributor.cs new file mode 100644 index 00000000..52216706 --- /dev/null +++ b/integration/EasyAbp.EShop/test/EasyAbp.EShop.TestBase/EShopDataSeedContributor.cs @@ -0,0 +1,27 @@ +using System.Threading.Tasks; +using Volo.Abp.Data; +using Volo.Abp.DependencyInjection; +using Volo.Abp.Guids; + +namespace EasyAbp.EShop +{ + public class EShopDataSeedContributor : IDataSeedContributor, ITransientDependency + { + private readonly IGuidGenerator _guidGenerator; + + public EShopDataSeedContributor( + IGuidGenerator guidGenerator) + { + _guidGenerator = guidGenerator; + } + + public Task SeedAsync(DataSeedContext context) + { + /* Instead of returning the Task.CompletedTask, you can insert your test data + * at this point! + */ + + return Task.CompletedTask; + } + } +} \ No newline at end of file diff --git a/integration/EasyAbp.EShop/test/EasyAbp.EShop.TestBase/EShopTestBase.cs b/integration/EasyAbp.EShop/test/EasyAbp.EShop.TestBase/EShopTestBase.cs new file mode 100644 index 00000000..67f4ab12 --- /dev/null +++ b/integration/EasyAbp.EShop/test/EasyAbp.EShop.TestBase/EShopTestBase.cs @@ -0,0 +1,60 @@ +using System; +using System.Threading.Tasks; +using Microsoft.Extensions.DependencyInjection; +using Volo.Abp; +using Volo.Abp.Modularity; +using Volo.Abp.Uow; +using Volo.Abp.Testing; + +namespace EasyAbp.EShop +{ + /* All test classes are derived from this class, directly or indirectly. */ + public abstract class EShopTestBase : AbpIntegratedTest + where TStartupModule : IAbpModule + { + protected override void SetAbpApplicationCreationOptions(AbpApplicationCreationOptions options) + { + options.UseAutofac(); + } + + protected virtual Task WithUnitOfWorkAsync(Func func) + { + return WithUnitOfWorkAsync(new AbpUnitOfWorkOptions(), func); + } + + protected virtual async Task WithUnitOfWorkAsync(AbpUnitOfWorkOptions options, Func action) + { + using (var scope = ServiceProvider.CreateScope()) + { + var uowManager = scope.ServiceProvider.GetRequiredService(); + + using (var uow = uowManager.Begin(options)) + { + await action(); + + await uow.CompleteAsync(); + } + } + } + + protected virtual Task WithUnitOfWorkAsync(Func> func) + { + return WithUnitOfWorkAsync(new AbpUnitOfWorkOptions(), func); + } + + protected virtual async Task WithUnitOfWorkAsync(AbpUnitOfWorkOptions options, Func> func) + { + using (var scope = ServiceProvider.CreateScope()) + { + var uowManager = scope.ServiceProvider.GetRequiredService(); + + using (var uow = uowManager.Begin(options)) + { + var result = await func(); + await uow.CompleteAsync(); + return result; + } + } + } + } +} diff --git a/integration/EasyAbp.EShop/test/EasyAbp.EShop.TestBase/EShopTestBaseModule.cs b/integration/EasyAbp.EShop/test/EasyAbp.EShop.TestBase/EShopTestBaseModule.cs new file mode 100644 index 00000000..aa4963f9 --- /dev/null +++ b/integration/EasyAbp.EShop/test/EasyAbp.EShop.TestBase/EShopTestBaseModule.cs @@ -0,0 +1,42 @@ +using Microsoft.Extensions.DependencyInjection; +using Volo.Abp; +using Volo.Abp.Authorization; +using Volo.Abp.Autofac; +using Volo.Abp.Data; +using Volo.Abp.Modularity; +using Volo.Abp.Threading; + +namespace EasyAbp.EShop +{ + [DependsOn( + typeof(AbpAutofacModule), + typeof(AbpTestBaseModule), + typeof(AbpAuthorizationModule), + typeof(EShopDomainModule) + )] + public class EShopTestBaseModule : AbpModule + { + public override void ConfigureServices(ServiceConfigurationContext context) + { + context.Services.AddAlwaysAllowAuthorization(); + } + + public override void OnApplicationInitialization(ApplicationInitializationContext context) + { + SeedTestData(context); + } + + private static void SeedTestData(ApplicationInitializationContext context) + { + AsyncHelper.RunSync(async () => + { + using (var scope = context.ServiceProvider.CreateScope()) + { + await scope.ServiceProvider + .GetRequiredService() + .SeedAsync(); + } + }); + } + } +} 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 new file mode 100644 index 00000000..168c4fef --- /dev/null +++ b/integration/EasyAbp.EShop/test/EasyAbp.EShop.TestBase/EasyAbp.EShop.TestBase.csproj @@ -0,0 +1,23 @@ + + + + + + netcoreapp3.1 + + + + + + + + + + + + + + + + + diff --git a/integration/EasyAbp.EShop/test/EasyAbp.EShop.TestBase/FodyWeavers.xml b/integration/EasyAbp.EShop/test/EasyAbp.EShop.TestBase/FodyWeavers.xml new file mode 100644 index 00000000..be0de3a9 --- /dev/null +++ b/integration/EasyAbp.EShop/test/EasyAbp.EShop.TestBase/FodyWeavers.xml @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/integration/EasyAbp.EShop/test/EasyAbp.EShop.TestBase/FodyWeavers.xsd b/integration/EasyAbp.EShop/test/EasyAbp.EShop.TestBase/FodyWeavers.xsd new file mode 100644 index 00000000..3f3946e2 --- /dev/null +++ b/integration/EasyAbp.EShop/test/EasyAbp.EShop.TestBase/FodyWeavers.xsd @@ -0,0 +1,30 @@ + + + + + + + + + + + + + + + 'true' to run assembly verification (PEVerify) on the target assembly after all weavers have been executed. + + + + + A comma-separated list of error codes that can be safely ignored in assembly verification. + + + + + 'false' to turn off automatic generation of the XML Schema file. + + + + + \ No newline at end of file diff --git a/integration/EasyAbp.EShop/test/EasyAbp.EShop.TestBase/Security/FakeCurrentPrincipalAccessor.cs b/integration/EasyAbp.EShop/test/EasyAbp.EShop.TestBase/Security/FakeCurrentPrincipalAccessor.cs new file mode 100644 index 00000000..adc772d8 --- /dev/null +++ b/integration/EasyAbp.EShop/test/EasyAbp.EShop.TestBase/Security/FakeCurrentPrincipalAccessor.cs @@ -0,0 +1,43 @@ +using System.Collections.Generic; +using System.Security.Claims; +using Volo.Abp.DependencyInjection; +using Volo.Abp.Security.Claims; + +namespace EasyAbp.EShop.Security +{ + [Dependency(ReplaceServices = true)] + public class FakeCurrentPrincipalAccessor : ThreadCurrentPrincipalAccessor + { + public override ClaimsPrincipal GetClaimsPrincipal() + { + return GetPrincipal(); + } + + private ClaimsPrincipal _principal; + + private ClaimsPrincipal GetPrincipal() + { + if (_principal == null) + { + lock (this) + { + if (_principal == null) + { + _principal = new ClaimsPrincipal( + new ClaimsIdentity( + new List + { + new Claim(AbpClaimTypes.UserId,"2e701e62-0953-4dd3-910b-dc6cc93ccb0d"), + new Claim(AbpClaimTypes.UserName,"admin"), + new Claim(AbpClaimTypes.Email,"admin@abp.io") + } + ) + ); + } + } + } + + return _principal; + } + } +} diff --git a/modules/EasyAbp.EShop.Payments/src/EasyAbp.EShop.Payments.EntityFrameworkCore/EasyAbp/EShop/Payments/EntityFrameworkCore/PaymentsDbContextModelCreatingExtensions.cs b/modules/EasyAbp.EShop.Payments/src/EasyAbp.EShop.Payments.EntityFrameworkCore/EasyAbp/EShop/Payments/EntityFrameworkCore/PaymentsDbContextModelCreatingExtensions.cs index 2a3f7907..1bfda815 100644 --- a/modules/EasyAbp.EShop.Payments/src/EasyAbp.EShop.Payments.EntityFrameworkCore/EasyAbp/EShop/Payments/EntityFrameworkCore/PaymentsDbContextModelCreatingExtensions.cs +++ b/modules/EasyAbp.EShop.Payments/src/EasyAbp.EShop.Payments.EntityFrameworkCore/EasyAbp/EShop/Payments/EntityFrameworkCore/PaymentsDbContextModelCreatingExtensions.cs @@ -40,8 +40,6 @@ namespace EasyAbp.EShop.Payments.EntityFrameworkCore }); */ - // Configure dependent module - builder.ConfigurePaymentService(); } } diff --git a/modules/EasyAbp.EShop.Payments/src/EasyAbp.EShop.Payments.MongoDB/EasyAbp/EShop/Payments/MongoDB/PaymentsMongoDbContextExtensions.cs b/modules/EasyAbp.EShop.Payments/src/EasyAbp.EShop.Payments.MongoDB/EasyAbp/EShop/Payments/MongoDB/PaymentsMongoDbContextExtensions.cs index 5e5daaef..481c2b6a 100644 --- a/modules/EasyAbp.EShop.Payments/src/EasyAbp.EShop.Payments.MongoDB/EasyAbp/EShop/Payments/MongoDB/PaymentsMongoDbContextExtensions.cs +++ b/modules/EasyAbp.EShop.Payments/src/EasyAbp.EShop.Payments.MongoDB/EasyAbp/EShop/Payments/MongoDB/PaymentsMongoDbContextExtensions.cs @@ -1,4 +1,5 @@ using System; +using EasyAbp.PaymentService.MongoDB; using Volo.Abp; using Volo.Abp.MongoDB; @@ -17,6 +18,8 @@ namespace EasyAbp.EShop.Payments.MongoDB ); optionsAction?.Invoke(options); + + builder.ConfigurePaymentService(); } } } \ No newline at end of file diff --git a/samples/EasyMall/aspnet-core/EasyMall.sln b/samples/EasyMall/aspnet-core/EasyMall.sln index b30c3529..568fdcd5 100644 --- a/samples/EasyMall/aspnet-core/EasyMall.sln +++ b/samples/EasyMall/aspnet-core/EasyMall.sln @@ -221,6 +221,44 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "EasyAbp.EShop.Stores.MongoD EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "EasyAbp.EShop.Stores.TestBase", "..\..\..\modules\EasyAbp.EShop.Stores\test\EasyAbp.EShop.Stores.TestBase\EasyAbp.EShop.Stores.TestBase.csproj", "{F2A770E7-17A5-4009-9DE2-703940F34A3D}" EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "integration", "integration", "{A8D42645-BAE3-4F2E-BC5B-889173CEC63C}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "EShop", "EShop", "{220D5B7C-FD10-46D8-82A1-FAE877DE59E6}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{4B0BD42D-BDE6-449F-8608-580399290ABE}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "test", "test", "{4995F694-3DE4-4678-BED4-3C5D8B5F0158}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "EasyAbp.EShop.Application", "..\..\..\integration\EasyAbp.EShop\src\EasyAbp.EShop.Application\EasyAbp.EShop.Application.csproj", "{8CC74F2A-573B-480F-9872-7C4597493B66}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "EasyAbp.EShop.Application.Contracts", "..\..\..\integration\EasyAbp.EShop\src\EasyAbp.EShop.Application.Contracts\EasyAbp.EShop.Application.Contracts.csproj", "{098387B9-B28F-4854-9323-2B9B67E523E2}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "EasyAbp.EShop.Domain", "..\..\..\integration\EasyAbp.EShop\src\EasyAbp.EShop.Domain\EasyAbp.EShop.Domain.csproj", "{187718A5-03C3-431A-A80D-5E0A64F86C05}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "EasyAbp.EShop.Domain.Shared", "..\..\..\integration\EasyAbp.EShop\src\EasyAbp.EShop.Domain.Shared\EasyAbp.EShop.Domain.Shared.csproj", "{26E75959-FA49-4328-9BB2-187E45F3F94D}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "EasyAbp.EShop.EntityFrameworkCore", "..\..\..\integration\EasyAbp.EShop\src\EasyAbp.EShop.EntityFrameworkCore\EasyAbp.EShop.EntityFrameworkCore.csproj", "{5C279AA1-3F00-4FD4-8D61-65E6EC385B05}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "EasyAbp.EShop.HttpApi", "..\..\..\integration\EasyAbp.EShop\src\EasyAbp.EShop.HttpApi\EasyAbp.EShop.HttpApi.csproj", "{D0B30993-0242-4FC0-A7DA-D8A78B194D13}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "EasyAbp.EShop.HttpApi.Client", "..\..\..\integration\EasyAbp.EShop\src\EasyAbp.EShop.HttpApi.Client\EasyAbp.EShop.HttpApi.Client.csproj", "{E0A4BE17-935E-433A-B22A-C94394C59BA6}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "EasyAbp.EShop.MongoDB", "..\..\..\integration\EasyAbp.EShop\src\EasyAbp.EShop.MongoDB\EasyAbp.EShop.MongoDB.csproj", "{9E08DF86-2BC4-4760-97A3-C873AC33295C}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "EasyAbp.EShop.Web", "..\..\..\integration\EasyAbp.EShop\src\EasyAbp.EShop.Web\EasyAbp.EShop.Web.csproj", "{0B7E609B-B842-424D-ABD2-EDFBDDFE7051}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "EasyAbp.EShop.Application.Tests", "..\..\..\integration\EasyAbp.EShop\test\EasyAbp.EShop.Application.Tests\EasyAbp.EShop.Application.Tests.csproj", "{F48A94E6-5EAF-4C48-8AA4-CFCA459E0D02}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "EasyAbp.EShop.Domain.Tests", "..\..\..\integration\EasyAbp.EShop\test\EasyAbp.EShop.Domain.Tests\EasyAbp.EShop.Domain.Tests.csproj", "{74206FEF-72A6-4972-B810-C75282D01F37}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "EasyAbp.EShop.EntityFrameworkCore.Tests", "..\..\..\integration\EasyAbp.EShop\test\EasyAbp.EShop.EntityFrameworkCore.Tests\EasyAbp.EShop.EntityFrameworkCore.Tests.csproj", "{6042A1F6-8A71-4B1A-B944-71E16179C971}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "EasyAbp.EShop.HttpApi.Client.ConsoleTestApp", "..\..\..\integration\EasyAbp.EShop\test\EasyAbp.EShop.HttpApi.Client.ConsoleTestApp\EasyAbp.EShop.HttpApi.Client.ConsoleTestApp.csproj", "{6ADE7CAF-260E-4E71-B4FA-E96819A0F43A}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "EasyAbp.EShop.MongoDB.Tests", "..\..\..\integration\EasyAbp.EShop\test\EasyAbp.EShop.MongoDB.Tests\EasyAbp.EShop.MongoDB.Tests.csproj", "{65B43722-08F5-4F0D-ADAE-E7C6768E59BC}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "EasyAbp.EShop.TestBase", "..\..\..\integration\EasyAbp.EShop\test\EasyAbp.EShop.TestBase\EasyAbp.EShop.TestBase.csproj", "{45B6591E-6517-4F57-9AFA-F28AF880B725}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -591,6 +629,66 @@ Global {F2A770E7-17A5-4009-9DE2-703940F34A3D}.Debug|Any CPU.Build.0 = Debug|Any CPU {F2A770E7-17A5-4009-9DE2-703940F34A3D}.Release|Any CPU.ActiveCfg = Release|Any CPU {F2A770E7-17A5-4009-9DE2-703940F34A3D}.Release|Any CPU.Build.0 = Release|Any CPU + {8CC74F2A-573B-480F-9872-7C4597493B66}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {8CC74F2A-573B-480F-9872-7C4597493B66}.Debug|Any CPU.Build.0 = Debug|Any CPU + {8CC74F2A-573B-480F-9872-7C4597493B66}.Release|Any CPU.ActiveCfg = Release|Any CPU + {8CC74F2A-573B-480F-9872-7C4597493B66}.Release|Any CPU.Build.0 = Release|Any CPU + {098387B9-B28F-4854-9323-2B9B67E523E2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {098387B9-B28F-4854-9323-2B9B67E523E2}.Debug|Any CPU.Build.0 = Debug|Any CPU + {098387B9-B28F-4854-9323-2B9B67E523E2}.Release|Any CPU.ActiveCfg = Release|Any CPU + {098387B9-B28F-4854-9323-2B9B67E523E2}.Release|Any CPU.Build.0 = Release|Any CPU + {187718A5-03C3-431A-A80D-5E0A64F86C05}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {187718A5-03C3-431A-A80D-5E0A64F86C05}.Debug|Any CPU.Build.0 = Debug|Any CPU + {187718A5-03C3-431A-A80D-5E0A64F86C05}.Release|Any CPU.ActiveCfg = Release|Any CPU + {187718A5-03C3-431A-A80D-5E0A64F86C05}.Release|Any CPU.Build.0 = Release|Any CPU + {26E75959-FA49-4328-9BB2-187E45F3F94D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {26E75959-FA49-4328-9BB2-187E45F3F94D}.Debug|Any CPU.Build.0 = Debug|Any CPU + {26E75959-FA49-4328-9BB2-187E45F3F94D}.Release|Any CPU.ActiveCfg = Release|Any CPU + {26E75959-FA49-4328-9BB2-187E45F3F94D}.Release|Any CPU.Build.0 = Release|Any CPU + {5C279AA1-3F00-4FD4-8D61-65E6EC385B05}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {5C279AA1-3F00-4FD4-8D61-65E6EC385B05}.Debug|Any CPU.Build.0 = Debug|Any CPU + {5C279AA1-3F00-4FD4-8D61-65E6EC385B05}.Release|Any CPU.ActiveCfg = Release|Any CPU + {5C279AA1-3F00-4FD4-8D61-65E6EC385B05}.Release|Any CPU.Build.0 = Release|Any CPU + {D0B30993-0242-4FC0-A7DA-D8A78B194D13}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {D0B30993-0242-4FC0-A7DA-D8A78B194D13}.Debug|Any CPU.Build.0 = Debug|Any CPU + {D0B30993-0242-4FC0-A7DA-D8A78B194D13}.Release|Any CPU.ActiveCfg = Release|Any CPU + {D0B30993-0242-4FC0-A7DA-D8A78B194D13}.Release|Any CPU.Build.0 = Release|Any CPU + {E0A4BE17-935E-433A-B22A-C94394C59BA6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {E0A4BE17-935E-433A-B22A-C94394C59BA6}.Debug|Any CPU.Build.0 = Debug|Any CPU + {E0A4BE17-935E-433A-B22A-C94394C59BA6}.Release|Any CPU.ActiveCfg = Release|Any CPU + {E0A4BE17-935E-433A-B22A-C94394C59BA6}.Release|Any CPU.Build.0 = Release|Any CPU + {9E08DF86-2BC4-4760-97A3-C873AC33295C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {9E08DF86-2BC4-4760-97A3-C873AC33295C}.Debug|Any CPU.Build.0 = Debug|Any CPU + {9E08DF86-2BC4-4760-97A3-C873AC33295C}.Release|Any CPU.ActiveCfg = Release|Any CPU + {9E08DF86-2BC4-4760-97A3-C873AC33295C}.Release|Any CPU.Build.0 = Release|Any CPU + {0B7E609B-B842-424D-ABD2-EDFBDDFE7051}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {0B7E609B-B842-424D-ABD2-EDFBDDFE7051}.Debug|Any CPU.Build.0 = Debug|Any CPU + {0B7E609B-B842-424D-ABD2-EDFBDDFE7051}.Release|Any CPU.ActiveCfg = Release|Any CPU + {0B7E609B-B842-424D-ABD2-EDFBDDFE7051}.Release|Any CPU.Build.0 = Release|Any CPU + {F48A94E6-5EAF-4C48-8AA4-CFCA459E0D02}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {F48A94E6-5EAF-4C48-8AA4-CFCA459E0D02}.Debug|Any CPU.Build.0 = Debug|Any CPU + {F48A94E6-5EAF-4C48-8AA4-CFCA459E0D02}.Release|Any CPU.ActiveCfg = Release|Any CPU + {F48A94E6-5EAF-4C48-8AA4-CFCA459E0D02}.Release|Any CPU.Build.0 = Release|Any CPU + {74206FEF-72A6-4972-B810-C75282D01F37}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {74206FEF-72A6-4972-B810-C75282D01F37}.Debug|Any CPU.Build.0 = Debug|Any CPU + {74206FEF-72A6-4972-B810-C75282D01F37}.Release|Any CPU.ActiveCfg = Release|Any CPU + {74206FEF-72A6-4972-B810-C75282D01F37}.Release|Any CPU.Build.0 = Release|Any CPU + {6042A1F6-8A71-4B1A-B944-71E16179C971}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {6042A1F6-8A71-4B1A-B944-71E16179C971}.Debug|Any CPU.Build.0 = Debug|Any CPU + {6042A1F6-8A71-4B1A-B944-71E16179C971}.Release|Any CPU.ActiveCfg = Release|Any CPU + {6042A1F6-8A71-4B1A-B944-71E16179C971}.Release|Any CPU.Build.0 = Release|Any CPU + {6ADE7CAF-260E-4E71-B4FA-E96819A0F43A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {6ADE7CAF-260E-4E71-B4FA-E96819A0F43A}.Debug|Any CPU.Build.0 = Debug|Any CPU + {6ADE7CAF-260E-4E71-B4FA-E96819A0F43A}.Release|Any CPU.ActiveCfg = Release|Any CPU + {6ADE7CAF-260E-4E71-B4FA-E96819A0F43A}.Release|Any CPU.Build.0 = Release|Any CPU + {65B43722-08F5-4F0D-ADAE-E7C6768E59BC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {65B43722-08F5-4F0D-ADAE-E7C6768E59BC}.Debug|Any CPU.Build.0 = Debug|Any CPU + {65B43722-08F5-4F0D-ADAE-E7C6768E59BC}.Release|Any CPU.ActiveCfg = Release|Any CPU + {65B43722-08F5-4F0D-ADAE-E7C6768E59BC}.Release|Any CPU.Build.0 = Release|Any CPU + {45B6591E-6517-4F57-9AFA-F28AF880B725}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {45B6591E-6517-4F57-9AFA-F28AF880B725}.Debug|Any CPU.Build.0 = Debug|Any CPU + {45B6591E-6517-4F57-9AFA-F28AF880B725}.Release|Any CPU.ActiveCfg = Release|Any CPU + {45B6591E-6517-4F57-9AFA-F28AF880B725}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE @@ -702,6 +800,24 @@ Global {F9F30B96-B456-452A-843F-904E89BB1B58} = {AD00688C-1F70-4439-BCF5-8931989359E0} {B64703AF-1554-4087-A638-E295444F2F86} = {AD00688C-1F70-4439-BCF5-8931989359E0} {F2A770E7-17A5-4009-9DE2-703940F34A3D} = {AD00688C-1F70-4439-BCF5-8931989359E0} + {220D5B7C-FD10-46D8-82A1-FAE877DE59E6} = {A8D42645-BAE3-4F2E-BC5B-889173CEC63C} + {4B0BD42D-BDE6-449F-8608-580399290ABE} = {220D5B7C-FD10-46D8-82A1-FAE877DE59E6} + {4995F694-3DE4-4678-BED4-3C5D8B5F0158} = {220D5B7C-FD10-46D8-82A1-FAE877DE59E6} + {8CC74F2A-573B-480F-9872-7C4597493B66} = {4B0BD42D-BDE6-449F-8608-580399290ABE} + {098387B9-B28F-4854-9323-2B9B67E523E2} = {4B0BD42D-BDE6-449F-8608-580399290ABE} + {187718A5-03C3-431A-A80D-5E0A64F86C05} = {4B0BD42D-BDE6-449F-8608-580399290ABE} + {26E75959-FA49-4328-9BB2-187E45F3F94D} = {4B0BD42D-BDE6-449F-8608-580399290ABE} + {5C279AA1-3F00-4FD4-8D61-65E6EC385B05} = {4B0BD42D-BDE6-449F-8608-580399290ABE} + {D0B30993-0242-4FC0-A7DA-D8A78B194D13} = {4B0BD42D-BDE6-449F-8608-580399290ABE} + {E0A4BE17-935E-433A-B22A-C94394C59BA6} = {4B0BD42D-BDE6-449F-8608-580399290ABE} + {9E08DF86-2BC4-4760-97A3-C873AC33295C} = {4B0BD42D-BDE6-449F-8608-580399290ABE} + {0B7E609B-B842-424D-ABD2-EDFBDDFE7051} = {4B0BD42D-BDE6-449F-8608-580399290ABE} + {F48A94E6-5EAF-4C48-8AA4-CFCA459E0D02} = {4995F694-3DE4-4678-BED4-3C5D8B5F0158} + {74206FEF-72A6-4972-B810-C75282D01F37} = {4995F694-3DE4-4678-BED4-3C5D8B5F0158} + {6042A1F6-8A71-4B1A-B944-71E16179C971} = {4995F694-3DE4-4678-BED4-3C5D8B5F0158} + {6ADE7CAF-260E-4E71-B4FA-E96819A0F43A} = {4995F694-3DE4-4678-BED4-3C5D8B5F0158} + {65B43722-08F5-4F0D-ADAE-E7C6768E59BC} = {4995F694-3DE4-4678-BED4-3C5D8B5F0158} + {45B6591E-6517-4F57-9AFA-F28AF880B725} = {4995F694-3DE4-4678-BED4-3C5D8B5F0158} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {28315BFD-90E7-4E14-A2EA-F3D23AF4126F} diff --git a/samples/EasyMall/aspnet-core/src/EasyMall.Application.Contracts/EasyMall.Application.Contracts.csproj b/samples/EasyMall/aspnet-core/src/EasyMall.Application.Contracts/EasyMall.Application.Contracts.csproj index 84ac97e1..272d9987 100644 --- a/samples/EasyMall/aspnet-core/src/EasyMall.Application.Contracts/EasyMall.Application.Contracts.csproj +++ b/samples/EasyMall/aspnet-core/src/EasyMall.Application.Contracts/EasyMall.Application.Contracts.csproj @@ -8,11 +8,7 @@ - - - - - + diff --git a/samples/EasyMall/aspnet-core/src/EasyMall.Application.Contracts/EasyMallApplicationContractsModule.cs b/samples/EasyMall/aspnet-core/src/EasyMall.Application.Contracts/EasyMallApplicationContractsModule.cs index 37b1013d..86d93138 100644 --- a/samples/EasyMall/aspnet-core/src/EasyMall.Application.Contracts/EasyMallApplicationContractsModule.cs +++ b/samples/EasyMall/aspnet-core/src/EasyMall.Application.Contracts/EasyMallApplicationContractsModule.cs @@ -1,8 +1,4 @@ -using EasyAbp.EShop.Baskets; -using EasyAbp.EShop.Orders; -using EasyAbp.EShop.Payments; -using EasyAbp.EShop.Products; -using EasyAbp.EShop.Stores; +using EasyAbp.EShop; using EasyAbp.PaymentService.WeChatPay; using Volo.Abp.Account; using Volo.Abp.FeatureManagement; @@ -22,11 +18,7 @@ namespace EasyMall typeof(AbpPermissionManagementApplicationContractsModule), typeof(AbpTenantManagementApplicationContractsModule), typeof(AbpObjectExtendingModule), - typeof(EShopBasketsApplicationContractsModule), - typeof(EShopOrdersApplicationContractsModule), - typeof(EShopPaymentsApplicationContractsModule), - typeof(EShopProductsApplicationContractsModule), - typeof(EShopStoresApplicationContractsModule), + typeof(EShopApplicationContractsModule), typeof(PaymentServiceWeChatPayApplicationContractsModule) )] public class EasyMallApplicationContractsModule : AbpModule diff --git a/samples/EasyMall/aspnet-core/src/EasyMall.Application/EasyMall.Application.csproj b/samples/EasyMall/aspnet-core/src/EasyMall.Application/EasyMall.Application.csproj index e2af44c8..6b266258 100644 --- a/samples/EasyMall/aspnet-core/src/EasyMall.Application/EasyMall.Application.csproj +++ b/samples/EasyMall/aspnet-core/src/EasyMall.Application/EasyMall.Application.csproj @@ -8,11 +8,7 @@ - - - - - + diff --git a/samples/EasyMall/aspnet-core/src/EasyMall.Application/EasyMallApplicationModule.cs b/samples/EasyMall/aspnet-core/src/EasyMall.Application/EasyMallApplicationModule.cs index e106929c..0853cd09 100644 --- a/samples/EasyMall/aspnet-core/src/EasyMall.Application/EasyMallApplicationModule.cs +++ b/samples/EasyMall/aspnet-core/src/EasyMall.Application/EasyMallApplicationModule.cs @@ -1,8 +1,4 @@ -using EasyAbp.EShop.Baskets; -using EasyAbp.EShop.Orders; -using EasyAbp.EShop.Payments; -using EasyAbp.EShop.Products; -using EasyAbp.EShop.Stores; +using EasyAbp.EShop; using EasyAbp.PaymentService.WeChatPay; using Volo.Abp.Account; using Volo.Abp.AutoMapper; @@ -22,11 +18,7 @@ namespace EasyMall typeof(AbpPermissionManagementApplicationModule), typeof(AbpTenantManagementApplicationModule), typeof(AbpFeatureManagementApplicationModule), - typeof(EShopBasketsApplicationModule), - typeof(EShopOrdersApplicationModule), - typeof(EShopPaymentsApplicationModule), - typeof(EShopProductsApplicationModule), - typeof(EShopStoresApplicationModule), + typeof(EShopApplicationModule), typeof(PaymentServiceWeChatPayApplicationModule) )] public class EasyMallApplicationModule : AbpModule diff --git a/samples/EasyMall/aspnet-core/src/EasyMall.Domain.Shared/EasyMall.Domain.Shared.csproj b/samples/EasyMall/aspnet-core/src/EasyMall.Domain.Shared/EasyMall.Domain.Shared.csproj index a0011a93..75809d38 100644 --- a/samples/EasyMall/aspnet-core/src/EasyMall.Domain.Shared/EasyMall.Domain.Shared.csproj +++ b/samples/EasyMall/aspnet-core/src/EasyMall.Domain.Shared/EasyMall.Domain.Shared.csproj @@ -17,6 +17,7 @@ + @@ -24,12 +25,4 @@ - - - - - - - - diff --git a/samples/EasyMall/aspnet-core/src/EasyMall.Domain.Shared/EasyMallDomainSharedModule.cs b/samples/EasyMall/aspnet-core/src/EasyMall.Domain.Shared/EasyMallDomainSharedModule.cs index d81fca27..058dc795 100644 --- a/samples/EasyMall/aspnet-core/src/EasyMall.Domain.Shared/EasyMallDomainSharedModule.cs +++ b/samples/EasyMall/aspnet-core/src/EasyMall.Domain.Shared/EasyMallDomainSharedModule.cs @@ -1,8 +1,4 @@ -using EasyAbp.EShop.Baskets; -using EasyAbp.EShop.Orders; -using EasyAbp.EShop.Payments; -using EasyAbp.EShop.Products; -using EasyAbp.EShop.Stores; +using EasyAbp.EShop; using EasyAbp.PaymentService.WeChatPay; using EasyMall.Localization; using Volo.Abp.AuditLogging; @@ -29,11 +25,7 @@ namespace EasyMall typeof(AbpPermissionManagementDomainSharedModule), typeof(AbpSettingManagementDomainSharedModule), typeof(AbpTenantManagementDomainSharedModule), - typeof(EShopBasketsDomainSharedModule), - typeof(EShopOrdersDomainSharedModule), - typeof(EShopPaymentsDomainSharedModule), - typeof(EShopProductsDomainSharedModule), - typeof(EShopStoresDomainSharedModule), + typeof(EShopDomainSharedModule), typeof(PaymentServiceWeChatPayDomainSharedModule) )] public class EasyMallDomainSharedModule : AbpModule diff --git a/samples/EasyMall/aspnet-core/src/EasyMall.Domain/EasyMall.Domain.csproj b/samples/EasyMall/aspnet-core/src/EasyMall.Domain/EasyMall.Domain.csproj index 264685af..7085a74b 100644 --- a/samples/EasyMall/aspnet-core/src/EasyMall.Domain/EasyMall.Domain.csproj +++ b/samples/EasyMall/aspnet-core/src/EasyMall.Domain/EasyMall.Domain.csproj @@ -8,11 +8,7 @@ - - - - - + diff --git a/samples/EasyMall/aspnet-core/src/EasyMall.Domain/EasyMallDomainModule.cs b/samples/EasyMall/aspnet-core/src/EasyMall.Domain/EasyMallDomainModule.cs index 332dbc3d..a184f868 100644 --- a/samples/EasyMall/aspnet-core/src/EasyMall.Domain/EasyMallDomainModule.cs +++ b/samples/EasyMall/aspnet-core/src/EasyMall.Domain/EasyMallDomainModule.cs @@ -1,8 +1,4 @@ -using EasyAbp.EShop.Baskets; -using EasyAbp.EShop.Orders; -using EasyAbp.EShop.Payments; -using EasyAbp.EShop.Products; -using EasyAbp.EShop.Stores; +using EasyAbp.EShop; using EasyAbp.PaymentService.Payments; using EasyAbp.PaymentService.WeChatPay; using EasyMall.MultiTenancy; @@ -34,11 +30,7 @@ namespace EasyMall typeof(AbpPermissionManagementDomainIdentityServerModule), typeof(AbpSettingManagementDomainModule), typeof(AbpTenantManagementDomainModule), - typeof(EShopBasketsDomainModule), - typeof(EShopOrdersDomainModule), - typeof(EShopPaymentsDomainModule), - typeof(EShopProductsDomainModule), - typeof(EShopStoresDomainModule), + typeof(EShopDomainModule), typeof(PaymentServiceWeChatPayDomainModule) )] public class EasyMallDomainModule : AbpModule diff --git a/samples/EasyMall/aspnet-core/src/EasyMall.EntityFrameworkCore/EasyMall.EntityFrameworkCore.csproj b/samples/EasyMall/aspnet-core/src/EasyMall.EntityFrameworkCore/EasyMall.EntityFrameworkCore.csproj index 6141fa5a..f0f0b05b 100644 --- a/samples/EasyMall/aspnet-core/src/EasyMall.EntityFrameworkCore/EasyMall.EntityFrameworkCore.csproj +++ b/samples/EasyMall/aspnet-core/src/EasyMall.EntityFrameworkCore/EasyMall.EntityFrameworkCore.csproj @@ -8,11 +8,7 @@ - - - - - + diff --git a/samples/EasyMall/aspnet-core/src/EasyMall.EntityFrameworkCore/EntityFrameworkCore/EasyMallEntityFrameworkCoreModule.cs b/samples/EasyMall/aspnet-core/src/EasyMall.EntityFrameworkCore/EntityFrameworkCore/EasyMallEntityFrameworkCoreModule.cs index 34bdda16..5efc9575 100644 --- a/samples/EasyMall/aspnet-core/src/EasyMall.EntityFrameworkCore/EntityFrameworkCore/EasyMallEntityFrameworkCoreModule.cs +++ b/samples/EasyMall/aspnet-core/src/EasyMall.EntityFrameworkCore/EntityFrameworkCore/EasyMallEntityFrameworkCoreModule.cs @@ -1,8 +1,4 @@ -using EasyAbp.EShop.Baskets.EntityFrameworkCore; -using EasyAbp.EShop.Orders.EntityFrameworkCore; -using EasyAbp.EShop.Payments.EntityFrameworkCore; -using EasyAbp.EShop.Products.EntityFrameworkCore; -using EasyAbp.EShop.Stores.EntityFrameworkCore; +using EasyAbp.EShop.EntityFrameworkCore; using EasyAbp.PaymentService.WeChatPay.EntityFrameworkCore; using Microsoft.Extensions.DependencyInjection; using Volo.Abp.AuditLogging.EntityFrameworkCore; @@ -30,11 +26,7 @@ namespace EasyMall.EntityFrameworkCore typeof(AbpAuditLoggingEntityFrameworkCoreModule), typeof(AbpTenantManagementEntityFrameworkCoreModule), typeof(AbpFeatureManagementEntityFrameworkCoreModule), - typeof(EShopBasketsEntityFrameworkCoreModule), - typeof(EShopOrdersEntityFrameworkCoreModule), - typeof(EShopPaymentsEntityFrameworkCoreModule), - typeof(EShopProductsEntityFrameworkCoreModule), - typeof(EShopStoresEntityFrameworkCoreModule), + typeof(EShopEntityFrameworkCoreModule), typeof(PaymentServiceWeChatPayEntityFrameworkCoreModule) )] public class EasyMallEntityFrameworkCoreModule : AbpModule diff --git a/samples/EasyMall/aspnet-core/src/EasyMall.HttpApi.Client/EasyMall.HttpApi.Client.csproj b/samples/EasyMall/aspnet-core/src/EasyMall.HttpApi.Client/EasyMall.HttpApi.Client.csproj index 72c918d5..e5772e52 100644 --- a/samples/EasyMall/aspnet-core/src/EasyMall.HttpApi.Client/EasyMall.HttpApi.Client.csproj +++ b/samples/EasyMall/aspnet-core/src/EasyMall.HttpApi.Client/EasyMall.HttpApi.Client.csproj @@ -8,11 +8,7 @@ - - - - - + diff --git a/samples/EasyMall/aspnet-core/src/EasyMall.HttpApi.Client/EasyMallHttpApiClientModule.cs b/samples/EasyMall/aspnet-core/src/EasyMall.HttpApi.Client/EasyMallHttpApiClientModule.cs index d9058fe9..14ca6a7d 100644 --- a/samples/EasyMall/aspnet-core/src/EasyMall.HttpApi.Client/EasyMallHttpApiClientModule.cs +++ b/samples/EasyMall/aspnet-core/src/EasyMall.HttpApi.Client/EasyMallHttpApiClientModule.cs @@ -1,8 +1,4 @@ -using EasyAbp.EShop.Baskets; -using EasyAbp.EShop.Orders; -using EasyAbp.EShop.Payments; -using EasyAbp.EShop.Products; -using EasyAbp.EShop.Stores; +using EasyAbp.EShop; using EasyAbp.PaymentService.WeChatPay; using Microsoft.Extensions.DependencyInjection; using Volo.Abp.Account; @@ -21,11 +17,7 @@ namespace EasyMall typeof(AbpPermissionManagementHttpApiClientModule), typeof(AbpTenantManagementHttpApiClientModule), typeof(AbpFeatureManagementHttpApiClientModule), - typeof(EShopBasketsHttpApiClientModule), - typeof(EShopOrdersHttpApiClientModule), - typeof(EShopPaymentsHttpApiClientModule), - typeof(EShopProductsHttpApiClientModule), - typeof(EShopStoresHttpApiClientModule), + typeof(EShopHttpApiClientModule), typeof(PaymentServiceWeChatPayHttpApiClientModule) )] public class EasyMallHttpApiClientModule : AbpModule diff --git a/samples/EasyMall/aspnet-core/src/EasyMall.HttpApi/EasyMall.HttpApi.csproj b/samples/EasyMall/aspnet-core/src/EasyMall.HttpApi/EasyMall.HttpApi.csproj index 24d132e3..ad5bdfb3 100644 --- a/samples/EasyMall/aspnet-core/src/EasyMall.HttpApi/EasyMall.HttpApi.csproj +++ b/samples/EasyMall/aspnet-core/src/EasyMall.HttpApi/EasyMall.HttpApi.csproj @@ -8,11 +8,7 @@ - - - - - + diff --git a/samples/EasyMall/aspnet-core/src/EasyMall.HttpApi/EasyMallHttpApiModule.cs b/samples/EasyMall/aspnet-core/src/EasyMall.HttpApi/EasyMallHttpApiModule.cs index 7b9efd67..7dc94d8c 100644 --- a/samples/EasyMall/aspnet-core/src/EasyMall.HttpApi/EasyMallHttpApiModule.cs +++ b/samples/EasyMall/aspnet-core/src/EasyMall.HttpApi/EasyMallHttpApiModule.cs @@ -1,8 +1,4 @@ -using EasyAbp.EShop.Baskets; -using EasyAbp.EShop.Orders; -using EasyAbp.EShop.Payments; -using EasyAbp.EShop.Products; -using EasyAbp.EShop.Stores; +using EasyAbp.EShop; using EasyAbp.PaymentService.WeChatPay; using Volo.Abp.Account; using Volo.Abp.FeatureManagement; @@ -20,11 +16,7 @@ namespace EasyMall typeof(AbpPermissionManagementHttpApiModule), typeof(AbpTenantManagementHttpApiModule), typeof(AbpFeatureManagementHttpApiModule), - typeof(EShopBasketsHttpApiModule), - typeof(EShopOrdersHttpApiModule), - typeof(EShopPaymentsHttpApiModule), - typeof(EShopProductsHttpApiModule), - typeof(EShopStoresHttpApiModule), + typeof(EShopHttpApiModule), typeof(PaymentServiceWeChatPayHttpApiModule) )] public class EasyMallHttpApiModule : AbpModule diff --git a/samples/EasyMall/aspnet-core/src/EasyMall.Web/EasyMall.Web.csproj b/samples/EasyMall/aspnet-core/src/EasyMall.Web/EasyMall.Web.csproj index 592a7cf7..aae6648a 100644 --- a/samples/EasyMall/aspnet-core/src/EasyMall.Web/EasyMall.Web.csproj +++ b/samples/EasyMall/aspnet-core/src/EasyMall.Web/EasyMall.Web.csproj @@ -41,11 +41,7 @@ - - - - - + diff --git a/samples/EasyMall/aspnet-core/src/EasyMall.Web/EasyMallWebModule.cs b/samples/EasyMall/aspnet-core/src/EasyMall.Web/EasyMallWebModule.cs index 1be1e5a9..0cb61ac7 100644 --- a/samples/EasyMall/aspnet-core/src/EasyMall.Web/EasyMallWebModule.cs +++ b/samples/EasyMall/aspnet-core/src/EasyMall.Web/EasyMallWebModule.cs @@ -10,6 +10,7 @@ using EasyAbp.EShop.Products; using EasyAbp.EShop.Products.Web; using EasyAbp.EShop.Stores; using EasyAbp.EShop.Stores.Web; +using EasyAbp.EShop.Web; using EasyAbp.PaymentService; using EasyAbp.PaymentService.WeChatPay; using EasyAbp.PaymentService.WeChatPay.Web; @@ -63,11 +64,7 @@ namespace EasyMall.Web typeof(AbpAspNetCoreAuthenticationJwtBearerModule), typeof(AbpTenantManagementWebModule), typeof(AbpAspNetCoreSerilogModule), - typeof(EShopBasketsWebModule), - typeof(EShopOrdersWebModule), - typeof(EShopPaymentsWebModule), - typeof(EShopProductsWebModule), - typeof(EShopStoresWebModule), + typeof(EShopWebModule), typeof(PaymentServiceWeChatPayWebModule) )] public class EasyMallWebModule : AbpModule