From c53bc8d3feb0e69f335a4b89f29efe87c38bfb64 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=8E=8B=E5=86=9B?= <510423039@qq.com> Date: Fri, 5 Nov 2021 23:50:53 +0800 Subject: [PATCH 1/7] =?UTF-8?q?=E2=9C=A8=20=E8=B0=83=E6=95=B4=E9=A1=B9?= =?UTF-8?q?=E7=9B=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- aspnet-core/CompanyName.ProjectName.sln | 227 ++-- .../Lion.Abp.Cap.csproj} | 17 +- .../LionAbpCapConsumerServiceSelector.cs} | 6 +- .../LionAbpCapDistributedEventBus.cs} | 6 +- .../LionAbpCapModule.cs} | 4 +- .../LionAbpCapServiceCollectionExtensions.cs} | 6 +- .../ElasticsearchBasicRepository.cs | 3 +- .../ElasticsearchProvider.cs | 9 +- .../IElasticsearchProvider.cs | 5 +- .../Lion.Abp.ElasticSearch.csproj | 10 + .../LionAbpElasticSearchModule.cs | 9 + .../Lion.Abp.Domain/Lion.Abp.Domain.csproj | 12 + .../Lion.Abp.Domain/LionAbpDomainModule.cs | 13 + .../Lion.Abp.Domain/LionAbpDomainService.cs | 36 + .../Customs/Dtos/CustomeListResultDto.cs | 26 + .../Customs/Dtos/CustomePagedResultDto.cs | 21 + .../Customs/Dtos/FromSelector.cs | 41 + .../Customs/Dtos/IdInput.cs | 9 + .../Customs/Dtos/PagingBase.cs | 59 ++ .../src/Lion.Abp.Extension/Customs/Guard.cs | 302 ++++++ .../Customs/Http/HttpClientHelper.cs | 164 +++ .../Lion.Abp.Extension.csproj | 18 + .../System/BooleanExtensions.cs | 27 + .../Generic/CollectionExtensions.cs | 77 ++ .../Generic/EnumerableExtensions.cs | 199 ++++ .../System/DateTimeExtensions.cs | 78 ++ .../System/EnumExtensions.cs | 199 ++++ .../System/ExceptionExtensions.cs | 76 ++ .../System/Linq/QueryableExtensions.cs | 28 + .../System/Reflection/AssemblyExtensions.cs | 26 + .../System/Reflection/MemberInfoExtensions.cs | 73 ++ .../System/Reflection/MethodInfoExtensions.cs | 31 + .../Reflection/PropertyInfoExtensions.cs | 24 + .../System/StringExtensions.cs | 981 ++++++++++++++++++ .../System/Text/StringBuilderExtensions.cs | 241 +++++ ...mpanyName.ProjectName.PublicGateway.csproj | 11 + .../Controllers/WeatherForecastController.cs | 40 + .../Program.cs | 23 + .../Properties/launchSettings.json | 31 + .../Startup.cs | 58 ++ .../WeatherForecast.cs | 15 + .../appsettings.Development.json | 9 + .../appsettings.json | 10 + .../CompanyName.ProjectName.WebGateway.csproj | 11 + .../Controllers/WeatherForecastController.cs | 40 + .../Program.cs | 23 + .../Properties/launchSettings.json | 31 + .../Startup.cs | 58 ++ .../WeatherForecast.cs | 15 + .../appsettings.Development.json | 9 + .../appsettings.json | 10 + .../Dtos/PagingDataDictionaryDetailInput.cs | 3 +- .../Dtos/PagingDataDictionaryInput.cs | 2 +- .../DataDictionaryAppService.cs | 2 - ...aDictionaryManagement.Domain.Shared.csproj | 2 +- ...ame.DataDictionaryManagement.Domain.csproj | 2 + .../Aggregates/DataDictionary.cs | 2 +- .../Aggregates/DataDictionaryDetail.cs | 2 +- .../DataDictionaryManagementDomainModule.cs | 6 +- ...me.DataDictionaryManagement.MongoDB.csproj | 14 - .../FodyWeavers.xml | 3 - .../FodyWeavers.xsd | 30 - .../DataDictionaryManagementMongoDbContext.cs | 20 - ...onaryManagementMongoDbContextExtensions.cs | 22 - .../DataDictionaryManagementMongoDbModule.cs | 23 - ...ntMongoModelBuilderConfigurationOptions.cs | 14 - ...IDataDictionaryManagementMongoDbContext.cs | 13 - ...ionManagement.Application.Contracts.csproj | 1 - .../Dtos/PagingNotificationListInput.cs | 3 +- ...otificationManagement.Domain.Shared.csproj | 46 +- ...tName.NotificationManagement.Domain.csproj | 2 +- .../NotificationManagementDomainService.cs | 6 +- .../Notifications/Aggregates/Notification.cs | 2 +- ...Name.NotificationManagement.MongoDB.csproj | 15 - .../FodyWeavers.xml | 3 - .../FodyWeavers.xsd | 30 - .../INotificationManagementMongoDbContext.cs | 13 - .../NotificationManagementMongoDbContext.cs | 20 - ...ationManagementMongoDbContextExtensions.cs | 22 - .../NotificationManagementMongoDbModule.cs | 23 - ...ntMongoModelBuilderConfigurationOptions.cs | 14 - ...eryManagement.Application.Contracts.csproj | 17 - .../ElasticSearchs/ILogAppService.cs | 12 - .../FodyWeavers.xml | 3 - .../FodyWeavers.xsd | 30 - ...yManagementPermissionDefinitionProvider.cs | 21 - .../Permissions/QueryManagementPermissions.cs | 23 - ...eryManagementApplicationContractsModule.cs | 16 - ...ectName.QueryManagement.Application.csproj | 18 - .../ElasticSearchs/LogAppService.cs | 35 - .../FodyWeavers.xml | 3 - .../FodyWeavers.xsd | 30 - .../QueryManagementAppService.cs | 14 - ...yManagementApplicationAutoMapperProfile.cs | 14 - .../QueryManagementApplicationModule.cs | 27 - ...tName.QueryManagement.Domain.Shared.csproj | 29 - .../Dtos/PagingElasticSearchLogInput.cs | 14 - .../Dtos/PagingElasticSearchLogOutput.cs | 30 - .../FodyWeavers.xml | 3 - .../FodyWeavers.xsd | 30 - .../Localization/QueryManagement/ar.json | 7 - .../Localization/QueryManagement/cs.json | 7 - .../Localization/QueryManagement/de-DE.json | 7 - .../Localization/QueryManagement/en-GB.json | 7 - .../Localization/QueryManagement/en.json | 8 - .../Localization/QueryManagement/es.json | 7 - .../Localization/QueryManagement/fr.json | 7 - .../Localization/QueryManagement/hu.json | 7 - .../Localization/QueryManagement/nl.json | 7 - .../Localization/QueryManagement/pl-PL.json | 6 - .../Localization/QueryManagement/pt-BR.json | 6 - .../Localization/QueryManagement/sl.json | 6 - .../Localization/QueryManagement/tr.json | 7 - .../Localization/QueryManagement/vi.json | 6 - .../Localization/QueryManagement/zh-Hans.json | 8 - .../Localization/QueryManagement/zh-Hant.json | 6 - .../Localization/QueryManagementResource.cs | 10 - .../QueryManagementDomainSharedModule.cs | 37 - .../QueryManagementErrorCodes.cs | 7 - .../Systems/Users/AbpUserFreeSqlDto.cs | 13 - ....ProjectName.QueryManagement.Domain.csproj | 15 - .../ICompanyNameProjectNameLogRepository.cs | 17 - .../FodyWeavers.xml | 3 - .../FodyWeavers.xsd | 30 - .../QueryManagementDbProperties.cs | 12 - .../QueryManagementDomainModule.cs | 14 - ...ueryManagementSettingDefinitionProvider.cs | 14 - .../Settings/QueryManagementSettings.cs | 11 - .../Systems/Users/IUserFreeSqlRepository.cs | 10 - ...tName.QueryManagement.ElasticSearch.csproj | 13 - .../CompanyNameProjectNameLogRepository.cs | 60 -- .../QueryManagementElasticsearchModule.cs | 12 - ...QueryManagement.EntityFrameworkCore.csproj | 15 - .../IQueryManagementDbContext.cs | 13 - .../QueryManagementDbContext.cs | 27 - ...agementDbContextModelCreatingExtensions.cs | 43 - ...ueryManagementEntityFrameworkCoreModule.cs | 23 - ...agementModelBuilderConfigurationOptions.cs | 18 - .../FodyWeavers.xml | 3 - .../FodyWeavers.xsd | 30 - ...ctName.QueryManagement.FreeSqlMySql.csproj | 16 - .../Systems/Users/UserFreeSqlRepository.cs | 26 - ...Name.QueryManagement.HttpApi.Client.csproj | 15 - .../FodyWeavers.xml | 3 - .../FodyWeavers.xsd | 30 - .../QueryManagementHttpApiClientModule.cs | 22 - ...ProjectName.QueryManagement.HttpApi.csproj | 15 - .../ElasticSearchs/ElasticSearchController.cs | 30 - .../FodyWeavers.xml | 3 - .../FodyWeavers.xsd | 30 - .../QueryManagementController.cs | 13 - .../QueryManagementHttpApiModule.cs | 33 - ...ProjectName.QueryManagement.MongoDB.csproj | 15 - .../FodyWeavers.xml | 3 - .../FodyWeavers.xsd | 30 - .../MongoDB/IQueryManagementMongoDbContext.cs | 13 - .../MongoDB/QueryManagementMongoDbContext.cs | 20 - ...QueryManagementMongoDbContextExtensions.cs | 22 - .../MongoDB/QueryManagementMongoDbModule.cs | 23 - ...ntMongoModelBuilderConfigurationOptions.cs | 14 - ...e.QueryManagement.Application.Tests.csproj | 16 - .../FodyWeavers.xml | 3 - .../FodyWeavers.xsd | 30 - .../QueryManagementApplicationTestBase.cs | 10 - .../QueryManagementApplicationTestModule.cs | 13 - ...ctName.QueryManagement.Domain.Tests.csproj | 15 - .../FodyWeavers.xml | 3 - .../FodyWeavers.xsd | 30 - .../QueryManagementDomainTestBase.cs | 10 - .../QueryManagementDomainTestModule.cs | 17 - .../Samples/SampleManager_Tests.cs | 15 - ...anagement.EntityFrameworkCore.Tests.csproj | 18 - ...ryManagementEntityFrameworkCoreTestBase.cs | 10 - ...ManagementEntityFrameworkCoreTestModule.cs | 43 - .../Samples/SampleRepository_Tests.cs | 12 - .../FodyWeavers.xml | 3 - .../FodyWeavers.xsd | 30 - ...tName.QueryManagement.MongoDB.Tests.csproj | 17 - .../FodyWeavers.xml | 3 - .../FodyWeavers.xsd | 30 - .../MongoDB/MongoDbFixture.cs | 22 - .../MongoDB/MongoTestCollection.cs | 10 - .../MongoDB/QueryManagementMongoDbTestBase.cs | 10 - .../QueryManagementMongoDbTestModule.cs | 27 - .../MongoDB/Samples/SampleRepository_Tests.cs | 14 - ...rojectName.QueryManagement.TestBase.csproj | 23 - .../FodyWeavers.xml | 3 - .../FodyWeavers.xsd | 30 - .../QueryManagementDataSeedContributor.cs | 33 - .../QueryManagementTestBase.cs | 60 -- .../QueryManagementTestBaseModule.cs | 42 - .../Samples/SampleRepository_Tests.cs | 22 - .../Security/FakeCurrentPrincipalAccessor.cs | 43 - ...ompanyName.ProjectName.HttpApi.Host.csproj | 2 +- .../ProjectNameHttpApiHostModule.cs | 13 +- .../Properties/launchSettings.json | 2 +- .../AuditLogs/PagingAuditLogListInput.cs | 2 +- .../Dtos/PagingApiRseourceListInput.cs | 2 +- .../ApiResources/IApiResourceAppService.cs | 2 +- .../ApiScopes/Dtos/PagingApiScopeListInput.cs | 2 +- .../ApiScopes/IApiScopeAppService.cs | 6 +- .../Clients/Dtos/PagingClientListInput.cs | 2 +- .../IIdentityServerClientAppService.cs | 2 +- .../Dtos/PagingIdentityResourceListInput.cs | 2 +- .../IIdentityResourceAppService.cs | 2 +- .../Roles/Dtos/PagingRoleListInput.cs | 3 +- .../Tenants/Dtos/PagingTenantInput.cs | 2 +- .../Users/Dtos/PagingUserListInput.cs | 3 +- ...CompanyName.ProjectName.Application.csproj | 3 +- .../HttpClientNameConsts.cs | 13 + .../ApiResources/ApiResourceAppService.cs | 2 +- .../ApiScopes/ApiScopeAppService.cs | 3 +- .../Clients/IdentityServerClientAppService.cs | 4 +- .../IdentityResourceAppService.cs | 3 +- .../ProjectNameApplicationModule.cs | 7 +- .../Users/LoginAppService.cs | 8 +- .../Users/UserAppService.cs | 1 - .../appsettings.json | 2 +- ...mpanyName.ProjectName.Domain.Shared.csproj | 4 +- .../CompanyName.ProjectName.Domain.csproj | 1 - .../Seeds/AbpSettingDataSeedContributor.cs | 28 + .../IdentityServerDataSeedContributor.cs | 0 .../Seeds}/UserDataSeedContributor.cs | 0 .../ProjectNameDomainModule.cs | 4 +- ...ame.ProjectName.EntityFrameworkCore.csproj | 1 - .../ProjectNameDbContext.cs | 66 +- .../ProjectNameEntityFrameworkCoreModule.cs | 2 - ...yName.ProjectName.FreeSqlRepository.csproj | 14 + .../FreeSqlBasicRepository.cs | 5 +- .../FreeSqlRepositoryModule.cs} | 23 +- .../CompanyName.ProjectName.HttpApi.csproj | 1 - .../IdentityServers/ApiResourceController.cs | 2 +- .../IdentityServers/ApiScopeController.cs | 6 +- .../IdentityServers/ClientController.cs | 2 +- .../IdentityResourceController.cs | 2 +- .../Controllers/Systems/AccountController.cs | 3 + .../Controllers/Systems/RoleController.cs | 6 +- .../Controllers/Systems/UserController.cs | 5 +- .../Controllers/Tenants/TenantController.cs | 2 +- .../ProjectNameHttpApiModule.cs | 5 +- ...ProjectName.Shared.Hosting.Gateways.csproj | 15 + .../SharedHostingGatewayModule.cs | 30 + ...ctName.Shared.Hosting.Microservices.csproj | 20 + .../Builder/ApplicationBuilderExtensions.cs | 53 + .../ServiceCollectionExtensions.cs | 19 + .../SharedHostingMicroserviceModule.cs | 104 ++ .../Swaggers/EnumSchemaFilter.cs | 28 + .../Swaggers/HiddenAbpDefaultApiFilter.cs | 53 + .../DefaultHttpExceptionStatusCodeFinder.cs | 74 ++ vben271/src/hooks/web/useSignalR.ts | 42 +- vben271/src/store/modules/permission.ts | 2 +- 251 files changed, 3900 insertions(+), 2603 deletions(-) rename aspnet-core/frameworks/CAP/src/{CompanyName.ProjectName.CAP/CompanyName.ProjectName.CAP.csproj => Lion.Abp.Cap/Lion.Abp.Cap.csproj} (58%) rename aspnet-core/frameworks/CAP/src/{CompanyName.ProjectName.CAP/AbpCapConsumerServiceSelector.cs => Lion.Abp.Cap/LionAbpCapConsumerServiceSelector.cs} (96%) rename aspnet-core/frameworks/CAP/src/{CompanyName.ProjectName.CAP/AbpCapDistributedEventBus.cs => Lion.Abp.Cap/LionAbpCapDistributedEventBus.cs} (97%) rename aspnet-core/frameworks/CAP/src/{CompanyName.ProjectName.CAP/AbpCapModule.cs => Lion.Abp.Cap/LionAbpCapModule.cs} (58%) rename aspnet-core/frameworks/CAP/src/{CompanyName.ProjectName.CAP/AbpCapServiceCollectionExtensions.cs => Lion.Abp.Cap/LionAbpCapServiceCollectionExtensions.cs} (85%) rename aspnet-core/{modules/QueryManagement/src/CompanyName.ProjectName.QueryManagement.ElasticSearch => frameworks/ElasticSearch/src/Lion.Abp.ElasticSearch}/ElasticsearchBasicRepository.cs (82%) rename aspnet-core/{modules/QueryManagement/src/CompanyName.ProjectName.QueryManagement.ElasticSearch => frameworks/ElasticSearch/src/Lion.Abp.ElasticSearch}/ElasticsearchProvider.cs (73%) rename aspnet-core/{modules/QueryManagement/src/CompanyName.ProjectName.QueryManagement.ElasticSearch => frameworks/ElasticSearch/src/Lion.Abp.ElasticSearch}/IElasticsearchProvider.cs (63%) create mode 100644 aspnet-core/frameworks/ElasticSearch/src/Lion.Abp.ElasticSearch/Lion.Abp.ElasticSearch.csproj create mode 100644 aspnet-core/frameworks/ElasticSearch/src/Lion.Abp.ElasticSearch/LionAbpElasticSearchModule.cs create mode 100644 aspnet-core/frameworks/Extensions/src/Lion.Abp.Domain/Lion.Abp.Domain.csproj create mode 100644 aspnet-core/frameworks/Extensions/src/Lion.Abp.Domain/LionAbpDomainModule.cs create mode 100644 aspnet-core/frameworks/Extensions/src/Lion.Abp.Domain/LionAbpDomainService.cs create mode 100644 aspnet-core/frameworks/Extensions/src/Lion.Abp.Extension/Customs/Dtos/CustomeListResultDto.cs create mode 100644 aspnet-core/frameworks/Extensions/src/Lion.Abp.Extension/Customs/Dtos/CustomePagedResultDto.cs create mode 100644 aspnet-core/frameworks/Extensions/src/Lion.Abp.Extension/Customs/Dtos/FromSelector.cs create mode 100644 aspnet-core/frameworks/Extensions/src/Lion.Abp.Extension/Customs/Dtos/IdInput.cs create mode 100644 aspnet-core/frameworks/Extensions/src/Lion.Abp.Extension/Customs/Dtos/PagingBase.cs create mode 100644 aspnet-core/frameworks/Extensions/src/Lion.Abp.Extension/Customs/Guard.cs create mode 100644 aspnet-core/frameworks/Extensions/src/Lion.Abp.Extension/Customs/Http/HttpClientHelper.cs create mode 100644 aspnet-core/frameworks/Extensions/src/Lion.Abp.Extension/Lion.Abp.Extension.csproj create mode 100644 aspnet-core/frameworks/Extensions/src/Lion.Abp.Extension/System/BooleanExtensions.cs create mode 100644 aspnet-core/frameworks/Extensions/src/Lion.Abp.Extension/System/Collections/Generic/CollectionExtensions.cs create mode 100644 aspnet-core/frameworks/Extensions/src/Lion.Abp.Extension/System/Collections/Generic/EnumerableExtensions.cs create mode 100644 aspnet-core/frameworks/Extensions/src/Lion.Abp.Extension/System/DateTimeExtensions.cs create mode 100644 aspnet-core/frameworks/Extensions/src/Lion.Abp.Extension/System/EnumExtensions.cs create mode 100644 aspnet-core/frameworks/Extensions/src/Lion.Abp.Extension/System/ExceptionExtensions.cs create mode 100644 aspnet-core/frameworks/Extensions/src/Lion.Abp.Extension/System/Linq/QueryableExtensions.cs create mode 100644 aspnet-core/frameworks/Extensions/src/Lion.Abp.Extension/System/Reflection/AssemblyExtensions.cs create mode 100644 aspnet-core/frameworks/Extensions/src/Lion.Abp.Extension/System/Reflection/MemberInfoExtensions.cs create mode 100644 aspnet-core/frameworks/Extensions/src/Lion.Abp.Extension/System/Reflection/MethodInfoExtensions.cs create mode 100644 aspnet-core/frameworks/Extensions/src/Lion.Abp.Extension/System/Reflection/PropertyInfoExtensions.cs create mode 100644 aspnet-core/frameworks/Extensions/src/Lion.Abp.Extension/System/StringExtensions.cs create mode 100644 aspnet-core/frameworks/Extensions/src/Lion.Abp.Extension/System/Text/StringBuilderExtensions.cs create mode 100644 aspnet-core/gateways/CompanyName.ProjectName.PublicGateway/CompanyName.ProjectName.PublicGateway.csproj create mode 100644 aspnet-core/gateways/CompanyName.ProjectName.PublicGateway/Controllers/WeatherForecastController.cs create mode 100644 aspnet-core/gateways/CompanyName.ProjectName.PublicGateway/Program.cs create mode 100644 aspnet-core/gateways/CompanyName.ProjectName.PublicGateway/Properties/launchSettings.json create mode 100644 aspnet-core/gateways/CompanyName.ProjectName.PublicGateway/Startup.cs create mode 100644 aspnet-core/gateways/CompanyName.ProjectName.PublicGateway/WeatherForecast.cs create mode 100644 aspnet-core/gateways/CompanyName.ProjectName.PublicGateway/appsettings.Development.json create mode 100644 aspnet-core/gateways/CompanyName.ProjectName.PublicGateway/appsettings.json create mode 100644 aspnet-core/gateways/CompanyName.ProjectName.WebGateway/CompanyName.ProjectName.WebGateway.csproj create mode 100644 aspnet-core/gateways/CompanyName.ProjectName.WebGateway/Controllers/WeatherForecastController.cs create mode 100644 aspnet-core/gateways/CompanyName.ProjectName.WebGateway/Program.cs create mode 100644 aspnet-core/gateways/CompanyName.ProjectName.WebGateway/Properties/launchSettings.json create mode 100644 aspnet-core/gateways/CompanyName.ProjectName.WebGateway/Startup.cs create mode 100644 aspnet-core/gateways/CompanyName.ProjectName.WebGateway/WeatherForecast.cs create mode 100644 aspnet-core/gateways/CompanyName.ProjectName.WebGateway/appsettings.Development.json create mode 100644 aspnet-core/gateways/CompanyName.ProjectName.WebGateway/appsettings.json delete mode 100644 aspnet-core/modules/DataDictionaryManagement/src/CompanyName.ProjectName.DataDictionaryManagement.MongoDB/CompanyName.ProjectName.DataDictionaryManagement.MongoDB.csproj delete mode 100644 aspnet-core/modules/DataDictionaryManagement/src/CompanyName.ProjectName.DataDictionaryManagement.MongoDB/FodyWeavers.xml delete mode 100644 aspnet-core/modules/DataDictionaryManagement/src/CompanyName.ProjectName.DataDictionaryManagement.MongoDB/FodyWeavers.xsd delete mode 100644 aspnet-core/modules/DataDictionaryManagement/src/CompanyName.ProjectName.DataDictionaryManagement.MongoDB/MongoDB/DataDictionaryManagementMongoDbContext.cs delete mode 100644 aspnet-core/modules/DataDictionaryManagement/src/CompanyName.ProjectName.DataDictionaryManagement.MongoDB/MongoDB/DataDictionaryManagementMongoDbContextExtensions.cs delete mode 100644 aspnet-core/modules/DataDictionaryManagement/src/CompanyName.ProjectName.DataDictionaryManagement.MongoDB/MongoDB/DataDictionaryManagementMongoDbModule.cs delete mode 100644 aspnet-core/modules/DataDictionaryManagement/src/CompanyName.ProjectName.DataDictionaryManagement.MongoDB/MongoDB/DataDictionaryManagementMongoModelBuilderConfigurationOptions.cs delete mode 100644 aspnet-core/modules/DataDictionaryManagement/src/CompanyName.ProjectName.DataDictionaryManagement.MongoDB/MongoDB/IDataDictionaryManagementMongoDbContext.cs delete mode 100644 aspnet-core/modules/NotificationManagement/src/CompanyName.ProjectName.NotificationManagement.MongoDB/CompanyName.ProjectName.NotificationManagement.MongoDB.csproj delete mode 100644 aspnet-core/modules/NotificationManagement/src/CompanyName.ProjectName.NotificationManagement.MongoDB/FodyWeavers.xml delete mode 100644 aspnet-core/modules/NotificationManagement/src/CompanyName.ProjectName.NotificationManagement.MongoDB/FodyWeavers.xsd delete mode 100644 aspnet-core/modules/NotificationManagement/src/CompanyName.ProjectName.NotificationManagement.MongoDB/MongoDB/INotificationManagementMongoDbContext.cs delete mode 100644 aspnet-core/modules/NotificationManagement/src/CompanyName.ProjectName.NotificationManagement.MongoDB/MongoDB/NotificationManagementMongoDbContext.cs delete mode 100644 aspnet-core/modules/NotificationManagement/src/CompanyName.ProjectName.NotificationManagement.MongoDB/MongoDB/NotificationManagementMongoDbContextExtensions.cs delete mode 100644 aspnet-core/modules/NotificationManagement/src/CompanyName.ProjectName.NotificationManagement.MongoDB/MongoDB/NotificationManagementMongoDbModule.cs delete mode 100644 aspnet-core/modules/NotificationManagement/src/CompanyName.ProjectName.NotificationManagement.MongoDB/MongoDB/NotificationManagementMongoModelBuilderConfigurationOptions.cs delete mode 100644 aspnet-core/modules/QueryManagement/src/CompanyName.ProjectName.QueryManagement.Application.Contracts/CompanyName.ProjectName.QueryManagement.Application.Contracts.csproj delete mode 100644 aspnet-core/modules/QueryManagement/src/CompanyName.ProjectName.QueryManagement.Application.Contracts/ElasticSearchs/ILogAppService.cs delete mode 100644 aspnet-core/modules/QueryManagement/src/CompanyName.ProjectName.QueryManagement.Application.Contracts/FodyWeavers.xml delete mode 100644 aspnet-core/modules/QueryManagement/src/CompanyName.ProjectName.QueryManagement.Application.Contracts/FodyWeavers.xsd delete mode 100644 aspnet-core/modules/QueryManagement/src/CompanyName.ProjectName.QueryManagement.Application.Contracts/Permissions/QueryManagementPermissionDefinitionProvider.cs delete mode 100644 aspnet-core/modules/QueryManagement/src/CompanyName.ProjectName.QueryManagement.Application.Contracts/Permissions/QueryManagementPermissions.cs delete mode 100644 aspnet-core/modules/QueryManagement/src/CompanyName.ProjectName.QueryManagement.Application.Contracts/QueryManagementApplicationContractsModule.cs delete mode 100644 aspnet-core/modules/QueryManagement/src/CompanyName.ProjectName.QueryManagement.Application/CompanyName.ProjectName.QueryManagement.Application.csproj delete mode 100644 aspnet-core/modules/QueryManagement/src/CompanyName.ProjectName.QueryManagement.Application/ElasticSearchs/LogAppService.cs delete mode 100644 aspnet-core/modules/QueryManagement/src/CompanyName.ProjectName.QueryManagement.Application/FodyWeavers.xml delete mode 100644 aspnet-core/modules/QueryManagement/src/CompanyName.ProjectName.QueryManagement.Application/FodyWeavers.xsd delete mode 100644 aspnet-core/modules/QueryManagement/src/CompanyName.ProjectName.QueryManagement.Application/QueryManagementAppService.cs delete mode 100644 aspnet-core/modules/QueryManagement/src/CompanyName.ProjectName.QueryManagement.Application/QueryManagementApplicationAutoMapperProfile.cs delete mode 100644 aspnet-core/modules/QueryManagement/src/CompanyName.ProjectName.QueryManagement.Application/QueryManagementApplicationModule.cs delete mode 100644 aspnet-core/modules/QueryManagement/src/CompanyName.ProjectName.QueryManagement.Domain.Shared/CompanyName.ProjectName.QueryManagement.Domain.Shared.csproj delete mode 100644 aspnet-core/modules/QueryManagement/src/CompanyName.ProjectName.QueryManagement.Domain.Shared/ElasticSearchs/Dtos/PagingElasticSearchLogInput.cs delete mode 100644 aspnet-core/modules/QueryManagement/src/CompanyName.ProjectName.QueryManagement.Domain.Shared/ElasticSearchs/Dtos/PagingElasticSearchLogOutput.cs delete mode 100644 aspnet-core/modules/QueryManagement/src/CompanyName.ProjectName.QueryManagement.Domain.Shared/FodyWeavers.xml delete mode 100644 aspnet-core/modules/QueryManagement/src/CompanyName.ProjectName.QueryManagement.Domain.Shared/FodyWeavers.xsd delete mode 100644 aspnet-core/modules/QueryManagement/src/CompanyName.ProjectName.QueryManagement.Domain.Shared/Localization/QueryManagement/ar.json delete mode 100644 aspnet-core/modules/QueryManagement/src/CompanyName.ProjectName.QueryManagement.Domain.Shared/Localization/QueryManagement/cs.json delete mode 100644 aspnet-core/modules/QueryManagement/src/CompanyName.ProjectName.QueryManagement.Domain.Shared/Localization/QueryManagement/de-DE.json delete mode 100644 aspnet-core/modules/QueryManagement/src/CompanyName.ProjectName.QueryManagement.Domain.Shared/Localization/QueryManagement/en-GB.json delete mode 100644 aspnet-core/modules/QueryManagement/src/CompanyName.ProjectName.QueryManagement.Domain.Shared/Localization/QueryManagement/en.json delete mode 100644 aspnet-core/modules/QueryManagement/src/CompanyName.ProjectName.QueryManagement.Domain.Shared/Localization/QueryManagement/es.json delete mode 100644 aspnet-core/modules/QueryManagement/src/CompanyName.ProjectName.QueryManagement.Domain.Shared/Localization/QueryManagement/fr.json delete mode 100644 aspnet-core/modules/QueryManagement/src/CompanyName.ProjectName.QueryManagement.Domain.Shared/Localization/QueryManagement/hu.json delete mode 100644 aspnet-core/modules/QueryManagement/src/CompanyName.ProjectName.QueryManagement.Domain.Shared/Localization/QueryManagement/nl.json delete mode 100644 aspnet-core/modules/QueryManagement/src/CompanyName.ProjectName.QueryManagement.Domain.Shared/Localization/QueryManagement/pl-PL.json delete mode 100644 aspnet-core/modules/QueryManagement/src/CompanyName.ProjectName.QueryManagement.Domain.Shared/Localization/QueryManagement/pt-BR.json delete mode 100644 aspnet-core/modules/QueryManagement/src/CompanyName.ProjectName.QueryManagement.Domain.Shared/Localization/QueryManagement/sl.json delete mode 100644 aspnet-core/modules/QueryManagement/src/CompanyName.ProjectName.QueryManagement.Domain.Shared/Localization/QueryManagement/tr.json delete mode 100644 aspnet-core/modules/QueryManagement/src/CompanyName.ProjectName.QueryManagement.Domain.Shared/Localization/QueryManagement/vi.json delete mode 100644 aspnet-core/modules/QueryManagement/src/CompanyName.ProjectName.QueryManagement.Domain.Shared/Localization/QueryManagement/zh-Hans.json delete mode 100644 aspnet-core/modules/QueryManagement/src/CompanyName.ProjectName.QueryManagement.Domain.Shared/Localization/QueryManagement/zh-Hant.json delete mode 100644 aspnet-core/modules/QueryManagement/src/CompanyName.ProjectName.QueryManagement.Domain.Shared/Localization/QueryManagementResource.cs delete mode 100644 aspnet-core/modules/QueryManagement/src/CompanyName.ProjectName.QueryManagement.Domain.Shared/QueryManagementDomainSharedModule.cs delete mode 100644 aspnet-core/modules/QueryManagement/src/CompanyName.ProjectName.QueryManagement.Domain.Shared/QueryManagementErrorCodes.cs delete mode 100644 aspnet-core/modules/QueryManagement/src/CompanyName.ProjectName.QueryManagement.Domain.Shared/Systems/Users/AbpUserFreeSqlDto.cs delete mode 100644 aspnet-core/modules/QueryManagement/src/CompanyName.ProjectName.QueryManagement.Domain/CompanyName.ProjectName.QueryManagement.Domain.csproj delete mode 100644 aspnet-core/modules/QueryManagement/src/CompanyName.ProjectName.QueryManagement.Domain/ElasticSearchs/ICompanyNameProjectNameLogRepository.cs delete mode 100644 aspnet-core/modules/QueryManagement/src/CompanyName.ProjectName.QueryManagement.Domain/FodyWeavers.xml delete mode 100644 aspnet-core/modules/QueryManagement/src/CompanyName.ProjectName.QueryManagement.Domain/FodyWeavers.xsd delete mode 100644 aspnet-core/modules/QueryManagement/src/CompanyName.ProjectName.QueryManagement.Domain/QueryManagementDbProperties.cs delete mode 100644 aspnet-core/modules/QueryManagement/src/CompanyName.ProjectName.QueryManagement.Domain/QueryManagementDomainModule.cs delete mode 100644 aspnet-core/modules/QueryManagement/src/CompanyName.ProjectName.QueryManagement.Domain/Settings/QueryManagementSettingDefinitionProvider.cs delete mode 100644 aspnet-core/modules/QueryManagement/src/CompanyName.ProjectName.QueryManagement.Domain/Settings/QueryManagementSettings.cs delete mode 100644 aspnet-core/modules/QueryManagement/src/CompanyName.ProjectName.QueryManagement.Domain/Systems/Users/IUserFreeSqlRepository.cs delete mode 100644 aspnet-core/modules/QueryManagement/src/CompanyName.ProjectName.QueryManagement.ElasticSearch/CompanyName.ProjectName.QueryManagement.ElasticSearch.csproj delete mode 100644 aspnet-core/modules/QueryManagement/src/CompanyName.ProjectName.QueryManagement.ElasticSearch/CompanyNameProjectNameLogRepository.cs delete mode 100644 aspnet-core/modules/QueryManagement/src/CompanyName.ProjectName.QueryManagement.ElasticSearch/QueryManagementElasticsearchModule.cs delete mode 100644 aspnet-core/modules/QueryManagement/src/CompanyName.ProjectName.QueryManagement.EntityFrameworkCore/CompanyName.ProjectName.QueryManagement.EntityFrameworkCore.csproj delete mode 100644 aspnet-core/modules/QueryManagement/src/CompanyName.ProjectName.QueryManagement.EntityFrameworkCore/EntityFrameworkCore/IQueryManagementDbContext.cs delete mode 100644 aspnet-core/modules/QueryManagement/src/CompanyName.ProjectName.QueryManagement.EntityFrameworkCore/EntityFrameworkCore/QueryManagementDbContext.cs delete mode 100644 aspnet-core/modules/QueryManagement/src/CompanyName.ProjectName.QueryManagement.EntityFrameworkCore/EntityFrameworkCore/QueryManagementDbContextModelCreatingExtensions.cs delete mode 100644 aspnet-core/modules/QueryManagement/src/CompanyName.ProjectName.QueryManagement.EntityFrameworkCore/EntityFrameworkCore/QueryManagementEntityFrameworkCoreModule.cs delete mode 100644 aspnet-core/modules/QueryManagement/src/CompanyName.ProjectName.QueryManagement.EntityFrameworkCore/EntityFrameworkCore/QueryManagementModelBuilderConfigurationOptions.cs delete mode 100644 aspnet-core/modules/QueryManagement/src/CompanyName.ProjectName.QueryManagement.EntityFrameworkCore/FodyWeavers.xml delete mode 100644 aspnet-core/modules/QueryManagement/src/CompanyName.ProjectName.QueryManagement.EntityFrameworkCore/FodyWeavers.xsd delete mode 100644 aspnet-core/modules/QueryManagement/src/CompanyName.ProjectName.QueryManagement.FreeSqlMySql/CompanyName.ProjectName.QueryManagement.FreeSqlMySql.csproj delete mode 100644 aspnet-core/modules/QueryManagement/src/CompanyName.ProjectName.QueryManagement.FreeSqlMySql/Systems/Users/UserFreeSqlRepository.cs delete mode 100644 aspnet-core/modules/QueryManagement/src/CompanyName.ProjectName.QueryManagement.HttpApi.Client/CompanyName.ProjectName.QueryManagement.HttpApi.Client.csproj delete mode 100644 aspnet-core/modules/QueryManagement/src/CompanyName.ProjectName.QueryManagement.HttpApi.Client/FodyWeavers.xml delete mode 100644 aspnet-core/modules/QueryManagement/src/CompanyName.ProjectName.QueryManagement.HttpApi.Client/FodyWeavers.xsd delete mode 100644 aspnet-core/modules/QueryManagement/src/CompanyName.ProjectName.QueryManagement.HttpApi.Client/QueryManagementHttpApiClientModule.cs delete mode 100644 aspnet-core/modules/QueryManagement/src/CompanyName.ProjectName.QueryManagement.HttpApi/CompanyName.ProjectName.QueryManagement.HttpApi.csproj delete mode 100644 aspnet-core/modules/QueryManagement/src/CompanyName.ProjectName.QueryManagement.HttpApi/ElasticSearchs/ElasticSearchController.cs delete mode 100644 aspnet-core/modules/QueryManagement/src/CompanyName.ProjectName.QueryManagement.HttpApi/FodyWeavers.xml delete mode 100644 aspnet-core/modules/QueryManagement/src/CompanyName.ProjectName.QueryManagement.HttpApi/FodyWeavers.xsd delete mode 100644 aspnet-core/modules/QueryManagement/src/CompanyName.ProjectName.QueryManagement.HttpApi/QueryManagementController.cs delete mode 100644 aspnet-core/modules/QueryManagement/src/CompanyName.ProjectName.QueryManagement.HttpApi/QueryManagementHttpApiModule.cs delete mode 100644 aspnet-core/modules/QueryManagement/src/CompanyName.ProjectName.QueryManagement.MongoDB/CompanyName.ProjectName.QueryManagement.MongoDB.csproj delete mode 100644 aspnet-core/modules/QueryManagement/src/CompanyName.ProjectName.QueryManagement.MongoDB/FodyWeavers.xml delete mode 100644 aspnet-core/modules/QueryManagement/src/CompanyName.ProjectName.QueryManagement.MongoDB/FodyWeavers.xsd delete mode 100644 aspnet-core/modules/QueryManagement/src/CompanyName.ProjectName.QueryManagement.MongoDB/MongoDB/IQueryManagementMongoDbContext.cs delete mode 100644 aspnet-core/modules/QueryManagement/src/CompanyName.ProjectName.QueryManagement.MongoDB/MongoDB/QueryManagementMongoDbContext.cs delete mode 100644 aspnet-core/modules/QueryManagement/src/CompanyName.ProjectName.QueryManagement.MongoDB/MongoDB/QueryManagementMongoDbContextExtensions.cs delete mode 100644 aspnet-core/modules/QueryManagement/src/CompanyName.ProjectName.QueryManagement.MongoDB/MongoDB/QueryManagementMongoDbModule.cs delete mode 100644 aspnet-core/modules/QueryManagement/src/CompanyName.ProjectName.QueryManagement.MongoDB/MongoDB/QueryManagementMongoModelBuilderConfigurationOptions.cs delete mode 100644 aspnet-core/modules/QueryManagement/test/CompanyName.ProjectName.QueryManagement.Application.Tests/CompanyName.ProjectName.QueryManagement.Application.Tests.csproj delete mode 100644 aspnet-core/modules/QueryManagement/test/CompanyName.ProjectName.QueryManagement.Application.Tests/FodyWeavers.xml delete mode 100644 aspnet-core/modules/QueryManagement/test/CompanyName.ProjectName.QueryManagement.Application.Tests/FodyWeavers.xsd delete mode 100644 aspnet-core/modules/QueryManagement/test/CompanyName.ProjectName.QueryManagement.Application.Tests/QueryManagementApplicationTestBase.cs delete mode 100644 aspnet-core/modules/QueryManagement/test/CompanyName.ProjectName.QueryManagement.Application.Tests/QueryManagementApplicationTestModule.cs delete mode 100644 aspnet-core/modules/QueryManagement/test/CompanyName.ProjectName.QueryManagement.Domain.Tests/CompanyName.ProjectName.QueryManagement.Domain.Tests.csproj delete mode 100644 aspnet-core/modules/QueryManagement/test/CompanyName.ProjectName.QueryManagement.Domain.Tests/FodyWeavers.xml delete mode 100644 aspnet-core/modules/QueryManagement/test/CompanyName.ProjectName.QueryManagement.Domain.Tests/FodyWeavers.xsd delete mode 100644 aspnet-core/modules/QueryManagement/test/CompanyName.ProjectName.QueryManagement.Domain.Tests/QueryManagementDomainTestBase.cs delete mode 100644 aspnet-core/modules/QueryManagement/test/CompanyName.ProjectName.QueryManagement.Domain.Tests/QueryManagementDomainTestModule.cs delete mode 100644 aspnet-core/modules/QueryManagement/test/CompanyName.ProjectName.QueryManagement.Domain.Tests/Samples/SampleManager_Tests.cs delete mode 100644 aspnet-core/modules/QueryManagement/test/CompanyName.ProjectName.QueryManagement.EntityFrameworkCore.Tests/CompanyName.ProjectName.QueryManagement.EntityFrameworkCore.Tests.csproj delete mode 100644 aspnet-core/modules/QueryManagement/test/CompanyName.ProjectName.QueryManagement.EntityFrameworkCore.Tests/EntityFrameworkCore/QueryManagementEntityFrameworkCoreTestBase.cs delete mode 100644 aspnet-core/modules/QueryManagement/test/CompanyName.ProjectName.QueryManagement.EntityFrameworkCore.Tests/EntityFrameworkCore/QueryManagementEntityFrameworkCoreTestModule.cs delete mode 100644 aspnet-core/modules/QueryManagement/test/CompanyName.ProjectName.QueryManagement.EntityFrameworkCore.Tests/EntityFrameworkCore/Samples/SampleRepository_Tests.cs delete mode 100644 aspnet-core/modules/QueryManagement/test/CompanyName.ProjectName.QueryManagement.EntityFrameworkCore.Tests/FodyWeavers.xml delete mode 100644 aspnet-core/modules/QueryManagement/test/CompanyName.ProjectName.QueryManagement.EntityFrameworkCore.Tests/FodyWeavers.xsd delete mode 100644 aspnet-core/modules/QueryManagement/test/CompanyName.ProjectName.QueryManagement.MongoDB.Tests/CompanyName.ProjectName.QueryManagement.MongoDB.Tests.csproj delete mode 100644 aspnet-core/modules/QueryManagement/test/CompanyName.ProjectName.QueryManagement.MongoDB.Tests/FodyWeavers.xml delete mode 100644 aspnet-core/modules/QueryManagement/test/CompanyName.ProjectName.QueryManagement.MongoDB.Tests/FodyWeavers.xsd delete mode 100644 aspnet-core/modules/QueryManagement/test/CompanyName.ProjectName.QueryManagement.MongoDB.Tests/MongoDB/MongoDbFixture.cs delete mode 100644 aspnet-core/modules/QueryManagement/test/CompanyName.ProjectName.QueryManagement.MongoDB.Tests/MongoDB/MongoTestCollection.cs delete mode 100644 aspnet-core/modules/QueryManagement/test/CompanyName.ProjectName.QueryManagement.MongoDB.Tests/MongoDB/QueryManagementMongoDbTestBase.cs delete mode 100644 aspnet-core/modules/QueryManagement/test/CompanyName.ProjectName.QueryManagement.MongoDB.Tests/MongoDB/QueryManagementMongoDbTestModule.cs delete mode 100644 aspnet-core/modules/QueryManagement/test/CompanyName.ProjectName.QueryManagement.MongoDB.Tests/MongoDB/Samples/SampleRepository_Tests.cs delete mode 100644 aspnet-core/modules/QueryManagement/test/CompanyName.ProjectName.QueryManagement.TestBase/CompanyName.ProjectName.QueryManagement.TestBase.csproj delete mode 100644 aspnet-core/modules/QueryManagement/test/CompanyName.ProjectName.QueryManagement.TestBase/FodyWeavers.xml delete mode 100644 aspnet-core/modules/QueryManagement/test/CompanyName.ProjectName.QueryManagement.TestBase/FodyWeavers.xsd delete mode 100644 aspnet-core/modules/QueryManagement/test/CompanyName.ProjectName.QueryManagement.TestBase/QueryManagementDataSeedContributor.cs delete mode 100644 aspnet-core/modules/QueryManagement/test/CompanyName.ProjectName.QueryManagement.TestBase/QueryManagementTestBase.cs delete mode 100644 aspnet-core/modules/QueryManagement/test/CompanyName.ProjectName.QueryManagement.TestBase/QueryManagementTestBaseModule.cs delete mode 100644 aspnet-core/modules/QueryManagement/test/CompanyName.ProjectName.QueryManagement.TestBase/Samples/SampleRepository_Tests.cs delete mode 100644 aspnet-core/modules/QueryManagement/test/CompanyName.ProjectName.QueryManagement.TestBase/Security/FakeCurrentPrincipalAccessor.cs create mode 100644 aspnet-core/services/src/CompanyName.ProjectName.Application/HttpClientNameConsts.cs create mode 100644 aspnet-core/services/src/CompanyName.ProjectName.Domain/Data/Seeds/AbpSettingDataSeedContributor.cs rename aspnet-core/services/src/CompanyName.ProjectName.Domain/{IdentityServer => Data/Seeds}/IdentityServerDataSeedContributor.cs (100%) rename aspnet-core/services/src/CompanyName.ProjectName.Domain/{Users => Data/Seeds}/UserDataSeedContributor.cs (100%) create mode 100644 aspnet-core/services/src/CompanyName.ProjectName.FreeSqlRepository/CompanyName.ProjectName.FreeSqlRepository.csproj rename aspnet-core/{modules/QueryManagement/src/CompanyName.ProjectName.QueryManagement.FreeSqlMySql => services/src/CompanyName.ProjectName.FreeSqlRepository}/FreeSqlBasicRepository.cs (87%) rename aspnet-core/{modules/QueryManagement/src/CompanyName.ProjectName.QueryManagement.FreeSqlMySql/QueryManagementFreeSqlMySqlModule.cs => services/src/CompanyName.ProjectName.FreeSqlRepository/FreeSqlRepositoryModule.cs} (53%) create mode 100644 aspnet-core/shared/CompanyName.ProjectName.Shared.Hosting.Gateways/CompanyName.ProjectName.Shared.Hosting.Gateways.csproj create mode 100644 aspnet-core/shared/CompanyName.ProjectName.Shared.Hosting.Gateways/SharedHostingGatewayModule.cs create mode 100644 aspnet-core/shared/CompanyName.ProjectName.Shared.Hosting.Microservices/CompanyName.ProjectName.Shared.Hosting.Microservices.csproj create mode 100644 aspnet-core/shared/CompanyName.ProjectName.Shared.Hosting.Microservices/Microsoft/AspNetCore/Builder/ApplicationBuilderExtensions.cs create mode 100644 aspnet-core/shared/CompanyName.ProjectName.Shared.Hosting.Microservices/Microsoft/Extensions/DependencyInjection/ServiceCollectionExtensions.cs create mode 100644 aspnet-core/shared/CompanyName.ProjectName.Shared.Hosting.Microservices/SharedHostingMicroserviceModule.cs create mode 100644 aspnet-core/shared/CompanyName.ProjectName.Shared.Hosting.Microservices/Swaggers/EnumSchemaFilter.cs create mode 100644 aspnet-core/shared/CompanyName.ProjectName.Shared.Hosting.Microservices/Swaggers/HiddenAbpDefaultApiFilter.cs create mode 100644 aspnet-core/shared/CompanyName.ProjectName.Shared.Hosting.Microservices/Volo/Abp/DefaultHttpExceptionStatusCodeFinder.cs diff --git a/aspnet-core/CompanyName.ProjectName.sln b/aspnet-core/CompanyName.ProjectName.sln index f515f59a..97d91200 100644 --- a/aspnet-core/CompanyName.ProjectName.sln +++ b/aspnet-core/CompanyName.ProjectName.sln @@ -51,44 +51,8 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "frameworks", "frameworks", EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Extensions", "Extensions", "{9F5676A3-00DC-48B7-93D1-341C39E19BB9}" EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "CompanyName.ProjectName.Extensions", "frameworks\Extensions\src\CompanyName.ProjectName.Extensions\CompanyName.ProjectName.Extensions.csproj", "{7423541F-9BC3-401D-AC0B-5981D53C194C}" -EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{C4AC9352-C9F5-4096-8D73-13638232CFB9}" EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "QueryManagement", "QueryManagement", "{7596C20A-689E-4EC9-96F4-DB8445892497}" -EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{9528B5B6-C087-4932-92EA-EE486E97AAB0}" -EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "test", "test", "{FD0047B9-490E-41DA-B7EE-778F01D06D9F}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "CompanyName.ProjectName.QueryManagement.Application", "modules\QueryManagement\src\CompanyName.ProjectName.QueryManagement.Application\CompanyName.ProjectName.QueryManagement.Application.csproj", "{75F9D251-7F50-46A3-8367-7B0FE7A5FA8E}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "CompanyName.ProjectName.QueryManagement.Application.Contracts", "modules\QueryManagement\src\CompanyName.ProjectName.QueryManagement.Application.Contracts\CompanyName.ProjectName.QueryManagement.Application.Contracts.csproj", "{001E86FF-824E-4112-85AA-3800354F5F2A}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "CompanyName.ProjectName.QueryManagement.Domain", "modules\QueryManagement\src\CompanyName.ProjectName.QueryManagement.Domain\CompanyName.ProjectName.QueryManagement.Domain.csproj", "{C3257A7E-64AA-438E-B615-2DC4BBAD9A7C}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "CompanyName.ProjectName.QueryManagement.Domain.Shared", "modules\QueryManagement\src\CompanyName.ProjectName.QueryManagement.Domain.Shared\CompanyName.ProjectName.QueryManagement.Domain.Shared.csproj", "{69548DCB-B86B-4DAF-93A3-8BF30A7846DD}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "CompanyName.ProjectName.QueryManagement.EntityFrameworkCore", "modules\QueryManagement\src\CompanyName.ProjectName.QueryManagement.EntityFrameworkCore\CompanyName.ProjectName.QueryManagement.EntityFrameworkCore.csproj", "{BC2BB3D6-FECA-4C99-8C65-C0930865BF62}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "CompanyName.ProjectName.QueryManagement.HttpApi", "modules\QueryManagement\src\CompanyName.ProjectName.QueryManagement.HttpApi\CompanyName.ProjectName.QueryManagement.HttpApi.csproj", "{B6468E4A-753B-4256-8DDD-D31673FBA169}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "CompanyName.ProjectName.QueryManagement.HttpApi.Client", "modules\QueryManagement\src\CompanyName.ProjectName.QueryManagement.HttpApi.Client\CompanyName.ProjectName.QueryManagement.HttpApi.Client.csproj", "{1FF1CA56-8206-4152-88FD-F10C9AFA01F0}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "CompanyName.ProjectName.QueryManagement.MongoDB", "modules\QueryManagement\src\CompanyName.ProjectName.QueryManagement.MongoDB\CompanyName.ProjectName.QueryManagement.MongoDB.csproj", "{CED1C499-CD5C-4A16-897A-3FEB05380910}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "CompanyName.ProjectName.QueryManagement.Application.Tests", "modules\QueryManagement\test\CompanyName.ProjectName.QueryManagement.Application.Tests\CompanyName.ProjectName.QueryManagement.Application.Tests.csproj", "{12ED7E9D-E8CB-40FD-8390-CD60BC76C578}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "CompanyName.ProjectName.QueryManagement.Domain.Tests", "modules\QueryManagement\test\CompanyName.ProjectName.QueryManagement.Domain.Tests\CompanyName.ProjectName.QueryManagement.Domain.Tests.csproj", "{C8FC7FE3-F7FE-4D6E-BD65-D1CDEDCC3D80}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "CompanyName.ProjectName.QueryManagement.EntityFrameworkCore.Tests", "modules\QueryManagement\test\CompanyName.ProjectName.QueryManagement.EntityFrameworkCore.Tests\CompanyName.ProjectName.QueryManagement.EntityFrameworkCore.Tests.csproj", "{CB657CB5-35D5-4B46-9588-E974FDB5A8FB}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "CompanyName.ProjectName.QueryManagement.MongoDB.Tests", "modules\QueryManagement\test\CompanyName.ProjectName.QueryManagement.MongoDB.Tests\CompanyName.ProjectName.QueryManagement.MongoDB.Tests.csproj", "{D875344A-04EE-4D09-A1BA-144D46EA5DB9}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "CompanyName.ProjectName.QueryManagement.TestBase", "modules\QueryManagement\test\CompanyName.ProjectName.QueryManagement.TestBase\CompanyName.ProjectName.QueryManagement.TestBase.csproj", "{839291C2-DA87-4226-9A67-A7D364DAE9CB}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "CompanyName.ProjectName.QueryManagement.FreeSqlMySql", "modules\QueryManagement\src\CompanyName.ProjectName.QueryManagement.FreeSqlMySql\CompanyName.ProjectName.QueryManagement.FreeSqlMySql.csproj", "{C8A251F3-74DF-4B4F-B91E-367D1976B99F}" -EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "NotificationManagement", "NotificationManagement", "{EB2B8705-18E7-49E1-A565-93A6DE5570D5}" EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{E28AECBD-2904-477C-9817-C67312330A41}" @@ -109,16 +73,12 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "CompanyName.ProjectName.Not EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "CompanyName.ProjectName.NotificationManagement.HttpApi.Client", "modules\NotificationManagement\src\CompanyName.ProjectName.NotificationManagement.HttpApi.Client\CompanyName.ProjectName.NotificationManagement.HttpApi.Client.csproj", "{B3554E2E-7150-482F-A08F-DCB8BD166FED}" EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "CompanyName.ProjectName.NotificationManagement.MongoDB", "modules\NotificationManagement\src\CompanyName.ProjectName.NotificationManagement.MongoDB\CompanyName.ProjectName.NotificationManagement.MongoDB.csproj", "{7614A8FD-D204-47FF-B409-255A0BE3B09A}" -EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "CompanyName.ProjectName.NotificationManagement.Application.Tests", "modules\NotificationManagement\test\CompanyName.ProjectName.NotificationManagement.Application.Tests\CompanyName.ProjectName.NotificationManagement.Application.Tests.csproj", "{22A3A359-C6F4-4540-A61F-C8E94A73C95E}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "CompanyName.ProjectName.NotificationManagement.Domain.Tests", "modules\NotificationManagement\test\CompanyName.ProjectName.NotificationManagement.Domain.Tests\CompanyName.ProjectName.NotificationManagement.Domain.Tests.csproj", "{FCE5BD62-F7C7-45EA-80DE-B4880C4A84C6}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "CompanyName.ProjectName.NotificationManagement.EntityFrameworkCore.Tests", "modules\NotificationManagement\test\CompanyName.ProjectName.NotificationManagement.EntityFrameworkCore.Tests\CompanyName.ProjectName.NotificationManagement.EntityFrameworkCore.Tests.csproj", "{19A921F2-1587-4E94-A023-B81956874DAB}" EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "CompanyName.ProjectName.NotificationManagement.MongoDB.Tests", "modules\NotificationManagement\test\CompanyName.ProjectName.NotificationManagement.MongoDB.Tests\CompanyName.ProjectName.NotificationManagement.MongoDB.Tests.csproj", "{23FA155F-6F79-4DAB-B39B-DD92224E3E4F}" -EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "CompanyName.ProjectName.NotificationManagement.TestBase", "modules\NotificationManagement\test\CompanyName.ProjectName.NotificationManagement.TestBase\CompanyName.ProjectName.NotificationManagement.TestBase.csproj", "{91A3257D-0D1A-479D-8F3C-DBB1944802FE}" EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "DataDictionaryManagement", "DataDictionaryManagement", "{9C53260A-6F4B-4106-98B0-EDCC10BB3E1A}" @@ -141,16 +101,12 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "CompanyName.ProjectName.Dat EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "CompanyName.ProjectName.DataDictionaryManagement.HttpApi.Client", "modules\DataDictionaryManagement\src\CompanyName.ProjectName.DataDictionaryManagement.HttpApi.Client\CompanyName.ProjectName.DataDictionaryManagement.HttpApi.Client.csproj", "{CC104C76-0CC6-453E-A49D-C4995B6EB72B}" EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "CompanyName.ProjectName.DataDictionaryManagement.MongoDB", "modules\DataDictionaryManagement\src\CompanyName.ProjectName.DataDictionaryManagement.MongoDB\CompanyName.ProjectName.DataDictionaryManagement.MongoDB.csproj", "{E46D26ED-F43A-4651-8B0E-5566FBE14D89}" -EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "CompanyName.ProjectName.DataDictionaryManagement.Application.Tests", "modules\DataDictionaryManagement\test\CompanyName.ProjectName.DataDictionaryManagement.Application.Tests\CompanyName.ProjectName.DataDictionaryManagement.Application.Tests.csproj", "{13AF64F3-8962-4568-A0E1-833CCA1922D5}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "CompanyName.ProjectName.DataDictionaryManagement.Domain.Tests", "modules\DataDictionaryManagement\test\CompanyName.ProjectName.DataDictionaryManagement.Domain.Tests\CompanyName.ProjectName.DataDictionaryManagement.Domain.Tests.csproj", "{F9FADD90-8634-4B03-AC44-9F6C80B30E73}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "CompanyName.ProjectName.DataDictionaryManagement.EntityFrameworkCore.Tests", "modules\DataDictionaryManagement\test\CompanyName.ProjectName.DataDictionaryManagement.EntityFrameworkCore.Tests\CompanyName.ProjectName.DataDictionaryManagement.EntityFrameworkCore.Tests.csproj", "{8BC28722-20CC-41BD-B183-4E33E94CA2A7}" EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "CompanyName.ProjectName.DataDictionaryManagement.MongoDB.Tests", "modules\DataDictionaryManagement\test\CompanyName.ProjectName.DataDictionaryManagement.MongoDB.Tests\CompanyName.ProjectName.DataDictionaryManagement.MongoDB.Tests.csproj", "{7327CE44-55FD-4419-AF32-2A6745029732}" -EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "CompanyName.ProjectName.DataDictionaryManagement.TestBase", "modules\DataDictionaryManagement\test\CompanyName.ProjectName.DataDictionaryManagement.TestBase\CompanyName.ProjectName.DataDictionaryManagement.TestBase.csproj", "{6A398750-D7D8-43DC-8DF8-AA65C5766154}" EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "host", "host", "{5AACD0EE-F2B2-49F6-868F-8FE08D7243C0}" @@ -163,13 +119,35 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "CAP", "CAP", "{2C09EED0-5AF EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{11ED8435-B5AE-4BF3-9D4B-51FA1E4A18A6}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CompanyName.ProjectName.CAP", "frameworks\CAP\src\CompanyName.ProjectName.CAP\CompanyName.ProjectName.CAP.csproj", "{F59B3C43-0B54-4A3A-AA28-1A50F59D2FC3}" -EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CompanyName.ProjectName.HttpApi.Host", "services\host\CompanyName.ProjectName.HttpApi.Host\CompanyName.ProjectName.HttpApi.Host.csproj", "{FB20372D-6C96-4733-9AAC-12522F15CAA6}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CompanyName.ProjectName.IdentityServer", "services\host\CompanyName.ProjectName.IdentityServer\CompanyName.ProjectName.IdentityServer.csproj", "{FB1C29FF-5467-4CF0-995D-5B3F931AB135}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CompanyName.ProjectName.QueryManagement.ElasticSearch", "modules\QueryManagement\src\CompanyName.ProjectName.QueryManagement.ElasticSearch\CompanyName.ProjectName.QueryManagement.ElasticSearch.csproj", "{C9861622-B0CB-4747-82CC-16664648A499}" +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "shared", "shared", "{6434E3F2-B352-4B30-839A-88C2BA166D96}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CompanyName.ProjectName.Shared.Hosting.Microservices", "shared\CompanyName.ProjectName.Shared.Hosting.Microservices\CompanyName.ProjectName.Shared.Hosting.Microservices.csproj", "{A091AE9B-3A1E-49AC-9AD5-D29310512A3D}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CompanyName.ProjectName.Shared.Hosting.Gateways", "shared\CompanyName.ProjectName.Shared.Hosting.Gateways\CompanyName.ProjectName.Shared.Hosting.Gateways.csproj", "{C018EFF9-579E-43B3-9181-543BE95E2E03}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ElasticSearch", "ElasticSearch", "{3F507591-5C8A-49A7-AB0A-043B64B7EC41}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{1A57338B-65B1-4B8F-ABBD-83F4E8321D8F}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Lion.Abp.ElasticSearch", "frameworks\ElasticSearch\src\Lion.Abp.ElasticSearch\Lion.Abp.ElasticSearch.csproj", "{48D938A1-36E4-4AC1-9AF2-645CB75D4A05}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Lion.Abp.Cap", "frameworks\CAP\src\Lion.Abp.Cap\Lion.Abp.Cap.csproj", "{800F4482-EAC3-472B-AF07-53980D47AA41}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Lion.Abp.Extension", "frameworks\Extensions\src\Lion.Abp.Extension\Lion.Abp.Extension.csproj", "{6848FA46-EFFF-4E0C-8EAA-145D8C440333}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Lion.Abp.Domain", "frameworks\Extensions\src\Lion.Abp.Domain\Lion.Abp.Domain.csproj", "{1EF5EF2B-323C-4DB0-B08A-37312A68E9DB}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "gateways", "gateways", "{5C304CBC-F30D-413C-A0AF-8B6814A2D4A3}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CompanyName.ProjectName.PublicGateway", "gateways\CompanyName.ProjectName.PublicGateway\CompanyName.ProjectName.PublicGateway.csproj", "{870364BA-DD5C-4597-9047-BD8A0CA1CFBA}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CompanyName.ProjectName.WebGateway", "gateways\CompanyName.ProjectName.WebGateway\CompanyName.ProjectName.WebGateway.csproj", "{D9108313-8D05-4F5F-9AA0-B443EC3374B6}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CompanyName.ProjectName.FreeSqlRepository", "services\src\CompanyName.ProjectName.FreeSqlRepository\CompanyName.ProjectName.FreeSqlRepository.csproj", "{FC30B17B-F671-4E55-90C6-9F37E40B483D}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution @@ -233,66 +211,6 @@ Global {AA94D832-1CCC-4715-95A9-A483F23A1A5D}.Debug|Any CPU.Build.0 = Debug|Any CPU {AA94D832-1CCC-4715-95A9-A483F23A1A5D}.Release|Any CPU.ActiveCfg = Release|Any CPU {AA94D832-1CCC-4715-95A9-A483F23A1A5D}.Release|Any CPU.Build.0 = Release|Any CPU - {7423541F-9BC3-401D-AC0B-5981D53C194C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {7423541F-9BC3-401D-AC0B-5981D53C194C}.Debug|Any CPU.Build.0 = Debug|Any CPU - {7423541F-9BC3-401D-AC0B-5981D53C194C}.Release|Any CPU.ActiveCfg = Release|Any CPU - {7423541F-9BC3-401D-AC0B-5981D53C194C}.Release|Any CPU.Build.0 = Release|Any CPU - {75F9D251-7F50-46A3-8367-7B0FE7A5FA8E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {75F9D251-7F50-46A3-8367-7B0FE7A5FA8E}.Debug|Any CPU.Build.0 = Debug|Any CPU - {75F9D251-7F50-46A3-8367-7B0FE7A5FA8E}.Release|Any CPU.ActiveCfg = Release|Any CPU - {75F9D251-7F50-46A3-8367-7B0FE7A5FA8E}.Release|Any CPU.Build.0 = Release|Any CPU - {001E86FF-824E-4112-85AA-3800354F5F2A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {001E86FF-824E-4112-85AA-3800354F5F2A}.Debug|Any CPU.Build.0 = Debug|Any CPU - {001E86FF-824E-4112-85AA-3800354F5F2A}.Release|Any CPU.ActiveCfg = Release|Any CPU - {001E86FF-824E-4112-85AA-3800354F5F2A}.Release|Any CPU.Build.0 = Release|Any CPU - {C3257A7E-64AA-438E-B615-2DC4BBAD9A7C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {C3257A7E-64AA-438E-B615-2DC4BBAD9A7C}.Debug|Any CPU.Build.0 = Debug|Any CPU - {C3257A7E-64AA-438E-B615-2DC4BBAD9A7C}.Release|Any CPU.ActiveCfg = Release|Any CPU - {C3257A7E-64AA-438E-B615-2DC4BBAD9A7C}.Release|Any CPU.Build.0 = Release|Any CPU - {69548DCB-B86B-4DAF-93A3-8BF30A7846DD}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {69548DCB-B86B-4DAF-93A3-8BF30A7846DD}.Debug|Any CPU.Build.0 = Debug|Any CPU - {69548DCB-B86B-4DAF-93A3-8BF30A7846DD}.Release|Any CPU.ActiveCfg = Release|Any CPU - {69548DCB-B86B-4DAF-93A3-8BF30A7846DD}.Release|Any CPU.Build.0 = Release|Any CPU - {BC2BB3D6-FECA-4C99-8C65-C0930865BF62}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {BC2BB3D6-FECA-4C99-8C65-C0930865BF62}.Debug|Any CPU.Build.0 = Debug|Any CPU - {BC2BB3D6-FECA-4C99-8C65-C0930865BF62}.Release|Any CPU.ActiveCfg = Release|Any CPU - {BC2BB3D6-FECA-4C99-8C65-C0930865BF62}.Release|Any CPU.Build.0 = Release|Any CPU - {B6468E4A-753B-4256-8DDD-D31673FBA169}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {B6468E4A-753B-4256-8DDD-D31673FBA169}.Debug|Any CPU.Build.0 = Debug|Any CPU - {B6468E4A-753B-4256-8DDD-D31673FBA169}.Release|Any CPU.ActiveCfg = Release|Any CPU - {B6468E4A-753B-4256-8DDD-D31673FBA169}.Release|Any CPU.Build.0 = Release|Any CPU - {1FF1CA56-8206-4152-88FD-F10C9AFA01F0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {1FF1CA56-8206-4152-88FD-F10C9AFA01F0}.Debug|Any CPU.Build.0 = Debug|Any CPU - {1FF1CA56-8206-4152-88FD-F10C9AFA01F0}.Release|Any CPU.ActiveCfg = Release|Any CPU - {1FF1CA56-8206-4152-88FD-F10C9AFA01F0}.Release|Any CPU.Build.0 = Release|Any CPU - {CED1C499-CD5C-4A16-897A-3FEB05380910}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {CED1C499-CD5C-4A16-897A-3FEB05380910}.Debug|Any CPU.Build.0 = Debug|Any CPU - {CED1C499-CD5C-4A16-897A-3FEB05380910}.Release|Any CPU.ActiveCfg = Release|Any CPU - {CED1C499-CD5C-4A16-897A-3FEB05380910}.Release|Any CPU.Build.0 = Release|Any CPU - {12ED7E9D-E8CB-40FD-8390-CD60BC76C578}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {12ED7E9D-E8CB-40FD-8390-CD60BC76C578}.Debug|Any CPU.Build.0 = Debug|Any CPU - {12ED7E9D-E8CB-40FD-8390-CD60BC76C578}.Release|Any CPU.ActiveCfg = Release|Any CPU - {12ED7E9D-E8CB-40FD-8390-CD60BC76C578}.Release|Any CPU.Build.0 = Release|Any CPU - {C8FC7FE3-F7FE-4D6E-BD65-D1CDEDCC3D80}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {C8FC7FE3-F7FE-4D6E-BD65-D1CDEDCC3D80}.Debug|Any CPU.Build.0 = Debug|Any CPU - {C8FC7FE3-F7FE-4D6E-BD65-D1CDEDCC3D80}.Release|Any CPU.ActiveCfg = Release|Any CPU - {C8FC7FE3-F7FE-4D6E-BD65-D1CDEDCC3D80}.Release|Any CPU.Build.0 = Release|Any CPU - {CB657CB5-35D5-4B46-9588-E974FDB5A8FB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {CB657CB5-35D5-4B46-9588-E974FDB5A8FB}.Debug|Any CPU.Build.0 = Debug|Any CPU - {CB657CB5-35D5-4B46-9588-E974FDB5A8FB}.Release|Any CPU.ActiveCfg = Release|Any CPU - {CB657CB5-35D5-4B46-9588-E974FDB5A8FB}.Release|Any CPU.Build.0 = Release|Any CPU - {D875344A-04EE-4D09-A1BA-144D46EA5DB9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {D875344A-04EE-4D09-A1BA-144D46EA5DB9}.Debug|Any CPU.Build.0 = Debug|Any CPU - {D875344A-04EE-4D09-A1BA-144D46EA5DB9}.Release|Any CPU.ActiveCfg = Release|Any CPU - {D875344A-04EE-4D09-A1BA-144D46EA5DB9}.Release|Any CPU.Build.0 = Release|Any CPU - {839291C2-DA87-4226-9A67-A7D364DAE9CB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {839291C2-DA87-4226-9A67-A7D364DAE9CB}.Debug|Any CPU.Build.0 = Debug|Any CPU - {839291C2-DA87-4226-9A67-A7D364DAE9CB}.Release|Any CPU.ActiveCfg = Release|Any CPU - {839291C2-DA87-4226-9A67-A7D364DAE9CB}.Release|Any CPU.Build.0 = Release|Any CPU - {C8A251F3-74DF-4B4F-B91E-367D1976B99F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {C8A251F3-74DF-4B4F-B91E-367D1976B99F}.Debug|Any CPU.Build.0 = Debug|Any CPU - {C8A251F3-74DF-4B4F-B91E-367D1976B99F}.Release|Any CPU.ActiveCfg = Release|Any CPU - {C8A251F3-74DF-4B4F-B91E-367D1976B99F}.Release|Any CPU.Build.0 = Release|Any CPU {3E69D96A-F923-4AC4-8430-9AAB84B6A3FE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {3E69D96A-F923-4AC4-8430-9AAB84B6A3FE}.Debug|Any CPU.Build.0 = Debug|Any CPU {3E69D96A-F923-4AC4-8430-9AAB84B6A3FE}.Release|Any CPU.ActiveCfg = Release|Any CPU @@ -321,10 +239,6 @@ Global {B3554E2E-7150-482F-A08F-DCB8BD166FED}.Debug|Any CPU.Build.0 = Debug|Any CPU {B3554E2E-7150-482F-A08F-DCB8BD166FED}.Release|Any CPU.ActiveCfg = Release|Any CPU {B3554E2E-7150-482F-A08F-DCB8BD166FED}.Release|Any CPU.Build.0 = Release|Any CPU - {7614A8FD-D204-47FF-B409-255A0BE3B09A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {7614A8FD-D204-47FF-B409-255A0BE3B09A}.Debug|Any CPU.Build.0 = Debug|Any CPU - {7614A8FD-D204-47FF-B409-255A0BE3B09A}.Release|Any CPU.ActiveCfg = Release|Any CPU - {7614A8FD-D204-47FF-B409-255A0BE3B09A}.Release|Any CPU.Build.0 = Release|Any CPU {22A3A359-C6F4-4540-A61F-C8E94A73C95E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {22A3A359-C6F4-4540-A61F-C8E94A73C95E}.Debug|Any CPU.Build.0 = Debug|Any CPU {22A3A359-C6F4-4540-A61F-C8E94A73C95E}.Release|Any CPU.ActiveCfg = Release|Any CPU @@ -337,10 +251,6 @@ Global {19A921F2-1587-4E94-A023-B81956874DAB}.Debug|Any CPU.Build.0 = Debug|Any CPU {19A921F2-1587-4E94-A023-B81956874DAB}.Release|Any CPU.ActiveCfg = Release|Any CPU {19A921F2-1587-4E94-A023-B81956874DAB}.Release|Any CPU.Build.0 = Release|Any CPU - {23FA155F-6F79-4DAB-B39B-DD92224E3E4F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {23FA155F-6F79-4DAB-B39B-DD92224E3E4F}.Debug|Any CPU.Build.0 = Debug|Any CPU - {23FA155F-6F79-4DAB-B39B-DD92224E3E4F}.Release|Any CPU.ActiveCfg = Release|Any CPU - {23FA155F-6F79-4DAB-B39B-DD92224E3E4F}.Release|Any CPU.Build.0 = Release|Any CPU {91A3257D-0D1A-479D-8F3C-DBB1944802FE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {91A3257D-0D1A-479D-8F3C-DBB1944802FE}.Debug|Any CPU.Build.0 = Debug|Any CPU {91A3257D-0D1A-479D-8F3C-DBB1944802FE}.Release|Any CPU.ActiveCfg = Release|Any CPU @@ -373,10 +283,6 @@ Global {CC104C76-0CC6-453E-A49D-C4995B6EB72B}.Debug|Any CPU.Build.0 = Debug|Any CPU {CC104C76-0CC6-453E-A49D-C4995B6EB72B}.Release|Any CPU.ActiveCfg = Release|Any CPU {CC104C76-0CC6-453E-A49D-C4995B6EB72B}.Release|Any CPU.Build.0 = Release|Any CPU - {E46D26ED-F43A-4651-8B0E-5566FBE14D89}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {E46D26ED-F43A-4651-8B0E-5566FBE14D89}.Debug|Any CPU.Build.0 = Debug|Any CPU - {E46D26ED-F43A-4651-8B0E-5566FBE14D89}.Release|Any CPU.ActiveCfg = Release|Any CPU - {E46D26ED-F43A-4651-8B0E-5566FBE14D89}.Release|Any CPU.Build.0 = Release|Any CPU {13AF64F3-8962-4568-A0E1-833CCA1922D5}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {13AF64F3-8962-4568-A0E1-833CCA1922D5}.Debug|Any CPU.Build.0 = Debug|Any CPU {13AF64F3-8962-4568-A0E1-833CCA1922D5}.Release|Any CPU.ActiveCfg = Release|Any CPU @@ -389,10 +295,6 @@ Global {8BC28722-20CC-41BD-B183-4E33E94CA2A7}.Debug|Any CPU.Build.0 = Debug|Any CPU {8BC28722-20CC-41BD-B183-4E33E94CA2A7}.Release|Any CPU.ActiveCfg = Release|Any CPU {8BC28722-20CC-41BD-B183-4E33E94CA2A7}.Release|Any CPU.Build.0 = Release|Any CPU - {7327CE44-55FD-4419-AF32-2A6745029732}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {7327CE44-55FD-4419-AF32-2A6745029732}.Debug|Any CPU.Build.0 = Debug|Any CPU - {7327CE44-55FD-4419-AF32-2A6745029732}.Release|Any CPU.ActiveCfg = Release|Any CPU - {7327CE44-55FD-4419-AF32-2A6745029732}.Release|Any CPU.Build.0 = Release|Any CPU {6A398750-D7D8-43DC-8DF8-AA65C5766154}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {6A398750-D7D8-43DC-8DF8-AA65C5766154}.Debug|Any CPU.Build.0 = Debug|Any CPU {6A398750-D7D8-43DC-8DF8-AA65C5766154}.Release|Any CPU.ActiveCfg = Release|Any CPU @@ -401,10 +303,6 @@ Global {8D196E3D-6F95-4793-B948-79669AF09017}.Debug|Any CPU.Build.0 = Debug|Any CPU {8D196E3D-6F95-4793-B948-79669AF09017}.Release|Any CPU.ActiveCfg = Release|Any CPU {8D196E3D-6F95-4793-B948-79669AF09017}.Release|Any CPU.Build.0 = Release|Any CPU - {F59B3C43-0B54-4A3A-AA28-1A50F59D2FC3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {F59B3C43-0B54-4A3A-AA28-1A50F59D2FC3}.Debug|Any CPU.Build.0 = Debug|Any CPU - {F59B3C43-0B54-4A3A-AA28-1A50F59D2FC3}.Release|Any CPU.ActiveCfg = Release|Any CPU - {F59B3C43-0B54-4A3A-AA28-1A50F59D2FC3}.Release|Any CPU.Build.0 = Release|Any CPU {FB20372D-6C96-4733-9AAC-12522F15CAA6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {FB20372D-6C96-4733-9AAC-12522F15CAA6}.Debug|Any CPU.Build.0 = Debug|Any CPU {FB20372D-6C96-4733-9AAC-12522F15CAA6}.Release|Any CPU.ActiveCfg = Release|Any CPU @@ -413,10 +311,42 @@ Global {FB1C29FF-5467-4CF0-995D-5B3F931AB135}.Debug|Any CPU.Build.0 = Debug|Any CPU {FB1C29FF-5467-4CF0-995D-5B3F931AB135}.Release|Any CPU.ActiveCfg = Release|Any CPU {FB1C29FF-5467-4CF0-995D-5B3F931AB135}.Release|Any CPU.Build.0 = Release|Any CPU - {C9861622-B0CB-4747-82CC-16664648A499}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {C9861622-B0CB-4747-82CC-16664648A499}.Debug|Any CPU.Build.0 = Debug|Any CPU - {C9861622-B0CB-4747-82CC-16664648A499}.Release|Any CPU.ActiveCfg = Release|Any CPU - {C9861622-B0CB-4747-82CC-16664648A499}.Release|Any CPU.Build.0 = Release|Any CPU + {A091AE9B-3A1E-49AC-9AD5-D29310512A3D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {A091AE9B-3A1E-49AC-9AD5-D29310512A3D}.Debug|Any CPU.Build.0 = Debug|Any CPU + {A091AE9B-3A1E-49AC-9AD5-D29310512A3D}.Release|Any CPU.ActiveCfg = Release|Any CPU + {A091AE9B-3A1E-49AC-9AD5-D29310512A3D}.Release|Any CPU.Build.0 = Release|Any CPU + {C018EFF9-579E-43B3-9181-543BE95E2E03}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {C018EFF9-579E-43B3-9181-543BE95E2E03}.Debug|Any CPU.Build.0 = Debug|Any CPU + {C018EFF9-579E-43B3-9181-543BE95E2E03}.Release|Any CPU.ActiveCfg = Release|Any CPU + {C018EFF9-579E-43B3-9181-543BE95E2E03}.Release|Any CPU.Build.0 = Release|Any CPU + {48D938A1-36E4-4AC1-9AF2-645CB75D4A05}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {48D938A1-36E4-4AC1-9AF2-645CB75D4A05}.Debug|Any CPU.Build.0 = Debug|Any CPU + {48D938A1-36E4-4AC1-9AF2-645CB75D4A05}.Release|Any CPU.ActiveCfg = Release|Any CPU + {48D938A1-36E4-4AC1-9AF2-645CB75D4A05}.Release|Any CPU.Build.0 = Release|Any CPU + {800F4482-EAC3-472B-AF07-53980D47AA41}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {800F4482-EAC3-472B-AF07-53980D47AA41}.Debug|Any CPU.Build.0 = Debug|Any CPU + {800F4482-EAC3-472B-AF07-53980D47AA41}.Release|Any CPU.ActiveCfg = Release|Any CPU + {800F4482-EAC3-472B-AF07-53980D47AA41}.Release|Any CPU.Build.0 = Release|Any CPU + {6848FA46-EFFF-4E0C-8EAA-145D8C440333}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {6848FA46-EFFF-4E0C-8EAA-145D8C440333}.Debug|Any CPU.Build.0 = Debug|Any CPU + {6848FA46-EFFF-4E0C-8EAA-145D8C440333}.Release|Any CPU.ActiveCfg = Release|Any CPU + {6848FA46-EFFF-4E0C-8EAA-145D8C440333}.Release|Any CPU.Build.0 = Release|Any CPU + {1EF5EF2B-323C-4DB0-B08A-37312A68E9DB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {1EF5EF2B-323C-4DB0-B08A-37312A68E9DB}.Debug|Any CPU.Build.0 = Debug|Any CPU + {1EF5EF2B-323C-4DB0-B08A-37312A68E9DB}.Release|Any CPU.ActiveCfg = Release|Any CPU + {1EF5EF2B-323C-4DB0-B08A-37312A68E9DB}.Release|Any CPU.Build.0 = Release|Any CPU + {870364BA-DD5C-4597-9047-BD8A0CA1CFBA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {870364BA-DD5C-4597-9047-BD8A0CA1CFBA}.Debug|Any CPU.Build.0 = Debug|Any CPU + {870364BA-DD5C-4597-9047-BD8A0CA1CFBA}.Release|Any CPU.ActiveCfg = Release|Any CPU + {870364BA-DD5C-4597-9047-BD8A0CA1CFBA}.Release|Any CPU.Build.0 = Release|Any CPU + {D9108313-8D05-4F5F-9AA0-B443EC3374B6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {D9108313-8D05-4F5F-9AA0-B443EC3374B6}.Debug|Any CPU.Build.0 = Debug|Any CPU + {D9108313-8D05-4F5F-9AA0-B443EC3374B6}.Release|Any CPU.ActiveCfg = Release|Any CPU + {D9108313-8D05-4F5F-9AA0-B443EC3374B6}.Release|Any CPU.Build.0 = Release|Any CPU + {FC30B17B-F671-4E55-90C6-9F37E40B483D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {FC30B17B-F671-4E55-90C6-9F37E40B483D}.Debug|Any CPU.Build.0 = Debug|Any CPU + {FC30B17B-F671-4E55-90C6-9F37E40B483D}.Release|Any CPU.ActiveCfg = Release|Any CPU + {FC30B17B-F671-4E55-90C6-9F37E40B483D}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE @@ -439,25 +369,7 @@ Global {EF480016-9127-4916-8735-D2466BDBC582} = {04DBDB01-70F4-4E06-B468-8F87850B22BE} {AA94D832-1CCC-4715-95A9-A483F23A1A5D} = {CA9AC87F-097E-4F15-8393-4BC07735A5B0} {9F5676A3-00DC-48B7-93D1-341C39E19BB9} = {CC2EBB07-A070-4158-AB37-A0C0BBAEA9F5} - {7423541F-9BC3-401D-AC0B-5981D53C194C} = {C4AC9352-C9F5-4096-8D73-13638232CFB9} {C4AC9352-C9F5-4096-8D73-13638232CFB9} = {9F5676A3-00DC-48B7-93D1-341C39E19BB9} - {7596C20A-689E-4EC9-96F4-DB8445892497} = {F8A8EB2A-2D4B-464F-9A13-F8F7B6A8FAA3} - {9528B5B6-C087-4932-92EA-EE486E97AAB0} = {7596C20A-689E-4EC9-96F4-DB8445892497} - {FD0047B9-490E-41DA-B7EE-778F01D06D9F} = {7596C20A-689E-4EC9-96F4-DB8445892497} - {75F9D251-7F50-46A3-8367-7B0FE7A5FA8E} = {9528B5B6-C087-4932-92EA-EE486E97AAB0} - {001E86FF-824E-4112-85AA-3800354F5F2A} = {9528B5B6-C087-4932-92EA-EE486E97AAB0} - {C3257A7E-64AA-438E-B615-2DC4BBAD9A7C} = {9528B5B6-C087-4932-92EA-EE486E97AAB0} - {69548DCB-B86B-4DAF-93A3-8BF30A7846DD} = {9528B5B6-C087-4932-92EA-EE486E97AAB0} - {BC2BB3D6-FECA-4C99-8C65-C0930865BF62} = {9528B5B6-C087-4932-92EA-EE486E97AAB0} - {B6468E4A-753B-4256-8DDD-D31673FBA169} = {9528B5B6-C087-4932-92EA-EE486E97AAB0} - {1FF1CA56-8206-4152-88FD-F10C9AFA01F0} = {9528B5B6-C087-4932-92EA-EE486E97AAB0} - {CED1C499-CD5C-4A16-897A-3FEB05380910} = {9528B5B6-C087-4932-92EA-EE486E97AAB0} - {12ED7E9D-E8CB-40FD-8390-CD60BC76C578} = {FD0047B9-490E-41DA-B7EE-778F01D06D9F} - {C8FC7FE3-F7FE-4D6E-BD65-D1CDEDCC3D80} = {FD0047B9-490E-41DA-B7EE-778F01D06D9F} - {CB657CB5-35D5-4B46-9588-E974FDB5A8FB} = {FD0047B9-490E-41DA-B7EE-778F01D06D9F} - {D875344A-04EE-4D09-A1BA-144D46EA5DB9} = {FD0047B9-490E-41DA-B7EE-778F01D06D9F} - {839291C2-DA87-4226-9A67-A7D364DAE9CB} = {FD0047B9-490E-41DA-B7EE-778F01D06D9F} - {C8A251F3-74DF-4B4F-B91E-367D1976B99F} = {9528B5B6-C087-4932-92EA-EE486E97AAB0} {EB2B8705-18E7-49E1-A565-93A6DE5570D5} = {F8A8EB2A-2D4B-464F-9A13-F8F7B6A8FAA3} {E28AECBD-2904-477C-9817-C67312330A41} = {EB2B8705-18E7-49E1-A565-93A6DE5570D5} {120FE15B-3E5C-4BFF-B874-F09235C9E1ED} = {EB2B8705-18E7-49E1-A565-93A6DE5570D5} @@ -468,11 +380,9 @@ Global {10DF0925-A1EE-4B1C-AAF6-249C6D02424C} = {E28AECBD-2904-477C-9817-C67312330A41} {0880AA9C-0E45-43B3-B02A-093736CDD961} = {E28AECBD-2904-477C-9817-C67312330A41} {B3554E2E-7150-482F-A08F-DCB8BD166FED} = {E28AECBD-2904-477C-9817-C67312330A41} - {7614A8FD-D204-47FF-B409-255A0BE3B09A} = {E28AECBD-2904-477C-9817-C67312330A41} {22A3A359-C6F4-4540-A61F-C8E94A73C95E} = {120FE15B-3E5C-4BFF-B874-F09235C9E1ED} {FCE5BD62-F7C7-45EA-80DE-B4880C4A84C6} = {120FE15B-3E5C-4BFF-B874-F09235C9E1ED} {19A921F2-1587-4E94-A023-B81956874DAB} = {120FE15B-3E5C-4BFF-B874-F09235C9E1ED} - {23FA155F-6F79-4DAB-B39B-DD92224E3E4F} = {120FE15B-3E5C-4BFF-B874-F09235C9E1ED} {91A3257D-0D1A-479D-8F3C-DBB1944802FE} = {120FE15B-3E5C-4BFF-B874-F09235C9E1ED} {9C53260A-6F4B-4106-98B0-EDCC10BB3E1A} = {F8A8EB2A-2D4B-464F-9A13-F8F7B6A8FAA3} {D1CFD035-1562-42CF-A96A-0E2EA8D92E80} = {9C53260A-6F4B-4106-98B0-EDCC10BB3E1A} @@ -484,21 +394,28 @@ Global {DE15C716-E1C3-4FC3-B976-7EA06EBF23F5} = {D1CFD035-1562-42CF-A96A-0E2EA8D92E80} {430D3AF9-DCCF-4B6F-BFAF-1ECC2F0594A2} = {D1CFD035-1562-42CF-A96A-0E2EA8D92E80} {CC104C76-0CC6-453E-A49D-C4995B6EB72B} = {D1CFD035-1562-42CF-A96A-0E2EA8D92E80} - {E46D26ED-F43A-4651-8B0E-5566FBE14D89} = {D1CFD035-1562-42CF-A96A-0E2EA8D92E80} {13AF64F3-8962-4568-A0E1-833CCA1922D5} = {E76E35FC-B62E-48D5-A7AF-79375CFD20BD} {F9FADD90-8634-4B03-AC44-9F6C80B30E73} = {E76E35FC-B62E-48D5-A7AF-79375CFD20BD} {8BC28722-20CC-41BD-B183-4E33E94CA2A7} = {E76E35FC-B62E-48D5-A7AF-79375CFD20BD} - {7327CE44-55FD-4419-AF32-2A6745029732} = {E76E35FC-B62E-48D5-A7AF-79375CFD20BD} {6A398750-D7D8-43DC-8DF8-AA65C5766154} = {E76E35FC-B62E-48D5-A7AF-79375CFD20BD} {5AACD0EE-F2B2-49F6-868F-8FE08D7243C0} = {9C53260A-6F4B-4106-98B0-EDCC10BB3E1A} {8D196E3D-6F95-4793-B948-79669AF09017} = {5AACD0EE-F2B2-49F6-868F-8FE08D7243C0} {8C1B8C6C-C518-4290-B070-622CCA6004DA} = {2C861ADD-76E9-4B3B-8A3C-638EBB67D683} {2C09EED0-5AF6-4F1E-B05A-FB3272EDF6E8} = {CC2EBB07-A070-4158-AB37-A0C0BBAEA9F5} {11ED8435-B5AE-4BF3-9D4B-51FA1E4A18A6} = {2C09EED0-5AF6-4F1E-B05A-FB3272EDF6E8} - {F59B3C43-0B54-4A3A-AA28-1A50F59D2FC3} = {11ED8435-B5AE-4BF3-9D4B-51FA1E4A18A6} {FB20372D-6C96-4733-9AAC-12522F15CAA6} = {8C1B8C6C-C518-4290-B070-622CCA6004DA} {FB1C29FF-5467-4CF0-995D-5B3F931AB135} = {8C1B8C6C-C518-4290-B070-622CCA6004DA} - {C9861622-B0CB-4747-82CC-16664648A499} = {9528B5B6-C087-4932-92EA-EE486E97AAB0} + {A091AE9B-3A1E-49AC-9AD5-D29310512A3D} = {6434E3F2-B352-4B30-839A-88C2BA166D96} + {C018EFF9-579E-43B3-9181-543BE95E2E03} = {6434E3F2-B352-4B30-839A-88C2BA166D96} + {3F507591-5C8A-49A7-AB0A-043B64B7EC41} = {CC2EBB07-A070-4158-AB37-A0C0BBAEA9F5} + {1A57338B-65B1-4B8F-ABBD-83F4E8321D8F} = {3F507591-5C8A-49A7-AB0A-043B64B7EC41} + {48D938A1-36E4-4AC1-9AF2-645CB75D4A05} = {1A57338B-65B1-4B8F-ABBD-83F4E8321D8F} + {800F4482-EAC3-472B-AF07-53980D47AA41} = {11ED8435-B5AE-4BF3-9D4B-51FA1E4A18A6} + {6848FA46-EFFF-4E0C-8EAA-145D8C440333} = {C4AC9352-C9F5-4096-8D73-13638232CFB9} + {1EF5EF2B-323C-4DB0-B08A-37312A68E9DB} = {C4AC9352-C9F5-4096-8D73-13638232CFB9} + {870364BA-DD5C-4597-9047-BD8A0CA1CFBA} = {5C304CBC-F30D-413C-A0AF-8B6814A2D4A3} + {D9108313-8D05-4F5F-9AA0-B443EC3374B6} = {5C304CBC-F30D-413C-A0AF-8B6814A2D4A3} + {FC30B17B-F671-4E55-90C6-9F37E40B483D} = {CA9AC87F-097E-4F15-8393-4BC07735A5B0} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {28315BFD-90E7-4E14-A2EA-F3D23AF4126F} diff --git a/aspnet-core/frameworks/CAP/src/CompanyName.ProjectName.CAP/CompanyName.ProjectName.CAP.csproj b/aspnet-core/frameworks/CAP/src/Lion.Abp.Cap/Lion.Abp.Cap.csproj similarity index 58% rename from aspnet-core/frameworks/CAP/src/CompanyName.ProjectName.CAP/CompanyName.ProjectName.CAP.csproj rename to aspnet-core/frameworks/CAP/src/Lion.Abp.Cap/Lion.Abp.Cap.csproj index a66439af..4abac2ea 100644 --- a/aspnet-core/frameworks/CAP/src/CompanyName.ProjectName.CAP/CompanyName.ProjectName.CAP.csproj +++ b/aspnet-core/frameworks/CAP/src/Lion.Abp.Cap/Lion.Abp.Cap.csproj @@ -3,16 +3,15 @@ net5.0 - + - - - - - - - + + + + + + + - diff --git a/aspnet-core/frameworks/CAP/src/CompanyName.ProjectName.CAP/AbpCapConsumerServiceSelector.cs b/aspnet-core/frameworks/CAP/src/Lion.Abp.Cap/LionAbpCapConsumerServiceSelector.cs similarity index 96% rename from aspnet-core/frameworks/CAP/src/CompanyName.ProjectName.CAP/AbpCapConsumerServiceSelector.cs rename to aspnet-core/frameworks/CAP/src/Lion.Abp.Cap/LionAbpCapConsumerServiceSelector.cs index 09bcc232..46bd0f9a 100644 --- a/aspnet-core/frameworks/CAP/src/CompanyName.ProjectName.CAP/AbpCapConsumerServiceSelector.cs +++ b/aspnet-core/frameworks/CAP/src/Lion.Abp.Cap/LionAbpCapConsumerServiceSelector.cs @@ -10,11 +10,11 @@ using Volo.Abp.DependencyInjection; using Volo.Abp.EventBus; using Volo.Abp.EventBus.Distributed; -namespace CompanyName.ProjectName.CAP +namespace Lion.Abp.Cap { [Dependency(ServiceLifetime.Singleton, ReplaceServices = true)] [ExposeServices(typeof(IConsumerServiceSelector))] - public class AbpCapConsumerServiceSelector : ConsumerServiceSelector + public class LionAbpCapConsumerServiceSelector : ConsumerServiceSelector { protected AbpDistributedEventBusOptions AbpDistributedEventBusOptions { get; } protected IServiceProvider ServiceProvider { get; } @@ -22,7 +22,7 @@ namespace CompanyName.ProjectName.CAP /// /// Creates a new . /// - public AbpCapConsumerServiceSelector( + public LionAbpCapConsumerServiceSelector( IServiceProvider serviceProvider, IOptions distributedEventBusOptions) : base(serviceProvider) diff --git a/aspnet-core/frameworks/CAP/src/CompanyName.ProjectName.CAP/AbpCapDistributedEventBus.cs b/aspnet-core/frameworks/CAP/src/Lion.Abp.Cap/LionAbpCapDistributedEventBus.cs similarity index 97% rename from aspnet-core/frameworks/CAP/src/CompanyName.ProjectName.CAP/AbpCapDistributedEventBus.cs rename to aspnet-core/frameworks/CAP/src/Lion.Abp.Cap/LionAbpCapDistributedEventBus.cs index 9a91f867..473411d8 100644 --- a/aspnet-core/frameworks/CAP/src/CompanyName.ProjectName.CAP/AbpCapDistributedEventBus.cs +++ b/aspnet-core/frameworks/CAP/src/Lion.Abp.Cap/LionAbpCapDistributedEventBus.cs @@ -14,9 +14,9 @@ using Volo.Abp.MultiTenancy; using Volo.Abp.Threading; -namespace CompanyName.ProjectName.CAP +namespace Lion.Abp.Cap { - public class AbpCapDistributedEventBus : + public class LionAbpCapDistributedEventBus : EventBusBase, IDistributedEventBus, ISingletonDependency @@ -27,7 +27,7 @@ namespace CompanyName.ProjectName.CAP protected readonly ICapPublisher CapPublisher; - public AbpCapDistributedEventBus(IServiceScopeFactory serviceScopeFactory, + public LionAbpCapDistributedEventBus(IServiceScopeFactory serviceScopeFactory, IOptions distributedEventBusOptions, ICapPublisher capPublisher, ICurrentTenant currentTenant, diff --git a/aspnet-core/frameworks/CAP/src/CompanyName.ProjectName.CAP/AbpCapModule.cs b/aspnet-core/frameworks/CAP/src/Lion.Abp.Cap/LionAbpCapModule.cs similarity index 58% rename from aspnet-core/frameworks/CAP/src/CompanyName.ProjectName.CAP/AbpCapModule.cs rename to aspnet-core/frameworks/CAP/src/Lion.Abp.Cap/LionAbpCapModule.cs index 174aeba7..a6af78d7 100644 --- a/aspnet-core/frameworks/CAP/src/CompanyName.ProjectName.CAP/AbpCapModule.cs +++ b/aspnet-core/frameworks/CAP/src/Lion.Abp.Cap/LionAbpCapModule.cs @@ -1,10 +1,10 @@ using Volo.Abp.EventBus; using Volo.Abp.Modularity; -namespace CompanyName.ProjectName.CAP +namespace Lion.Abp.Cap { [DependsOn(typeof(AbpEventBusModule))] - public class AbpCapModule : AbpModule + public class LionAbpCapModule : AbpModule { } } \ No newline at end of file diff --git a/aspnet-core/frameworks/CAP/src/CompanyName.ProjectName.CAP/AbpCapServiceCollectionExtensions.cs b/aspnet-core/frameworks/CAP/src/Lion.Abp.Cap/LionAbpCapServiceCollectionExtensions.cs similarity index 85% rename from aspnet-core/frameworks/CAP/src/CompanyName.ProjectName.CAP/AbpCapServiceCollectionExtensions.cs rename to aspnet-core/frameworks/CAP/src/Lion.Abp.Cap/LionAbpCapServiceCollectionExtensions.cs index a67fc0e8..c7259f43 100644 --- a/aspnet-core/frameworks/CAP/src/CompanyName.ProjectName.CAP/AbpCapServiceCollectionExtensions.cs +++ b/aspnet-core/frameworks/CAP/src/Lion.Abp.Cap/LionAbpCapServiceCollectionExtensions.cs @@ -5,7 +5,7 @@ using Microsoft.Extensions.DependencyInjection; using Volo.Abp.EventBus.Distributed; using Volo.Abp.Modularity; -namespace CompanyName.ProjectName.CAP +namespace Lion.Abp.Cap { public static class AbpCapServiceCollectionExtensions { @@ -14,8 +14,8 @@ namespace CompanyName.ProjectName.CAP Action capAction) { context.Services.AddCap(capAction); - context.Services.AddSingleton(); - context.Services.AddSingleton(); + context.Services.AddSingleton(); + context.Services.AddSingleton(); return context; } } diff --git a/aspnet-core/modules/QueryManagement/src/CompanyName.ProjectName.QueryManagement.ElasticSearch/ElasticsearchBasicRepository.cs b/aspnet-core/frameworks/ElasticSearch/src/Lion.Abp.ElasticSearch/ElasticsearchBasicRepository.cs similarity index 82% rename from aspnet-core/modules/QueryManagement/src/CompanyName.ProjectName.QueryManagement.ElasticSearch/ElasticsearchBasicRepository.cs rename to aspnet-core/frameworks/ElasticSearch/src/Lion.Abp.ElasticSearch/ElasticsearchBasicRepository.cs index cbb47496..0f62da8f 100644 --- a/aspnet-core/modules/QueryManagement/src/CompanyName.ProjectName.QueryManagement.ElasticSearch/ElasticsearchBasicRepository.cs +++ b/aspnet-core/frameworks/ElasticSearch/src/Lion.Abp.ElasticSearch/ElasticsearchBasicRepository.cs @@ -1,12 +1,13 @@ using Nest; using Volo.Abp.Domain.Services; -namespace CompanyName.ProjectName.QueryManagement.ElasticSearch +namespace Lion.Abp.ElasticSearch { public abstract class ElasticsearchBasicRepository : DomainService { private readonly IElasticsearchProvider _elasticsearchProvider; + // ReSharper disable once PublicConstructorInAbstractClass public ElasticsearchBasicRepository(IElasticsearchProvider elasticsearchProvider) { _elasticsearchProvider = elasticsearchProvider; diff --git a/aspnet-core/modules/QueryManagement/src/CompanyName.ProjectName.QueryManagement.ElasticSearch/ElasticsearchProvider.cs b/aspnet-core/frameworks/ElasticSearch/src/Lion.Abp.ElasticSearch/ElasticsearchProvider.cs similarity index 73% rename from aspnet-core/modules/QueryManagement/src/CompanyName.ProjectName.QueryManagement.ElasticSearch/ElasticsearchProvider.cs rename to aspnet-core/frameworks/ElasticSearch/src/Lion.Abp.ElasticSearch/ElasticsearchProvider.cs index 19a42ac8..b28fa7c3 100644 --- a/aspnet-core/modules/QueryManagement/src/CompanyName.ProjectName.QueryManagement.ElasticSearch/ElasticsearchProvider.cs +++ b/aspnet-core/frameworks/ElasticSearch/src/Lion.Abp.ElasticSearch/ElasticsearchProvider.cs @@ -4,7 +4,7 @@ using Microsoft.Extensions.Configuration; using Nest; using Volo.Abp.DependencyInjection; -namespace CompanyName.ProjectName.QueryManagement.ElasticSearch +namespace Lion.Abp.ElasticSearch { public class ElasticsearchProvider : IElasticsearchProvider, ISingletonDependency { @@ -17,13 +17,12 @@ namespace CompanyName.ProjectName.QueryManagement.ElasticSearch public IElasticClient GetElasticClient() { - var pool = new SingleNodeConnectionPool(new Uri(_configuration.GetValue("LogToElasticSearch:ElasticSearch:Url"))); + var pool = new SingleNodeConnectionPool(new Uri(_configuration.GetValue("ElasticSearch:Url"))); var connectionSettings = new ConnectionSettings(pool); connectionSettings.EnableHttpCompression(); - connectionSettings.BasicAuthentication(_configuration.GetValue("LogToElasticSearch:ElasticSearch:UserName"), - _configuration.GetValue("LogToElasticSearch:ElasticSearch:Password")); - + connectionSettings.BasicAuthentication(_configuration.GetValue("ElasticSearch:UserName"), + _configuration.GetValue("ElasticSearch:Password")); return new ElasticClient(connectionSettings); } } diff --git a/aspnet-core/modules/QueryManagement/src/CompanyName.ProjectName.QueryManagement.ElasticSearch/IElasticsearchProvider.cs b/aspnet-core/frameworks/ElasticSearch/src/Lion.Abp.ElasticSearch/IElasticsearchProvider.cs similarity index 63% rename from aspnet-core/modules/QueryManagement/src/CompanyName.ProjectName.QueryManagement.ElasticSearch/IElasticsearchProvider.cs rename to aspnet-core/frameworks/ElasticSearch/src/Lion.Abp.ElasticSearch/IElasticsearchProvider.cs index 4aba5714..52bcb74b 100644 --- a/aspnet-core/modules/QueryManagement/src/CompanyName.ProjectName.QueryManagement.ElasticSearch/IElasticsearchProvider.cs +++ b/aspnet-core/frameworks/ElasticSearch/src/Lion.Abp.ElasticSearch/IElasticsearchProvider.cs @@ -1,8 +1,7 @@ -using System; -using Nest; +using Nest; using Volo.Abp.DependencyInjection; -namespace CompanyName.ProjectName.QueryManagement.ElasticSearch +namespace Lion.Abp.ElasticSearch { public interface IElasticsearchProvider : ISingletonDependency { diff --git a/aspnet-core/frameworks/ElasticSearch/src/Lion.Abp.ElasticSearch/Lion.Abp.ElasticSearch.csproj b/aspnet-core/frameworks/ElasticSearch/src/Lion.Abp.ElasticSearch/Lion.Abp.ElasticSearch.csproj new file mode 100644 index 00000000..fc45aead --- /dev/null +++ b/aspnet-core/frameworks/ElasticSearch/src/Lion.Abp.ElasticSearch/Lion.Abp.ElasticSearch.csproj @@ -0,0 +1,10 @@ + + + + net5.0 + + + + + + diff --git a/aspnet-core/frameworks/ElasticSearch/src/Lion.Abp.ElasticSearch/LionAbpElasticSearchModule.cs b/aspnet-core/frameworks/ElasticSearch/src/Lion.Abp.ElasticSearch/LionAbpElasticSearchModule.cs new file mode 100644 index 00000000..76d7aee4 --- /dev/null +++ b/aspnet-core/frameworks/ElasticSearch/src/Lion.Abp.ElasticSearch/LionAbpElasticSearchModule.cs @@ -0,0 +1,9 @@ +using System; +using Volo.Abp.Modularity; + +namespace Lion.Abp.ElasticSearch +{ + public class LionAbpElasticSearchModule : AbpModule + { + } +} \ No newline at end of file diff --git a/aspnet-core/frameworks/Extensions/src/Lion.Abp.Domain/Lion.Abp.Domain.csproj b/aspnet-core/frameworks/Extensions/src/Lion.Abp.Domain/Lion.Abp.Domain.csproj new file mode 100644 index 00000000..a34a15b3 --- /dev/null +++ b/aspnet-core/frameworks/Extensions/src/Lion.Abp.Domain/Lion.Abp.Domain.csproj @@ -0,0 +1,12 @@ + + + + net5.0 + + + + + + + + diff --git a/aspnet-core/frameworks/Extensions/src/Lion.Abp.Domain/LionAbpDomainModule.cs b/aspnet-core/frameworks/Extensions/src/Lion.Abp.Domain/LionAbpDomainModule.cs new file mode 100644 index 00000000..24820528 --- /dev/null +++ b/aspnet-core/frameworks/Extensions/src/Lion.Abp.Domain/LionAbpDomainModule.cs @@ -0,0 +1,13 @@ +using Volo.Abp.Domain; +using Volo.Abp.Modularity; +using Volo.Abp.ObjectMapping; + +namespace Lion.Abp.Domain +{ + [DependsOn( + typeof(AbpDddDomainModule), + typeof(AbpObjectMappingModule))] + public class LionAbpDomainModule : AbpModule + { + } +} \ No newline at end of file diff --git a/aspnet-core/frameworks/Extensions/src/Lion.Abp.Domain/LionAbpDomainService.cs b/aspnet-core/frameworks/Extensions/src/Lion.Abp.Domain/LionAbpDomainService.cs new file mode 100644 index 00000000..1a3f4c75 --- /dev/null +++ b/aspnet-core/frameworks/Extensions/src/Lion.Abp.Domain/LionAbpDomainService.cs @@ -0,0 +1,36 @@ +using System; +using Microsoft.Extensions.DependencyInjection; +using Volo.Abp.Domain.Services; +using Volo.Abp.EventBus.Distributed; +using Volo.Abp.ObjectMapping; +using Volo.Abp.Uow; + +namespace Lion.Abp.Domain +{ + public abstract class LionAbpDomainService : DomainService + { + protected Type ObjectMapperContext { get; set; } + + /// + /// 工作单元管理器 + /// + protected IUnitOfWorkManager UnitOfWorkManager => + LazyServiceProvider.LazyGetRequiredService(); + + /// + /// 分布式事件总线 + /// + protected IDistributedEventBus DistributedEventBus => + LazyServiceProvider.LazyGetRequiredService(); + + /// + /// 对象映射器 + /// + protected IObjectMapper ObjectMapper => LazyServiceProvider.LazyGetService( + provider => + ObjectMapperContext == null + ? provider.GetRequiredService() + : (IObjectMapper)provider.GetRequiredService( + typeof(IObjectMapper<>).MakeGenericType(ObjectMapperContext))); + } +} \ No newline at end of file diff --git a/aspnet-core/frameworks/Extensions/src/Lion.Abp.Extension/Customs/Dtos/CustomeListResultDto.cs b/aspnet-core/frameworks/Extensions/src/Lion.Abp.Extension/Customs/Dtos/CustomeListResultDto.cs new file mode 100644 index 00000000..e04b9f58 --- /dev/null +++ b/aspnet-core/frameworks/Extensions/src/Lion.Abp.Extension/Customs/Dtos/CustomeListResultDto.cs @@ -0,0 +1,26 @@ +using System; +using System.Collections.Generic; + +namespace Lion.Abp.Extension +{ + [Serializable] + public class CustomeListResultDto + { + public IReadOnlyList Items + { + get { return _items ??= new List(); } + set => _items = value; + } + + private IReadOnlyList _items; + + public CustomeListResultDto() + { + } + + public CustomeListResultDto(IReadOnlyList items) + { + Items = items; + } + } +} \ No newline at end of file diff --git a/aspnet-core/frameworks/Extensions/src/Lion.Abp.Extension/Customs/Dtos/CustomePagedResultDto.cs b/aspnet-core/frameworks/Extensions/src/Lion.Abp.Extension/Customs/Dtos/CustomePagedResultDto.cs new file mode 100644 index 00000000..ecedba44 --- /dev/null +++ b/aspnet-core/frameworks/Extensions/src/Lion.Abp.Extension/Customs/Dtos/CustomePagedResultDto.cs @@ -0,0 +1,21 @@ +using System; +using System.Collections.Generic; + +namespace Lion.Abp.Extension +{ + [Serializable] + public class CustomePagedResultDto : CustomeListResultDto + { + public long TotalCount { get; set; } + + public CustomePagedResultDto() + { + } + + public CustomePagedResultDto(long totalCount, IReadOnlyList items) + : base(items) + { + TotalCount = totalCount; + } + } +} \ No newline at end of file diff --git a/aspnet-core/frameworks/Extensions/src/Lion.Abp.Extension/Customs/Dtos/FromSelector.cs b/aspnet-core/frameworks/Extensions/src/Lion.Abp.Extension/Customs/Dtos/FromSelector.cs new file mode 100644 index 00000000..e50345ea --- /dev/null +++ b/aspnet-core/frameworks/Extensions/src/Lion.Abp.Extension/Customs/Dtos/FromSelector.cs @@ -0,0 +1,41 @@ +namespace Lion.Abp.Extension +{ + + + public abstract class FromSelectorBase + { + protected FromSelectorBase(int value, string label) + { + Value = value; + Label = label; + } + public int Value { get; protected set; } + public string Label { get; protected set; } + } + + public abstract class FromSelectorBase + { + protected FromSelectorBase(TValue value, TLabel label) + { + Value = value; + Label = label; + } + + public TValue Value { get; protected set; } + public TLabel Label { get; protected set; } + } + + public class FromSelector : FromSelectorBase + { + public FromSelector(int value, string label) : base(value, label) + { + } + } + + public class FromSelector : FromSelectorBase + { + public FromSelector(TValue value, TLabel label) : base(value, label) + { + } + } +} \ No newline at end of file diff --git a/aspnet-core/frameworks/Extensions/src/Lion.Abp.Extension/Customs/Dtos/IdInput.cs b/aspnet-core/frameworks/Extensions/src/Lion.Abp.Extension/Customs/Dtos/IdInput.cs new file mode 100644 index 00000000..fc4b3eff --- /dev/null +++ b/aspnet-core/frameworks/Extensions/src/Lion.Abp.Extension/Customs/Dtos/IdInput.cs @@ -0,0 +1,9 @@ +using System; + +namespace Lion.Abp.Extension +{ + public class IdInput + { + public Guid Id { get; set; } + } +} \ No newline at end of file diff --git a/aspnet-core/frameworks/Extensions/src/Lion.Abp.Extension/Customs/Dtos/PagingBase.cs b/aspnet-core/frameworks/Extensions/src/Lion.Abp.Extension/Customs/Dtos/PagingBase.cs new file mode 100644 index 00000000..1b77504a --- /dev/null +++ b/aspnet-core/frameworks/Extensions/src/Lion.Abp.Extension/Customs/Dtos/PagingBase.cs @@ -0,0 +1,59 @@ +using System.Collections.Generic; +using System.ComponentModel.DataAnnotations; + +namespace Lion.Abp.Extension +{ + + + /// + /// 分页查询时使用的Dto类型 + /// + public class PagingBase : IValidatableObject + { + public const int MaxPageSize = 100000; + + /// + /// 当前页面.默认从1开始 + /// + public int PageIndex { get; set; } = 1; + + /// + /// 每页多少条.每页显示多少记录 + /// + public int PageSize { get; set; } = 10; + + /// + /// 跳过多少条 + /// + public int SkipCount => (PageIndex - 1) * PageSize; + + protected PagingBase() + { + } + + public PagingBase(int pageIndex = 1, int pageSize = 10) + { + PageIndex = pageIndex; + PageSize = pageSize; + } + + public virtual IEnumerable Validate(ValidationContext validationContext) + { + if (PageIndex < 1) + { + yield return new ValidationResult( + "起始页必须大于等于1", + new[] { "PageIndex"} + ); + } + + if (PageSize > MaxPageSize) + { + yield return new ValidationResult( + $"每页最大记录数不能超过'{MaxPageSize}'", + new[] { "PageSize"} + ); + } + } + } +} \ No newline at end of file diff --git a/aspnet-core/frameworks/Extensions/src/Lion.Abp.Extension/Customs/Guard.cs b/aspnet-core/frameworks/Extensions/src/Lion.Abp.Extension/Customs/Guard.cs new file mode 100644 index 00000000..bab1227d --- /dev/null +++ b/aspnet-core/frameworks/Extensions/src/Lion.Abp.Extension/Customs/Guard.cs @@ -0,0 +1,302 @@ +using System; +using System.Collections.Generic; +using System.Diagnostics; +using System.IO; +using System.Linq; + +namespace Lion.Abp.Extension +{ + /// + /// 参数合法性检查类 + /// + [DebuggerStepThrough] + public static class Guard + { + /// + /// 检查参数不能为空引用, + /// 否则抛出异常。 + /// + /// + /// 参数名称 + /// + public static T NotNull(T value, string valueName) + { + if (null == value) + { + throw new ArgumentNullException(valueName); + } + + return value; + } + + /// + /// 检查字符串不能为空引用或空字符串, + /// 否则抛出异常 + /// 或异常 + /// 或异常。 + /// + /// + /// 参数名称。 + /// 字符串允许的最大长度。 + /// 字符串允许的最小长度。0表示不限制最小长度 + /// + /// + /// + public static string NotNullOrEmpty(string value, string valueName, int maxLength = int.MaxValue, + int minLength = 0) + { + if (string.IsNullOrEmpty(value)) + { + throw new ArgumentNullException(valueName); + } + + if (value.Length > maxLength) + { + throw new ArgumentOutOfRangeException(valueName); + } + + if (minLength > 0 && value.Length < minLength) + { + throw new ArgumentOutOfRangeException(valueName); + } + + return value; + } + + /// + /// 检查字符串不能为空引用或全部为空白, + /// 否则抛出异常 + /// 或异常 + /// 或异常。 + /// + /// 需检查的字符串 + /// 参数名称。 + /// 字符串允许的最大长度。 + /// 字符串允许的最小长度。0表示不限制最小长度 + /// + /// + /// + public static string NotNullOrWhiteSpace( + string value, + string valueName, + int maxLength = int.MaxValue, + int minLength = 0) + { + if (string.IsNullOrWhiteSpace(value)) + { + throw new ArgumentNullException(valueName); + } + + if (value.Length > maxLength) + { + throw new ArgumentOutOfRangeException(valueName); + } + + if (minLength > 0 && value.Length < minLength) + { + throw new ArgumentOutOfRangeException(valueName); + } + + return value; + } + + /// + /// 检查字符串长度是否超过最大长度,或低于最小长度, + /// 否则抛出异常 + /// 或异常。 + /// + /// 需检查的字符串。 + /// 参数名称。 + /// 字符串允许的最大长度。 + /// 字符串要求的最小长度。0表示不限制最小长度 + /// + /// + public static string Length(string value, string valueName, int maxLength = int.MaxValue, + int minLength = 0) + { + if (string.IsNullOrEmpty(value)) + { + return value; + } + + if (value.Length > maxLength) + { + throw new ArgumentOutOfRangeException(valueName); + } + + if (minLength > 0 && value.Length < minLength) + { + throw new ArgumentOutOfRangeException(valueName); + } + + return value; + } + + /// + /// 检查Guid值不能为Guid.Empty,否则抛出异常。 + /// + /// + /// 参数名称。 + /// + public static Guid NotEmpty( + Guid value, + string valueName) + { + if (value == Guid.Empty) + { + throw new ArgumentNullException(valueName); + } + + return value; + } + + /// + /// 检查集合不能为空引用或空集合, + /// 否则抛出异常。 + /// + /// 集合项的类型。 + /// + /// 参数名称。 + /// + public static void NotNullOrEmpty( + IReadOnlyList list, + string valueName) + { + if (null == list || !list.Any()) + { + throw new ArgumentNullException(valueName); + } + } + + /// + /// 检查参数必须小于[或可等于,参数]指定值, + /// 否则抛出异常。 + /// + /// 参数类型。 + /// + /// 参数名称。 + /// 要比较的值。 + /// 是否可等于。 + /// + public static void LessThan( + T value, + string valueName, + T target, + bool canEqual = false) + where T : IComparable + { + var flag = canEqual ? value.CompareTo(target) <= 0 : value.CompareTo(target) < 0; + if (!flag) + { + throw new ArgumentOutOfRangeException(valueName); + } + } + + /// + /// 检查参数必须大于[或可等于,参数]指定值, + /// 否则抛出异常。 + /// + /// 参数类型。 + /// 需检查的参数。 + /// 参数名称。 + /// 要比较的值。 + /// 是否可等于。 + /// + public static void GreaterThan( + T value, + string valueName, + T target, + bool canEqual = false) + where T : IComparable + { + var flag = canEqual ? value.CompareTo(target) >= 0 : value.CompareTo(target) > 0; + if (!flag) + { + throw new ArgumentOutOfRangeException(valueName); + } + } + + /// + /// 检查参数必须在指定范围之间,否则抛出异常。 + /// + /// 参数类型。 + /// 需检查的参数。 + /// 参数名称。 + /// 比较范围的起始值。 + /// 比较范围的结束值。 + /// 是否可等于起始值 + /// 是否可等于结束值 + /// 不在指定范围内时 + public static void Between( + T value, + string valueName, + T start, + T end, + bool startEqual = false, + bool endEqual = false) + where T : IComparable + { + var flag = startEqual ? value.CompareTo(start) >= 0 : value.CompareTo(start) > 0; + if (!flag) + { + throw new ArgumentOutOfRangeException(valueName); + } + + flag = endEqual ? value.CompareTo(end) <= 0 : value.CompareTo(end) < 0; + if (!flag) + { + throw new ArgumentOutOfRangeException(valueName); + } + } + + /// + /// 检查指定路径的文件夹必须存在, + /// 否则抛出异常 + /// 或 异常。 + /// + /// 需检查的路径。 + /// 参数名称。 + /// 当文件夹路径为null或空时 + /// 当文件夹路径不存在时 + public static string DirectoryExists( + string directory, + string parameterName) + { + if (string.IsNullOrWhiteSpace(directory)) + { + throw new DirectoryNotFoundException(parameterName); + } + + if (!Directory.Exists(directory)) + { + throw new DirectoryNotFoundException(directory); + } + + return directory; + } + + /// + /// 检查指定路径的文件必须存在,否则抛出异常。 + /// + /// + /// 参数名称。 + /// 当文件路径为null或空时 + /// 当文件路径不存在时 + public static string FileExists( + string filename, + string valueName) + { + if (string.IsNullOrWhiteSpace(filename)) + { + throw new ArgumentNullException(valueName); + } + + if (!File.Exists(filename)) + { + throw new FileNotFoundException(filename); + } + + return filename; + } + } +} diff --git a/aspnet-core/frameworks/Extensions/src/Lion.Abp.Extension/Customs/Http/HttpClientHelper.cs b/aspnet-core/frameworks/Extensions/src/Lion.Abp.Extension/Customs/Http/HttpClientHelper.cs new file mode 100644 index 00000000..a4f23846 --- /dev/null +++ b/aspnet-core/frameworks/Extensions/src/Lion.Abp.Extension/Customs/Http/HttpClientHelper.cs @@ -0,0 +1,164 @@ +using Newtonsoft.Json; +using System; +using System.Collections.Generic; +using System.Net.Http; +using System.Net.Http.Headers; +using System.Text; +using System.Threading.Tasks; + +namespace Lion.Abp.Extension +{ + /// + /// 基于IHttpClientFactory二次封装httpclient + /// + public static class HttpClientHelper + { + + public static async Task GetAsync(this IHttpClientFactory _httpClientFactory, string clientName, string url, Dictionary headers = null) where TResult : class + { + try + { + var client = _httpClientFactory.CreateClient(clientName); + if (headers != null && headers.Count > 0) + { + foreach (var item in headers) + { + client.DefaultRequestHeaders.Add(item.Key, item.Value); + } + + } + + client.DefaultRequestHeaders.CacheControl = CacheControlHeaderValue.Parse("no-cache"); + + //执行请求 + var response = await client.GetAsync(url); + var result = await response.Content.ReadAsStringAsync(); + if (response.IsSuccessStatusCode) + { + if (result != null && !string.IsNullOrEmpty(result)) + return JsonConvert.DeserializeObject(result); + else + return default(TResult); + } + else + { + if (string.IsNullOrEmpty(result)) + result = response.ReasonPhrase; + throw new Exception(result); + } + } + catch (Exception e) + { + throw new Exception(e.Message); + } + } + + public static async Task PostAsync(this IHttpClientFactory _httpClientFactory, string clientName, string url, T obj, Dictionary headers = null) where T : class where TResult : class + { + var data = typeof(T).Name.ToLower() == "string" ? obj.ToString() : JsonConvert.SerializeObject(obj); + var client = _httpClientFactory.CreateClient(clientName); + if (headers != null && headers.Count > 0) + { + foreach (var item in headers) + { + client.DefaultRequestHeaders.Add(item.Key, item.Value); + } + } + + client.DefaultRequestHeaders.CacheControl = CacheControlHeaderValue.Parse("no-cache"); + //post 参数 + var content = new StringContent(data, Encoding.UTF8, "application/json"); + //执行请求 + var response = await client.PostAsync(url, content); + + var result = await response.Content.ReadAsStringAsync(); + if (response.IsSuccessStatusCode) + { + if (result != null && !string.IsNullOrEmpty(result)) + return JsonConvert.DeserializeObject(result); + else + return default(TResult); + } + else + { + if (string.IsNullOrEmpty(result)) + result = response.ReasonPhrase; + + throw new Exception(result); + } + } + + public static async Task PutAsync(this IHttpClientFactory _httpClientFactory, string clientName, string url, T obj, Dictionary headers = null) where T : class where TResult : class + { + var data = typeof(T).Name.ToLower() == "string" ? obj.ToString() : JsonConvert.SerializeObject(obj); + var client = _httpClientFactory.CreateClient(clientName); + if (headers != null && headers.Count > 0) + { + foreach (var item in headers) + { + client.DefaultRequestHeaders.Add(item.Key, item.Value); + } + } + + client.DefaultRequestHeaders.CacheControl = CacheControlHeaderValue.Parse("no-cache"); + //post 参数 + var content = new StringContent(data, Encoding.UTF8, "application/json"); + //执行请求 + var response = await client.PutAsync(url, content); + + var result = await response.Content.ReadAsStringAsync(); + if (response.IsSuccessStatusCode) + { + if (result != null && !string.IsNullOrEmpty(result)) + return JsonConvert.DeserializeObject(result); + else + return default(TResult); + } + else + { + if (string.IsNullOrEmpty(result)) + result = response.ReasonPhrase; + + throw new Exception(result); + } + } + + public static async Task DeleteAsync(this IHttpClientFactory _httpClientFactory, string clientName, string url, Dictionary headers = null) where TResult : class + { + try + { + var client = _httpClientFactory.CreateClient(clientName); + if (headers != null && headers.Count > 0) + { + foreach (var item in headers) + { + client.DefaultRequestHeaders.Add(item.Key, item.Value); + } + } + + client.DefaultRequestHeaders.CacheControl = CacheControlHeaderValue.Parse("no-cache"); + + //执行请求 + var response = await client.DeleteAsync(url); + var result = await response.Content.ReadAsStringAsync(); + if (response.IsSuccessStatusCode) + { + if (result != null && !string.IsNullOrEmpty(result)) + return JsonConvert.DeserializeObject(result); + else + return default(TResult); + } + else + { + if (string.IsNullOrEmpty(result)) + result = response.ReasonPhrase; + throw new Exception(result); + } + } + catch (Exception e) + { + throw new Exception(e.Message); + } + } + } +} diff --git a/aspnet-core/frameworks/Extensions/src/Lion.Abp.Extension/Lion.Abp.Extension.csproj b/aspnet-core/frameworks/Extensions/src/Lion.Abp.Extension/Lion.Abp.Extension.csproj new file mode 100644 index 00000000..3ac701d6 --- /dev/null +++ b/aspnet-core/frameworks/Extensions/src/Lion.Abp.Extension/Lion.Abp.Extension.csproj @@ -0,0 +1,18 @@ + + + + net5.0 + + + + + + + + + + + + + + diff --git a/aspnet-core/frameworks/Extensions/src/Lion.Abp.Extension/System/BooleanExtensions.cs b/aspnet-core/frameworks/Extensions/src/Lion.Abp.Extension/System/BooleanExtensions.cs new file mode 100644 index 00000000..1c4b83bf --- /dev/null +++ b/aspnet-core/frameworks/Extensions/src/Lion.Abp.Extension/System/BooleanExtensions.cs @@ -0,0 +1,27 @@ +namespace System +{ + /// + /// 布尔值类型的扩展辅助操作类 + /// + public static class BooleanExtensions + { + /// + /// 把布尔值转换为小写字符串 + /// + public static string ToLower(this bool value) + { + return value.ToString().ToLower(); + } + + /// + /// 如果条件成立,则抛出异常 + /// + public static void TrueThrow(this bool flag, Exception exception) + { + if (flag) + { + throw exception; + } + } + } +} \ No newline at end of file diff --git a/aspnet-core/frameworks/Extensions/src/Lion.Abp.Extension/System/Collections/Generic/CollectionExtensions.cs b/aspnet-core/frameworks/Extensions/src/Lion.Abp.Extension/System/Collections/Generic/CollectionExtensions.cs new file mode 100644 index 00000000..2ce33be8 --- /dev/null +++ b/aspnet-core/frameworks/Extensions/src/Lion.Abp.Extension/System/Collections/Generic/CollectionExtensions.cs @@ -0,0 +1,77 @@ +using System.Linq; +using Lion.Abp.Extension; + +namespace System.Collections.Generic +{ + /// + /// 集合扩展方法 + /// + public static class CollectionExtensions + { + /// + /// 如果条件成立,添加项 + /// + public static void AddIf(this ICollection collection, T value, bool flag) + { + Guard.NotNull(collection, nameof(collection)); + if (flag) + { + collection.Add(value); + } + } + + /// + /// 如果条件成立,添加项 + /// + public static void AddIf(this ICollection collection, T value, Func func) + { + Guard.NotNull(collection, nameof(collection)); + if (func()) + { + collection.Add(value); + } + } + + /// + /// 获取对象,不存在对使用委托添加对象 + /// + public static T GetOrAdd(this ICollection collection, Func selector, Func factory) + { + Guard.NotNull(collection, nameof(collection)); + T item = collection.FirstOrDefault(selector); + if (item == null) + { + item = factory(); + collection.Add(item); + } + + return item; + } + + /// + /// 判断集合是否为null或空集合 + /// + public static bool IsNullOrEmpty(this ICollection collection) + { + return collection == null || collection.Count == 0; + } + + /// + /// 交换两项的位置 + /// + public static void Swap(this List list, int index1, int index2) + { + Guard.Between(index1, nameof(index1), 0, list.Count, true); + Guard.Between(index2, nameof(index2), 0, list.Count, true); + + if (index1 == index2) + { + return; + } + + T tmp = list[index1]; + list[index1] = list[index2]; + list[index2] = tmp; + } + } +} \ No newline at end of file diff --git a/aspnet-core/frameworks/Extensions/src/Lion.Abp.Extension/System/Collections/Generic/EnumerableExtensions.cs b/aspnet-core/frameworks/Extensions/src/Lion.Abp.Extension/System/Collections/Generic/EnumerableExtensions.cs new file mode 100644 index 00000000..53b28bc3 --- /dev/null +++ b/aspnet-core/frameworks/Extensions/src/Lion.Abp.Extension/System/Collections/Generic/EnumerableExtensions.cs @@ -0,0 +1,199 @@ +using System.Linq; +using System.Text; +using Lion.Abp.Extension; +namespace System.Collections.Generic +{ + /// + /// Enumerable集合扩展方法 + /// + public static class EnumerableExtensions + { + /// 断言集合中的元素符合指定表达式,否则抛出异常。 + /// 集合项类型 + /// 源集合 + /// 元素判断表达式 + /// 异常选择器 + /// 筛选过的集合 + public static IEnumerable Assert(this IEnumerable source, Func predicate, + Func errorSelector = null) + { + foreach (var item in source) + { + var success = predicate(item); + if (!success) + { + throw errorSelector?.Invoke(item) ?? + new InvalidOperationException("集合中包含无效的元素。"); + } + + yield return item; + } + } + + /// + /// 打乱一个集合的项顺序,将一个集合洗牌 + /// + public static IEnumerable Shuffle(this IEnumerable source) + { + // ReSharper disable PossibleMultipleEnumeration + + Guard.NotNull(source, nameof(source)); + return source.OrderBy(m => Guid.NewGuid()); + + // ReSharper restore PossibleMultipleEnumeration + } + + /// + /// 将集合展开并分别转换成字符串,再以指定的分隔符衔接,拼成一个字符串返回。默认分隔符为逗号。 + /// + /// 要处理的集合 + /// 分隔符,默认为逗号 + /// 拼接后的字符串 + public static string ExpandAndToString(this IEnumerable collection, string separator = ",") + { + return collection.ExpandAndToString(item => item?.ToString() ?? string.Empty, separator); + } + + /// + /// 循环集合的每一项,调用委托生成字符串,返回合并后的字符串。默认分隔符为逗号 + /// + /// 待处理的集合 + /// 单个集合项的转换委托 + /// 分隔符,默认为逗号 + /// 泛型类型 + /// + public static string ExpandAndToString( + this IEnumerable collection, + Func itemFormatFunc, + string separator = ",") + { + collection = collection as IList ?? collection.ToList(); + Guard.NotNull(itemFormatFunc, nameof(itemFormatFunc)); + + if (!collection.Any()) + { + return string.Empty; + } + + var sb = new StringBuilder(); + var i = 0; + var count = collection.Count(); + foreach (var item in collection) + { + if (i == count - 1) + { + sb.Append(itemFormatFunc(item)); + } + else + { + sb.Append(itemFormatFunc(item) + separator); + } + + i++; + } + + return sb.ToString(); + } + + /// + /// 集合是否为空 + /// + /// 要处理的集合 + /// 动态类型 + /// 为空返回True,不为空返回False + public static bool IsEmpty(this IEnumerable collection) + { + collection = collection as IList ?? collection.ToList(); + return !collection.Any(); + } + + /// + /// 根据第三方条件是否为真来决定是否执行指定条件的查询 + /// + /// 要查询的源 + /// 查询条件 + /// 第三方条件 + /// 动态类型 + /// 查询的结果 + public static IEnumerable WhereIf(this IEnumerable source, Func predicate, bool condition) + { + Guard.NotNull(predicate, nameof(predicate)); + source = source as IList ?? source.ToList(); + + return condition ? source.Where(predicate) : source; + } + + /// + /// 将字符串集合按指定前缀排序 + /// + public static IEnumerable OrderByPrefixes(this IEnumerable source, Func keySelector, + params string[] prefixes) + { + var all = source.OrderBy(keySelector).ToList(); + var result = new List(); + foreach (var prefix in prefixes) + { + var tmpList = all.Where(m => keySelector(m).StartsWith(prefix)).OrderBy(keySelector).ToList(); + all = all.Except(tmpList).ToList(); + result.AddRange(tmpList); + } + + result.AddRange(all); + return result; + } + + /// + /// 根据指定条件返回集合中不重复的元素 + /// + /// 动态类型 + /// 动态筛选条件类型 + /// 要操作的源 + /// 重复数据筛选条件 + /// 不重复元素的集合 + public static IEnumerable DistinctBy(this IEnumerable source, Func keySelector) + { + Guard.NotNull(keySelector, nameof(keySelector)); + source = source as IList ?? source.ToList(); + + return source.GroupBy(keySelector).Select(group => group.First()); + } + + #region Internal + + internal static int? TryGetCollectionCount(this IEnumerable source) + { + switch (source) + { + case null: + throw new ArgumentNullException(nameof(source)); + case ICollection collection: + return collection.Count; + case IReadOnlyCollection collection: + return collection.Count; + default: + return null; + } + } + + static int CountUpTo(this IEnumerable source, int max) + { + if (source == null) throw new ArgumentNullException(nameof(source)); + if (max < 0) + throw new ArgumentOutOfRangeException(nameof(max), "最大计数参数不能为负。"); + + var count = 0; + + using (var e = source.GetEnumerator()) + { + while (count < max && e.MoveNext()) + { + count++; + } + } + + return count; + } + + #endregion + } +} \ No newline at end of file diff --git a/aspnet-core/frameworks/Extensions/src/Lion.Abp.Extension/System/DateTimeExtensions.cs b/aspnet-core/frameworks/Extensions/src/Lion.Abp.Extension/System/DateTimeExtensions.cs new file mode 100644 index 00000000..44d59056 --- /dev/null +++ b/aspnet-core/frameworks/Extensions/src/Lion.Abp.Extension/System/DateTimeExtensions.cs @@ -0,0 +1,78 @@ +using System.Globalization; +using System.Linq; + +namespace System +{ + /// + /// 时间扩展操作类 + /// + public static class DateTimeExtensions + { + /// + /// 当前时间是否周末 + /// + /// 时间点 + /// + public static bool IsWeekend(this DateTime dateTime) + { + DayOfWeek[] weeks = { DayOfWeek.Saturday, DayOfWeek.Sunday }; + return weeks.Contains(dateTime.DayOfWeek); + } + + /// + /// 当前时间是否工作日 + /// + /// 时间点 + /// + public static bool IsWeekday(this DateTime dateTime) + { + DayOfWeek[] weeks = { DayOfWeek.Monday, DayOfWeek.Tuesday, DayOfWeek.Wednesday, DayOfWeek.Thursday, DayOfWeek.Friday }; + return weeks.Contains(dateTime.DayOfWeek); + } + + /// + /// 获取时间相对唯一字符串 + /// + /// + /// 是否使用毫秒 + /// + public static string ToUniqueString(this DateTime dateTime, bool millisecond = false) + { + var seconds = dateTime.Hour * 3600 + dateTime.Minute * 60 + dateTime.Second; + var value = $"{dateTime:yyyy}{dateTime.DayOfYear}{seconds}"; + if (millisecond) + { + return value + dateTime.ToString("fff"); + } + + return value; + } + + /// + /// 将时间转换为JS时间格式(Date.getTime()) + /// + /// + /// 是否使用毫秒 + public static string ToJsGetTime(this DateTime dateTime, bool millisecond = true) + { + var utc = dateTime.ToUniversalTime(); + var span = utc.Subtract(new DateTime(1970, 1, 1)); + return Math.Round(millisecond ? span.TotalMilliseconds : span.TotalSeconds).ToString(CultureInfo.InvariantCulture); + } + + /// + /// 将JS时间格式的数值转换为时间 + /// + public static DateTime FromJsGetTime(this long jsTime) + { + var length = jsTime.ToString().Length; + if (!(length == 10 || length == 13)) + { + throw new ArgumentOutOfRangeException(null, "JS时间数值的长度不正确,必须为10位或13位"); + } + var start = new DateTime(1970, 1, 1); + var result = length == 10 ? start.AddSeconds(jsTime) : start.AddMilliseconds(jsTime); + return result.ToUniversalTime(); + } + } +} \ No newline at end of file diff --git a/aspnet-core/frameworks/Extensions/src/Lion.Abp.Extension/System/EnumExtensions.cs b/aspnet-core/frameworks/Extensions/src/Lion.Abp.Extension/System/EnumExtensions.cs new file mode 100644 index 00000000..b81a732c --- /dev/null +++ b/aspnet-core/frameworks/Extensions/src/Lion.Abp.Extension/System/EnumExtensions.cs @@ -0,0 +1,199 @@ +using System; +using System.Collections.Generic; +using System.Collections.Specialized; +using System.ComponentModel; +using System.Linq; +using System.Reflection; + +namespace System +{ + /// + /// 枚举的扩展辅助操作方法 + /// + public static class EnumExtensions + { + /// + /// 获取枚举项上的特性的文字描述 + /// + /// + /// + public static string ToDescription(this Enum value) + { + var type = value.GetType(); + var member = type.GetMember(value.ToString()).FirstOrDefault(); + + return member != null ? member.GetDescription() : value.ToString(); + } + + /// + /// 枚举遍历,返回枚举的名称、值、特性 + /// + /// 枚举类型 + /// 回调函数 + private static void Each(this Type enumType, Action action) + { + if (enumType.BaseType != typeof(Enum)) + { + return; + } + var arr = Enum.GetValues(enumType); + foreach (var name in arr) + { + var currentEnum = Enum.Parse(enumType, name.ToString()); + var value = Convert.ToInt32(Enum.Parse(enumType, name.ToString())); + var fieldInfo = enumType.GetField(name.ToString()); + var description = ""; + if (fieldInfo != null) + { + var attr = Attribute.GetCustomAttribute(fieldInfo, + typeof(DescriptionAttribute), false) as DescriptionAttribute; + if (attr != null) + { + description = attr.Description; + } + } + action(name.ToString(), value.ToString(), description, currentEnum); + } + } + + /// + /// 根据枚举类型值返回枚举定义Description属性 + /// + /// + /// + /// + public static string ToEnumDescriptionString(this short value, Type enumType) + { + var nvc = new NameValueCollection(); + var typeDescription = typeof(DescriptionAttribute); + var fields = enumType.GetFields(); + foreach (var field in fields) + { + if (field.FieldType.IsEnum) + { + var strValue = ((int)enumType.InvokeMember(field.Name, BindingFlags.GetField, null, null, null)).ToString(); + var arr = field.GetCustomAttributes(typeDescription, true); + string strText; + if (arr.Length > 0) + { + var aa = (DescriptionAttribute)arr[0]; + strText = aa.Description; + } + else + { + strText = ""; + } + nvc.Add(strValue, strText); + } + } + return nvc[value.ToString()]; + } + + /// + /// 将指定枚举转换为字典. + /// 枚举的Description为字典的Key,枚举的Value为字典的Value + /// + /// 指定枚举 + private static List> GetEnumTypeValueList() + { + var items = new List>(); + typeof(T).Each((name, value, description, enumObj) => + items.Add(new KeyValuePair(description, value))); + return items; + } + + /// + /// 将指定枚举转换为字典. + /// 枚举的Description为字典的Key,枚举为字典的Value + /// + /// 指定枚举 + private static List> GetEnumTypeList() + { + var items = new List>(); + typeof(T).Each((name, value, description, enumObj) => + items.Add(new KeyValuePair(description, (T)enumObj))); + return items; + } + + /// + /// 将指定枚举转换为字典. + /// 枚举的Description为字典的Key,枚举的Name为字典的Value + /// + /// 指定枚举 + public static List> GetEnumTypeDescriptionNameList() + { + var items = new List>(); + typeof(T).Each((name, value, description, enumObj) => items.Add(new KeyValuePair(description, name))); + return items; + } + + /// + /// 将指定枚举转换为字典. + /// 枚举的Name为字典的Key,枚举的Description为字典的Value + /// + /// 指定枚举 + public static List> GetEnumTypeValueNameList() + { + var items = new List>(); + typeof(T).Each((name, value, description, enumObj) => items.Add(new KeyValuePair(name, description))); + return items; + } + + /// + /// 将指定枚举转换为字典. + /// 枚举的Name为字典的Key,枚举的Description为字典的Value + /// + /// 指定枚举 + public static List> GetStringKeyValueList() where TModel : Enum + { + var keyValuePairList = new List>(); + var values = Enum.GetValues(typeof(TModel)); + var modelArray = new TModel[values.Length]; + values.CopyTo(modelArray, 0); + foreach (TModel model in modelArray) + keyValuePairList.Add(new KeyValuePair(model.ToString(), model.ToString())); + return keyValuePairList; + } + + /// + /// 将指定枚举转换为字典. + /// 枚举的Description为字典的Key,枚举为字典的Value + /// + /// 指定枚举 + public static List> GetEnumKeyValueList() where TModel : Enum + { + var enumTypeList = GetEnumTypeList(); + var keyValuePairList = new List>(); + foreach (KeyValuePair keyValuePair in enumTypeList) + keyValuePairList.Add(new KeyValuePair(keyValuePair.Key, keyValuePair.Value)); + return keyValuePairList; + } + + public static List> GetEntityDoubleStringKeyValueList() + { + var enumTypeList = GetEnumTypeValueList(); + var keyValuePairList = new List>(); + foreach (KeyValuePair keyValuePair in enumTypeList) + keyValuePairList.Add(new KeyValuePair(keyValuePair.Key, keyValuePair.Value)); + return keyValuePairList; + } + + public static List> GetEntityStringIntKeyValueList() + { + List> enumTypeList = GetEnumTypeValueList(); + List> keyValuePairList = new List>(); + foreach (KeyValuePair keyValuePair in enumTypeList) + keyValuePairList.Add(new KeyValuePair(keyValuePair.Key, Convert.ToInt32(keyValuePair.Value))); + return keyValuePairList; + } + + public static List> GetEntityDoubleIntKeyValueList() + { + List> enumTypeList = GetEnumTypeValueList(); + List> keyValuePairList = new List>(); + foreach (KeyValuePair keyValuePair in enumTypeList) + keyValuePairList.Add(new KeyValuePair(Convert.ToInt32(keyValuePair.Key), Convert.ToInt32(keyValuePair.Value))); + return keyValuePairList; + } + } +} \ No newline at end of file diff --git a/aspnet-core/frameworks/Extensions/src/Lion.Abp.Extension/System/ExceptionExtensions.cs b/aspnet-core/frameworks/Extensions/src/Lion.Abp.Extension/System/ExceptionExtensions.cs new file mode 100644 index 00000000..2662e6ce --- /dev/null +++ b/aspnet-core/frameworks/Extensions/src/Lion.Abp.Extension/System/ExceptionExtensions.cs @@ -0,0 +1,76 @@ +using System.Runtime.ExceptionServices; +using System.Text; + +namespace System +{ + /// + /// 异常操作扩展 + /// + public static class ExceptionExtensions + { + /// + /// 格式化异常消息 + /// + /// 异常对象 + /// 是否隐藏异常规模信息 + /// 格式化后的异常信息字符串 + public static string FormatMessage(this Exception e, bool isHideStackTrace = false) + { + var sb = new StringBuilder(); + var count = 0; + var appString = string.Empty; + while (e != null) + { + if (count > 0) + { + appString += " "; + } + sb.AppendLine($"{appString}异常消息:{e.Message}"); + sb.AppendLine($"{appString}异常类型:{e.GetType().FullName}"); + sb.AppendLine($"{appString}异常方法:{(e.TargetSite == null ? null : e.TargetSite.Name)}"); + sb.AppendLine($"{appString}异常源:{e.Source}"); + if (!isHideStackTrace && e.StackTrace != null) + { + sb.AppendLine($"{appString}异常堆栈:{e.StackTrace}"); + } + if (e.InnerException != null) + { + sb.AppendLine($"{appString}内部异常:"); + count++; + e = e.InnerException; + } + } + return sb.ToString(); + } + + /// + /// 将异常重新抛出 + /// + public static void ReThrow(this Exception exception) + { + ExceptionDispatchInfo.Capture(exception).Throw(); + } + + /// + /// 如果条件成立,则抛出异常 + /// + public static void ThrowIf(this Exception exception, bool isThrow) + { + if (isThrow) + { + throw exception; + } + } + + /// + /// 如果条件成立,则抛出异常 + /// + public static void ThrowIf(this Exception exception, Func isThrowFunc) + { + if (isThrowFunc()) + { + throw exception; + } + } + } +} \ No newline at end of file diff --git a/aspnet-core/frameworks/Extensions/src/Lion.Abp.Extension/System/Linq/QueryableExtensions.cs b/aspnet-core/frameworks/Extensions/src/Lion.Abp.Extension/System/Linq/QueryableExtensions.cs new file mode 100644 index 00000000..51edf5d6 --- /dev/null +++ b/aspnet-core/frameworks/Extensions/src/Lion.Abp.Extension/System/Linq/QueryableExtensions.cs @@ -0,0 +1,28 @@ +using System.Linq.Expressions; +using Lion.Abp.Extension; + +namespace System.Linq +{ + /// + /// IQueryable集合扩展方法 + /// + public static class QueryableExtensions + { + /// + /// 根据第三方条件是否为真来决定是否执行指定条件的查询 + /// + /// 要查询的源 + /// 查询条件 + /// 第三方条件 + /// 动态类型 + /// 查询的结果 + public static IQueryable WhereIf(this IQueryable source, Expression> predicate, + bool condition) + { + Guard.NotNull(source, nameof(source)); + Guard.NotNull(predicate, nameof(predicate)); + + return condition ? source.Where(predicate) : source; + } + } +} \ No newline at end of file diff --git a/aspnet-core/frameworks/Extensions/src/Lion.Abp.Extension/System/Reflection/AssemblyExtensions.cs b/aspnet-core/frameworks/Extensions/src/Lion.Abp.Extension/System/Reflection/AssemblyExtensions.cs new file mode 100644 index 00000000..87a825f3 --- /dev/null +++ b/aspnet-core/frameworks/Extensions/src/Lion.Abp.Extension/System/Reflection/AssemblyExtensions.cs @@ -0,0 +1,26 @@ +using System.Diagnostics; +using Lion.Abp.Extension; + +namespace System.Reflection +{ + /// + /// 程序集扩展操作类 + /// + public static class AssemblyExtensions + { + /// + /// 获取程序集的产品版本 + /// + public static string GetProductVersion(this Assembly assembly) + { + Guard.NotNull(assembly, nameof(assembly)); + var info = FileVersionInfo.GetVersionInfo(assembly.Location); + var version = info.ProductVersion; + if (version.Contains("+")) + { + version = version.ReplaceRegex(@"\+(\w+)?", ""); + } + return version; + } + } +} \ No newline at end of file diff --git a/aspnet-core/frameworks/Extensions/src/Lion.Abp.Extension/System/Reflection/MemberInfoExtensions.cs b/aspnet-core/frameworks/Extensions/src/Lion.Abp.Extension/System/Reflection/MemberInfoExtensions.cs new file mode 100644 index 00000000..c7ecd81a --- /dev/null +++ b/aspnet-core/frameworks/Extensions/src/Lion.Abp.Extension/System/Reflection/MemberInfoExtensions.cs @@ -0,0 +1,73 @@ +using System.ComponentModel; +using System.ComponentModel.DataAnnotations; +using System.Linq; + +namespace System.Reflection +{ + /// + /// 成员的扩展辅助操作方法 + /// + public static class MemberInfoExtensions + { + /// + /// 获取成员元数据的Description特性描述信息。 + /// + /// 成员元数据对象。 + /// 是否搜索成员的继承链以查找描述特性。 + /// 返回Description特性描述信息,如不存在则返回成员的名称。 + public static string GetDescription(this MemberInfo member, bool inherit = true) + { + var desc = member.GetAttribute(inherit); + if (desc != null) + { + return desc.Description; + } + + var displayName = member.GetAttribute(inherit); + if (displayName != null) + { + return displayName.DisplayName; + } + + var display = member.GetAttribute(inherit); + return display != null ? display.Name : member.Name; + } + + /// + /// 检查指定指定类型成员中是否存在指定的Attribute特性。 + /// + /// 要检查的Attribute特性类型。 + /// 要检查的类型成员 + /// 是否从继承中查找 + /// 是否存在 + public static bool HasAttribute(this MemberInfo memberInfo, bool inherit = true) where T : Attribute + { + return memberInfo.IsDefined(typeof(T), inherit); + } + + /// + /// 从类型成员获取指定Attribute特性 + /// + /// Attribute特性类型 + /// 类型类型成员 + /// 是否从继承中查找 + /// 存在返回第一个,不存在返回null + public static T GetAttribute(this MemberInfo memberInfo, bool inherit = true) where T : Attribute + { + var attributes = memberInfo.GetCustomAttributes(typeof(T), inherit); + return attributes.FirstOrDefault() as T; + } + + /// + /// 从类型成员获取指定Attribute特性。 + /// + /// Attribute特性类型。 + /// 类型类型成员。 + /// 是否从继承中查找。 + /// 返回所有指定Attribute特性的数组。 + public static T[] GetAttributes(this MemberInfo memberInfo, bool inherit = true) where T : Attribute + { + return memberInfo.GetCustomAttributes(typeof(T), inherit).Cast().ToArray(); + } + } +} \ No newline at end of file diff --git a/aspnet-core/frameworks/Extensions/src/Lion.Abp.Extension/System/Reflection/MethodInfoExtensions.cs b/aspnet-core/frameworks/Extensions/src/Lion.Abp.Extension/System/Reflection/MethodInfoExtensions.cs new file mode 100644 index 00000000..fd2ffde8 --- /dev/null +++ b/aspnet-core/frameworks/Extensions/src/Lion.Abp.Extension/System/Reflection/MethodInfoExtensions.cs @@ -0,0 +1,31 @@ +using System.Threading.Tasks; + +namespace System.Reflection +{ + /// + /// 方法的扩展辅助操作方法 + /// + public static class MethodInfoExtensions + { + /// + /// 方法是否是异步 + /// + public static bool IsAsync(this MethodInfo method) + { + return (method.ReturnType == typeof(Task<>) + || method.ReturnType.IsGenericType + && method.ReturnType.GetGenericTypeDefinition() == typeof(Task<>)) + || method.ReturnType == typeof(Task); + } + + /// + /// 返回当前方法信息是否是重写方法 + /// + /// 要判断的方法信息 + /// 是否是重写方法 + public static bool IsOverridden(this MethodInfo method) + { + return method.GetBaseDefinition().DeclaringType != method.DeclaringType; + } + } +} \ No newline at end of file diff --git a/aspnet-core/frameworks/Extensions/src/Lion.Abp.Extension/System/Reflection/PropertyInfoExtensions.cs b/aspnet-core/frameworks/Extensions/src/Lion.Abp.Extension/System/Reflection/PropertyInfoExtensions.cs new file mode 100644 index 00000000..a2e13d28 --- /dev/null +++ b/aspnet-core/frameworks/Extensions/src/Lion.Abp.Extension/System/Reflection/PropertyInfoExtensions.cs @@ -0,0 +1,24 @@ +using System.Linq; + +namespace System.Reflection +{ + /// + /// 属性的扩展辅助操作方法 + /// + public static class PropertyInfoExtensions + { + /// + /// 返回当前属性信息是否为virtual + /// + public static bool IsVirtual(this PropertyInfo property) + { + var accessor = property.GetAccessors().FirstOrDefault(); + if (accessor == null) + { + return false; + } + + return accessor.IsVirtual && !accessor.IsFinal; + } + } +} \ No newline at end of file diff --git a/aspnet-core/frameworks/Extensions/src/Lion.Abp.Extension/System/StringExtensions.cs b/aspnet-core/frameworks/Extensions/src/Lion.Abp.Extension/System/StringExtensions.cs new file mode 100644 index 00000000..31d80338 --- /dev/null +++ b/aspnet-core/frameworks/Extensions/src/Lion.Abp.Extension/System/StringExtensions.cs @@ -0,0 +1,981 @@ +using System.Collections.Generic; +using System.Diagnostics; +using System.Globalization; +using System.Linq; +using System.Text; +using System.Text.RegularExpressions; +using System.Web; +using Lion.Abp.Extension; +using Newtonsoft.Json; + +namespace System +{ + /// + /// 字符串类型的扩展辅助操作类 + /// + [DebuggerStepThrough] + public static class StringExtensions + { + #region 正则表达式 + + /// + /// 指示所指定的正则表达式在指定的输入字符串中是否找到了匹配项 + /// + /// 要搜索匹配项的字符串 + /// 要匹配的正则表达式模式 + /// 是否包含,否则全匹配 + /// 如果正则表达式找到匹配项,则为 true;否则,为 false + public static bool IsMatch(this string value, string pattern, bool isContains = true) + { + if (value == null) + { + return false; + } + + return isContains + ? Regex.IsMatch(value, pattern) + : Regex.Match(value, pattern).Success; + } + + /// + /// 在指定的输入字符串中搜索指定的正则表达式的第一个匹配项 + /// + /// 要搜索匹配项的字符串 + /// 要匹配的正则表达式模式 + /// 一个对象,包含有关匹配项的信息 + public static string Match(this string value, string pattern) + { + if (value == null) + { + return null; + } + + return Regex.Match(value, pattern).Value; + } + + /// + /// 在指定的输入字符串中匹配并替换符合指定正则表达式的子串 + /// + public static string ReplaceRegex(this string value, string pattern, string replacement) + { + if (value == null) + { + return null; + } + + return Regex.Replace(value, pattern, replacement); + } + + /// + /// 在指定的输入字符串中搜索指定的正则表达式的所有匹配项的字符串集合 + /// + /// 要搜索匹配项的字符串 + /// 要匹配的正则表达式模式 + /// 一个集合,包含有关匹配项的字符串值 + public static IEnumerable Matches(this string value, string pattern) + { + if (value == null) + { + return new string[] { }; + } + + var matches = Regex.Matches(value, pattern); + return from Match match in matches select match.Value; + } + + /// + /// 在指定的输入字符串中匹配第一个数字字符串 + /// + public static string MatchFirstNumber(this string value) + { + var matches = Regex.Matches(value, @"\d+"); + if (matches.Count == 0) + { + return string.Empty; + } + + return matches[0].Value; + } + + /// + /// 在指定字符串中匹配最后一个数字字符串 + /// + public static string MatchLastNumber(this string value) + { + var matches = Regex.Matches(value, @"\d+"); + if (matches.Count == 0) + { + return string.Empty; + } + + return matches[matches.Count - 1].Value; + } + + /// + /// 在指定字符串中匹配所有数字字符串 + /// + public static IEnumerable MatchNumbers(this string value) + { + return Matches(value, @"\d+"); + } + + /// + /// 检测指定字符串中是否包含数字 + /// + public static bool IsMatchNumber(this string value) + { + return IsMatch(value, @"\d"); + } + + /// + /// 检测指定字符串是否全部为数字并且长度等于指定长度 + /// + public static bool IsMatchNumber(this string value, int length) + { + var regex = new Regex(@"^\d{" + length + "}$"); + return regex.IsMatch(value); + } + + /// + /// 截取指定字符串之间的字符串 + /// + /// + /// 起始字符串 + /// 结束字符串,可多个 + /// 返回的中间字符串 + public static string Substring(this string source, string startString, params string[] endStrings) + { + if (source.IsMissing()) + { + return string.Empty; + } + + var startIndex = 0; + if (!string.IsNullOrEmpty(startString)) + { + startIndex = source.IndexOf(startString, StringComparison.OrdinalIgnoreCase); + if (startIndex < 0) + { + throw new InvalidOperationException($"在源字符串中无法找到“{startString}”的子串位置"); + } + + startIndex += startString.Length; + } + + var endIndex = source.Length; + endStrings = endStrings.OrderByDescending(m => m.Length).ToArray(); + foreach (var endString in endStrings) + { + if (string.IsNullOrEmpty(endString)) + { + endIndex = source.Length; + break; + } + + endIndex = source.IndexOf(endString, startIndex, StringComparison.OrdinalIgnoreCase); + if (endIndex < 0 || endIndex < startIndex) + { + continue; + } + + break; + } + + if (endIndex < 0 || endIndex < startIndex) + { + throw new InvalidOperationException($"在源字符串中无法找到“{endStrings.ExpandAndToString()}”的子串位置"); + } + + var length = endIndex - startIndex; + + return source.Substring(startIndex, length); + } + + /// + /// 用正则表达式截取字符串 + /// + public static string Substring2(this string source, string startString, string endString) + { + return source.Substring2(startString, endString, false); + } + + /// + /// 用正则表达式截取字符串 + /// + public static string Substring2(this string source, string startString, string endString, bool containsEmpty) + { + if (source.IsMissing()) + { + return string.Empty; + } + + var inner = containsEmpty ? "\\s\\S" : "\\S"; + var result = source.Match($"(?<={startString})([{inner}]+?)(?={endString})"); + return result.IsMissing() ? null : result; + } + + /// + /// 是否电子邮件 + /// + public static bool IsEmail(this string value) + { + const string pattern = @"^[\w-]+(\.[\w-]+)*@[\w-]+(\.[\w-]+)+$"; + return value.IsMatch(pattern); + } + + /// + /// 是否是IP地址 + /// + public static bool IsIpAddress(this string value) + { + const string pattern = + @"^((?:(?:25[0-5]|2[0-4]\d|((1\d{2})|([1-9]?\d)))\.){3}(?:25[0-5]|2[0-4]\d|((1\d{2})|([1-9]?\d))))$"; + return value.IsMatch(pattern); + } + + /// + /// 是否是整数 + /// + public static bool IsNumeric(this string value) + { + const string pattern = @"^\-?[0-9]+$"; + return value.IsMatch(pattern); + } + + /// + /// 是否是Unicode字符串 + /// + public static bool IsUnicode(this string value) + { + const string pattern = @"^[\u4E00-\u9FA5\uE815-\uFA29]+$"; + return value.IsMatch(pattern); + } + + /// + /// 是否Url字符串 + /// + public static bool IsUrl(this string value) + { + try + { + if (string.IsNullOrEmpty(value) || value.Contains(' ')) + { + return false; + } + + var uri = new Uri(value); + return true; + } + catch (Exception) + { + return false; + } + } + + /// + /// 是否身份证号,验证如下3种情况: + /// 1.身份证号码为15位数字; + /// 2.身份证号码为18位数字; + /// 3.身份证号码为17位数字+1个字母 + /// + public static bool IsIdentityCardId(this string value) + { + if (value.Length != 15 && value.Length != 18) + { + return false; + } + + Regex regex; + string[] array; + if (value.Length == 15) + { + regex = new Regex(@"^(\d{6})(\d{2})(\d{2})(\d{2})(\d{3})_"); + if (!regex.Match(value).Success) + { + return false; + } + + array = regex.Split(value); + return DateTime.TryParse(string.Format("{0}-{1}-{2}", "19" + array[2], array[3], array[4]), out _); + } + + regex = new Regex(@"^(\d{6})(\d{4})(\d{2})(\d{2})(\d{3})([0-9Xx])$"); + if (!regex.Match(value).Success) + { + return false; + } + + array = regex.Split(value); + if (!DateTime.TryParse(string.Format("{0}-{1}-{2}", array[2], array[3], array[4]), out _)) + { + return false; + } + + //校验最后一位 + var chars = value.ToCharArray().Select(m => m.ToString()).ToArray(); + int[] weights = {7, 9, 10, 5, 8, 4, 2, 1, 6, 3, 7, 9, 10, 5, 8, 4, 2}; + var sum = 0; + for (var i = 0; i < 17; i++) + { + var num = int.Parse(chars[i]); + sum += num * weights[i]; + } + + var mod = sum % 11; + var vCode = "10X98765432"; // 检验码字符串 + var last = vCode.ToCharArray().ElementAt(mod).ToString(); + return chars.Last().ToUpper() == last; + } + + /// + /// 是否手机号码 + /// + /// + /// 是否按严格格式验证 + public static bool IsMobileNumber(this string value, bool isRestrict = false) + { + var pattern = isRestrict ? @"^[1][3-8]\d{9}$" : @"^[1]\d{10}$"; + return value.IsMatch(pattern); + } + + #endregion + + #region 其他操作 + + /// + /// 判断指定的字符串不是 null、空。 + /// + public static bool IsNotNullOrEmpty(this string str) + { + return !string.IsNullOrEmpty(str); + } + + /// + /// 判断指定的字符串不是 null、空或者仅由空白字符组成 + /// + public static bool IsNotNullOrWhiteSpace(this string str) + { + return !string.IsNullOrWhiteSpace(str); + } + + /// + /// 指示指定的字符串是 null、空或者仅由空白字符组成 + /// + public static bool IsMissing(this string value) + { + return string.IsNullOrWhiteSpace(value); + } + + /// + /// 为指定格式的字符串填充相应对象来生成字符串 + /// + /// 字符串格式,占位符以{n}表示 + /// 用于填充占位符的参数 + /// 格式化后的字符串 + public static string FormatWith(this string format, params object[] args) + { + Guard.NotNull(format, nameof(format)); + return string.Format(CultureInfo.CurrentCulture, format, args); + } + + /// + /// 将字符串反转 + /// + /// 要反转的字符串 + public static string ReverseString(this string value) + { + Guard.NotNull(value, nameof(value)); + return new string(value.Reverse().ToArray()); + } + + /// + /// 单词复数变成单数形式 + /// + /// + /// + public static string ToSingular(this string word) + { + var plural1 = new Regex("(?[^aeiou])ies$"); + var plural2 = new Regex("(?[aeiou]y)s$"); + var plural3 = new Regex("(?[sxzh])es$"); + var plural4 = new Regex("(?[^sxzhyu])s$"); + + if (plural1.IsMatch(word)) + { + return plural1.Replace(word, "${keep}y"); + } + + if (plural2.IsMatch(word)) + { + return plural2.Replace(word, "${keep}"); + } + + if (plural3.IsMatch(word)) + { + return plural3.Replace(word, "${keep}"); + } + + if (plural4.IsMatch(word)) + { + return plural4.Replace(word, "${keep}"); + } + + return word; + } + + /// + /// 单词单数变成复数形式 + /// + /// + /// + public static string ToPlural(this string word) + { + var plural1 = new Regex("(?[^aeiou])y$"); + var plural2 = new Regex("(?[aeiou]y)$"); + var plural3 = new Regex("(?[sxzh])$"); + var plural4 = new Regex("(?[^sxzhy])$"); + + if (plural1.IsMatch(word)) + { + return plural1.Replace(word, "${keep}ies"); + } + + if (plural2.IsMatch(word)) + { + return plural2.Replace(word, "${keep}s"); + } + + if (plural3.IsMatch(word)) + { + return plural3.Replace(word, "${keep}es"); + } + + if (plural4.IsMatch(word)) + { + return plural4.Replace(word, "${keep}s"); + } + + return word; + } + + /// + /// 以指定字符串作为分隔符将指定字符串分隔成数组 + /// + /// 要分割的字符串 + /// 字符串类型的分隔符 + /// 是否移除数据中元素为空字符串的项 + /// 分割后的数据 + public static string[] Split(this string value, string strSplit, bool removeEmptyEntries = false) + { + return value.Split(new[] {strSplit}, + removeEmptyEntries ? StringSplitOptions.RemoveEmptyEntries : StringSplitOptions.None); + } + + /// + /// 支持汉字的字符串长度,汉字长度计为2 + /// + /// 参数字符串 + /// 当前字符串的长度,汉字长度为2 + public static int TextLength(this string value) + { + var ascii = new ASCIIEncoding(); + var tempLen = 0; + var bytes = ascii.GetBytes(value); + foreach (var b in bytes) + { + if (b == 63) + { + tempLen += 2; + } + else + { + tempLen += 1; + } + } + + return tempLen; + } + + /// + /// 将JSON字符串还原为对象 + /// + /// 要转换的目标类型 + /// JSON字符串 + /// + public static T FromJsonString(this string json) + { + Guard.NotNull(json, nameof(json)); + return JsonConvert.DeserializeObject(json); + } + + /// + /// 将JSON字符串还原为对象 + /// + /// JSON字符串 + /// 数据类型 + public static object FromJsonString(this string json, Type type) + { + return JsonConvert.DeserializeObject(json, type); + } + + /// + /// 给URL添加查询参数 + /// + /// URL字符串 + /// 要添加的参数,形如:"id=1,cid=2" + /// + public static string AddUrlQuery(this string url, params string[] queries) + { + foreach (var query in queries) + { + if (!url.Contains("?")) + { + url += "?"; + } + else if (!url.EndsWith("&")) + { + url += "&"; + } + + url += query; + } + + return url; + } + + /// + /// 获取URL中指定参数的值,不存在返回空字符串 + /// + public static string GetUrlQuery(this string url, string key) + { + var uri = new Uri(url); + var query = uri.Query; + if (string.IsNullOrEmpty(query)) + { + return string.Empty; + } + + query = query.TrimStart('?'); + var dict = (from m in query.Split("&", true) + let strs = m.Split("=") + select new KeyValuePair(strs[0], strs[1])) + .ToDictionary(m => m.Key, m => m.Value); + if (dict.ContainsKey(key)) + { + return dict[key]; + } + + return string.Empty; + } + + /// + /// 给URL添加 # 参数 + /// + /// URL字符串 + /// 要添加的参数 + /// + public static string AddHashFragment(this string url, string query) + { + Guard.NotNull(url, nameof(url)); + Guard.NotNull(query, nameof(query)); + + if (!url.Contains("#")) + { + url += "#"; + } + + return url + query; + } + + + + /// + /// 将[]数组转换为Base64字符串 + /// + public static string ToBase64String(this byte[] bytes) + { + Guard.NotNull(bytes, nameof(bytes)); + + return Convert.ToBase64String(bytes); + } + + /// + /// 将字符串转换为Base64字符串,默认编码为 + /// + /// 正常的字符串 + /// 编码 + /// Base64字符串 + public static string ToBase64String(this string source, Encoding encoding = null) + { + Guard.NotNull(source, nameof(source)); + + if (encoding == null) encoding = Encoding.UTF8; + + return Convert.ToBase64String(encoding.GetBytes(source)); + } + + /// + /// 将Base64字符串转换为正常字符串,默认编码为 + /// + /// Base64字符串 + /// 编码 + /// 正常字符串 + public static string FromBase64String(this string base64String, Encoding encoding = null) + { + Guard.NotNull(base64String, nameof(base64String)); + + if (encoding == null) encoding = Encoding.UTF8; + + var bytes = Convert.FromBase64String(base64String); + return encoding.GetString(bytes); + } + + /// + /// 将字符串进行UrlDecode解码 + /// + /// 待UrlDecode解码的字符串 + /// UrlDecode解码后的字符串 + public static string ToUrlDecode(this string source) + { + Guard.NotNull(source, nameof(source)); + + return HttpUtility.UrlDecode(source); + } + + /// + /// 将字符串进行UrlEncode编码 + /// + /// 待UrlEncode编码的字符串 + /// UrlEncode编码后的字符串 + public static string ToUrlEncode(this string source) + { + Guard.NotNull(source, nameof(source)); + + return HttpUtility.UrlEncode(source); + } + + /// + /// 将字符串进行HtmlDecode解码 + /// + /// 待HtmlDecode解码的字符串 + /// HtmlDecode解码后的字符串 + public static string ToHtmlDecode(this string source) + { + Guard.NotNull(source, nameof(source)); + + return HttpUtility.HtmlDecode(source); + } + + /// + /// 将字符串进行HtmlEncode编码 + /// + /// 待HtmlEncode编码的字符串 + /// HtmlEncode编码后的字符串 + public static string ToHtmlEncode(this string source) + { + Guard.NotNull(source, nameof(source)); + + return HttpUtility.HtmlEncode(source); + } + + /// + /// 将字符串转换为十六进制字符串,默认编码为 + /// + public static string ToHexString(this string source, Encoding encoding = null) + { + Guard.NotNull(source, nameof(source)); + + if (encoding == null) encoding = Encoding.UTF8; + + byte[] bytes = encoding.GetBytes(source); + return bytes.ToHexString(); + } + + /// + /// 将十六进制字符串转换为常规字符串,默认编码为 + /// + public static string FromHexString(this string hexString, Encoding encoding = null) + { + Guard.NotNull(hexString, nameof(hexString)); + + if (encoding == null) encoding = Encoding.UTF8; + + var bytes = hexString.ToHexBytes(); + return encoding.GetString(bytes); + } + + /// + /// 将byte[]编码为十六进制字符串 + /// + /// byte[]数组 + /// 十六进制字符串 + public static string ToHexString(this byte[] bytes) + { + Guard.NotNull(bytes, nameof(bytes)); + + return bytes.Aggregate(string.Empty, (current, t) => current + t.ToString("X2")); + } + + /// + /// 将十六进制字符串转换为byte[] + /// + /// 十六进制字符串 + /// byte[]数组 + public static byte[] ToHexBytes(this string hexString) + { + hexString = hexString ?? ""; + hexString = hexString.Replace(" ", ""); + byte[] bytes = new byte[hexString.Length / 2]; + for (int i = 0; i < bytes.Length; i++) + { + bytes[i] = Convert.ToByte(hexString.Substring(i * 2, 2), 16); + } + + return bytes; + } + + /// + /// 将字符串进行Unicode编码,变成形如“\u7f16\u7801”的形式 + /// + /// 要进行编号的字符串 + public static string ToUnicodeString(this string source) + { + Guard.NotNull(source, nameof(source)); + + var regex = new Regex(@"[^\u0000-\u00ff]"); + return regex.Replace(source, m => string.Format(@"\u{0:x4}", (short) m.Value[0])); + } + + /// + /// 将形如“\u7f16\u7801”的Unicode字符串解码 + /// + public static string FromUnicodeString(this string source) + { + var regex = new Regex(@"\\u([0-9a-fA-F]{4})", RegexOptions.Compiled); + return regex.Replace(source, + m => + { + short s; + if (short.TryParse(m.Groups[1].Value, NumberStyles.HexNumber, CultureInfo.InstalledUICulture, + out s)) + { + return "" + (char) s; + } + + return m.Value; + }); + } + + /// + /// 将驼峰字符串按单词拆分并转换成小写,再以特定字符串分隔 + /// + /// 待转换的字符串 + /// 分隔符字符 + /// + public static string UpperToLowerAndSplit(this string str, string splitStr = "-") + { + if (string.IsNullOrEmpty(str)) + { + return str; + } + + List words = new List(); + while (str.Length > 0) + { + char c = str.FirstOrDefault(char.IsUpper); + if (c == default(char)) + { + words.Add(str); + break; + } + + int upperIndex = str.IndexOf(c); + if (upperIndex < 0) //admin + { + return str; + } + + if (upperIndex > 0) //adminAdmin + { + string first = str.Substring(0, upperIndex); + words.Add(first); + str = str.Substring(upperIndex, str.Length - upperIndex); + continue; + } + + str = char.ToLower(str[0]) + str.Substring(1, str.Length - 1); + } + + return words.ExpandAndToString(splitStr); + } + + /// + /// 将驼峰字符串的第一个字符小写 + /// + public static string LowerFirstChar(this string str) + { + if (string.IsNullOrEmpty(str) || !char.IsUpper(str[0])) + { + return str; + } + + if (str.Length == 1) + { + return char.ToLower(str[0]).ToString(); + } + + return char.ToLower(str[0]) + str.Substring(1, str.Length - 1); + } + + /// + /// 将小驼峰字符串的第一个字符大写 + /// + public static string UpperFirstChar(this string str) + { + if (string.IsNullOrEmpty(str) || !char.IsLower(str[0])) + { + return str; + } + + if (str.Length == 1) + { + return char.ToUpper(str[0]).ToString(); + } + + return char.ToUpper(str[0]) + str.Substring(1, str.Length - 1); + } + + /// + /// 计算当前字符串与指定字符串的编辑距离(相似度) + /// + /// 源字符串 + /// 目标字符串 + /// 输出相似度 + /// 是否忽略大小写 + /// 编辑距离 + public static int LevenshteinDistance(this string source, string target, out double similarity, + bool ignoreCase = false) + { + if (string.IsNullOrEmpty(source)) + { + if (string.IsNullOrEmpty(target)) + { + similarity = 1; + return 0; + } + + similarity = 0; + return target.Length; + } + + if (string.IsNullOrEmpty(target)) + { + similarity = 0; + return source.Length; + } + + string from, to; + if (ignoreCase) + { + from = source; + to = target; + } + else + { + from = source.ToLower(); + to = source.ToLower(); + } + + int m = from.Length, n = to.Length; + int[,] mn = new int[m + 1, n + 1]; + for (int i = 0; i <= m; i++) + { + mn[i, 0] = i; + } + + for (int j = 1; j <= n; j++) + { + mn[0, j] = j; + } + + for (int i = 1; i <= m; i++) + { + char c = from[i - 1]; + for (int j = 1; j <= n; j++) + { + if (c == to[j - 1]) + { + mn[i, j] = mn[i - 1, j - 1]; + } + else + { + mn[i, j] = Math.Min(mn[i - 1, j - 1], Math.Min(mn[i - 1, j], mn[i, j - 1])) + 1; + } + } + } + + int maxLength = Math.Max(m, n); + similarity = (double) (maxLength - mn[m, n]) / maxLength; + return mn[m, n]; + } + + /// + /// 计算两个字符串的相似度,应用公式:相似度=kq*q/(kq*q+kr*r+ks*s)(kq>0,kr>=0,ka>=0) + /// 其中,q是字符串1和字符串2中都存在的单词的总数,s是字符串1中存在,字符串2中不存在的单词总数,r是字符串2中存在,字符串1中不存在的单词总数. kq,kr和ka分别是q,r,s的权重,根据实际的计算情况,我们设kq=2,kr=ks=1. + /// + /// 源字符串 + /// 目标字符串 + /// 是否忽略大小写 + /// 字符串相似度 + public static double GetSimilarityWith(this string source, string target, bool ignoreCase = false) + { + if (string.IsNullOrEmpty(source) && string.IsNullOrEmpty(target)) + { + return 1; + } + + if (string.IsNullOrEmpty(source) || string.IsNullOrEmpty(target)) + { + return 0; + } + + const double kq = 2, kr = 1, ks = 1; + char[] sourceChars = source.ToCharArray(), targetChars = target.ToCharArray(); + + //获取交集数量 + int q = sourceChars.Intersect(targetChars).Count(), s = sourceChars.Length - q, r = targetChars.Length - q; + return kq * q / (kq * q + kr * r + ks * s); + } + + /// + /// 标准化Path字符串,将 \\ 转换为 / + /// + /// Path字符串 + public static string NormalizePath(this string path) + { + return path.Replace('\\', '/'); + } + + /// + /// (Pascal) 命名法 的字符串 改为 短横线分隔式命名 + /// 例如UserName => user-name + /// + public static string PascalToKebabCase(this string value) + { + if (string.IsNullOrEmpty(value)) + { + return value; + } + + return Regex.Replace( + value, + "(? + /// StringBuilder 扩展方法类 + /// + public static class StringBuilderExtensions + { + /// + /// 去除开头的空格 + /// + /// + /// 返回修改后的StringBuilder,主要用于链式操作 + public static StringBuilder TrimStart(this StringBuilder stringBuilder) + { + Guard.NotNull(stringBuilder, nameof(stringBuilder)); + + return stringBuilder.TrimStart(' '); + } + + /// + /// 去除开头的指定 + /// + /// + /// 要去掉的 + /// + public static StringBuilder TrimStart(this StringBuilder stringBuilder, char c) + { + Guard.NotNull(stringBuilder, nameof(stringBuilder)); + + if (stringBuilder.Length == 0) + return stringBuilder; + while (c.Equals(stringBuilder[0])) + { + stringBuilder.Remove(0, 1); + } + + return stringBuilder; + } + + /// + /// 去除开头的指定字符数组 + /// + /// + /// 要去掉的字符数组 + /// + public static StringBuilder TrimStart(this StringBuilder stringBuilder, char[] chars) + { + Guard.NotNull(stringBuilder, nameof(stringBuilder)); + Guard.NotNull(chars, nameof(chars)); + + return stringBuilder.TrimStart(new string(chars)); + } + + /// + /// 去除开头的指定的 + /// + /// + /// 要去掉的 + /// + public static StringBuilder TrimStart(this StringBuilder stringBuilder, string str) + { + Guard.NotNull(stringBuilder, nameof(stringBuilder)); + + if (string.IsNullOrEmpty(str) + || stringBuilder.Length == 0 + || str.Length > stringBuilder.Length) + { + return stringBuilder; + } + + while (stringBuilder.SubString(0, str.Length).Equals(str)) + { + stringBuilder.Remove(0, str.Length); + if (str.Length > stringBuilder.Length) + { + break; + } + } + + return stringBuilder; + } + + /// + /// 去除StringBuilder结尾的空格 + /// + /// StringBuilder + /// 返回修改后的StringBuilder,主要用于链式操作 + public static StringBuilder TrimEnd(this StringBuilder stringBuilder) + { + return stringBuilder.TrimEnd(' '); + } + + /// + /// 去除结尾指定字符 + /// + /// + /// 要去掉的字符 + /// + public static StringBuilder TrimEnd(this StringBuilder stringBuilder, char c) + { + Guard.NotNull(stringBuilder, nameof(stringBuilder)); + if (stringBuilder.Length == 0) + { + return stringBuilder; + } + + while (c.Equals(stringBuilder[stringBuilder.Length - 1])) + { + stringBuilder.Remove(stringBuilder.Length - 1, 1); + } + + return stringBuilder; + } + + /// + /// 去除结尾指定字符数组 + /// + /// + /// 要去除的字符数组 + /// + public static StringBuilder TrimEnd(this StringBuilder stringBuilder, char[] chars) + { + Guard.NotNull(stringBuilder, nameof(stringBuilder)); + Guard.NotNull(chars, nameof(chars)); + + return stringBuilder.TrimEnd(new string(chars)); + } + + /// + /// 去除结尾指定字符串 + /// + /// + /// 要去除的字符串 + /// + public static StringBuilder TrimEnd(this StringBuilder stringBuilder, string str) + { + Guard.NotNull(stringBuilder, nameof(stringBuilder)); + if (string.IsNullOrEmpty(str) + || stringBuilder.Length == 0 + || str.Length > stringBuilder.Length) + { + return stringBuilder; + } + while (stringBuilder.SubString(stringBuilder.Length - str.Length, str.Length).Equals(str)) + { + stringBuilder.Remove(stringBuilder.Length - str.Length, str.Length); + if (stringBuilder.Length < str.Length) + { + break; + } + } + + return stringBuilder; + } + + /// + /// 去除StringBuilder两端的空格 + /// + /// StringBuilder + /// 返回修改后的StringBuilder,主要用于链式操作 + public static StringBuilder Trim(this StringBuilder stringBuilder) + { + Guard.NotNull(stringBuilder, nameof(stringBuilder)); + + if (stringBuilder.Length == 0) + return stringBuilder; + return stringBuilder.TrimEnd().TrimStart(); + } + + /// + /// 返回从起始位置指定长度的字符串 + /// + /// + /// 起始位置 + /// 长度 + /// 字符串 + /// 超出字符串索引长度异常 + public static string SubString(this StringBuilder stringBuilder, int start, int length) + { + Guard.NotNull(stringBuilder, nameof(stringBuilder)); + + if (start + length > stringBuilder.Length) + { + throw new IndexOutOfRangeException("超出字符串索引长度"); + } + + var cs = new char[length]; + for (var i = 0; i < length; i++) + { + cs[i] = stringBuilder[start + i]; + } + + return new string(cs); + } + + public static StringBuilder AppendLineWithControlChar(this StringBuilder stringBuilder, StringBuilder sb, string newLine) + { + stringBuilder = AppendWithControlChar(stringBuilder, sb.ToString()); + return stringBuilder.Append(newLine); + } + + public static StringBuilder AppendLineWithControlChar(this StringBuilder stringBuilder, string str, string newLine) + { + stringBuilder = AppendWithControlChar(stringBuilder, str); + return stringBuilder.Append(newLine); + } + + public static StringBuilder AppendWithControlChar(this StringBuilder stringBuilder, StringBuilder sb) + { + return AppendWithControlChar(stringBuilder, sb.ToString()); + } + + public static StringBuilder AppendWithControlChar(this StringBuilder stringBuilder, string str) + { + if (str.Contains('\b')) + { + foreach (var c in str) + { + if (c == '\b') + { + stringBuilder.Length--; + } + else + { + stringBuilder.Append(c); + } + } + } + else + { + stringBuilder.Append(str); + } + + return stringBuilder; + } + + } +} \ No newline at end of file diff --git a/aspnet-core/gateways/CompanyName.ProjectName.PublicGateway/CompanyName.ProjectName.PublicGateway.csproj b/aspnet-core/gateways/CompanyName.ProjectName.PublicGateway/CompanyName.ProjectName.PublicGateway.csproj new file mode 100644 index 00000000..11984f2d --- /dev/null +++ b/aspnet-core/gateways/CompanyName.ProjectName.PublicGateway/CompanyName.ProjectName.PublicGateway.csproj @@ -0,0 +1,11 @@ + + + + net5.0 + + + + + + + diff --git a/aspnet-core/gateways/CompanyName.ProjectName.PublicGateway/Controllers/WeatherForecastController.cs b/aspnet-core/gateways/CompanyName.ProjectName.PublicGateway/Controllers/WeatherForecastController.cs new file mode 100644 index 00000000..2af021d9 --- /dev/null +++ b/aspnet-core/gateways/CompanyName.ProjectName.PublicGateway/Controllers/WeatherForecastController.cs @@ -0,0 +1,40 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Threading.Tasks; +using Microsoft.AspNetCore.Mvc; +using Microsoft.Extensions.Logging; + +namespace CompanyName.ProjectName.PublicGateway.Controllers +{ + [ApiController] + [Route("[controller]")] + public class WeatherForecastController : ControllerBase + { + private static readonly string[] Summaries = new[] + { + "Freezing", "Bracing", "Chilly", "Cool", "Mild", "Warm", "Balmy", "Hot", "Sweltering", + "Scorching" + }; + + private readonly ILogger _logger; + + public WeatherForecastController(ILogger logger) + { + _logger = logger; + } + + [HttpGet] + public IEnumerable Get() + { + var rng = new Random(); + return Enumerable.Range(1, 5).Select(index => new WeatherForecast + { + Date = DateTime.Now.AddDays(index), + TemperatureC = rng.Next(-20, 55), + Summary = Summaries[rng.Next(Summaries.Length)] + }) + .ToArray(); + } + } +} \ No newline at end of file diff --git a/aspnet-core/gateways/CompanyName.ProjectName.PublicGateway/Program.cs b/aspnet-core/gateways/CompanyName.ProjectName.PublicGateway/Program.cs new file mode 100644 index 00000000..6c2882f0 --- /dev/null +++ b/aspnet-core/gateways/CompanyName.ProjectName.PublicGateway/Program.cs @@ -0,0 +1,23 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Threading.Tasks; +using Microsoft.AspNetCore.Hosting; +using Microsoft.Extensions.Configuration; +using Microsoft.Extensions.Hosting; +using Microsoft.Extensions.Logging; + +namespace CompanyName.ProjectName.PublicGateway +{ + public class Program + { + public static void Main(string[] args) + { + CreateHostBuilder(args).Build().Run(); + } + + public static IHostBuilder CreateHostBuilder(string[] args) => + Host.CreateDefaultBuilder(args) + .ConfigureWebHostDefaults(webBuilder => { webBuilder.UseStartup(); }); + } +} \ No newline at end of file diff --git a/aspnet-core/gateways/CompanyName.ProjectName.PublicGateway/Properties/launchSettings.json b/aspnet-core/gateways/CompanyName.ProjectName.PublicGateway/Properties/launchSettings.json new file mode 100644 index 00000000..f0771cbb --- /dev/null +++ b/aspnet-core/gateways/CompanyName.ProjectName.PublicGateway/Properties/launchSettings.json @@ -0,0 +1,31 @@ +{ + "$schema": "http://json.schemastore.org/launchsettings.json", + "iisSettings": { + "windowsAuthentication": false, + "anonymousAuthentication": true, + "iisExpress": { + "applicationUrl": "http://localhost:29877", + "sslPort": 44344 + } + }, + "profiles": { + "IIS Express": { + "commandName": "IISExpress", + "launchBrowser": true, + "launchUrl": "swagger", + "environmentVariables": { + "ASPNETCORE_ENVIRONMENT": "Development" + } + }, + "CompanyName.ProjectName.PublicGateway": { + "commandName": "Project", + "dotnetRunMessages": "true", + "launchBrowser": true, + "launchUrl": "swagger", + "applicationUrl": "https://localhost:5001;http://localhost:5000", + "environmentVariables": { + "ASPNETCORE_ENVIRONMENT": "Development" + } + } + } +} diff --git a/aspnet-core/gateways/CompanyName.ProjectName.PublicGateway/Startup.cs b/aspnet-core/gateways/CompanyName.ProjectName.PublicGateway/Startup.cs new file mode 100644 index 00000000..63ce8e33 --- /dev/null +++ b/aspnet-core/gateways/CompanyName.ProjectName.PublicGateway/Startup.cs @@ -0,0 +1,58 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Threading.Tasks; +using Microsoft.AspNetCore.Builder; +using Microsoft.AspNetCore.Hosting; +using Microsoft.AspNetCore.HttpsPolicy; +using Microsoft.AspNetCore.Mvc; +using Microsoft.Extensions.Configuration; +using Microsoft.Extensions.DependencyInjection; +using Microsoft.Extensions.Hosting; +using Microsoft.Extensions.Logging; +using Microsoft.OpenApi.Models; + +namespace CompanyName.ProjectName.PublicGateway +{ + public class Startup + { + public Startup(IConfiguration configuration) + { + Configuration = configuration; + } + + public IConfiguration Configuration { get; } + + // This method gets called by the runtime. Use this method to add services to the container. + public void ConfigureServices(IServiceCollection services) + { + services.AddControllers(); + services.AddSwaggerGen(c => + { + c.SwaggerDoc("v1", + new OpenApiInfo + { Title = "CompanyName.ProjectName.PublicGateway", Version = "v1" }); + }); + } + + // This method gets called by the runtime. Use this method to configure the HTTP request pipeline. + public void Configure(IApplicationBuilder app, IWebHostEnvironment env) + { + if (env.IsDevelopment()) + { + app.UseDeveloperExceptionPage(); + app.UseSwagger(); + app.UseSwaggerUI(c => c.SwaggerEndpoint("/swagger/v1/swagger.json", + "CompanyName.ProjectName.PublicGateway v1")); + } + + app.UseHttpsRedirection(); + + app.UseRouting(); + + app.UseAuthorization(); + + app.UseEndpoints(endpoints => { endpoints.MapControllers(); }); + } + } +} \ No newline at end of file diff --git a/aspnet-core/gateways/CompanyName.ProjectName.PublicGateway/WeatherForecast.cs b/aspnet-core/gateways/CompanyName.ProjectName.PublicGateway/WeatherForecast.cs new file mode 100644 index 00000000..298c8728 --- /dev/null +++ b/aspnet-core/gateways/CompanyName.ProjectName.PublicGateway/WeatherForecast.cs @@ -0,0 +1,15 @@ +using System; + +namespace CompanyName.ProjectName.PublicGateway +{ + public class WeatherForecast + { + public DateTime Date { get; set; } + + public int TemperatureC { get; set; } + + public int TemperatureF => 32 + (int)(TemperatureC / 0.5556); + + public string Summary { get; set; } + } +} \ No newline at end of file diff --git a/aspnet-core/gateways/CompanyName.ProjectName.PublicGateway/appsettings.Development.json b/aspnet-core/gateways/CompanyName.ProjectName.PublicGateway/appsettings.Development.json new file mode 100644 index 00000000..8983e0fc --- /dev/null +++ b/aspnet-core/gateways/CompanyName.ProjectName.PublicGateway/appsettings.Development.json @@ -0,0 +1,9 @@ +{ + "Logging": { + "LogLevel": { + "Default": "Information", + "Microsoft": "Warning", + "Microsoft.Hosting.Lifetime": "Information" + } + } +} diff --git a/aspnet-core/gateways/CompanyName.ProjectName.PublicGateway/appsettings.json b/aspnet-core/gateways/CompanyName.ProjectName.PublicGateway/appsettings.json new file mode 100644 index 00000000..d9d9a9bf --- /dev/null +++ b/aspnet-core/gateways/CompanyName.ProjectName.PublicGateway/appsettings.json @@ -0,0 +1,10 @@ +{ + "Logging": { + "LogLevel": { + "Default": "Information", + "Microsoft": "Warning", + "Microsoft.Hosting.Lifetime": "Information" + } + }, + "AllowedHosts": "*" +} diff --git a/aspnet-core/gateways/CompanyName.ProjectName.WebGateway/CompanyName.ProjectName.WebGateway.csproj b/aspnet-core/gateways/CompanyName.ProjectName.WebGateway/CompanyName.ProjectName.WebGateway.csproj new file mode 100644 index 00000000..11984f2d --- /dev/null +++ b/aspnet-core/gateways/CompanyName.ProjectName.WebGateway/CompanyName.ProjectName.WebGateway.csproj @@ -0,0 +1,11 @@ + + + + net5.0 + + + + + + + diff --git a/aspnet-core/gateways/CompanyName.ProjectName.WebGateway/Controllers/WeatherForecastController.cs b/aspnet-core/gateways/CompanyName.ProjectName.WebGateway/Controllers/WeatherForecastController.cs new file mode 100644 index 00000000..4b0dd1c0 --- /dev/null +++ b/aspnet-core/gateways/CompanyName.ProjectName.WebGateway/Controllers/WeatherForecastController.cs @@ -0,0 +1,40 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Threading.Tasks; +using Microsoft.AspNetCore.Mvc; +using Microsoft.Extensions.Logging; + +namespace CompanyName.ProjectName.WebGateway.Controllers +{ + [ApiController] + [Route("[controller]")] + public class WeatherForecastController : ControllerBase + { + private static readonly string[] Summaries = new[] + { + "Freezing", "Bracing", "Chilly", "Cool", "Mild", "Warm", "Balmy", "Hot", "Sweltering", + "Scorching" + }; + + private readonly ILogger _logger; + + public WeatherForecastController(ILogger logger) + { + _logger = logger; + } + + [HttpGet] + public IEnumerable Get() + { + var rng = new Random(); + return Enumerable.Range(1, 5).Select(index => new WeatherForecast + { + Date = DateTime.Now.AddDays(index), + TemperatureC = rng.Next(-20, 55), + Summary = Summaries[rng.Next(Summaries.Length)] + }) + .ToArray(); + } + } +} \ No newline at end of file diff --git a/aspnet-core/gateways/CompanyName.ProjectName.WebGateway/Program.cs b/aspnet-core/gateways/CompanyName.ProjectName.WebGateway/Program.cs new file mode 100644 index 00000000..b067d793 --- /dev/null +++ b/aspnet-core/gateways/CompanyName.ProjectName.WebGateway/Program.cs @@ -0,0 +1,23 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Threading.Tasks; +using Microsoft.AspNetCore.Hosting; +using Microsoft.Extensions.Configuration; +using Microsoft.Extensions.Hosting; +using Microsoft.Extensions.Logging; + +namespace CompanyName.ProjectName.WebGateway +{ + public class Program + { + public static void Main(string[] args) + { + CreateHostBuilder(args).Build().Run(); + } + + public static IHostBuilder CreateHostBuilder(string[] args) => + Host.CreateDefaultBuilder(args) + .ConfigureWebHostDefaults(webBuilder => { webBuilder.UseStartup(); }); + } +} \ No newline at end of file diff --git a/aspnet-core/gateways/CompanyName.ProjectName.WebGateway/Properties/launchSettings.json b/aspnet-core/gateways/CompanyName.ProjectName.WebGateway/Properties/launchSettings.json new file mode 100644 index 00000000..793664c0 --- /dev/null +++ b/aspnet-core/gateways/CompanyName.ProjectName.WebGateway/Properties/launchSettings.json @@ -0,0 +1,31 @@ +{ + "$schema": "http://json.schemastore.org/launchsettings.json", + "iisSettings": { + "windowsAuthentication": false, + "anonymousAuthentication": true, + "iisExpress": { + "applicationUrl": "http://localhost:2409", + "sslPort": 44302 + } + }, + "profiles": { + "IIS Express": { + "commandName": "IISExpress", + "launchBrowser": true, + "launchUrl": "swagger", + "environmentVariables": { + "ASPNETCORE_ENVIRONMENT": "Development" + } + }, + "CompanyName.ProjectName.WebGateway": { + "commandName": "Project", + "dotnetRunMessages": "true", + "launchBrowser": true, + "launchUrl": "swagger", + "applicationUrl": "https://localhost:5001;http://localhost:5000", + "environmentVariables": { + "ASPNETCORE_ENVIRONMENT": "Development" + } + } + } +} diff --git a/aspnet-core/gateways/CompanyName.ProjectName.WebGateway/Startup.cs b/aspnet-core/gateways/CompanyName.ProjectName.WebGateway/Startup.cs new file mode 100644 index 00000000..245a83b8 --- /dev/null +++ b/aspnet-core/gateways/CompanyName.ProjectName.WebGateway/Startup.cs @@ -0,0 +1,58 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Threading.Tasks; +using Microsoft.AspNetCore.Builder; +using Microsoft.AspNetCore.Hosting; +using Microsoft.AspNetCore.HttpsPolicy; +using Microsoft.AspNetCore.Mvc; +using Microsoft.Extensions.Configuration; +using Microsoft.Extensions.DependencyInjection; +using Microsoft.Extensions.Hosting; +using Microsoft.Extensions.Logging; +using Microsoft.OpenApi.Models; + +namespace CompanyName.ProjectName.WebGateway +{ + public class Startup + { + public Startup(IConfiguration configuration) + { + Configuration = configuration; + } + + public IConfiguration Configuration { get; } + + // This method gets called by the runtime. Use this method to add services to the container. + public void ConfigureServices(IServiceCollection services) + { + services.AddControllers(); + services.AddSwaggerGen(c => + { + c.SwaggerDoc("v1", + new OpenApiInfo + { Title = "CompanyName.ProjectName.WebGateway", Version = "v1" }); + }); + } + + // This method gets called by the runtime. Use this method to configure the HTTP request pipeline. + public void Configure(IApplicationBuilder app, IWebHostEnvironment env) + { + if (env.IsDevelopment()) + { + app.UseDeveloperExceptionPage(); + app.UseSwagger(); + app.UseSwaggerUI(c => c.SwaggerEndpoint("/swagger/v1/swagger.json", + "CompanyName.ProjectName.WebGateway v1")); + } + + app.UseHttpsRedirection(); + + app.UseRouting(); + + app.UseAuthorization(); + + app.UseEndpoints(endpoints => { endpoints.MapControllers(); }); + } + } +} \ No newline at end of file diff --git a/aspnet-core/gateways/CompanyName.ProjectName.WebGateway/WeatherForecast.cs b/aspnet-core/gateways/CompanyName.ProjectName.WebGateway/WeatherForecast.cs new file mode 100644 index 00000000..d258003e --- /dev/null +++ b/aspnet-core/gateways/CompanyName.ProjectName.WebGateway/WeatherForecast.cs @@ -0,0 +1,15 @@ +using System; + +namespace CompanyName.ProjectName.WebGateway +{ + public class WeatherForecast + { + public DateTime Date { get; set; } + + public int TemperatureC { get; set; } + + public int TemperatureF => 32 + (int)(TemperatureC / 0.5556); + + public string Summary { get; set; } + } +} \ No newline at end of file diff --git a/aspnet-core/gateways/CompanyName.ProjectName.WebGateway/appsettings.Development.json b/aspnet-core/gateways/CompanyName.ProjectName.WebGateway/appsettings.Development.json new file mode 100644 index 00000000..8983e0fc --- /dev/null +++ b/aspnet-core/gateways/CompanyName.ProjectName.WebGateway/appsettings.Development.json @@ -0,0 +1,9 @@ +{ + "Logging": { + "LogLevel": { + "Default": "Information", + "Microsoft": "Warning", + "Microsoft.Hosting.Lifetime": "Information" + } + } +} diff --git a/aspnet-core/gateways/CompanyName.ProjectName.WebGateway/appsettings.json b/aspnet-core/gateways/CompanyName.ProjectName.WebGateway/appsettings.json new file mode 100644 index 00000000..d9d9a9bf --- /dev/null +++ b/aspnet-core/gateways/CompanyName.ProjectName.WebGateway/appsettings.json @@ -0,0 +1,10 @@ +{ + "Logging": { + "LogLevel": { + "Default": "Information", + "Microsoft": "Warning", + "Microsoft.Hosting.Lifetime": "Information" + } + }, + "AllowedHosts": "*" +} diff --git a/aspnet-core/modules/DataDictionaryManagement/src/CompanyName.ProjectName.DataDictionaryManagement.Application.Contracts/DataDictionaries/Dtos/PagingDataDictionaryDetailInput.cs b/aspnet-core/modules/DataDictionaryManagement/src/CompanyName.ProjectName.DataDictionaryManagement.Application.Contracts/DataDictionaries/Dtos/PagingDataDictionaryDetailInput.cs index 27d91556..afcfc520 100644 --- a/aspnet-core/modules/DataDictionaryManagement/src/CompanyName.ProjectName.DataDictionaryManagement.Application.Contracts/DataDictionaries/Dtos/PagingDataDictionaryDetailInput.cs +++ b/aspnet-core/modules/DataDictionaryManagement/src/CompanyName.ProjectName.DataDictionaryManagement.Application.Contracts/DataDictionaries/Dtos/PagingDataDictionaryDetailInput.cs @@ -1,5 +1,6 @@ using System; -using CompanyName.ProjectName.Extensions.Customs; +using Lion.Abp.Extension; + namespace CompanyName.ProjectName.DataDictionaryManagement.DataDictionaries.Dtos { diff --git a/aspnet-core/modules/DataDictionaryManagement/src/CompanyName.ProjectName.DataDictionaryManagement.Application.Contracts/DataDictionaries/Dtos/PagingDataDictionaryInput.cs b/aspnet-core/modules/DataDictionaryManagement/src/CompanyName.ProjectName.DataDictionaryManagement.Application.Contracts/DataDictionaries/Dtos/PagingDataDictionaryInput.cs index e671c006..f0df7dee 100644 --- a/aspnet-core/modules/DataDictionaryManagement/src/CompanyName.ProjectName.DataDictionaryManagement.Application.Contracts/DataDictionaries/Dtos/PagingDataDictionaryInput.cs +++ b/aspnet-core/modules/DataDictionaryManagement/src/CompanyName.ProjectName.DataDictionaryManagement.Application.Contracts/DataDictionaries/Dtos/PagingDataDictionaryInput.cs @@ -1,4 +1,4 @@ -using CompanyName.ProjectName.Extensions.Customs; +using Lion.Abp.Extension; namespace CompanyName.ProjectName.DataDictionaryManagement.DataDictionaries.Dtos { diff --git a/aspnet-core/modules/DataDictionaryManagement/src/CompanyName.ProjectName.DataDictionaryManagement.Application/DataDictionaries/DataDictionaryAppService.cs b/aspnet-core/modules/DataDictionaryManagement/src/CompanyName.ProjectName.DataDictionaryManagement.Application/DataDictionaries/DataDictionaryAppService.cs index bb105597..c8ab22d6 100644 --- a/aspnet-core/modules/DataDictionaryManagement/src/CompanyName.ProjectName.DataDictionaryManagement.Application/DataDictionaries/DataDictionaryAppService.cs +++ b/aspnet-core/modules/DataDictionaryManagement/src/CompanyName.ProjectName.DataDictionaryManagement.Application/DataDictionaries/DataDictionaryAppService.cs @@ -1,11 +1,9 @@ using System.Collections.Generic; using System.Linq; -using System.Linq.Dynamic.Core; using System.Threading; using System.Threading.Tasks; using CompanyName.ProjectName.DataDictionaryManagement.DataDictionaries.Aggregates; using CompanyName.ProjectName.DataDictionaryManagement.DataDictionaries.Dtos; -using CompanyName.ProjectName.Publics.Dtos; using Volo.Abp.Application.Dtos; namespace CompanyName.ProjectName.DataDictionaryManagement.DataDictionaries diff --git a/aspnet-core/modules/DataDictionaryManagement/src/CompanyName.ProjectName.DataDictionaryManagement.Domain.Shared/CompanyName.ProjectName.DataDictionaryManagement.Domain.Shared.csproj b/aspnet-core/modules/DataDictionaryManagement/src/CompanyName.ProjectName.DataDictionaryManagement.Domain.Shared/CompanyName.ProjectName.DataDictionaryManagement.Domain.Shared.csproj index ea879c8d..9ebbd42c 100644 --- a/aspnet-core/modules/DataDictionaryManagement/src/CompanyName.ProjectName.DataDictionaryManagement.Domain.Shared/CompanyName.ProjectName.DataDictionaryManagement.Domain.Shared.csproj +++ b/aspnet-core/modules/DataDictionaryManagement/src/CompanyName.ProjectName.DataDictionaryManagement.Domain.Shared/CompanyName.ProjectName.DataDictionaryManagement.Domain.Shared.csproj @@ -14,7 +14,7 @@ - + diff --git a/aspnet-core/modules/DataDictionaryManagement/src/CompanyName.ProjectName.DataDictionaryManagement.Domain/CompanyName.ProjectName.DataDictionaryManagement.Domain.csproj b/aspnet-core/modules/DataDictionaryManagement/src/CompanyName.ProjectName.DataDictionaryManagement.Domain/CompanyName.ProjectName.DataDictionaryManagement.Domain.csproj index 0a8b4e9d..8a63951d 100644 --- a/aspnet-core/modules/DataDictionaryManagement/src/CompanyName.ProjectName.DataDictionaryManagement.Domain/CompanyName.ProjectName.DataDictionaryManagement.Domain.csproj +++ b/aspnet-core/modules/DataDictionaryManagement/src/CompanyName.ProjectName.DataDictionaryManagement.Domain/CompanyName.ProjectName.DataDictionaryManagement.Domain.csproj @@ -9,6 +9,8 @@ + + diff --git a/aspnet-core/modules/DataDictionaryManagement/src/CompanyName.ProjectName.DataDictionaryManagement.Domain/DataDictionaries/Aggregates/DataDictionary.cs b/aspnet-core/modules/DataDictionaryManagement/src/CompanyName.ProjectName.DataDictionaryManagement.Domain/DataDictionaries/Aggregates/DataDictionary.cs index 2ad4aa58..45796b9c 100644 --- a/aspnet-core/modules/DataDictionaryManagement/src/CompanyName.ProjectName.DataDictionaryManagement.Domain/DataDictionaries/Aggregates/DataDictionary.cs +++ b/aspnet-core/modules/DataDictionaryManagement/src/CompanyName.ProjectName.DataDictionaryManagement.Domain/DataDictionaries/Aggregates/DataDictionary.cs @@ -3,7 +3,7 @@ using System.Collections.Generic; using System.ComponentModel.DataAnnotations; using System.Linq; using CompanyName.ProjectName.DataDictionaryManagement.DataDictionaries.Exceptions; -using CompanyName.ProjectName.Extensions.Customs; +using Lion.Abp.Extension; using Volo.Abp.Domain.Entities.Auditing; using Volo.Abp.MultiTenancy; diff --git a/aspnet-core/modules/DataDictionaryManagement/src/CompanyName.ProjectName.DataDictionaryManagement.Domain/DataDictionaries/Aggregates/DataDictionaryDetail.cs b/aspnet-core/modules/DataDictionaryManagement/src/CompanyName.ProjectName.DataDictionaryManagement.Domain/DataDictionaries/Aggregates/DataDictionaryDetail.cs index c78ed685..c7af3e3a 100644 --- a/aspnet-core/modules/DataDictionaryManagement/src/CompanyName.ProjectName.DataDictionaryManagement.Domain/DataDictionaries/Aggregates/DataDictionaryDetail.cs +++ b/aspnet-core/modules/DataDictionaryManagement/src/CompanyName.ProjectName.DataDictionaryManagement.Domain/DataDictionaries/Aggregates/DataDictionaryDetail.cs @@ -1,5 +1,5 @@ using System; -using CompanyName.ProjectName.Extensions.Customs; +using Lion.Abp.Extension; using Volo.Abp.Domain.Entities.Auditing; namespace CompanyName.ProjectName.DataDictionaryManagement.DataDictionaries.Aggregates diff --git a/aspnet-core/modules/DataDictionaryManagement/src/CompanyName.ProjectName.DataDictionaryManagement.Domain/DataDictionaryManagementDomainModule.cs b/aspnet-core/modules/DataDictionaryManagement/src/CompanyName.ProjectName.DataDictionaryManagement.Domain/DataDictionaryManagementDomainModule.cs index 0cc1c567..a4155a49 100644 --- a/aspnet-core/modules/DataDictionaryManagement/src/CompanyName.ProjectName.DataDictionaryManagement.Domain/DataDictionaryManagementDomainModule.cs +++ b/aspnet-core/modules/DataDictionaryManagement/src/CompanyName.ProjectName.DataDictionaryManagement.Domain/DataDictionaryManagementDomainModule.cs @@ -1,11 +1,13 @@ -using Volo.Abp.Domain; +using Lion.Abp.Domain; +using Volo.Abp.Domain; using Volo.Abp.Modularity; namespace CompanyName.ProjectName.DataDictionaryManagement { [DependsOn( typeof(AbpDddDomainModule), - typeof(DataDictionaryManagementDomainSharedModule) + typeof(DataDictionaryManagementDomainSharedModule), + typeof(LionAbpDomainModule) )] public class DataDictionaryManagementDomainModule : AbpModule { diff --git a/aspnet-core/modules/DataDictionaryManagement/src/CompanyName.ProjectName.DataDictionaryManagement.MongoDB/CompanyName.ProjectName.DataDictionaryManagement.MongoDB.csproj b/aspnet-core/modules/DataDictionaryManagement/src/CompanyName.ProjectName.DataDictionaryManagement.MongoDB/CompanyName.ProjectName.DataDictionaryManagement.MongoDB.csproj deleted file mode 100644 index 7d177f15..00000000 --- a/aspnet-core/modules/DataDictionaryManagement/src/CompanyName.ProjectName.DataDictionaryManagement.MongoDB/CompanyName.ProjectName.DataDictionaryManagement.MongoDB.csproj +++ /dev/null @@ -1,14 +0,0 @@ - - - - - net5.0 - CompanyName.ProjectName.DataDictionaryManagement - - - - - - - - diff --git a/aspnet-core/modules/DataDictionaryManagement/src/CompanyName.ProjectName.DataDictionaryManagement.MongoDB/FodyWeavers.xml b/aspnet-core/modules/DataDictionaryManagement/src/CompanyName.ProjectName.DataDictionaryManagement.MongoDB/FodyWeavers.xml deleted file mode 100644 index be0de3a9..00000000 --- a/aspnet-core/modules/DataDictionaryManagement/src/CompanyName.ProjectName.DataDictionaryManagement.MongoDB/FodyWeavers.xml +++ /dev/null @@ -1,3 +0,0 @@ - - - \ No newline at end of file diff --git a/aspnet-core/modules/DataDictionaryManagement/src/CompanyName.ProjectName.DataDictionaryManagement.MongoDB/FodyWeavers.xsd b/aspnet-core/modules/DataDictionaryManagement/src/CompanyName.ProjectName.DataDictionaryManagement.MongoDB/FodyWeavers.xsd deleted file mode 100644 index 3f3946e2..00000000 --- a/aspnet-core/modules/DataDictionaryManagement/src/CompanyName.ProjectName.DataDictionaryManagement.MongoDB/FodyWeavers.xsd +++ /dev/null @@ -1,30 +0,0 @@ - - - - - - - - - - - - - - - '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/aspnet-core/modules/DataDictionaryManagement/src/CompanyName.ProjectName.DataDictionaryManagement.MongoDB/MongoDB/DataDictionaryManagementMongoDbContext.cs b/aspnet-core/modules/DataDictionaryManagement/src/CompanyName.ProjectName.DataDictionaryManagement.MongoDB/MongoDB/DataDictionaryManagementMongoDbContext.cs deleted file mode 100644 index 4ea626c4..00000000 --- a/aspnet-core/modules/DataDictionaryManagement/src/CompanyName.ProjectName.DataDictionaryManagement.MongoDB/MongoDB/DataDictionaryManagementMongoDbContext.cs +++ /dev/null @@ -1,20 +0,0 @@ -using Volo.Abp.Data; -using Volo.Abp.MongoDB; - -namespace CompanyName.ProjectName.DataDictionaryManagement.MongoDB -{ - [ConnectionStringName(DataDictionaryManagementDbProperties.ConnectionStringName)] - public class DataDictionaryManagementMongoDbContext : AbpMongoDbContext, IDataDictionaryManagementMongoDbContext - { - /* Add mongo collections here. Example: - * public IMongoCollection Questions => Collection(); - */ - - protected override void CreateModel(IMongoModelBuilder modelBuilder) - { - base.CreateModel(modelBuilder); - - modelBuilder.ConfigureDataDictionaryManagement(); - } - } -} \ No newline at end of file diff --git a/aspnet-core/modules/DataDictionaryManagement/src/CompanyName.ProjectName.DataDictionaryManagement.MongoDB/MongoDB/DataDictionaryManagementMongoDbContextExtensions.cs b/aspnet-core/modules/DataDictionaryManagement/src/CompanyName.ProjectName.DataDictionaryManagement.MongoDB/MongoDB/DataDictionaryManagementMongoDbContextExtensions.cs deleted file mode 100644 index 7bedbd34..00000000 --- a/aspnet-core/modules/DataDictionaryManagement/src/CompanyName.ProjectName.DataDictionaryManagement.MongoDB/MongoDB/DataDictionaryManagementMongoDbContextExtensions.cs +++ /dev/null @@ -1,22 +0,0 @@ -using System; -using Volo.Abp; -using Volo.Abp.MongoDB; - -namespace CompanyName.ProjectName.DataDictionaryManagement.MongoDB -{ - public static class DataDictionaryManagementMongoDbContextExtensions - { - public static void ConfigureDataDictionaryManagement( - this IMongoModelBuilder builder, - Action optionsAction = null) - { - Check.NotNull(builder, nameof(builder)); - - var options = new DataDictionaryManagementMongoModelBuilderConfigurationOptions( - DataDictionaryManagementDbProperties.DbTablePrefix - ); - - optionsAction?.Invoke(options); - } - } -} \ No newline at end of file diff --git a/aspnet-core/modules/DataDictionaryManagement/src/CompanyName.ProjectName.DataDictionaryManagement.MongoDB/MongoDB/DataDictionaryManagementMongoDbModule.cs b/aspnet-core/modules/DataDictionaryManagement/src/CompanyName.ProjectName.DataDictionaryManagement.MongoDB/MongoDB/DataDictionaryManagementMongoDbModule.cs deleted file mode 100644 index fb308141..00000000 --- a/aspnet-core/modules/DataDictionaryManagement/src/CompanyName.ProjectName.DataDictionaryManagement.MongoDB/MongoDB/DataDictionaryManagementMongoDbModule.cs +++ /dev/null @@ -1,23 +0,0 @@ -using Microsoft.Extensions.DependencyInjection; -using Volo.Abp.Modularity; -using Volo.Abp.MongoDB; - -namespace CompanyName.ProjectName.DataDictionaryManagement.MongoDB -{ - [DependsOn( - typeof(DataDictionaryManagementDomainModule), - typeof(AbpMongoDbModule) - )] - public class DataDictionaryManagementMongoDbModule : AbpModule - { - public override void ConfigureServices(ServiceConfigurationContext context) - { - context.Services.AddMongoDbContext(options => - { - /* Add custom repositories here. Example: - * options.AddRepository(); - */ - }); - } - } -} diff --git a/aspnet-core/modules/DataDictionaryManagement/src/CompanyName.ProjectName.DataDictionaryManagement.MongoDB/MongoDB/DataDictionaryManagementMongoModelBuilderConfigurationOptions.cs b/aspnet-core/modules/DataDictionaryManagement/src/CompanyName.ProjectName.DataDictionaryManagement.MongoDB/MongoDB/DataDictionaryManagementMongoModelBuilderConfigurationOptions.cs deleted file mode 100644 index e657d68f..00000000 --- a/aspnet-core/modules/DataDictionaryManagement/src/CompanyName.ProjectName.DataDictionaryManagement.MongoDB/MongoDB/DataDictionaryManagementMongoModelBuilderConfigurationOptions.cs +++ /dev/null @@ -1,14 +0,0 @@ -using JetBrains.Annotations; -using Volo.Abp.MongoDB; - -namespace CompanyName.ProjectName.DataDictionaryManagement.MongoDB -{ - public class DataDictionaryManagementMongoModelBuilderConfigurationOptions : AbpMongoModelBuilderConfigurationOptions - { - public DataDictionaryManagementMongoModelBuilderConfigurationOptions( - [NotNull] string collectionPrefix = "") - : base(collectionPrefix) - { - } - } -} \ No newline at end of file diff --git a/aspnet-core/modules/DataDictionaryManagement/src/CompanyName.ProjectName.DataDictionaryManagement.MongoDB/MongoDB/IDataDictionaryManagementMongoDbContext.cs b/aspnet-core/modules/DataDictionaryManagement/src/CompanyName.ProjectName.DataDictionaryManagement.MongoDB/MongoDB/IDataDictionaryManagementMongoDbContext.cs deleted file mode 100644 index d76973bd..00000000 --- a/aspnet-core/modules/DataDictionaryManagement/src/CompanyName.ProjectName.DataDictionaryManagement.MongoDB/MongoDB/IDataDictionaryManagementMongoDbContext.cs +++ /dev/null @@ -1,13 +0,0 @@ -using Volo.Abp.Data; -using Volo.Abp.MongoDB; - -namespace CompanyName.ProjectName.DataDictionaryManagement.MongoDB -{ - [ConnectionStringName(DataDictionaryManagementDbProperties.ConnectionStringName)] - public interface IDataDictionaryManagementMongoDbContext : IAbpMongoDbContext - { - /* Define mongo collections here. Example: - * IMongoCollection Questions { get; } - */ - } -} diff --git a/aspnet-core/modules/NotificationManagement/src/CompanyName.ProjectName.NotificationManagement.Application.Contracts/CompanyName.ProjectName.NotificationManagement.Application.Contracts.csproj b/aspnet-core/modules/NotificationManagement/src/CompanyName.ProjectName.NotificationManagement.Application.Contracts/CompanyName.ProjectName.NotificationManagement.Application.Contracts.csproj index 1295291f..e061c5e1 100644 --- a/aspnet-core/modules/NotificationManagement/src/CompanyName.ProjectName.NotificationManagement.Application.Contracts/CompanyName.ProjectName.NotificationManagement.Application.Contracts.csproj +++ b/aspnet-core/modules/NotificationManagement/src/CompanyName.ProjectName.NotificationManagement.Application.Contracts/CompanyName.ProjectName.NotificationManagement.Application.Contracts.csproj @@ -10,7 +10,6 @@ - diff --git a/aspnet-core/modules/NotificationManagement/src/CompanyName.ProjectName.NotificationManagement.Application.Contracts/Notifications/Dtos/PagingNotificationListInput.cs b/aspnet-core/modules/NotificationManagement/src/CompanyName.ProjectName.NotificationManagement.Application.Contracts/Notifications/Dtos/PagingNotificationListInput.cs index 53220359..44650c06 100644 --- a/aspnet-core/modules/NotificationManagement/src/CompanyName.ProjectName.NotificationManagement.Application.Contracts/Notifications/Dtos/PagingNotificationListInput.cs +++ b/aspnet-core/modules/NotificationManagement/src/CompanyName.ProjectName.NotificationManagement.Application.Contracts/Notifications/Dtos/PagingNotificationListInput.cs @@ -1,5 +1,4 @@ -using System; -using CompanyName.ProjectName.Extensions.Customs; +using Lion.Abp.Extension; namespace CompanyName.ProjectName.NotificationManagement.Notifications.Dtos { diff --git a/aspnet-core/modules/NotificationManagement/src/CompanyName.ProjectName.NotificationManagement.Domain.Shared/CompanyName.ProjectName.NotificationManagement.Domain.Shared.csproj b/aspnet-core/modules/NotificationManagement/src/CompanyName.ProjectName.NotificationManagement.Domain.Shared/CompanyName.ProjectName.NotificationManagement.Domain.Shared.csproj index 3b63efc9..72da3aa1 100644 --- a/aspnet-core/modules/NotificationManagement/src/CompanyName.ProjectName.NotificationManagement.Domain.Shared/CompanyName.ProjectName.NotificationManagement.Domain.Shared.csproj +++ b/aspnet-core/modules/NotificationManagement/src/CompanyName.ProjectName.NotificationManagement.Domain.Shared/CompanyName.ProjectName.NotificationManagement.Domain.Shared.csproj @@ -1,26 +1,30 @@ - - - - net5.0 - CompanyName.ProjectName.NotificationManagement - true - - - - - - - - - - - - - - - + + + + net5.0 + CompanyName.ProjectName.NotificationManagement + true + + + + + + + + + + + + + + + + + + + diff --git a/aspnet-core/modules/NotificationManagement/src/CompanyName.ProjectName.NotificationManagement.Domain/CompanyName.ProjectName.NotificationManagement.Domain.csproj b/aspnet-core/modules/NotificationManagement/src/CompanyName.ProjectName.NotificationManagement.Domain/CompanyName.ProjectName.NotificationManagement.Domain.csproj index 49fdefd6..b68988eb 100644 --- a/aspnet-core/modules/NotificationManagement/src/CompanyName.ProjectName.NotificationManagement.Domain/CompanyName.ProjectName.NotificationManagement.Domain.csproj +++ b/aspnet-core/modules/NotificationManagement/src/CompanyName.ProjectName.NotificationManagement.Domain/CompanyName.ProjectName.NotificationManagement.Domain.csproj @@ -9,8 +9,8 @@ + - diff --git a/aspnet-core/modules/NotificationManagement/src/CompanyName.ProjectName.NotificationManagement.Domain/NotificationManagementDomainService.cs b/aspnet-core/modules/NotificationManagement/src/CompanyName.ProjectName.NotificationManagement.Domain/NotificationManagementDomainService.cs index 69def55a..322431b5 100644 --- a/aspnet-core/modules/NotificationManagement/src/CompanyName.ProjectName.NotificationManagement.Domain/NotificationManagementDomainService.cs +++ b/aspnet-core/modules/NotificationManagement/src/CompanyName.ProjectName.NotificationManagement.Domain/NotificationManagementDomainService.cs @@ -1,9 +1,9 @@ -using CompanyName.ProjectName.Extensions.Volo.Abp; -using Volo.Abp.Domain.Services; +using System; +using Lion.Abp.Domain; namespace CompanyName.ProjectName.NotificationManagement { - public abstract class NotificationManagementDomainService : BaseDomainService + public abstract class NotificationManagementDomainService : LionAbpDomainService { protected NotificationManagementDomainService() { diff --git a/aspnet-core/modules/NotificationManagement/src/CompanyName.ProjectName.NotificationManagement.Domain/Notifications/Aggregates/Notification.cs b/aspnet-core/modules/NotificationManagement/src/CompanyName.ProjectName.NotificationManagement.Domain/Notifications/Aggregates/Notification.cs index 3aa9368a..1a523686 100644 --- a/aspnet-core/modules/NotificationManagement/src/CompanyName.ProjectName.NotificationManagement.Domain/Notifications/Aggregates/Notification.cs +++ b/aspnet-core/modules/NotificationManagement/src/CompanyName.ProjectName.NotificationManagement.Domain/Notifications/Aggregates/Notification.cs @@ -2,9 +2,9 @@ using System; using System.Collections.Generic; using System.ComponentModel.DataAnnotations; using System.Linq; -using CompanyName.ProjectName.Extensions.Customs; using Volo.Abp.Domain.Entities.Auditing; using CompanyName.ProjectName.NotificationManagement.Notifications.DistributedEvents; +using Lion.Abp.Extension; namespace CompanyName.ProjectName.NotificationManagement.Notifications { diff --git a/aspnet-core/modules/NotificationManagement/src/CompanyName.ProjectName.NotificationManagement.MongoDB/CompanyName.ProjectName.NotificationManagement.MongoDB.csproj b/aspnet-core/modules/NotificationManagement/src/CompanyName.ProjectName.NotificationManagement.MongoDB/CompanyName.ProjectName.NotificationManagement.MongoDB.csproj deleted file mode 100644 index f0e003b4..00000000 --- a/aspnet-core/modules/NotificationManagement/src/CompanyName.ProjectName.NotificationManagement.MongoDB/CompanyName.ProjectName.NotificationManagement.MongoDB.csproj +++ /dev/null @@ -1,15 +0,0 @@ - - - - - - net5.0 - CompanyName.ProjectName.NotificationManagement - - - - - - - - diff --git a/aspnet-core/modules/NotificationManagement/src/CompanyName.ProjectName.NotificationManagement.MongoDB/FodyWeavers.xml b/aspnet-core/modules/NotificationManagement/src/CompanyName.ProjectName.NotificationManagement.MongoDB/FodyWeavers.xml deleted file mode 100644 index be0de3a9..00000000 --- a/aspnet-core/modules/NotificationManagement/src/CompanyName.ProjectName.NotificationManagement.MongoDB/FodyWeavers.xml +++ /dev/null @@ -1,3 +0,0 @@ - - - \ No newline at end of file diff --git a/aspnet-core/modules/NotificationManagement/src/CompanyName.ProjectName.NotificationManagement.MongoDB/FodyWeavers.xsd b/aspnet-core/modules/NotificationManagement/src/CompanyName.ProjectName.NotificationManagement.MongoDB/FodyWeavers.xsd deleted file mode 100644 index 3f3946e2..00000000 --- a/aspnet-core/modules/NotificationManagement/src/CompanyName.ProjectName.NotificationManagement.MongoDB/FodyWeavers.xsd +++ /dev/null @@ -1,30 +0,0 @@ - - - - - - - - - - - - - - - '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/aspnet-core/modules/NotificationManagement/src/CompanyName.ProjectName.NotificationManagement.MongoDB/MongoDB/INotificationManagementMongoDbContext.cs b/aspnet-core/modules/NotificationManagement/src/CompanyName.ProjectName.NotificationManagement.MongoDB/MongoDB/INotificationManagementMongoDbContext.cs deleted file mode 100644 index c3a0efb2..00000000 --- a/aspnet-core/modules/NotificationManagement/src/CompanyName.ProjectName.NotificationManagement.MongoDB/MongoDB/INotificationManagementMongoDbContext.cs +++ /dev/null @@ -1,13 +0,0 @@ -using Volo.Abp.Data; -using Volo.Abp.MongoDB; - -namespace CompanyName.ProjectName.NotificationManagement.MongoDB -{ - [ConnectionStringName(NotificationManagementDbProperties.ConnectionStringName)] - public interface INotificationManagementMongoDbContext : IAbpMongoDbContext - { - /* Define mongo collections here. Example: - * IMongoCollection Questions { get; } - */ - } -} diff --git a/aspnet-core/modules/NotificationManagement/src/CompanyName.ProjectName.NotificationManagement.MongoDB/MongoDB/NotificationManagementMongoDbContext.cs b/aspnet-core/modules/NotificationManagement/src/CompanyName.ProjectName.NotificationManagement.MongoDB/MongoDB/NotificationManagementMongoDbContext.cs deleted file mode 100644 index 7fca0e93..00000000 --- a/aspnet-core/modules/NotificationManagement/src/CompanyName.ProjectName.NotificationManagement.MongoDB/MongoDB/NotificationManagementMongoDbContext.cs +++ /dev/null @@ -1,20 +0,0 @@ -using Volo.Abp.Data; -using Volo.Abp.MongoDB; - -namespace CompanyName.ProjectName.NotificationManagement.MongoDB -{ - [ConnectionStringName(NotificationManagementDbProperties.ConnectionStringName)] - public class NotificationManagementMongoDbContext : AbpMongoDbContext, INotificationManagementMongoDbContext - { - /* Add mongo collections here. Example: - * public IMongoCollection Questions => Collection(); - */ - - protected override void CreateModel(IMongoModelBuilder modelBuilder) - { - base.CreateModel(modelBuilder); - - modelBuilder.ConfigureNotificationManagement(); - } - } -} \ No newline at end of file diff --git a/aspnet-core/modules/NotificationManagement/src/CompanyName.ProjectName.NotificationManagement.MongoDB/MongoDB/NotificationManagementMongoDbContextExtensions.cs b/aspnet-core/modules/NotificationManagement/src/CompanyName.ProjectName.NotificationManagement.MongoDB/MongoDB/NotificationManagementMongoDbContextExtensions.cs deleted file mode 100644 index 367a359e..00000000 --- a/aspnet-core/modules/NotificationManagement/src/CompanyName.ProjectName.NotificationManagement.MongoDB/MongoDB/NotificationManagementMongoDbContextExtensions.cs +++ /dev/null @@ -1,22 +0,0 @@ -using System; -using Volo.Abp; -using Volo.Abp.MongoDB; - -namespace CompanyName.ProjectName.NotificationManagement.MongoDB -{ - public static class NotificationManagementMongoDbContextExtensions - { - public static void ConfigureNotificationManagement( - this IMongoModelBuilder builder, - Action optionsAction = null) - { - Check.NotNull(builder, nameof(builder)); - - var options = new NotificationManagementMongoModelBuilderConfigurationOptions( - NotificationManagementDbProperties.DbTablePrefix - ); - - optionsAction?.Invoke(options); - } - } -} \ No newline at end of file diff --git a/aspnet-core/modules/NotificationManagement/src/CompanyName.ProjectName.NotificationManagement.MongoDB/MongoDB/NotificationManagementMongoDbModule.cs b/aspnet-core/modules/NotificationManagement/src/CompanyName.ProjectName.NotificationManagement.MongoDB/MongoDB/NotificationManagementMongoDbModule.cs deleted file mode 100644 index 0caf4eeb..00000000 --- a/aspnet-core/modules/NotificationManagement/src/CompanyName.ProjectName.NotificationManagement.MongoDB/MongoDB/NotificationManagementMongoDbModule.cs +++ /dev/null @@ -1,23 +0,0 @@ -using Microsoft.Extensions.DependencyInjection; -using Volo.Abp.Modularity; -using Volo.Abp.MongoDB; - -namespace CompanyName.ProjectName.NotificationManagement.MongoDB -{ - [DependsOn( - typeof(NotificationManagementDomainModule), - typeof(AbpMongoDbModule) - )] - public class NotificationManagementMongoDbModule : AbpModule - { - public override void ConfigureServices(ServiceConfigurationContext context) - { - context.Services.AddMongoDbContext(options => - { - /* Add custom repositories here. Example: - * options.AddRepository(); - */ - }); - } - } -} diff --git a/aspnet-core/modules/NotificationManagement/src/CompanyName.ProjectName.NotificationManagement.MongoDB/MongoDB/NotificationManagementMongoModelBuilderConfigurationOptions.cs b/aspnet-core/modules/NotificationManagement/src/CompanyName.ProjectName.NotificationManagement.MongoDB/MongoDB/NotificationManagementMongoModelBuilderConfigurationOptions.cs deleted file mode 100644 index f97898ee..00000000 --- a/aspnet-core/modules/NotificationManagement/src/CompanyName.ProjectName.NotificationManagement.MongoDB/MongoDB/NotificationManagementMongoModelBuilderConfigurationOptions.cs +++ /dev/null @@ -1,14 +0,0 @@ -using JetBrains.Annotations; -using Volo.Abp.MongoDB; - -namespace CompanyName.ProjectName.NotificationManagement.MongoDB -{ - public class NotificationManagementMongoModelBuilderConfigurationOptions : AbpMongoModelBuilderConfigurationOptions - { - public NotificationManagementMongoModelBuilderConfigurationOptions( - [NotNull] string collectionPrefix = "") - : base(collectionPrefix) - { - } - } -} \ No newline at end of file diff --git a/aspnet-core/modules/QueryManagement/src/CompanyName.ProjectName.QueryManagement.Application.Contracts/CompanyName.ProjectName.QueryManagement.Application.Contracts.csproj b/aspnet-core/modules/QueryManagement/src/CompanyName.ProjectName.QueryManagement.Application.Contracts/CompanyName.ProjectName.QueryManagement.Application.Contracts.csproj deleted file mode 100644 index de296152..00000000 --- a/aspnet-core/modules/QueryManagement/src/CompanyName.ProjectName.QueryManagement.Application.Contracts/CompanyName.ProjectName.QueryManagement.Application.Contracts.csproj +++ /dev/null @@ -1,17 +0,0 @@ - - - - - - net5.0 - CompanyName.ProjectName.QueryManagement - - - - - - - - - - diff --git a/aspnet-core/modules/QueryManagement/src/CompanyName.ProjectName.QueryManagement.Application.Contracts/ElasticSearchs/ILogAppService.cs b/aspnet-core/modules/QueryManagement/src/CompanyName.ProjectName.QueryManagement.Application.Contracts/ElasticSearchs/ILogAppService.cs deleted file mode 100644 index afb472f3..00000000 --- a/aspnet-core/modules/QueryManagement/src/CompanyName.ProjectName.QueryManagement.Application.Contracts/ElasticSearchs/ILogAppService.cs +++ /dev/null @@ -1,12 +0,0 @@ -using System.Threading.Tasks; -using CompanyName.ProjectName.Extensions.Customs.Dtos; -using CompanyName.ProjectName.QueryManagement.ElasticSearchs.Dtos; -using Volo.Abp.Application.Services; - -namespace CompanyName.ProjectName.QueryManagement.ElasticSearchs -{ - public interface ILogAppService : IApplicationService - { - Task> PaingLogAsync(PagingElasticSearchLogInput input); - } -} \ No newline at end of file diff --git a/aspnet-core/modules/QueryManagement/src/CompanyName.ProjectName.QueryManagement.Application.Contracts/FodyWeavers.xml b/aspnet-core/modules/QueryManagement/src/CompanyName.ProjectName.QueryManagement.Application.Contracts/FodyWeavers.xml deleted file mode 100644 index be0de3a9..00000000 --- a/aspnet-core/modules/QueryManagement/src/CompanyName.ProjectName.QueryManagement.Application.Contracts/FodyWeavers.xml +++ /dev/null @@ -1,3 +0,0 @@ - - - \ No newline at end of file diff --git a/aspnet-core/modules/QueryManagement/src/CompanyName.ProjectName.QueryManagement.Application.Contracts/FodyWeavers.xsd b/aspnet-core/modules/QueryManagement/src/CompanyName.ProjectName.QueryManagement.Application.Contracts/FodyWeavers.xsd deleted file mode 100644 index 3f3946e2..00000000 --- a/aspnet-core/modules/QueryManagement/src/CompanyName.ProjectName.QueryManagement.Application.Contracts/FodyWeavers.xsd +++ /dev/null @@ -1,30 +0,0 @@ - - - - - - - - - - - - - - - '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/aspnet-core/modules/QueryManagement/src/CompanyName.ProjectName.QueryManagement.Application.Contracts/Permissions/QueryManagementPermissionDefinitionProvider.cs b/aspnet-core/modules/QueryManagement/src/CompanyName.ProjectName.QueryManagement.Application.Contracts/Permissions/QueryManagementPermissionDefinitionProvider.cs deleted file mode 100644 index 07ee43fe..00000000 --- a/aspnet-core/modules/QueryManagement/src/CompanyName.ProjectName.QueryManagement.Application.Contracts/Permissions/QueryManagementPermissionDefinitionProvider.cs +++ /dev/null @@ -1,21 +0,0 @@ -using CompanyName.ProjectName.QueryManagement.Localization; -using Volo.Abp.Authorization.Permissions; -using Volo.Abp.Identity; -using Volo.Abp.Localization; - -namespace CompanyName.ProjectName.QueryManagement.Permissions -{ - public class QueryManagementPermissionDefinitionProvider : PermissionDefinitionProvider - { - public override void Define(IPermissionDefinitionContext context) - { - var abpIdentityGroup = context.GetGroup(IdentityPermissions.GroupName); - var esManagement = abpIdentityGroup.AddPermission(QueryManagementPermissions.SystemManagement.ES, L("Permission:ESManagement")); - } - - private static LocalizableString L(string name) - { - return LocalizableString.Create(name); - } - } -} \ No newline at end of file diff --git a/aspnet-core/modules/QueryManagement/src/CompanyName.ProjectName.QueryManagement.Application.Contracts/Permissions/QueryManagementPermissions.cs b/aspnet-core/modules/QueryManagement/src/CompanyName.ProjectName.QueryManagement.Application.Contracts/Permissions/QueryManagementPermissions.cs deleted file mode 100644 index 4ccc9493..00000000 --- a/aspnet-core/modules/QueryManagement/src/CompanyName.ProjectName.QueryManagement.Application.Contracts/Permissions/QueryManagementPermissions.cs +++ /dev/null @@ -1,23 +0,0 @@ -using Volo.Abp.Reflection; - -namespace CompanyName.ProjectName.QueryManagement.Permissions -{ - public class QueryManagementPermissions - { - public const string GroupName = "QueryManagement"; - - public static string[] GetAll() - { - return ReflectionHelper.GetPublicConstantsRecursively(typeof(QueryManagementPermissions)); - } - - /// - /// 系统管理扩展权限 - /// - public static class SystemManagement - { - public const string Default = "System"; - public const string ES = Default + ".ES"; - } - } -} \ No newline at end of file diff --git a/aspnet-core/modules/QueryManagement/src/CompanyName.ProjectName.QueryManagement.Application.Contracts/QueryManagementApplicationContractsModule.cs b/aspnet-core/modules/QueryManagement/src/CompanyName.ProjectName.QueryManagement.Application.Contracts/QueryManagementApplicationContractsModule.cs deleted file mode 100644 index b9f4a5a0..00000000 --- a/aspnet-core/modules/QueryManagement/src/CompanyName.ProjectName.QueryManagement.Application.Contracts/QueryManagementApplicationContractsModule.cs +++ /dev/null @@ -1,16 +0,0 @@ -using Volo.Abp.Application; -using Volo.Abp.Modularity; -using Volo.Abp.Authorization; - -namespace CompanyName.ProjectName.QueryManagement -{ - [DependsOn( - typeof(QueryManagementDomainSharedModule), - typeof(AbpDddApplicationContractsModule), - typeof(AbpAuthorizationModule) - )] - public class QueryManagementApplicationContractsModule : AbpModule - { - - } -} diff --git a/aspnet-core/modules/QueryManagement/src/CompanyName.ProjectName.QueryManagement.Application/CompanyName.ProjectName.QueryManagement.Application.csproj b/aspnet-core/modules/QueryManagement/src/CompanyName.ProjectName.QueryManagement.Application/CompanyName.ProjectName.QueryManagement.Application.csproj deleted file mode 100644 index 283f56da..00000000 --- a/aspnet-core/modules/QueryManagement/src/CompanyName.ProjectName.QueryManagement.Application/CompanyName.ProjectName.QueryManagement.Application.csproj +++ /dev/null @@ -1,18 +0,0 @@ - - - - - - net5.0 - CompanyName.ProjectName.QueryManagement - - - - - - - - - - - diff --git a/aspnet-core/modules/QueryManagement/src/CompanyName.ProjectName.QueryManagement.Application/ElasticSearchs/LogAppService.cs b/aspnet-core/modules/QueryManagement/src/CompanyName.ProjectName.QueryManagement.Application/ElasticSearchs/LogAppService.cs deleted file mode 100644 index c8410380..00000000 --- a/aspnet-core/modules/QueryManagement/src/CompanyName.ProjectName.QueryManagement.Application/ElasticSearchs/LogAppService.cs +++ /dev/null @@ -1,35 +0,0 @@ -using System.Collections.Generic; -using System.Threading.Tasks; -using CompanyName.ProjectName.Extensions.Customs.Dtos; -using CompanyName.ProjectName.QueryManagement.ElasticSearchs.Dtos; -using Microsoft.Extensions.Configuration; - -namespace CompanyName.ProjectName.QueryManagement.ElasticSearchs -{ - public class LogAppService : QueryManagementAppService, ILogAppService - { - private readonly ICompanyNameProjectNameLogRepository _companyNameProjectNameLogRepository; - private readonly IConfiguration _configuration; - - public LogAppService( - ICompanyNameProjectNameLogRepository companyNameProjectNameLogRepository, - IConfiguration configuration) - { - _companyNameProjectNameLogRepository = companyNameProjectNameLogRepository; - _configuration = configuration; - } - - public async Task> PaingLogAsync(PagingElasticSearchLogInput input) - { - var enabled = _configuration.GetValue("LogToElasticSearch:Enabled", false); - if (enabled) - { - return await _companyNameProjectNameLogRepository.PaingAsync(input); - } - else - { - return new CustomePagedResultDto(0, new List()); - } - } - } -} \ No newline at end of file diff --git a/aspnet-core/modules/QueryManagement/src/CompanyName.ProjectName.QueryManagement.Application/FodyWeavers.xml b/aspnet-core/modules/QueryManagement/src/CompanyName.ProjectName.QueryManagement.Application/FodyWeavers.xml deleted file mode 100644 index be0de3a9..00000000 --- a/aspnet-core/modules/QueryManagement/src/CompanyName.ProjectName.QueryManagement.Application/FodyWeavers.xml +++ /dev/null @@ -1,3 +0,0 @@ - - - \ No newline at end of file diff --git a/aspnet-core/modules/QueryManagement/src/CompanyName.ProjectName.QueryManagement.Application/FodyWeavers.xsd b/aspnet-core/modules/QueryManagement/src/CompanyName.ProjectName.QueryManagement.Application/FodyWeavers.xsd deleted file mode 100644 index 3f3946e2..00000000 --- a/aspnet-core/modules/QueryManagement/src/CompanyName.ProjectName.QueryManagement.Application/FodyWeavers.xsd +++ /dev/null @@ -1,30 +0,0 @@ - - - - - - - - - - - - - - - '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/aspnet-core/modules/QueryManagement/src/CompanyName.ProjectName.QueryManagement.Application/QueryManagementAppService.cs b/aspnet-core/modules/QueryManagement/src/CompanyName.ProjectName.QueryManagement.Application/QueryManagementAppService.cs deleted file mode 100644 index 42daca45..00000000 --- a/aspnet-core/modules/QueryManagement/src/CompanyName.ProjectName.QueryManagement.Application/QueryManagementAppService.cs +++ /dev/null @@ -1,14 +0,0 @@ -using CompanyName.ProjectName.QueryManagement.Localization; -using Volo.Abp.Application.Services; - -namespace CompanyName.ProjectName.QueryManagement -{ - public abstract class QueryManagementAppService : ApplicationService - { - protected QueryManagementAppService() - { - LocalizationResource = typeof(QueryManagementResource); - ObjectMapperContext = typeof(QueryManagementApplicationModule); - } - } -} diff --git a/aspnet-core/modules/QueryManagement/src/CompanyName.ProjectName.QueryManagement.Application/QueryManagementApplicationAutoMapperProfile.cs b/aspnet-core/modules/QueryManagement/src/CompanyName.ProjectName.QueryManagement.Application/QueryManagementApplicationAutoMapperProfile.cs deleted file mode 100644 index 1701477d..00000000 --- a/aspnet-core/modules/QueryManagement/src/CompanyName.ProjectName.QueryManagement.Application/QueryManagementApplicationAutoMapperProfile.cs +++ /dev/null @@ -1,14 +0,0 @@ -using AutoMapper; - -namespace CompanyName.ProjectName.QueryManagement -{ - public class QueryManagementApplicationAutoMapperProfile : Profile - { - public QueryManagementApplicationAutoMapperProfile() - { - /* 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/aspnet-core/modules/QueryManagement/src/CompanyName.ProjectName.QueryManagement.Application/QueryManagementApplicationModule.cs b/aspnet-core/modules/QueryManagement/src/CompanyName.ProjectName.QueryManagement.Application/QueryManagementApplicationModule.cs deleted file mode 100644 index eb5075f7..00000000 --- a/aspnet-core/modules/QueryManagement/src/CompanyName.ProjectName.QueryManagement.Application/QueryManagementApplicationModule.cs +++ /dev/null @@ -1,27 +0,0 @@ -using CompanyName.ProjectName.QueryManagement.ElasticSearch; -using Microsoft.Extensions.DependencyInjection; -using Volo.Abp.AutoMapper; -using Volo.Abp.Modularity; -using Volo.Abp.Application; - -namespace CompanyName.ProjectName.QueryManagement -{ - [DependsOn( - typeof(QueryManagementDomainModule), - typeof(QueryManagementApplicationContractsModule), - typeof(AbpDddApplicationModule), - typeof(AbpAutoMapperModule), - typeof(QueryManagementElasticsearchModule) - )] - public class QueryManagementApplicationModule : AbpModule - { - public override void ConfigureServices(ServiceConfigurationContext context) - { - context.Services.AddAutoMapperObjectMapper(); - Configure(options => - { - options.AddMaps(validate: true); - }); - } - } -} diff --git a/aspnet-core/modules/QueryManagement/src/CompanyName.ProjectName.QueryManagement.Domain.Shared/CompanyName.ProjectName.QueryManagement.Domain.Shared.csproj b/aspnet-core/modules/QueryManagement/src/CompanyName.ProjectName.QueryManagement.Domain.Shared/CompanyName.ProjectName.QueryManagement.Domain.Shared.csproj deleted file mode 100644 index 6b380486..00000000 --- a/aspnet-core/modules/QueryManagement/src/CompanyName.ProjectName.QueryManagement.Domain.Shared/CompanyName.ProjectName.QueryManagement.Domain.Shared.csproj +++ /dev/null @@ -1,29 +0,0 @@ - - - - - - net5.0 - CompanyName.ProjectName.QueryManagement - true - - - - - - - - - - - - - - - - - - - - - diff --git a/aspnet-core/modules/QueryManagement/src/CompanyName.ProjectName.QueryManagement.Domain.Shared/ElasticSearchs/Dtos/PagingElasticSearchLogInput.cs b/aspnet-core/modules/QueryManagement/src/CompanyName.ProjectName.QueryManagement.Domain.Shared/ElasticSearchs/Dtos/PagingElasticSearchLogInput.cs deleted file mode 100644 index 847e5fa0..00000000 --- a/aspnet-core/modules/QueryManagement/src/CompanyName.ProjectName.QueryManagement.Domain.Shared/ElasticSearchs/Dtos/PagingElasticSearchLogInput.cs +++ /dev/null @@ -1,14 +0,0 @@ -using System; -using CompanyName.ProjectName.Extensions.Customs; - -namespace CompanyName.ProjectName.QueryManagement.ElasticSearchs.Dtos -{ - public class PagingElasticSearchLogInput : PagingBase - { - public string Filter { get; set; } - - public DateTime? StartCreationTime { get; set; } - - public DateTime? EndCreationTime { get; set; } - } -} \ No newline at end of file diff --git a/aspnet-core/modules/QueryManagement/src/CompanyName.ProjectName.QueryManagement.Domain.Shared/ElasticSearchs/Dtos/PagingElasticSearchLogOutput.cs b/aspnet-core/modules/QueryManagement/src/CompanyName.ProjectName.QueryManagement.Domain.Shared/ElasticSearchs/Dtos/PagingElasticSearchLogOutput.cs deleted file mode 100644 index 921b50a8..00000000 --- a/aspnet-core/modules/QueryManagement/src/CompanyName.ProjectName.QueryManagement.Domain.Shared/ElasticSearchs/Dtos/PagingElasticSearchLogOutput.cs +++ /dev/null @@ -1,30 +0,0 @@ -using System; -using System.Runtime.Serialization; -using Nest; - -namespace CompanyName.ProjectName.QueryManagement.ElasticSearchs.Dtos -{ - [Serializable] - public class PagingElasticSearchLogOutput - { - /// - /// 日志级别 - /// - public string Level { get; set; } - - - /// - /// 日志内容 - /// - public string Message { get; set; } - - - /// - /// 创建时间 - /// - // [JsonProperty("@timestamp")] - //[DataMember(Name = "@timestamp")] - [PropertyName("@timestamp")] - public DateTime CreationTime { get; set; } - } -} \ No newline at end of file diff --git a/aspnet-core/modules/QueryManagement/src/CompanyName.ProjectName.QueryManagement.Domain.Shared/FodyWeavers.xml b/aspnet-core/modules/QueryManagement/src/CompanyName.ProjectName.QueryManagement.Domain.Shared/FodyWeavers.xml deleted file mode 100644 index be0de3a9..00000000 --- a/aspnet-core/modules/QueryManagement/src/CompanyName.ProjectName.QueryManagement.Domain.Shared/FodyWeavers.xml +++ /dev/null @@ -1,3 +0,0 @@ - - - \ No newline at end of file diff --git a/aspnet-core/modules/QueryManagement/src/CompanyName.ProjectName.QueryManagement.Domain.Shared/FodyWeavers.xsd b/aspnet-core/modules/QueryManagement/src/CompanyName.ProjectName.QueryManagement.Domain.Shared/FodyWeavers.xsd deleted file mode 100644 index 3f3946e2..00000000 --- a/aspnet-core/modules/QueryManagement/src/CompanyName.ProjectName.QueryManagement.Domain.Shared/FodyWeavers.xsd +++ /dev/null @@ -1,30 +0,0 @@ - - - - - - - - - - - - - - - '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/aspnet-core/modules/QueryManagement/src/CompanyName.ProjectName.QueryManagement.Domain.Shared/Localization/QueryManagement/ar.json b/aspnet-core/modules/QueryManagement/src/CompanyName.ProjectName.QueryManagement.Domain.Shared/Localization/QueryManagement/ar.json deleted file mode 100644 index 37703e51..00000000 --- a/aspnet-core/modules/QueryManagement/src/CompanyName.ProjectName.QueryManagement.Domain.Shared/Localization/QueryManagement/ar.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "culture": "ar", - "texts": { - "ManageYourProfile": "إدارة ملفى", - "SamplePageMessage": "صفحة نموذجية للوحدة النمطية QueryManagement" - } -} \ No newline at end of file diff --git a/aspnet-core/modules/QueryManagement/src/CompanyName.ProjectName.QueryManagement.Domain.Shared/Localization/QueryManagement/cs.json b/aspnet-core/modules/QueryManagement/src/CompanyName.ProjectName.QueryManagement.Domain.Shared/Localization/QueryManagement/cs.json deleted file mode 100644 index f3a32d87..00000000 --- a/aspnet-core/modules/QueryManagement/src/CompanyName.ProjectName.QueryManagement.Domain.Shared/Localization/QueryManagement/cs.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "culture": "cs", - "texts": { - "ManageYourProfile": "Spravovat profil", - "SamplePageMessage": "Ukázková stránka pro modul QueryManagement" - } -} diff --git a/aspnet-core/modules/QueryManagement/src/CompanyName.ProjectName.QueryManagement.Domain.Shared/Localization/QueryManagement/de-DE.json b/aspnet-core/modules/QueryManagement/src/CompanyName.ProjectName.QueryManagement.Domain.Shared/Localization/QueryManagement/de-DE.json deleted file mode 100644 index 46b41190..00000000 --- a/aspnet-core/modules/QueryManagement/src/CompanyName.ProjectName.QueryManagement.Domain.Shared/Localization/QueryManagement/de-DE.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "culture": "de-DE", - "texts": { - "ManageYourProfile": "Verwalten Sie Ihr Profil", - "SamplePageMessage": "Eine Beispielseite für das Modul QueryManagementModul" - } -} \ No newline at end of file diff --git a/aspnet-core/modules/QueryManagement/src/CompanyName.ProjectName.QueryManagement.Domain.Shared/Localization/QueryManagement/en-GB.json b/aspnet-core/modules/QueryManagement/src/CompanyName.ProjectName.QueryManagement.Domain.Shared/Localization/QueryManagement/en-GB.json deleted file mode 100644 index 21ec4e80..00000000 --- a/aspnet-core/modules/QueryManagement/src/CompanyName.ProjectName.QueryManagement.Domain.Shared/Localization/QueryManagement/en-GB.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "culture": "en-GB", - "texts": { - "ManageYourProfile": "Manage your profile", - "SamplePageMessage": "A sample page for the QueryManagement module" - } -} \ No newline at end of file diff --git a/aspnet-core/modules/QueryManagement/src/CompanyName.ProjectName.QueryManagement.Domain.Shared/Localization/QueryManagement/en.json b/aspnet-core/modules/QueryManagement/src/CompanyName.ProjectName.QueryManagement.Domain.Shared/Localization/QueryManagement/en.json deleted file mode 100644 index 826f0260..00000000 --- a/aspnet-core/modules/QueryManagement/src/CompanyName.ProjectName.QueryManagement.Domain.Shared/Localization/QueryManagement/en.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "culture": "en", - "texts": { - "ManageYourProfile": "Manage your profile", - "SamplePageMessage": "A sample page for the QueryManagement module", - "Permission:ESManagement": "ElasticSearch" - } -} \ No newline at end of file diff --git a/aspnet-core/modules/QueryManagement/src/CompanyName.ProjectName.QueryManagement.Domain.Shared/Localization/QueryManagement/es.json b/aspnet-core/modules/QueryManagement/src/CompanyName.ProjectName.QueryManagement.Domain.Shared/Localization/QueryManagement/es.json deleted file mode 100644 index bd3f4873..00000000 --- a/aspnet-core/modules/QueryManagement/src/CompanyName.ProjectName.QueryManagement.Domain.Shared/Localization/QueryManagement/es.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "culture": "es", - "texts": { - "ManageYourProfile": "Gestiona tu perfil", - "SamplePageMessage": "Una página de ejemplo para el módulo QueryManagement " - } -} \ No newline at end of file diff --git a/aspnet-core/modules/QueryManagement/src/CompanyName.ProjectName.QueryManagement.Domain.Shared/Localization/QueryManagement/fr.json b/aspnet-core/modules/QueryManagement/src/CompanyName.ProjectName.QueryManagement.Domain.Shared/Localization/QueryManagement/fr.json deleted file mode 100644 index 4ef47621..00000000 --- a/aspnet-core/modules/QueryManagement/src/CompanyName.ProjectName.QueryManagement.Domain.Shared/Localization/QueryManagement/fr.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "culture": "fr", - "texts": { - "ManageYourProfile": "Gérer votre profil", - "SamplePageMessage": "Exemple de page pour le module QueryManagement" - } -} \ No newline at end of file diff --git a/aspnet-core/modules/QueryManagement/src/CompanyName.ProjectName.QueryManagement.Domain.Shared/Localization/QueryManagement/hu.json b/aspnet-core/modules/QueryManagement/src/CompanyName.ProjectName.QueryManagement.Domain.Shared/Localization/QueryManagement/hu.json deleted file mode 100644 index 2ebf0468..00000000 --- a/aspnet-core/modules/QueryManagement/src/CompanyName.ProjectName.QueryManagement.Domain.Shared/Localization/QueryManagement/hu.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "culture": "hu", - "texts": { - "ManageYourProfile": "Kezelje a profilját", - "SamplePageMessage": "Mintaoldal a QueryManagement modulhoz" - } -} \ No newline at end of file diff --git a/aspnet-core/modules/QueryManagement/src/CompanyName.ProjectName.QueryManagement.Domain.Shared/Localization/QueryManagement/nl.json b/aspnet-core/modules/QueryManagement/src/CompanyName.ProjectName.QueryManagement.Domain.Shared/Localization/QueryManagement/nl.json deleted file mode 100644 index dba2fe8e..00000000 --- a/aspnet-core/modules/QueryManagement/src/CompanyName.ProjectName.QueryManagement.Domain.Shared/Localization/QueryManagement/nl.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "culture": "nl", - "texts": { - "ManageYourProfile": "Beheer uw profiel", - "SamplePageMessage": "Een voorbeeldpagina voor de QueryManagement module" - } -} \ No newline at end of file diff --git a/aspnet-core/modules/QueryManagement/src/CompanyName.ProjectName.QueryManagement.Domain.Shared/Localization/QueryManagement/pl-PL.json b/aspnet-core/modules/QueryManagement/src/CompanyName.ProjectName.QueryManagement.Domain.Shared/Localization/QueryManagement/pl-PL.json deleted file mode 100644 index 3ea7b190..00000000 --- a/aspnet-core/modules/QueryManagement/src/CompanyName.ProjectName.QueryManagement.Domain.Shared/Localization/QueryManagement/pl-PL.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "culture": "pl-PL", - "texts": { - - } -} \ No newline at end of file diff --git a/aspnet-core/modules/QueryManagement/src/CompanyName.ProjectName.QueryManagement.Domain.Shared/Localization/QueryManagement/pt-BR.json b/aspnet-core/modules/QueryManagement/src/CompanyName.ProjectName.QueryManagement.Domain.Shared/Localization/QueryManagement/pt-BR.json deleted file mode 100644 index 6d746df0..00000000 --- a/aspnet-core/modules/QueryManagement/src/CompanyName.ProjectName.QueryManagement.Domain.Shared/Localization/QueryManagement/pt-BR.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "culture": "pt-BR", - "texts": { - - } -} \ No newline at end of file diff --git a/aspnet-core/modules/QueryManagement/src/CompanyName.ProjectName.QueryManagement.Domain.Shared/Localization/QueryManagement/sl.json b/aspnet-core/modules/QueryManagement/src/CompanyName.ProjectName.QueryManagement.Domain.Shared/Localization/QueryManagement/sl.json deleted file mode 100644 index 687d4257..00000000 --- a/aspnet-core/modules/QueryManagement/src/CompanyName.ProjectName.QueryManagement.Domain.Shared/Localization/QueryManagement/sl.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "culture": "sl", - "texts": { - "ManageYourProfile": "Upravljajte svojim profilom" - } -} \ No newline at end of file diff --git a/aspnet-core/modules/QueryManagement/src/CompanyName.ProjectName.QueryManagement.Domain.Shared/Localization/QueryManagement/tr.json b/aspnet-core/modules/QueryManagement/src/CompanyName.ProjectName.QueryManagement.Domain.Shared/Localization/QueryManagement/tr.json deleted file mode 100644 index f1022a2a..00000000 --- a/aspnet-core/modules/QueryManagement/src/CompanyName.ProjectName.QueryManagement.Domain.Shared/Localization/QueryManagement/tr.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "culture": "tr", - "texts": { - "ManageYourProfile": "Profil yönetimi", - "SamplePageMessage": "QueryManagement modulünden örnek bir sayfa" - } -} \ No newline at end of file diff --git a/aspnet-core/modules/QueryManagement/src/CompanyName.ProjectName.QueryManagement.Domain.Shared/Localization/QueryManagement/vi.json b/aspnet-core/modules/QueryManagement/src/CompanyName.ProjectName.QueryManagement.Domain.Shared/Localization/QueryManagement/vi.json deleted file mode 100644 index d8eb5f3c..00000000 --- a/aspnet-core/modules/QueryManagement/src/CompanyName.ProjectName.QueryManagement.Domain.Shared/Localization/QueryManagement/vi.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "culture": "vi", - "texts": { - - } -} diff --git a/aspnet-core/modules/QueryManagement/src/CompanyName.ProjectName.QueryManagement.Domain.Shared/Localization/QueryManagement/zh-Hans.json b/aspnet-core/modules/QueryManagement/src/CompanyName.ProjectName.QueryManagement.Domain.Shared/Localization/QueryManagement/zh-Hans.json deleted file mode 100644 index ec9959d3..00000000 --- a/aspnet-core/modules/QueryManagement/src/CompanyName.ProjectName.QueryManagement.Domain.Shared/Localization/QueryManagement/zh-Hans.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "culture": "zh-Hans", - "texts": { - "ManageYourProfile": "管理个人资料", - "SamplePageMessage": "QueryManagement模块的示例页面", - "Permission:ESManagement": "ES日志" - } -} \ No newline at end of file diff --git a/aspnet-core/modules/QueryManagement/src/CompanyName.ProjectName.QueryManagement.Domain.Shared/Localization/QueryManagement/zh-Hant.json b/aspnet-core/modules/QueryManagement/src/CompanyName.ProjectName.QueryManagement.Domain.Shared/Localization/QueryManagement/zh-Hant.json deleted file mode 100644 index ceea0555..00000000 --- a/aspnet-core/modules/QueryManagement/src/CompanyName.ProjectName.QueryManagement.Domain.Shared/Localization/QueryManagement/zh-Hant.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "culture": "zh-Hant", - "texts": { - "ManageYourProfile": "管理個人資料" - } -} \ No newline at end of file diff --git a/aspnet-core/modules/QueryManagement/src/CompanyName.ProjectName.QueryManagement.Domain.Shared/Localization/QueryManagementResource.cs b/aspnet-core/modules/QueryManagement/src/CompanyName.ProjectName.QueryManagement.Domain.Shared/Localization/QueryManagementResource.cs deleted file mode 100644 index 55886c7d..00000000 --- a/aspnet-core/modules/QueryManagement/src/CompanyName.ProjectName.QueryManagement.Domain.Shared/Localization/QueryManagementResource.cs +++ /dev/null @@ -1,10 +0,0 @@ -using Volo.Abp.Localization; - -namespace CompanyName.ProjectName.QueryManagement.Localization -{ - [LocalizationResourceName("QueryManagement")] - public class QueryManagementResource - { - - } -} diff --git a/aspnet-core/modules/QueryManagement/src/CompanyName.ProjectName.QueryManagement.Domain.Shared/QueryManagementDomainSharedModule.cs b/aspnet-core/modules/QueryManagement/src/CompanyName.ProjectName.QueryManagement.Domain.Shared/QueryManagementDomainSharedModule.cs deleted file mode 100644 index 9688988c..00000000 --- a/aspnet-core/modules/QueryManagement/src/CompanyName.ProjectName.QueryManagement.Domain.Shared/QueryManagementDomainSharedModule.cs +++ /dev/null @@ -1,37 +0,0 @@ -using Volo.Abp.Modularity; -using Volo.Abp.Localization; -using CompanyName.ProjectName.QueryManagement.Localization; -using Volo.Abp.Localization.ExceptionHandling; -using Volo.Abp.Validation; -using Volo.Abp.Validation.Localization; -using Volo.Abp.VirtualFileSystem; - -namespace CompanyName.ProjectName.QueryManagement -{ - [DependsOn( - typeof(AbpValidationModule) - )] - public class QueryManagementDomainSharedModule : AbpModule - { - public override void ConfigureServices(ServiceConfigurationContext context) - { - Configure(options => - { - options.FileSets.AddEmbedded(); - }); - - Configure(options => - { - options.Resources - .Add("en") - .AddBaseTypes(typeof(AbpValidationResource)) - .AddVirtualJson("/Localization/QueryManagement"); - }); - - Configure(options => - { - options.MapCodeNamespace("QueryManagement", typeof(QueryManagementResource)); - }); - } - } -} diff --git a/aspnet-core/modules/QueryManagement/src/CompanyName.ProjectName.QueryManagement.Domain.Shared/QueryManagementErrorCodes.cs b/aspnet-core/modules/QueryManagement/src/CompanyName.ProjectName.QueryManagement.Domain.Shared/QueryManagementErrorCodes.cs deleted file mode 100644 index 85bc76fd..00000000 --- a/aspnet-core/modules/QueryManagement/src/CompanyName.ProjectName.QueryManagement.Domain.Shared/QueryManagementErrorCodes.cs +++ /dev/null @@ -1,7 +0,0 @@ -namespace CompanyName.ProjectName.QueryManagement -{ - public static class QueryManagementErrorCodes - { - //Add your business exception error codes here... - } -} diff --git a/aspnet-core/modules/QueryManagement/src/CompanyName.ProjectName.QueryManagement.Domain.Shared/Systems/Users/AbpUserFreeSqlDto.cs b/aspnet-core/modules/QueryManagement/src/CompanyName.ProjectName.QueryManagement.Domain.Shared/Systems/Users/AbpUserFreeSqlDto.cs deleted file mode 100644 index a7c7d1be..00000000 --- a/aspnet-core/modules/QueryManagement/src/CompanyName.ProjectName.QueryManagement.Domain.Shared/Systems/Users/AbpUserFreeSqlDto.cs +++ /dev/null @@ -1,13 +0,0 @@ -namespace CompanyName.ProjectName.QueryManagement.Systems.Users -{ - public class AbpUserFreeSqlDto - { - public string Id { get; set; } - - public string Name { get; set; } - - public string UserName { get; set; } - - public string Email { get; set; } - } -} \ No newline at end of file diff --git a/aspnet-core/modules/QueryManagement/src/CompanyName.ProjectName.QueryManagement.Domain/CompanyName.ProjectName.QueryManagement.Domain.csproj b/aspnet-core/modules/QueryManagement/src/CompanyName.ProjectName.QueryManagement.Domain/CompanyName.ProjectName.QueryManagement.Domain.csproj deleted file mode 100644 index 0b473851..00000000 --- a/aspnet-core/modules/QueryManagement/src/CompanyName.ProjectName.QueryManagement.Domain/CompanyName.ProjectName.QueryManagement.Domain.csproj +++ /dev/null @@ -1,15 +0,0 @@ - - - - - - net5.0 - CompanyName.ProjectName.QueryManagement - - - - - - - - diff --git a/aspnet-core/modules/QueryManagement/src/CompanyName.ProjectName.QueryManagement.Domain/ElasticSearchs/ICompanyNameProjectNameLogRepository.cs b/aspnet-core/modules/QueryManagement/src/CompanyName.ProjectName.QueryManagement.Domain/ElasticSearchs/ICompanyNameProjectNameLogRepository.cs deleted file mode 100644 index 371e232e..00000000 --- a/aspnet-core/modules/QueryManagement/src/CompanyName.ProjectName.QueryManagement.Domain/ElasticSearchs/ICompanyNameProjectNameLogRepository.cs +++ /dev/null @@ -1,17 +0,0 @@ -using System.Threading.Tasks; -using CompanyName.ProjectName.Extensions.Customs.Dtos; -using CompanyName.ProjectName.QueryManagement.ElasticSearchs.Dtos; -using Volo.Abp.DependencyInjection; - -namespace CompanyName.ProjectName.QueryManagement.ElasticSearchs -{ - public interface ICompanyNameProjectNameLogRepository : ITransientDependency - { - /// - /// 分页查询es日志 - /// - /// - /// - Task> PaingAsync(PagingElasticSearchLogInput input); - } -} \ No newline at end of file diff --git a/aspnet-core/modules/QueryManagement/src/CompanyName.ProjectName.QueryManagement.Domain/FodyWeavers.xml b/aspnet-core/modules/QueryManagement/src/CompanyName.ProjectName.QueryManagement.Domain/FodyWeavers.xml deleted file mode 100644 index be0de3a9..00000000 --- a/aspnet-core/modules/QueryManagement/src/CompanyName.ProjectName.QueryManagement.Domain/FodyWeavers.xml +++ /dev/null @@ -1,3 +0,0 @@ - - - \ No newline at end of file diff --git a/aspnet-core/modules/QueryManagement/src/CompanyName.ProjectName.QueryManagement.Domain/FodyWeavers.xsd b/aspnet-core/modules/QueryManagement/src/CompanyName.ProjectName.QueryManagement.Domain/FodyWeavers.xsd deleted file mode 100644 index 3f3946e2..00000000 --- a/aspnet-core/modules/QueryManagement/src/CompanyName.ProjectName.QueryManagement.Domain/FodyWeavers.xsd +++ /dev/null @@ -1,30 +0,0 @@ - - - - - - - - - - - - - - - '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/aspnet-core/modules/QueryManagement/src/CompanyName.ProjectName.QueryManagement.Domain/QueryManagementDbProperties.cs b/aspnet-core/modules/QueryManagement/src/CompanyName.ProjectName.QueryManagement.Domain/QueryManagementDbProperties.cs deleted file mode 100644 index 5440ff37..00000000 --- a/aspnet-core/modules/QueryManagement/src/CompanyName.ProjectName.QueryManagement.Domain/QueryManagementDbProperties.cs +++ /dev/null @@ -1,12 +0,0 @@ -namespace CompanyName.ProjectName.QueryManagement -{ - public static class QueryManagementDbProperties - { - public static string DbTablePrefix { get; set; } = "QueryManagement"; - - public static string DbSchema { get; set; } = null; - - public const string ConnectionStringName = "Default"; - - } -} diff --git a/aspnet-core/modules/QueryManagement/src/CompanyName.ProjectName.QueryManagement.Domain/QueryManagementDomainModule.cs b/aspnet-core/modules/QueryManagement/src/CompanyName.ProjectName.QueryManagement.Domain/QueryManagementDomainModule.cs deleted file mode 100644 index d177d44c..00000000 --- a/aspnet-core/modules/QueryManagement/src/CompanyName.ProjectName.QueryManagement.Domain/QueryManagementDomainModule.cs +++ /dev/null @@ -1,14 +0,0 @@ -using Volo.Abp.Domain; -using Volo.Abp.Modularity; - -namespace CompanyName.ProjectName.QueryManagement -{ - [DependsOn( - typeof(AbpDddDomainModule), - typeof(QueryManagementDomainSharedModule) - )] - public class QueryManagementDomainModule : AbpModule - { - - } -} diff --git a/aspnet-core/modules/QueryManagement/src/CompanyName.ProjectName.QueryManagement.Domain/Settings/QueryManagementSettingDefinitionProvider.cs b/aspnet-core/modules/QueryManagement/src/CompanyName.ProjectName.QueryManagement.Domain/Settings/QueryManagementSettingDefinitionProvider.cs deleted file mode 100644 index 86e7645d..00000000 --- a/aspnet-core/modules/QueryManagement/src/CompanyName.ProjectName.QueryManagement.Domain/Settings/QueryManagementSettingDefinitionProvider.cs +++ /dev/null @@ -1,14 +0,0 @@ -using Volo.Abp.Settings; - -namespace CompanyName.ProjectName.QueryManagement.Settings -{ - public class QueryManagementSettingDefinitionProvider : SettingDefinitionProvider - { - public override void Define(ISettingDefinitionContext context) - { - /* Define module settings here. - * Use names from QueryManagementSettings class. - */ - } - } -} \ No newline at end of file diff --git a/aspnet-core/modules/QueryManagement/src/CompanyName.ProjectName.QueryManagement.Domain/Settings/QueryManagementSettings.cs b/aspnet-core/modules/QueryManagement/src/CompanyName.ProjectName.QueryManagement.Domain/Settings/QueryManagementSettings.cs deleted file mode 100644 index 362d3188..00000000 --- a/aspnet-core/modules/QueryManagement/src/CompanyName.ProjectName.QueryManagement.Domain/Settings/QueryManagementSettings.cs +++ /dev/null @@ -1,11 +0,0 @@ -namespace CompanyName.ProjectName.QueryManagement.Settings -{ - public static class QueryManagementSettings - { - public const string GroupName = "QueryManagement"; - - /* Add constants for setting names. Example: - * public const string MySettingName = GroupName + ".MySettingName"; - */ - } -} \ No newline at end of file diff --git a/aspnet-core/modules/QueryManagement/src/CompanyName.ProjectName.QueryManagement.Domain/Systems/Users/IUserFreeSqlRepository.cs b/aspnet-core/modules/QueryManagement/src/CompanyName.ProjectName.QueryManagement.Domain/Systems/Users/IUserFreeSqlRepository.cs deleted file mode 100644 index 266e51c6..00000000 --- a/aspnet-core/modules/QueryManagement/src/CompanyName.ProjectName.QueryManagement.Domain/Systems/Users/IUserFreeSqlRepository.cs +++ /dev/null @@ -1,10 +0,0 @@ -using System; -using System.Threading.Tasks; - -namespace CompanyName.ProjectName.QueryManagement.Systems.Users -{ - public interface IUserFreeSqlRepository - { - Task GetUserNameByIdAsync(Guid id); - } -} diff --git a/aspnet-core/modules/QueryManagement/src/CompanyName.ProjectName.QueryManagement.ElasticSearch/CompanyName.ProjectName.QueryManagement.ElasticSearch.csproj b/aspnet-core/modules/QueryManagement/src/CompanyName.ProjectName.QueryManagement.ElasticSearch/CompanyName.ProjectName.QueryManagement.ElasticSearch.csproj deleted file mode 100644 index cbeecac4..00000000 --- a/aspnet-core/modules/QueryManagement/src/CompanyName.ProjectName.QueryManagement.ElasticSearch/CompanyName.ProjectName.QueryManagement.ElasticSearch.csproj +++ /dev/null @@ -1,13 +0,0 @@ - - - - net5.0 - - - - - - - - - diff --git a/aspnet-core/modules/QueryManagement/src/CompanyName.ProjectName.QueryManagement.ElasticSearch/CompanyNameProjectNameLogRepository.cs b/aspnet-core/modules/QueryManagement/src/CompanyName.ProjectName.QueryManagement.ElasticSearch/CompanyNameProjectNameLogRepository.cs deleted file mode 100644 index 12215dc7..00000000 --- a/aspnet-core/modules/QueryManagement/src/CompanyName.ProjectName.QueryManagement.ElasticSearch/CompanyNameProjectNameLogRepository.cs +++ /dev/null @@ -1,60 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Threading.Tasks; -using CompanyName.ProjectName.Extensions.Customs.Dtos; -using CompanyName.ProjectName.QueryManagement.ElasticSearchs; -using CompanyName.ProjectName.QueryManagement.ElasticSearchs.Dtos; -using Microsoft.Extensions.Configuration; -using Microsoft.Extensions.Hosting; -using Nest; - -namespace CompanyName.ProjectName.QueryManagement.ElasticSearch -{ - public class CompanyNameProjectNameLogRepository : ElasticsearchBasicRepository, ICompanyNameProjectNameLogRepository - { - private readonly string IndexName = "{0}.{1}*"; - private readonly IConfiguration _configuration; - private readonly IHostEnvironment _hostEnvironment; - - public CompanyNameProjectNameLogRepository( - IElasticsearchProvider elasticsearchProvider, - IConfiguration configuration, - IHostEnvironment hostEnvironment) : - base(elasticsearchProvider) - { - _configuration = configuration; - _hostEnvironment = hostEnvironment; - IndexName = string.Format(IndexName, configuration["LogToElasticSearch:ElasticSearch:DashboardIndex"], - _hostEnvironment.EnvironmentName.ToLower()); - } - - public async Task> PaingAsync(PagingElasticSearchLogInput input) - { - // 默认查询当天 - input.StartCreationTime = input.StartCreationTime?.AddMilliseconds(-1) ?? DateTime.Now.Date.AddMilliseconds(-1); - input.EndCreationTime = - input.EndCreationTime?.AddDays(1).AddMilliseconds(-1) ?? DateTime.Now.Date.AddDays(1).AddMilliseconds(-1); - var mustFilters = new List, QueryContainer>> - { - t => t.DateRange(f => - f.Field(fd => fd.CreationTime).TimeZone("Asia/Shanghai").GreaterThanOrEquals(input.StartCreationTime.Value)), - t => t.DateRange( - f => f.Field(fd => fd.CreationTime).TimeZone("Asia/Shanghai").LessThanOrEquals(input.EndCreationTime.Value)) - }; - - if (!string.IsNullOrWhiteSpace(input.Filter)) - { - mustFilters.Add(t => t.MatchPhrase(f => f.Field(fd => fd.Message).Query(input.Filter.Trim()))); - } - - var result = await Client.SearchAsync(e => e.Index(IndexName) - .From(input.SkipCount) - .Size(input.PageSize) - .Sort(s => s.Descending(sd => sd.CreationTime)) - .Query(q => q.Bool(qb => qb.Filter(mustFilters)))); - - return new CustomePagedResultDto(result.HitsMetadata.Total.Value, result.Documents.ToList()); - } - } -} \ No newline at end of file diff --git a/aspnet-core/modules/QueryManagement/src/CompanyName.ProjectName.QueryManagement.ElasticSearch/QueryManagementElasticsearchModule.cs b/aspnet-core/modules/QueryManagement/src/CompanyName.ProjectName.QueryManagement.ElasticSearch/QueryManagementElasticsearchModule.cs deleted file mode 100644 index f4b0216f..00000000 --- a/aspnet-core/modules/QueryManagement/src/CompanyName.ProjectName.QueryManagement.ElasticSearch/QueryManagementElasticsearchModule.cs +++ /dev/null @@ -1,12 +0,0 @@ -using Volo.Abp.Autofac; -using Volo.Abp.Domain; -using Volo.Abp.Modularity; - -namespace CompanyName.ProjectName.QueryManagement.ElasticSearch -{ - [DependsOn(typeof(AbpAutofacModule))] - [DependsOn(typeof(AbpDddDomainModule))] - public class QueryManagementElasticsearchModule : AbpModule - { - } -} \ No newline at end of file diff --git a/aspnet-core/modules/QueryManagement/src/CompanyName.ProjectName.QueryManagement.EntityFrameworkCore/CompanyName.ProjectName.QueryManagement.EntityFrameworkCore.csproj b/aspnet-core/modules/QueryManagement/src/CompanyName.ProjectName.QueryManagement.EntityFrameworkCore/CompanyName.ProjectName.QueryManagement.EntityFrameworkCore.csproj deleted file mode 100644 index 0eef1dc7..00000000 --- a/aspnet-core/modules/QueryManagement/src/CompanyName.ProjectName.QueryManagement.EntityFrameworkCore/CompanyName.ProjectName.QueryManagement.EntityFrameworkCore.csproj +++ /dev/null @@ -1,15 +0,0 @@ - - - - - - net5.0 - CompanyName.ProjectName.QueryManagement - - - - - - - - diff --git a/aspnet-core/modules/QueryManagement/src/CompanyName.ProjectName.QueryManagement.EntityFrameworkCore/EntityFrameworkCore/IQueryManagementDbContext.cs b/aspnet-core/modules/QueryManagement/src/CompanyName.ProjectName.QueryManagement.EntityFrameworkCore/EntityFrameworkCore/IQueryManagementDbContext.cs deleted file mode 100644 index d32ec42f..00000000 --- a/aspnet-core/modules/QueryManagement/src/CompanyName.ProjectName.QueryManagement.EntityFrameworkCore/EntityFrameworkCore/IQueryManagementDbContext.cs +++ /dev/null @@ -1,13 +0,0 @@ -using Volo.Abp.Data; -using Volo.Abp.EntityFrameworkCore; - -namespace CompanyName.ProjectName.QueryManagement.EntityFrameworkCore -{ - [ConnectionStringName(QueryManagementDbProperties.ConnectionStringName)] - public interface IQueryManagementDbContext : IEfCoreDbContext - { - /* Add DbSet for each Aggregate Root here. Example: - * DbSet Questions { get; } - */ - } -} \ No newline at end of file diff --git a/aspnet-core/modules/QueryManagement/src/CompanyName.ProjectName.QueryManagement.EntityFrameworkCore/EntityFrameworkCore/QueryManagementDbContext.cs b/aspnet-core/modules/QueryManagement/src/CompanyName.ProjectName.QueryManagement.EntityFrameworkCore/EntityFrameworkCore/QueryManagementDbContext.cs deleted file mode 100644 index 76b38c14..00000000 --- a/aspnet-core/modules/QueryManagement/src/CompanyName.ProjectName.QueryManagement.EntityFrameworkCore/EntityFrameworkCore/QueryManagementDbContext.cs +++ /dev/null @@ -1,27 +0,0 @@ -using Microsoft.EntityFrameworkCore; -using Volo.Abp.Data; -using Volo.Abp.EntityFrameworkCore; - -namespace CompanyName.ProjectName.QueryManagement.EntityFrameworkCore -{ - [ConnectionStringName(QueryManagementDbProperties.ConnectionStringName)] - public class QueryManagementDbContext : AbpDbContext, IQueryManagementDbContext - { - /* Add DbSet for each Aggregate Root here. Example: - * public DbSet Questions { get; set; } - */ - - public QueryManagementDbContext(DbContextOptions options) - : base(options) - { - - } - - protected override void OnModelCreating(ModelBuilder builder) - { - base.OnModelCreating(builder); - - builder.ConfigureQueryManagement(); - } - } -} \ No newline at end of file diff --git a/aspnet-core/modules/QueryManagement/src/CompanyName.ProjectName.QueryManagement.EntityFrameworkCore/EntityFrameworkCore/QueryManagementDbContextModelCreatingExtensions.cs b/aspnet-core/modules/QueryManagement/src/CompanyName.ProjectName.QueryManagement.EntityFrameworkCore/EntityFrameworkCore/QueryManagementDbContextModelCreatingExtensions.cs deleted file mode 100644 index 542e35f2..00000000 --- a/aspnet-core/modules/QueryManagement/src/CompanyName.ProjectName.QueryManagement.EntityFrameworkCore/EntityFrameworkCore/QueryManagementDbContextModelCreatingExtensions.cs +++ /dev/null @@ -1,43 +0,0 @@ -using System; -using Microsoft.EntityFrameworkCore; -using Volo.Abp; - -namespace CompanyName.ProjectName.QueryManagement.EntityFrameworkCore -{ - public static class QueryManagementDbContextModelCreatingExtensions - { - public static void ConfigureQueryManagement( - this ModelBuilder builder, - Action optionsAction = null) - { - Check.NotNull(builder, nameof(builder)); - - var options = new QueryManagementModelBuilderConfigurationOptions( - QueryManagementDbProperties.DbTablePrefix, - QueryManagementDbProperties.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); - }); - */ - } - } -} \ No newline at end of file diff --git a/aspnet-core/modules/QueryManagement/src/CompanyName.ProjectName.QueryManagement.EntityFrameworkCore/EntityFrameworkCore/QueryManagementEntityFrameworkCoreModule.cs b/aspnet-core/modules/QueryManagement/src/CompanyName.ProjectName.QueryManagement.EntityFrameworkCore/EntityFrameworkCore/QueryManagementEntityFrameworkCoreModule.cs deleted file mode 100644 index 8a938512..00000000 --- a/aspnet-core/modules/QueryManagement/src/CompanyName.ProjectName.QueryManagement.EntityFrameworkCore/EntityFrameworkCore/QueryManagementEntityFrameworkCoreModule.cs +++ /dev/null @@ -1,23 +0,0 @@ -using Microsoft.Extensions.DependencyInjection; -using Volo.Abp.EntityFrameworkCore; -using Volo.Abp.Modularity; - -namespace CompanyName.ProjectName.QueryManagement.EntityFrameworkCore -{ - [DependsOn( - typeof(QueryManagementDomainModule), - typeof(AbpEntityFrameworkCoreModule) - )] - public class QueryManagementEntityFrameworkCoreModule : 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/aspnet-core/modules/QueryManagement/src/CompanyName.ProjectName.QueryManagement.EntityFrameworkCore/EntityFrameworkCore/QueryManagementModelBuilderConfigurationOptions.cs b/aspnet-core/modules/QueryManagement/src/CompanyName.ProjectName.QueryManagement.EntityFrameworkCore/EntityFrameworkCore/QueryManagementModelBuilderConfigurationOptions.cs deleted file mode 100644 index ea2654bb..00000000 --- a/aspnet-core/modules/QueryManagement/src/CompanyName.ProjectName.QueryManagement.EntityFrameworkCore/EntityFrameworkCore/QueryManagementModelBuilderConfigurationOptions.cs +++ /dev/null @@ -1,18 +0,0 @@ -using JetBrains.Annotations; -using Volo.Abp.EntityFrameworkCore.Modeling; - -namespace CompanyName.ProjectName.QueryManagement.EntityFrameworkCore -{ - public class QueryManagementModelBuilderConfigurationOptions : AbpModelBuilderConfigurationOptions - { - public QueryManagementModelBuilderConfigurationOptions( - [NotNull] string tablePrefix = "", - [CanBeNull] string schema = null) - : base( - tablePrefix, - schema) - { - - } - } -} \ No newline at end of file diff --git a/aspnet-core/modules/QueryManagement/src/CompanyName.ProjectName.QueryManagement.EntityFrameworkCore/FodyWeavers.xml b/aspnet-core/modules/QueryManagement/src/CompanyName.ProjectName.QueryManagement.EntityFrameworkCore/FodyWeavers.xml deleted file mode 100644 index be0de3a9..00000000 --- a/aspnet-core/modules/QueryManagement/src/CompanyName.ProjectName.QueryManagement.EntityFrameworkCore/FodyWeavers.xml +++ /dev/null @@ -1,3 +0,0 @@ - - - \ No newline at end of file diff --git a/aspnet-core/modules/QueryManagement/src/CompanyName.ProjectName.QueryManagement.EntityFrameworkCore/FodyWeavers.xsd b/aspnet-core/modules/QueryManagement/src/CompanyName.ProjectName.QueryManagement.EntityFrameworkCore/FodyWeavers.xsd deleted file mode 100644 index 3f3946e2..00000000 --- a/aspnet-core/modules/QueryManagement/src/CompanyName.ProjectName.QueryManagement.EntityFrameworkCore/FodyWeavers.xsd +++ /dev/null @@ -1,30 +0,0 @@ - - - - - - - - - - - - - - - '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/aspnet-core/modules/QueryManagement/src/CompanyName.ProjectName.QueryManagement.FreeSqlMySql/CompanyName.ProjectName.QueryManagement.FreeSqlMySql.csproj b/aspnet-core/modules/QueryManagement/src/CompanyName.ProjectName.QueryManagement.FreeSqlMySql/CompanyName.ProjectName.QueryManagement.FreeSqlMySql.csproj deleted file mode 100644 index 97f2cb88..00000000 --- a/aspnet-core/modules/QueryManagement/src/CompanyName.ProjectName.QueryManagement.FreeSqlMySql/CompanyName.ProjectName.QueryManagement.FreeSqlMySql.csproj +++ /dev/null @@ -1,16 +0,0 @@ - - - - net5.0 - - - - - - - - - - - - diff --git a/aspnet-core/modules/QueryManagement/src/CompanyName.ProjectName.QueryManagement.FreeSqlMySql/Systems/Users/UserFreeSqlRepository.cs b/aspnet-core/modules/QueryManagement/src/CompanyName.ProjectName.QueryManagement.FreeSqlMySql/Systems/Users/UserFreeSqlRepository.cs deleted file mode 100644 index f504cfe1..00000000 --- a/aspnet-core/modules/QueryManagement/src/CompanyName.ProjectName.QueryManagement.FreeSqlMySql/Systems/Users/UserFreeSqlRepository.cs +++ /dev/null @@ -1,26 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Threading.Tasks; -using CompanyName.ProjectName.QueryManagement.Systems.Users; - -namespace CompanyName.ProjectName.QueryManagement.FreeSqlMySql.Systems.Users -{ - public class UserFreeSqlRepository : FreeSqlBasicRepository, IUserFreeSqlRepository - { - /// - /// 根据用户id获取用户名称 - /// 测试 - /// - /// - /// - public async Task GetUserNameByIdAsync(Guid id) - { - - var sql = $"select a.Id,a.Name,a.UserName,a.Email from AbpUsers a where a.Id=?id"; - var se= await FreeSql.Select() - .WithSql(sql,new {id}) - .ToListAsync(); - return null; - } - } -} \ No newline at end of file diff --git a/aspnet-core/modules/QueryManagement/src/CompanyName.ProjectName.QueryManagement.HttpApi.Client/CompanyName.ProjectName.QueryManagement.HttpApi.Client.csproj b/aspnet-core/modules/QueryManagement/src/CompanyName.ProjectName.QueryManagement.HttpApi.Client/CompanyName.ProjectName.QueryManagement.HttpApi.Client.csproj deleted file mode 100644 index 76a3c7ac..00000000 --- a/aspnet-core/modules/QueryManagement/src/CompanyName.ProjectName.QueryManagement.HttpApi.Client/CompanyName.ProjectName.QueryManagement.HttpApi.Client.csproj +++ /dev/null @@ -1,15 +0,0 @@ - - - - - - net5.0 - CompanyName.ProjectName.QueryManagement - - - - - - - - diff --git a/aspnet-core/modules/QueryManagement/src/CompanyName.ProjectName.QueryManagement.HttpApi.Client/FodyWeavers.xml b/aspnet-core/modules/QueryManagement/src/CompanyName.ProjectName.QueryManagement.HttpApi.Client/FodyWeavers.xml deleted file mode 100644 index be0de3a9..00000000 --- a/aspnet-core/modules/QueryManagement/src/CompanyName.ProjectName.QueryManagement.HttpApi.Client/FodyWeavers.xml +++ /dev/null @@ -1,3 +0,0 @@ - - - \ No newline at end of file diff --git a/aspnet-core/modules/QueryManagement/src/CompanyName.ProjectName.QueryManagement.HttpApi.Client/FodyWeavers.xsd b/aspnet-core/modules/QueryManagement/src/CompanyName.ProjectName.QueryManagement.HttpApi.Client/FodyWeavers.xsd deleted file mode 100644 index 3f3946e2..00000000 --- a/aspnet-core/modules/QueryManagement/src/CompanyName.ProjectName.QueryManagement.HttpApi.Client/FodyWeavers.xsd +++ /dev/null @@ -1,30 +0,0 @@ - - - - - - - - - - - - - - - '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/aspnet-core/modules/QueryManagement/src/CompanyName.ProjectName.QueryManagement.HttpApi.Client/QueryManagementHttpApiClientModule.cs b/aspnet-core/modules/QueryManagement/src/CompanyName.ProjectName.QueryManagement.HttpApi.Client/QueryManagementHttpApiClientModule.cs deleted file mode 100644 index 1b69504b..00000000 --- a/aspnet-core/modules/QueryManagement/src/CompanyName.ProjectName.QueryManagement.HttpApi.Client/QueryManagementHttpApiClientModule.cs +++ /dev/null @@ -1,22 +0,0 @@ -using Microsoft.Extensions.DependencyInjection; -using Volo.Abp.Http.Client; -using Volo.Abp.Modularity; - -namespace CompanyName.ProjectName.QueryManagement -{ - [DependsOn( - typeof(QueryManagementApplicationContractsModule), - typeof(AbpHttpClientModule))] - public class QueryManagementHttpApiClientModule : AbpModule - { - public const string RemoteServiceName = "QueryManagement"; - - public override void ConfigureServices(ServiceConfigurationContext context) - { - context.Services.AddHttpClientProxies( - typeof(QueryManagementApplicationContractsModule).Assembly, - RemoteServiceName - ); - } - } -} diff --git a/aspnet-core/modules/QueryManagement/src/CompanyName.ProjectName.QueryManagement.HttpApi/CompanyName.ProjectName.QueryManagement.HttpApi.csproj b/aspnet-core/modules/QueryManagement/src/CompanyName.ProjectName.QueryManagement.HttpApi/CompanyName.ProjectName.QueryManagement.HttpApi.csproj deleted file mode 100644 index ca59986f..00000000 --- a/aspnet-core/modules/QueryManagement/src/CompanyName.ProjectName.QueryManagement.HttpApi/CompanyName.ProjectName.QueryManagement.HttpApi.csproj +++ /dev/null @@ -1,15 +0,0 @@ - - - - - - net5.0 - CompanyName.ProjectName.QueryManagement - - - - - - - - diff --git a/aspnet-core/modules/QueryManagement/src/CompanyName.ProjectName.QueryManagement.HttpApi/ElasticSearchs/ElasticSearchController.cs b/aspnet-core/modules/QueryManagement/src/CompanyName.ProjectName.QueryManagement.HttpApi/ElasticSearchs/ElasticSearchController.cs deleted file mode 100644 index 619a36f7..00000000 --- a/aspnet-core/modules/QueryManagement/src/CompanyName.ProjectName.QueryManagement.HttpApi/ElasticSearchs/ElasticSearchController.cs +++ /dev/null @@ -1,30 +0,0 @@ -using System.Threading.Tasks; -using CompanyName.ProjectName.Extensions.Customs.Dtos; -using CompanyName.ProjectName.QueryManagement.ElasticSearchs.Dtos; -using CompanyName.ProjectName.QueryManagement.Permissions; -using Microsoft.AspNetCore.Authorization; -using Microsoft.AspNetCore.Mvc; -using Volo.Abp.Application.Services; -using Volo.Abp.Identity; - -namespace CompanyName.ProjectName.QueryManagement.ElasticSearchs -{ - [Route("api/QueryManagement/ElasticSearch")] - [Authorize(Policy = IdentityPermissions.Users.Default)] - public class ElasticSearchController : QueryManagementController, IApplicationService - { - private readonly ILogAppService _logAppService; - - public ElasticSearchController(ILogAppService logAppService) - { - _logAppService = logAppService; - } - - [HttpPost("paging")] - [Authorize(Policy = QueryManagementPermissions.SystemManagement.ES)] - public Task> PaingLogAsync(PagingElasticSearchLogInput input) - { - return _logAppService.PaingLogAsync(input); - } - } -} \ No newline at end of file diff --git a/aspnet-core/modules/QueryManagement/src/CompanyName.ProjectName.QueryManagement.HttpApi/FodyWeavers.xml b/aspnet-core/modules/QueryManagement/src/CompanyName.ProjectName.QueryManagement.HttpApi/FodyWeavers.xml deleted file mode 100644 index be0de3a9..00000000 --- a/aspnet-core/modules/QueryManagement/src/CompanyName.ProjectName.QueryManagement.HttpApi/FodyWeavers.xml +++ /dev/null @@ -1,3 +0,0 @@ - - - \ No newline at end of file diff --git a/aspnet-core/modules/QueryManagement/src/CompanyName.ProjectName.QueryManagement.HttpApi/FodyWeavers.xsd b/aspnet-core/modules/QueryManagement/src/CompanyName.ProjectName.QueryManagement.HttpApi/FodyWeavers.xsd deleted file mode 100644 index 3f3946e2..00000000 --- a/aspnet-core/modules/QueryManagement/src/CompanyName.ProjectName.QueryManagement.HttpApi/FodyWeavers.xsd +++ /dev/null @@ -1,30 +0,0 @@ - - - - - - - - - - - - - - - '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/aspnet-core/modules/QueryManagement/src/CompanyName.ProjectName.QueryManagement.HttpApi/QueryManagementController.cs b/aspnet-core/modules/QueryManagement/src/CompanyName.ProjectName.QueryManagement.HttpApi/QueryManagementController.cs deleted file mode 100644 index 8f447fc9..00000000 --- a/aspnet-core/modules/QueryManagement/src/CompanyName.ProjectName.QueryManagement.HttpApi/QueryManagementController.cs +++ /dev/null @@ -1,13 +0,0 @@ -using CompanyName.ProjectName.QueryManagement.Localization; -using Volo.Abp.AspNetCore.Mvc; - -namespace CompanyName.ProjectName.QueryManagement -{ - public abstract class QueryManagementController : AbpController - { - protected QueryManagementController() - { - LocalizationResource = typeof(QueryManagementResource); - } - } -} diff --git a/aspnet-core/modules/QueryManagement/src/CompanyName.ProjectName.QueryManagement.HttpApi/QueryManagementHttpApiModule.cs b/aspnet-core/modules/QueryManagement/src/CompanyName.ProjectName.QueryManagement.HttpApi/QueryManagementHttpApiModule.cs deleted file mode 100644 index b3056a47..00000000 --- a/aspnet-core/modules/QueryManagement/src/CompanyName.ProjectName.QueryManagement.HttpApi/QueryManagementHttpApiModule.cs +++ /dev/null @@ -1,33 +0,0 @@ -using Localization.Resources.AbpUi; -using CompanyName.ProjectName.QueryManagement.Localization; -using Volo.Abp.AspNetCore.Mvc; -using Volo.Abp.Localization; -using Volo.Abp.Modularity; -using Microsoft.Extensions.DependencyInjection; - -namespace CompanyName.ProjectName.QueryManagement -{ - [DependsOn( - typeof(QueryManagementApplicationContractsModule), - typeof(AbpAspNetCoreMvcModule))] - public class QueryManagementHttpApiModule : AbpModule - { - public override void PreConfigureServices(ServiceConfigurationContext context) - { - PreConfigure(mvcBuilder => - { - mvcBuilder.AddApplicationPartIfNotExists(typeof(QueryManagementHttpApiModule).Assembly); - }); - } - - public override void ConfigureServices(ServiceConfigurationContext context) - { - Configure(options => - { - options.Resources - .Get() - .AddBaseTypes(typeof(AbpUiResource)); - }); - } - } -} diff --git a/aspnet-core/modules/QueryManagement/src/CompanyName.ProjectName.QueryManagement.MongoDB/CompanyName.ProjectName.QueryManagement.MongoDB.csproj b/aspnet-core/modules/QueryManagement/src/CompanyName.ProjectName.QueryManagement.MongoDB/CompanyName.ProjectName.QueryManagement.MongoDB.csproj deleted file mode 100644 index 622a609a..00000000 --- a/aspnet-core/modules/QueryManagement/src/CompanyName.ProjectName.QueryManagement.MongoDB/CompanyName.ProjectName.QueryManagement.MongoDB.csproj +++ /dev/null @@ -1,15 +0,0 @@ - - - - - - net5.0 - CompanyName.ProjectName.QueryManagement - - - - - - - - diff --git a/aspnet-core/modules/QueryManagement/src/CompanyName.ProjectName.QueryManagement.MongoDB/FodyWeavers.xml b/aspnet-core/modules/QueryManagement/src/CompanyName.ProjectName.QueryManagement.MongoDB/FodyWeavers.xml deleted file mode 100644 index be0de3a9..00000000 --- a/aspnet-core/modules/QueryManagement/src/CompanyName.ProjectName.QueryManagement.MongoDB/FodyWeavers.xml +++ /dev/null @@ -1,3 +0,0 @@ - - - \ No newline at end of file diff --git a/aspnet-core/modules/QueryManagement/src/CompanyName.ProjectName.QueryManagement.MongoDB/FodyWeavers.xsd b/aspnet-core/modules/QueryManagement/src/CompanyName.ProjectName.QueryManagement.MongoDB/FodyWeavers.xsd deleted file mode 100644 index 3f3946e2..00000000 --- a/aspnet-core/modules/QueryManagement/src/CompanyName.ProjectName.QueryManagement.MongoDB/FodyWeavers.xsd +++ /dev/null @@ -1,30 +0,0 @@ - - - - - - - - - - - - - - - '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/aspnet-core/modules/QueryManagement/src/CompanyName.ProjectName.QueryManagement.MongoDB/MongoDB/IQueryManagementMongoDbContext.cs b/aspnet-core/modules/QueryManagement/src/CompanyName.ProjectName.QueryManagement.MongoDB/MongoDB/IQueryManagementMongoDbContext.cs deleted file mode 100644 index 3f8c93ab..00000000 --- a/aspnet-core/modules/QueryManagement/src/CompanyName.ProjectName.QueryManagement.MongoDB/MongoDB/IQueryManagementMongoDbContext.cs +++ /dev/null @@ -1,13 +0,0 @@ -using Volo.Abp.Data; -using Volo.Abp.MongoDB; - -namespace CompanyName.ProjectName.QueryManagement.MongoDB -{ - [ConnectionStringName(QueryManagementDbProperties.ConnectionStringName)] - public interface IQueryManagementMongoDbContext : IAbpMongoDbContext - { - /* Define mongo collections here. Example: - * IMongoCollection Questions { get; } - */ - } -} diff --git a/aspnet-core/modules/QueryManagement/src/CompanyName.ProjectName.QueryManagement.MongoDB/MongoDB/QueryManagementMongoDbContext.cs b/aspnet-core/modules/QueryManagement/src/CompanyName.ProjectName.QueryManagement.MongoDB/MongoDB/QueryManagementMongoDbContext.cs deleted file mode 100644 index b625ea01..00000000 --- a/aspnet-core/modules/QueryManagement/src/CompanyName.ProjectName.QueryManagement.MongoDB/MongoDB/QueryManagementMongoDbContext.cs +++ /dev/null @@ -1,20 +0,0 @@ -using Volo.Abp.Data; -using Volo.Abp.MongoDB; - -namespace CompanyName.ProjectName.QueryManagement.MongoDB -{ - [ConnectionStringName(QueryManagementDbProperties.ConnectionStringName)] - public class QueryManagementMongoDbContext : AbpMongoDbContext, IQueryManagementMongoDbContext - { - /* Add mongo collections here. Example: - * public IMongoCollection Questions => Collection(); - */ - - protected override void CreateModel(IMongoModelBuilder modelBuilder) - { - base.CreateModel(modelBuilder); - - modelBuilder.ConfigureQueryManagement(); - } - } -} \ No newline at end of file diff --git a/aspnet-core/modules/QueryManagement/src/CompanyName.ProjectName.QueryManagement.MongoDB/MongoDB/QueryManagementMongoDbContextExtensions.cs b/aspnet-core/modules/QueryManagement/src/CompanyName.ProjectName.QueryManagement.MongoDB/MongoDB/QueryManagementMongoDbContextExtensions.cs deleted file mode 100644 index f9f6caa0..00000000 --- a/aspnet-core/modules/QueryManagement/src/CompanyName.ProjectName.QueryManagement.MongoDB/MongoDB/QueryManagementMongoDbContextExtensions.cs +++ /dev/null @@ -1,22 +0,0 @@ -using System; -using Volo.Abp; -using Volo.Abp.MongoDB; - -namespace CompanyName.ProjectName.QueryManagement.MongoDB -{ - public static class QueryManagementMongoDbContextExtensions - { - public static void ConfigureQueryManagement( - this IMongoModelBuilder builder, - Action optionsAction = null) - { - Check.NotNull(builder, nameof(builder)); - - var options = new QueryManagementMongoModelBuilderConfigurationOptions( - QueryManagementDbProperties.DbTablePrefix - ); - - optionsAction?.Invoke(options); - } - } -} \ No newline at end of file diff --git a/aspnet-core/modules/QueryManagement/src/CompanyName.ProjectName.QueryManagement.MongoDB/MongoDB/QueryManagementMongoDbModule.cs b/aspnet-core/modules/QueryManagement/src/CompanyName.ProjectName.QueryManagement.MongoDB/MongoDB/QueryManagementMongoDbModule.cs deleted file mode 100644 index f2e292f6..00000000 --- a/aspnet-core/modules/QueryManagement/src/CompanyName.ProjectName.QueryManagement.MongoDB/MongoDB/QueryManagementMongoDbModule.cs +++ /dev/null @@ -1,23 +0,0 @@ -using Microsoft.Extensions.DependencyInjection; -using Volo.Abp.Modularity; -using Volo.Abp.MongoDB; - -namespace CompanyName.ProjectName.QueryManagement.MongoDB -{ - [DependsOn( - typeof(QueryManagementDomainModule), - typeof(AbpMongoDbModule) - )] - public class QueryManagementMongoDbModule : AbpModule - { - public override void ConfigureServices(ServiceConfigurationContext context) - { - context.Services.AddMongoDbContext(options => - { - /* Add custom repositories here. Example: - * options.AddRepository(); - */ - }); - } - } -} diff --git a/aspnet-core/modules/QueryManagement/src/CompanyName.ProjectName.QueryManagement.MongoDB/MongoDB/QueryManagementMongoModelBuilderConfigurationOptions.cs b/aspnet-core/modules/QueryManagement/src/CompanyName.ProjectName.QueryManagement.MongoDB/MongoDB/QueryManagementMongoModelBuilderConfigurationOptions.cs deleted file mode 100644 index 237df983..00000000 --- a/aspnet-core/modules/QueryManagement/src/CompanyName.ProjectName.QueryManagement.MongoDB/MongoDB/QueryManagementMongoModelBuilderConfigurationOptions.cs +++ /dev/null @@ -1,14 +0,0 @@ -using JetBrains.Annotations; -using Volo.Abp.MongoDB; - -namespace CompanyName.ProjectName.QueryManagement.MongoDB -{ - public class QueryManagementMongoModelBuilderConfigurationOptions : AbpMongoModelBuilderConfigurationOptions - { - public QueryManagementMongoModelBuilderConfigurationOptions( - [NotNull] string collectionPrefix = "") - : base(collectionPrefix) - { - } - } -} \ No newline at end of file diff --git a/aspnet-core/modules/QueryManagement/test/CompanyName.ProjectName.QueryManagement.Application.Tests/CompanyName.ProjectName.QueryManagement.Application.Tests.csproj b/aspnet-core/modules/QueryManagement/test/CompanyName.ProjectName.QueryManagement.Application.Tests/CompanyName.ProjectName.QueryManagement.Application.Tests.csproj deleted file mode 100644 index cfcdeaa9..00000000 --- a/aspnet-core/modules/QueryManagement/test/CompanyName.ProjectName.QueryManagement.Application.Tests/CompanyName.ProjectName.QueryManagement.Application.Tests.csproj +++ /dev/null @@ -1,16 +0,0 @@ - - - - - - net5.0 - CompanyName.ProjectName.QueryManagement - - - - - - - - - diff --git a/aspnet-core/modules/QueryManagement/test/CompanyName.ProjectName.QueryManagement.Application.Tests/FodyWeavers.xml b/aspnet-core/modules/QueryManagement/test/CompanyName.ProjectName.QueryManagement.Application.Tests/FodyWeavers.xml deleted file mode 100644 index be0de3a9..00000000 --- a/aspnet-core/modules/QueryManagement/test/CompanyName.ProjectName.QueryManagement.Application.Tests/FodyWeavers.xml +++ /dev/null @@ -1,3 +0,0 @@ - - - \ No newline at end of file diff --git a/aspnet-core/modules/QueryManagement/test/CompanyName.ProjectName.QueryManagement.Application.Tests/FodyWeavers.xsd b/aspnet-core/modules/QueryManagement/test/CompanyName.ProjectName.QueryManagement.Application.Tests/FodyWeavers.xsd deleted file mode 100644 index 3f3946e2..00000000 --- a/aspnet-core/modules/QueryManagement/test/CompanyName.ProjectName.QueryManagement.Application.Tests/FodyWeavers.xsd +++ /dev/null @@ -1,30 +0,0 @@ - - - - - - - - - - - - - - - '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/aspnet-core/modules/QueryManagement/test/CompanyName.ProjectName.QueryManagement.Application.Tests/QueryManagementApplicationTestBase.cs b/aspnet-core/modules/QueryManagement/test/CompanyName.ProjectName.QueryManagement.Application.Tests/QueryManagementApplicationTestBase.cs deleted file mode 100644 index bda40192..00000000 --- a/aspnet-core/modules/QueryManagement/test/CompanyName.ProjectName.QueryManagement.Application.Tests/QueryManagementApplicationTestBase.cs +++ /dev/null @@ -1,10 +0,0 @@ -namespace CompanyName.ProjectName.QueryManagement -{ - /* Inherit from this class for your application layer tests. - * See SampleAppService_Tests for example. - */ - public abstract class QueryManagementApplicationTestBase : QueryManagementTestBase - { - - } -} \ No newline at end of file diff --git a/aspnet-core/modules/QueryManagement/test/CompanyName.ProjectName.QueryManagement.Application.Tests/QueryManagementApplicationTestModule.cs b/aspnet-core/modules/QueryManagement/test/CompanyName.ProjectName.QueryManagement.Application.Tests/QueryManagementApplicationTestModule.cs deleted file mode 100644 index 07913ed9..00000000 --- a/aspnet-core/modules/QueryManagement/test/CompanyName.ProjectName.QueryManagement.Application.Tests/QueryManagementApplicationTestModule.cs +++ /dev/null @@ -1,13 +0,0 @@ -using Volo.Abp.Modularity; - -namespace CompanyName.ProjectName.QueryManagement -{ - [DependsOn( - typeof(QueryManagementApplicationModule), - typeof(QueryManagementDomainTestModule) - )] - public class QueryManagementApplicationTestModule : AbpModule - { - - } -} diff --git a/aspnet-core/modules/QueryManagement/test/CompanyName.ProjectName.QueryManagement.Domain.Tests/CompanyName.ProjectName.QueryManagement.Domain.Tests.csproj b/aspnet-core/modules/QueryManagement/test/CompanyName.ProjectName.QueryManagement.Domain.Tests/CompanyName.ProjectName.QueryManagement.Domain.Tests.csproj deleted file mode 100644 index 82e325d8..00000000 --- a/aspnet-core/modules/QueryManagement/test/CompanyName.ProjectName.QueryManagement.Domain.Tests/CompanyName.ProjectName.QueryManagement.Domain.Tests.csproj +++ /dev/null @@ -1,15 +0,0 @@ - - - - - - net5.0 - CompanyName.ProjectName.QueryManagement - - - - - - - - diff --git a/aspnet-core/modules/QueryManagement/test/CompanyName.ProjectName.QueryManagement.Domain.Tests/FodyWeavers.xml b/aspnet-core/modules/QueryManagement/test/CompanyName.ProjectName.QueryManagement.Domain.Tests/FodyWeavers.xml deleted file mode 100644 index be0de3a9..00000000 --- a/aspnet-core/modules/QueryManagement/test/CompanyName.ProjectName.QueryManagement.Domain.Tests/FodyWeavers.xml +++ /dev/null @@ -1,3 +0,0 @@ - - - \ No newline at end of file diff --git a/aspnet-core/modules/QueryManagement/test/CompanyName.ProjectName.QueryManagement.Domain.Tests/FodyWeavers.xsd b/aspnet-core/modules/QueryManagement/test/CompanyName.ProjectName.QueryManagement.Domain.Tests/FodyWeavers.xsd deleted file mode 100644 index 3f3946e2..00000000 --- a/aspnet-core/modules/QueryManagement/test/CompanyName.ProjectName.QueryManagement.Domain.Tests/FodyWeavers.xsd +++ /dev/null @@ -1,30 +0,0 @@ - - - - - - - - - - - - - - - '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/aspnet-core/modules/QueryManagement/test/CompanyName.ProjectName.QueryManagement.Domain.Tests/QueryManagementDomainTestBase.cs b/aspnet-core/modules/QueryManagement/test/CompanyName.ProjectName.QueryManagement.Domain.Tests/QueryManagementDomainTestBase.cs deleted file mode 100644 index 601377cc..00000000 --- a/aspnet-core/modules/QueryManagement/test/CompanyName.ProjectName.QueryManagement.Domain.Tests/QueryManagementDomainTestBase.cs +++ /dev/null @@ -1,10 +0,0 @@ -namespace CompanyName.ProjectName.QueryManagement -{ - /* Inherit from this class for your domain layer tests. - * See SampleManager_Tests for example. - */ - public abstract class QueryManagementDomainTestBase : QueryManagementTestBase - { - - } -} \ No newline at end of file diff --git a/aspnet-core/modules/QueryManagement/test/CompanyName.ProjectName.QueryManagement.Domain.Tests/QueryManagementDomainTestModule.cs b/aspnet-core/modules/QueryManagement/test/CompanyName.ProjectName.QueryManagement.Domain.Tests/QueryManagementDomainTestModule.cs deleted file mode 100644 index 3e0eb217..00000000 --- a/aspnet-core/modules/QueryManagement/test/CompanyName.ProjectName.QueryManagement.Domain.Tests/QueryManagementDomainTestModule.cs +++ /dev/null @@ -1,17 +0,0 @@ -using CompanyName.ProjectName.QueryManagement.EntityFrameworkCore; -using Volo.Abp.Modularity; - -namespace CompanyName.ProjectName.QueryManagement -{ - /* 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(QueryManagementEntityFrameworkCoreTestModule) - )] - public class QueryManagementDomainTestModule : AbpModule - { - - } -} diff --git a/aspnet-core/modules/QueryManagement/test/CompanyName.ProjectName.QueryManagement.Domain.Tests/Samples/SampleManager_Tests.cs b/aspnet-core/modules/QueryManagement/test/CompanyName.ProjectName.QueryManagement.Domain.Tests/Samples/SampleManager_Tests.cs deleted file mode 100644 index 23ec84e9..00000000 --- a/aspnet-core/modules/QueryManagement/test/CompanyName.ProjectName.QueryManagement.Domain.Tests/Samples/SampleManager_Tests.cs +++ /dev/null @@ -1,15 +0,0 @@ -using System.Threading.Tasks; -using Xunit; - -namespace CompanyName.ProjectName.QueryManagement.Samples -{ - public class SampleManager_Tests : QueryManagementDomainTestBase - { - //private readonly SampleManager _sampleManager; - - public SampleManager_Tests() - { - //_sampleManager = GetRequiredService(); - } - } -} diff --git a/aspnet-core/modules/QueryManagement/test/CompanyName.ProjectName.QueryManagement.EntityFrameworkCore.Tests/CompanyName.ProjectName.QueryManagement.EntityFrameworkCore.Tests.csproj b/aspnet-core/modules/QueryManagement/test/CompanyName.ProjectName.QueryManagement.EntityFrameworkCore.Tests/CompanyName.ProjectName.QueryManagement.EntityFrameworkCore.Tests.csproj deleted file mode 100644 index 40481863..00000000 --- a/aspnet-core/modules/QueryManagement/test/CompanyName.ProjectName.QueryManagement.EntityFrameworkCore.Tests/CompanyName.ProjectName.QueryManagement.EntityFrameworkCore.Tests.csproj +++ /dev/null @@ -1,18 +0,0 @@ - - - - - - net5.0 - CompanyName.ProjectName.QueryManagement - - - - - - - - - - - diff --git a/aspnet-core/modules/QueryManagement/test/CompanyName.ProjectName.QueryManagement.EntityFrameworkCore.Tests/EntityFrameworkCore/QueryManagementEntityFrameworkCoreTestBase.cs b/aspnet-core/modules/QueryManagement/test/CompanyName.ProjectName.QueryManagement.EntityFrameworkCore.Tests/EntityFrameworkCore/QueryManagementEntityFrameworkCoreTestBase.cs deleted file mode 100644 index 17266735..00000000 --- a/aspnet-core/modules/QueryManagement/test/CompanyName.ProjectName.QueryManagement.EntityFrameworkCore.Tests/EntityFrameworkCore/QueryManagementEntityFrameworkCoreTestBase.cs +++ /dev/null @@ -1,10 +0,0 @@ -namespace CompanyName.ProjectName.QueryManagement.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 QueryManagementEntityFrameworkCoreTestBase : QueryManagementTestBase - { - - } -} \ No newline at end of file diff --git a/aspnet-core/modules/QueryManagement/test/CompanyName.ProjectName.QueryManagement.EntityFrameworkCore.Tests/EntityFrameworkCore/QueryManagementEntityFrameworkCoreTestModule.cs b/aspnet-core/modules/QueryManagement/test/CompanyName.ProjectName.QueryManagement.EntityFrameworkCore.Tests/EntityFrameworkCore/QueryManagementEntityFrameworkCoreTestModule.cs deleted file mode 100644 index 895ee92b..00000000 --- a/aspnet-core/modules/QueryManagement/test/CompanyName.ProjectName.QueryManagement.EntityFrameworkCore.Tests/EntityFrameworkCore/QueryManagementEntityFrameworkCoreTestModule.cs +++ /dev/null @@ -1,43 +0,0 @@ -using Microsoft.Data.Sqlite; -using Microsoft.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore.Infrastructure; -using Microsoft.EntityFrameworkCore.Storage; -using Volo.Abp.EntityFrameworkCore; -using Volo.Abp.EntityFrameworkCore.Sqlite; -using Volo.Abp.Modularity; - -namespace CompanyName.ProjectName.QueryManagement.EntityFrameworkCore -{ - [DependsOn( - typeof(QueryManagementTestBaseModule), - typeof(QueryManagementEntityFrameworkCoreModule), - typeof(AbpEntityFrameworkCoreSqliteModule) - )] - public class QueryManagementEntityFrameworkCoreTestModule : 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 QueryManagementDbContext( - new DbContextOptionsBuilder().UseSqlite(connection).Options - ).GetService().CreateTables(); - - return connection; - } - } -} diff --git a/aspnet-core/modules/QueryManagement/test/CompanyName.ProjectName.QueryManagement.EntityFrameworkCore.Tests/EntityFrameworkCore/Samples/SampleRepository_Tests.cs b/aspnet-core/modules/QueryManagement/test/CompanyName.ProjectName.QueryManagement.EntityFrameworkCore.Tests/EntityFrameworkCore/Samples/SampleRepository_Tests.cs deleted file mode 100644 index 9ea54f10..00000000 --- a/aspnet-core/modules/QueryManagement/test/CompanyName.ProjectName.QueryManagement.EntityFrameworkCore.Tests/EntityFrameworkCore/Samples/SampleRepository_Tests.cs +++ /dev/null @@ -1,12 +0,0 @@ -using CompanyName.ProjectName.QueryManagement.Samples; - -namespace CompanyName.ProjectName.QueryManagement.EntityFrameworkCore.Samples -{ - public class SampleRepository_Tests : SampleRepository_Tests - { - /* Don't write custom repository tests here, instead write to - * the base class. - * One exception can be some specific tests related to EF core. - */ - } -} diff --git a/aspnet-core/modules/QueryManagement/test/CompanyName.ProjectName.QueryManagement.EntityFrameworkCore.Tests/FodyWeavers.xml b/aspnet-core/modules/QueryManagement/test/CompanyName.ProjectName.QueryManagement.EntityFrameworkCore.Tests/FodyWeavers.xml deleted file mode 100644 index be0de3a9..00000000 --- a/aspnet-core/modules/QueryManagement/test/CompanyName.ProjectName.QueryManagement.EntityFrameworkCore.Tests/FodyWeavers.xml +++ /dev/null @@ -1,3 +0,0 @@ - - - \ No newline at end of file diff --git a/aspnet-core/modules/QueryManagement/test/CompanyName.ProjectName.QueryManagement.EntityFrameworkCore.Tests/FodyWeavers.xsd b/aspnet-core/modules/QueryManagement/test/CompanyName.ProjectName.QueryManagement.EntityFrameworkCore.Tests/FodyWeavers.xsd deleted file mode 100644 index 3f3946e2..00000000 --- a/aspnet-core/modules/QueryManagement/test/CompanyName.ProjectName.QueryManagement.EntityFrameworkCore.Tests/FodyWeavers.xsd +++ /dev/null @@ -1,30 +0,0 @@ - - - - - - - - - - - - - - - '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/aspnet-core/modules/QueryManagement/test/CompanyName.ProjectName.QueryManagement.MongoDB.Tests/CompanyName.ProjectName.QueryManagement.MongoDB.Tests.csproj b/aspnet-core/modules/QueryManagement/test/CompanyName.ProjectName.QueryManagement.MongoDB.Tests/CompanyName.ProjectName.QueryManagement.MongoDB.Tests.csproj deleted file mode 100644 index 022643a5..00000000 --- a/aspnet-core/modules/QueryManagement/test/CompanyName.ProjectName.QueryManagement.MongoDB.Tests/CompanyName.ProjectName.QueryManagement.MongoDB.Tests.csproj +++ /dev/null @@ -1,17 +0,0 @@ - - - - - - net5.0 - CompanyName.ProjectName.QueryManagement - - - - - - - - - - diff --git a/aspnet-core/modules/QueryManagement/test/CompanyName.ProjectName.QueryManagement.MongoDB.Tests/FodyWeavers.xml b/aspnet-core/modules/QueryManagement/test/CompanyName.ProjectName.QueryManagement.MongoDB.Tests/FodyWeavers.xml deleted file mode 100644 index be0de3a9..00000000 --- a/aspnet-core/modules/QueryManagement/test/CompanyName.ProjectName.QueryManagement.MongoDB.Tests/FodyWeavers.xml +++ /dev/null @@ -1,3 +0,0 @@ - - - \ No newline at end of file diff --git a/aspnet-core/modules/QueryManagement/test/CompanyName.ProjectName.QueryManagement.MongoDB.Tests/FodyWeavers.xsd b/aspnet-core/modules/QueryManagement/test/CompanyName.ProjectName.QueryManagement.MongoDB.Tests/FodyWeavers.xsd deleted file mode 100644 index 3f3946e2..00000000 --- a/aspnet-core/modules/QueryManagement/test/CompanyName.ProjectName.QueryManagement.MongoDB.Tests/FodyWeavers.xsd +++ /dev/null @@ -1,30 +0,0 @@ - - - - - - - - - - - - - - - '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/aspnet-core/modules/QueryManagement/test/CompanyName.ProjectName.QueryManagement.MongoDB.Tests/MongoDB/MongoDbFixture.cs b/aspnet-core/modules/QueryManagement/test/CompanyName.ProjectName.QueryManagement.MongoDB.Tests/MongoDB/MongoDbFixture.cs deleted file mode 100644 index d4a4b3cb..00000000 --- a/aspnet-core/modules/QueryManagement/test/CompanyName.ProjectName.QueryManagement.MongoDB.Tests/MongoDB/MongoDbFixture.cs +++ /dev/null @@ -1,22 +0,0 @@ -using System; -using Mongo2Go; - -namespace CompanyName.ProjectName.QueryManagement.MongoDB -{ - public class MongoDbFixture : IDisposable - { - private static readonly MongoDbRunner MongoDbRunner; - public static readonly string ConnectionString; - - static MongoDbFixture() - { - MongoDbRunner = MongoDbRunner.Start(singleNodeReplSet: true, singleNodeReplSetWaitTimeout: 20); - ConnectionString = MongoDbRunner.ConnectionString; - } - - public void Dispose() - { - MongoDbRunner?.Dispose(); - } - } -} diff --git a/aspnet-core/modules/QueryManagement/test/CompanyName.ProjectName.QueryManagement.MongoDB.Tests/MongoDB/MongoTestCollection.cs b/aspnet-core/modules/QueryManagement/test/CompanyName.ProjectName.QueryManagement.MongoDB.Tests/MongoDB/MongoTestCollection.cs deleted file mode 100644 index fc3203bb..00000000 --- a/aspnet-core/modules/QueryManagement/test/CompanyName.ProjectName.QueryManagement.MongoDB.Tests/MongoDB/MongoTestCollection.cs +++ /dev/null @@ -1,10 +0,0 @@ -using Xunit; - -namespace CompanyName.ProjectName.QueryManagement.MongoDB -{ - [CollectionDefinition(Name)] - public class MongoTestCollection : ICollectionFixture - { - public const string Name = "MongoDB Collection"; - } -} \ No newline at end of file diff --git a/aspnet-core/modules/QueryManagement/test/CompanyName.ProjectName.QueryManagement.MongoDB.Tests/MongoDB/QueryManagementMongoDbTestBase.cs b/aspnet-core/modules/QueryManagement/test/CompanyName.ProjectName.QueryManagement.MongoDB.Tests/MongoDB/QueryManagementMongoDbTestBase.cs deleted file mode 100644 index b7e47811..00000000 --- a/aspnet-core/modules/QueryManagement/test/CompanyName.ProjectName.QueryManagement.MongoDB.Tests/MongoDB/QueryManagementMongoDbTestBase.cs +++ /dev/null @@ -1,10 +0,0 @@ -namespace CompanyName.ProjectName.QueryManagement.MongoDB -{ - /* This class can be used as a base class for MongoDB integration tests, - * while SampleRepository_Tests uses a different approach. - */ - public abstract class QueryManagementMongoDbTestBase : QueryManagementTestBase - { - - } -} \ No newline at end of file diff --git a/aspnet-core/modules/QueryManagement/test/CompanyName.ProjectName.QueryManagement.MongoDB.Tests/MongoDB/QueryManagementMongoDbTestModule.cs b/aspnet-core/modules/QueryManagement/test/CompanyName.ProjectName.QueryManagement.MongoDB.Tests/MongoDB/QueryManagementMongoDbTestModule.cs deleted file mode 100644 index 55d50d0f..00000000 --- a/aspnet-core/modules/QueryManagement/test/CompanyName.ProjectName.QueryManagement.MongoDB.Tests/MongoDB/QueryManagementMongoDbTestModule.cs +++ /dev/null @@ -1,27 +0,0 @@ -using System; -using Volo.Abp.Data; -using Volo.Abp.Modularity; -using Volo.Abp.Uow; - -namespace CompanyName.ProjectName.QueryManagement.MongoDB -{ - [DependsOn( - typeof(QueryManagementTestBaseModule), - typeof(QueryManagementMongoDbModule) - )] - public class QueryManagementMongoDbTestModule : AbpModule - { - public override void ConfigureServices(ServiceConfigurationContext context) - { - var stringArray = MongoDbFixture.ConnectionString.Split('?'); - var connectionString = stringArray[0].EnsureEndsWith('/') + - "Db_" + - Guid.NewGuid().ToString("N") + "/?" + stringArray[1]; - - Configure(options => - { - options.ConnectionStrings.Default = connectionString; - }); - } - } -} diff --git a/aspnet-core/modules/QueryManagement/test/CompanyName.ProjectName.QueryManagement.MongoDB.Tests/MongoDB/Samples/SampleRepository_Tests.cs b/aspnet-core/modules/QueryManagement/test/CompanyName.ProjectName.QueryManagement.MongoDB.Tests/MongoDB/Samples/SampleRepository_Tests.cs deleted file mode 100644 index 51fa1d85..00000000 --- a/aspnet-core/modules/QueryManagement/test/CompanyName.ProjectName.QueryManagement.MongoDB.Tests/MongoDB/Samples/SampleRepository_Tests.cs +++ /dev/null @@ -1,14 +0,0 @@ -using CompanyName.ProjectName.QueryManagement.Samples; -using Xunit; - -namespace CompanyName.ProjectName.QueryManagement.MongoDB.Samples -{ - [Collection(MongoTestCollection.Name)] - public class SampleRepository_Tests : SampleRepository_Tests - { - /* Don't write custom repository tests here, instead write to - * the base class. - * One exception can be some specific tests related to MongoDB. - */ - } -} diff --git a/aspnet-core/modules/QueryManagement/test/CompanyName.ProjectName.QueryManagement.TestBase/CompanyName.ProjectName.QueryManagement.TestBase.csproj b/aspnet-core/modules/QueryManagement/test/CompanyName.ProjectName.QueryManagement.TestBase/CompanyName.ProjectName.QueryManagement.TestBase.csproj deleted file mode 100644 index 0755817c..00000000 --- a/aspnet-core/modules/QueryManagement/test/CompanyName.ProjectName.QueryManagement.TestBase/CompanyName.ProjectName.QueryManagement.TestBase.csproj +++ /dev/null @@ -1,23 +0,0 @@ - - - - - - net5.0 - CompanyName.ProjectName.QueryManagement - - - - - - - - - - - - - - - - diff --git a/aspnet-core/modules/QueryManagement/test/CompanyName.ProjectName.QueryManagement.TestBase/FodyWeavers.xml b/aspnet-core/modules/QueryManagement/test/CompanyName.ProjectName.QueryManagement.TestBase/FodyWeavers.xml deleted file mode 100644 index be0de3a9..00000000 --- a/aspnet-core/modules/QueryManagement/test/CompanyName.ProjectName.QueryManagement.TestBase/FodyWeavers.xml +++ /dev/null @@ -1,3 +0,0 @@ - - - \ No newline at end of file diff --git a/aspnet-core/modules/QueryManagement/test/CompanyName.ProjectName.QueryManagement.TestBase/FodyWeavers.xsd b/aspnet-core/modules/QueryManagement/test/CompanyName.ProjectName.QueryManagement.TestBase/FodyWeavers.xsd deleted file mode 100644 index 3f3946e2..00000000 --- a/aspnet-core/modules/QueryManagement/test/CompanyName.ProjectName.QueryManagement.TestBase/FodyWeavers.xsd +++ /dev/null @@ -1,30 +0,0 @@ - - - - - - - - - - - - - - - '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/aspnet-core/modules/QueryManagement/test/CompanyName.ProjectName.QueryManagement.TestBase/QueryManagementDataSeedContributor.cs b/aspnet-core/modules/QueryManagement/test/CompanyName.ProjectName.QueryManagement.TestBase/QueryManagementDataSeedContributor.cs deleted file mode 100644 index 3031cab6..00000000 --- a/aspnet-core/modules/QueryManagement/test/CompanyName.ProjectName.QueryManagement.TestBase/QueryManagementDataSeedContributor.cs +++ /dev/null @@ -1,33 +0,0 @@ -using System.Threading.Tasks; -using Volo.Abp.Data; -using Volo.Abp.DependencyInjection; -using Volo.Abp.Guids; -using Volo.Abp.MultiTenancy; - -namespace CompanyName.ProjectName.QueryManagement -{ - public class QueryManagementDataSeedContributor : IDataSeedContributor, ITransientDependency - { - private readonly IGuidGenerator _guidGenerator; - private readonly ICurrentTenant _currentTenant; - - public QueryManagementDataSeedContributor( - IGuidGenerator guidGenerator, ICurrentTenant currentTenant) - { - _guidGenerator = guidGenerator; - _currentTenant = currentTenant; - } - - public Task SeedAsync(DataSeedContext context) - { - /* Instead of returning the Task.CompletedTask, you can insert your test data - * at this point! - */ - - using (_currentTenant.Change(context?.TenantId)) - { - return Task.CompletedTask; - } - } - } -} diff --git a/aspnet-core/modules/QueryManagement/test/CompanyName.ProjectName.QueryManagement.TestBase/QueryManagementTestBase.cs b/aspnet-core/modules/QueryManagement/test/CompanyName.ProjectName.QueryManagement.TestBase/QueryManagementTestBase.cs deleted file mode 100644 index 37ea636a..00000000 --- a/aspnet-core/modules/QueryManagement/test/CompanyName.ProjectName.QueryManagement.TestBase/QueryManagementTestBase.cs +++ /dev/null @@ -1,60 +0,0 @@ -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 CompanyName.ProjectName.QueryManagement -{ - /* All test classes are derived from this class, directly or indirectly. */ - public abstract class QueryManagementTestBase : 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/aspnet-core/modules/QueryManagement/test/CompanyName.ProjectName.QueryManagement.TestBase/QueryManagementTestBaseModule.cs b/aspnet-core/modules/QueryManagement/test/CompanyName.ProjectName.QueryManagement.TestBase/QueryManagementTestBaseModule.cs deleted file mode 100644 index 1e6aabef..00000000 --- a/aspnet-core/modules/QueryManagement/test/CompanyName.ProjectName.QueryManagement.TestBase/QueryManagementTestBaseModule.cs +++ /dev/null @@ -1,42 +0,0 @@ -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 CompanyName.ProjectName.QueryManagement -{ - [DependsOn( - typeof(AbpAutofacModule), - typeof(AbpTestBaseModule), - typeof(AbpAuthorizationModule), - typeof(QueryManagementDomainModule) - )] - public class QueryManagementTestBaseModule : 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/aspnet-core/modules/QueryManagement/test/CompanyName.ProjectName.QueryManagement.TestBase/Samples/SampleRepository_Tests.cs b/aspnet-core/modules/QueryManagement/test/CompanyName.ProjectName.QueryManagement.TestBase/Samples/SampleRepository_Tests.cs deleted file mode 100644 index b66e7d5d..00000000 --- a/aspnet-core/modules/QueryManagement/test/CompanyName.ProjectName.QueryManagement.TestBase/Samples/SampleRepository_Tests.cs +++ /dev/null @@ -1,22 +0,0 @@ -using System.Threading.Tasks; -using Volo.Abp.Modularity; -using Xunit; - -namespace CompanyName.ProjectName.QueryManagement.Samples -{ - /* Write your custom repository tests like that, in this project, as abstract classes. - * Then inherit these abstract classes from EF Core & MongoDB test projects. - * In this way, both database providers are tests with the same set tests. - */ - public abstract class SampleRepository_Tests : QueryManagementTestBase - where TStartupModule : IAbpModule - { - //private readonly ISampleRepository _sampleRepository; - - protected SampleRepository_Tests() - { - //_sampleRepository = GetRequiredService(); - } - - } -} diff --git a/aspnet-core/modules/QueryManagement/test/CompanyName.ProjectName.QueryManagement.TestBase/Security/FakeCurrentPrincipalAccessor.cs b/aspnet-core/modules/QueryManagement/test/CompanyName.ProjectName.QueryManagement.TestBase/Security/FakeCurrentPrincipalAccessor.cs deleted file mode 100644 index ba9b3c47..00000000 --- a/aspnet-core/modules/QueryManagement/test/CompanyName.ProjectName.QueryManagement.TestBase/Security/FakeCurrentPrincipalAccessor.cs +++ /dev/null @@ -1,43 +0,0 @@ -using System.Collections.Generic; -using System.Security.Claims; -using Volo.Abp.DependencyInjection; -using Volo.Abp.Security.Claims; - -namespace CompanyName.ProjectName.QueryManagement.Security -{ - [Dependency(ReplaceServices = true)] - public class FakeCurrentPrincipalAccessor : ThreadCurrentPrincipalAccessor - { - protected 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/aspnet-core/services/host/CompanyName.ProjectName.HttpApi.Host/CompanyName.ProjectName.HttpApi.Host.csproj b/aspnet-core/services/host/CompanyName.ProjectName.HttpApi.Host/CompanyName.ProjectName.HttpApi.Host.csproj index a6c207db..d9d44fac 100644 --- a/aspnet-core/services/host/CompanyName.ProjectName.HttpApi.Host/CompanyName.ProjectName.HttpApi.Host.csproj +++ b/aspnet-core/services/host/CompanyName.ProjectName.HttpApi.Host/CompanyName.ProjectName.HttpApi.Host.csproj @@ -37,7 +37,7 @@ - + diff --git a/aspnet-core/services/host/CompanyName.ProjectName.HttpApi.Host/ProjectNameHttpApiHostModule.cs b/aspnet-core/services/host/CompanyName.ProjectName.HttpApi.Host/ProjectNameHttpApiHostModule.cs index 16221505..b6ee4e6d 100644 --- a/aspnet-core/services/host/CompanyName.ProjectName.HttpApi.Host/ProjectNameHttpApiHostModule.cs +++ b/aspnet-core/services/host/CompanyName.ProjectName.HttpApi.Host/ProjectNameHttpApiHostModule.cs @@ -1,5 +1,6 @@ using System; using System.Collections.Generic; +using System.IO; using System.Linq; using System.Text; using CompanyName.ProjectName.ConfigurationOptions; @@ -33,10 +34,9 @@ using Volo.Abp.Modularity; using Volo.Abp.Swashbuckle; using Volo.Abp.VirtualFileSystem; using System.Threading.Tasks; -using CompanyName.ProjectName.CAP; using CompanyName.ProjectName.Extensions; -using CompanyName.ProjectName.Extensions.Customs.Http; using CompanyName.ProjectName.MultiTenancy; +using Lion.Abp.Cap; using Savorboard.CAP.InMemoryMessageQueue; using Serilog; using Swashbuckle.AspNetCore.SwaggerUI; @@ -58,7 +58,7 @@ namespace CompanyName.ProjectName typeof(AbpAccountWebModule), typeof(AbpAspNetCoreAuthenticationJwtBearerModule), typeof(AbpBackgroundJobsHangfireModule), - typeof(AbpCapModule), + typeof(LionAbpCapModule), typeof(AbpAspNetCoreMultiTenancyModule) )] public class ProjectNameHttpApiHostModule : AbpModule @@ -314,6 +314,13 @@ namespace CompanyName.ProjectName options.EnableAnnotations(); // 启用注解 options.DocumentFilter(); options.SchemaFilter(); + // 加载所有xml注释,这里会导致swagger加载有点缓慢 + var xmls = Directory.GetFiles(AppContext.BaseDirectory, "*.xml"); + foreach (var xml in xmls) + { + options.IncludeXmlComments(xml, true); + } + options.AddSecurityDefinition(JwtBearerDefaults.AuthenticationScheme, new OpenApiSecurityScheme() { Description = "Please enter into field the word 'Bearer' followed by a space and the JWT value", diff --git a/aspnet-core/services/host/CompanyName.ProjectName.IdentityServer/Properties/launchSettings.json b/aspnet-core/services/host/CompanyName.ProjectName.IdentityServer/Properties/launchSettings.json index e7f9c313..4cb3979f 100644 --- a/aspnet-core/services/host/CompanyName.ProjectName.IdentityServer/Properties/launchSettings.json +++ b/aspnet-core/services/host/CompanyName.ProjectName.IdentityServer/Properties/launchSettings.json @@ -7,7 +7,7 @@ "launchBrowser": true, "applicationUrl": "http://localhost:44354", "environmentVariables": { - "ASPNETCORE_ENVIRONMENT": "Development" + "ASPNETCORE_ENVIRONMENT": "Production" } } } diff --git a/aspnet-core/services/src/CompanyName.ProjectName.Application.Contracts/AuditLogs/PagingAuditLogListInput.cs b/aspnet-core/services/src/CompanyName.ProjectName.Application.Contracts/AuditLogs/PagingAuditLogListInput.cs index e83fec2b..b1d49036 100644 --- a/aspnet-core/services/src/CompanyName.ProjectName.Application.Contracts/AuditLogs/PagingAuditLogListInput.cs +++ b/aspnet-core/services/src/CompanyName.ProjectName.Application.Contracts/AuditLogs/PagingAuditLogListInput.cs @@ -1,6 +1,6 @@ using System; using System.Net; -using CompanyName.ProjectName.Extensions.Customs; +using Lion.Abp.Extension; namespace CompanyName.ProjectName.AuditLogs diff --git a/aspnet-core/services/src/CompanyName.ProjectName.Application.Contracts/IdentityServers/ApiResources/Dtos/PagingApiRseourceListInput.cs b/aspnet-core/services/src/CompanyName.ProjectName.Application.Contracts/IdentityServers/ApiResources/Dtos/PagingApiRseourceListInput.cs index dd65eed2..5dc1df33 100644 --- a/aspnet-core/services/src/CompanyName.ProjectName.Application.Contracts/IdentityServers/ApiResources/Dtos/PagingApiRseourceListInput.cs +++ b/aspnet-core/services/src/CompanyName.ProjectName.Application.Contracts/IdentityServers/ApiResources/Dtos/PagingApiRseourceListInput.cs @@ -1,4 +1,4 @@ -using CompanyName.ProjectName.Extensions.Customs; +using Lion.Abp.Extension; namespace CompanyName.ProjectName.IdentityServers.Dtos { diff --git a/aspnet-core/services/src/CompanyName.ProjectName.Application.Contracts/IdentityServers/ApiResources/IApiResourceAppService.cs b/aspnet-core/services/src/CompanyName.ProjectName.Application.Contracts/IdentityServers/ApiResources/IApiResourceAppService.cs index 0f54491a..d9732c48 100644 --- a/aspnet-core/services/src/CompanyName.ProjectName.Application.Contracts/IdentityServers/ApiResources/IApiResourceAppService.cs +++ b/aspnet-core/services/src/CompanyName.ProjectName.Application.Contracts/IdentityServers/ApiResources/IApiResourceAppService.cs @@ -1,7 +1,7 @@ using System.Collections.Generic; using System.Threading.Tasks; using CompanyName.ProjectName.IdentityServers.Dtos; -using CompanyName.ProjectName.Publics.Dtos; +using Lion.Abp.Extension; using Volo.Abp.Application.Dtos; using Volo.Abp.Application.Services; diff --git a/aspnet-core/services/src/CompanyName.ProjectName.Application.Contracts/IdentityServers/ApiScopes/Dtos/PagingApiScopeListInput.cs b/aspnet-core/services/src/CompanyName.ProjectName.Application.Contracts/IdentityServers/ApiScopes/Dtos/PagingApiScopeListInput.cs index 622bc927..3c65039b 100644 --- a/aspnet-core/services/src/CompanyName.ProjectName.Application.Contracts/IdentityServers/ApiScopes/Dtos/PagingApiScopeListInput.cs +++ b/aspnet-core/services/src/CompanyName.ProjectName.Application.Contracts/IdentityServers/ApiScopes/Dtos/PagingApiScopeListInput.cs @@ -1,4 +1,4 @@ -using CompanyName.ProjectName.Extensions.Customs; +using Lion.Abp.Extension; namespace CompanyName.ProjectName.IdentityServers.ApiScopes.Dtos { diff --git a/aspnet-core/services/src/CompanyName.ProjectName.Application.Contracts/IdentityServers/ApiScopes/IApiScopeAppService.cs b/aspnet-core/services/src/CompanyName.ProjectName.Application.Contracts/IdentityServers/ApiScopes/IApiScopeAppService.cs index fbd19727..3678b9bc 100644 --- a/aspnet-core/services/src/CompanyName.ProjectName.Application.Contracts/IdentityServers/ApiScopes/IApiScopeAppService.cs +++ b/aspnet-core/services/src/CompanyName.ProjectName.Application.Contracts/IdentityServers/ApiScopes/IApiScopeAppService.cs @@ -1,9 +1,7 @@ -using System; -using System.Collections.Generic; +using System.Collections.Generic; using System.Threading.Tasks; -using CompanyName.ProjectName.Extensions.Customs.Dtos; using CompanyName.ProjectName.IdentityServers.ApiScopes.Dtos; -using CompanyName.ProjectName.Publics.Dtos; +using Lion.Abp.Extension; using Volo.Abp.Application.Dtos; using Volo.Abp.Application.Services; diff --git a/aspnet-core/services/src/CompanyName.ProjectName.Application.Contracts/IdentityServers/Clients/Dtos/PagingClientListInput.cs b/aspnet-core/services/src/CompanyName.ProjectName.Application.Contracts/IdentityServers/Clients/Dtos/PagingClientListInput.cs index f47a9736..9335d6e0 100644 --- a/aspnet-core/services/src/CompanyName.ProjectName.Application.Contracts/IdentityServers/Clients/Dtos/PagingClientListInput.cs +++ b/aspnet-core/services/src/CompanyName.ProjectName.Application.Contracts/IdentityServers/Clients/Dtos/PagingClientListInput.cs @@ -1,4 +1,4 @@ -using CompanyName.ProjectName.Extensions.Customs; +using Lion.Abp.Extension; namespace CompanyName.ProjectName.IdentityServers.Clients { diff --git a/aspnet-core/services/src/CompanyName.ProjectName.Application.Contracts/IdentityServers/Clients/IIdentityServerClientAppService.cs b/aspnet-core/services/src/CompanyName.ProjectName.Application.Contracts/IdentityServers/Clients/IIdentityServerClientAppService.cs index 8a46110f..2f79cc37 100644 --- a/aspnet-core/services/src/CompanyName.ProjectName.Application.Contracts/IdentityServers/Clients/IIdentityServerClientAppService.cs +++ b/aspnet-core/services/src/CompanyName.ProjectName.Application.Contracts/IdentityServers/Clients/IIdentityServerClientAppService.cs @@ -1,5 +1,5 @@ using System.Threading.Tasks; -using CompanyName.ProjectName.Publics.Dtos; +using Lion.Abp.Extension; using Volo.Abp.Application.Dtos; using Volo.Abp.Application.Services; diff --git a/aspnet-core/services/src/CompanyName.ProjectName.Application.Contracts/IdentityServers/IdentityResources/Dtos/PagingIdentityResourceListInput.cs b/aspnet-core/services/src/CompanyName.ProjectName.Application.Contracts/IdentityServers/IdentityResources/Dtos/PagingIdentityResourceListInput.cs index 73710e9f..eb9ee854 100644 --- a/aspnet-core/services/src/CompanyName.ProjectName.Application.Contracts/IdentityServers/IdentityResources/Dtos/PagingIdentityResourceListInput.cs +++ b/aspnet-core/services/src/CompanyName.ProjectName.Application.Contracts/IdentityServers/IdentityResources/Dtos/PagingIdentityResourceListInput.cs @@ -1,4 +1,4 @@ -using CompanyName.ProjectName.Extensions.Customs; +using Lion.Abp.Extension; namespace CompanyName.ProjectName.IdentityServers.IdentityResources.Dtos { diff --git a/aspnet-core/services/src/CompanyName.ProjectName.Application.Contracts/IdentityServers/IdentityResources/IIdentityResourceAppService.cs b/aspnet-core/services/src/CompanyName.ProjectName.Application.Contracts/IdentityServers/IdentityResources/IIdentityResourceAppService.cs index b6863e0c..ceb21f4c 100644 --- a/aspnet-core/services/src/CompanyName.ProjectName.Application.Contracts/IdentityServers/IdentityResources/IIdentityResourceAppService.cs +++ b/aspnet-core/services/src/CompanyName.ProjectName.Application.Contracts/IdentityServers/IdentityResources/IIdentityResourceAppService.cs @@ -1,7 +1,7 @@ using System.Collections.Generic; using System.Threading.Tasks; using CompanyName.ProjectName.IdentityServers.IdentityResources.Dtos; -using CompanyName.ProjectName.Publics.Dtos; +using Lion.Abp.Extension; using Volo.Abp.Application.Dtos; using Volo.Abp.Application.Services; diff --git a/aspnet-core/services/src/CompanyName.ProjectName.Application.Contracts/Roles/Dtos/PagingRoleListInput.cs b/aspnet-core/services/src/CompanyName.ProjectName.Application.Contracts/Roles/Dtos/PagingRoleListInput.cs index 5013fced..7fc664e0 100644 --- a/aspnet-core/services/src/CompanyName.ProjectName.Application.Contracts/Roles/Dtos/PagingRoleListInput.cs +++ b/aspnet-core/services/src/CompanyName.ProjectName.Application.Contracts/Roles/Dtos/PagingRoleListInput.cs @@ -1,5 +1,4 @@ -using CompanyName.ProjectName.Extensions.Customs; -using CompanyName.ProjectName.Publics.Dtos; +using Lion.Abp.Extension; namespace CompanyName.ProjectName.Roles.Dtos { diff --git a/aspnet-core/services/src/CompanyName.ProjectName.Application.Contracts/Tenants/Dtos/PagingTenantInput.cs b/aspnet-core/services/src/CompanyName.ProjectName.Application.Contracts/Tenants/Dtos/PagingTenantInput.cs index d16612cf..c346671f 100644 --- a/aspnet-core/services/src/CompanyName.ProjectName.Application.Contracts/Tenants/Dtos/PagingTenantInput.cs +++ b/aspnet-core/services/src/CompanyName.ProjectName.Application.Contracts/Tenants/Dtos/PagingTenantInput.cs @@ -1,4 +1,4 @@ -using CompanyName.ProjectName.Extensions.Customs; +using Lion.Abp.Extension; namespace CompanyName.ProjectName.Tenants.Dtos { diff --git a/aspnet-core/services/src/CompanyName.ProjectName.Application.Contracts/Users/Dtos/PagingUserListInput.cs b/aspnet-core/services/src/CompanyName.ProjectName.Application.Contracts/Users/Dtos/PagingUserListInput.cs index e70ff694..37eae17f 100644 --- a/aspnet-core/services/src/CompanyName.ProjectName.Application.Contracts/Users/Dtos/PagingUserListInput.cs +++ b/aspnet-core/services/src/CompanyName.ProjectName.Application.Contracts/Users/Dtos/PagingUserListInput.cs @@ -1,5 +1,4 @@ -using CompanyName.ProjectName.Extensions.Customs; -using CompanyName.ProjectName.Publics.Dtos; +using Lion.Abp.Extension; namespace CompanyName.ProjectName.Users.Dtos { diff --git a/aspnet-core/services/src/CompanyName.ProjectName.Application/CompanyName.ProjectName.Application.csproj b/aspnet-core/services/src/CompanyName.ProjectName.Application/CompanyName.ProjectName.Application.csproj index c8cfc40a..0ec17a1b 100644 --- a/aspnet-core/services/src/CompanyName.ProjectName.Application/CompanyName.ProjectName.Application.csproj +++ b/aspnet-core/services/src/CompanyName.ProjectName.Application/CompanyName.ProjectName.Application.csproj @@ -9,10 +9,9 @@ - - + diff --git a/aspnet-core/services/src/CompanyName.ProjectName.Application/HttpClientNameConsts.cs b/aspnet-core/services/src/CompanyName.ProjectName.Application/HttpClientNameConsts.cs new file mode 100644 index 00000000..6caff9ec --- /dev/null +++ b/aspnet-core/services/src/CompanyName.ProjectName.Application/HttpClientNameConsts.cs @@ -0,0 +1,13 @@ +using System; +using System.Threading.Tasks; + +namespace CompanyName.ProjectName +{ + public static class HttpClientNameConsts + { + /// + /// 身份验证中心 + /// + public static string Sts = "Sts"; + } +} diff --git a/aspnet-core/services/src/CompanyName.ProjectName.Application/IdentityServers/ApiResources/ApiResourceAppService.cs b/aspnet-core/services/src/CompanyName.ProjectName.Application/IdentityServers/ApiResources/ApiResourceAppService.cs index 7e674cf3..c5f26935 100644 --- a/aspnet-core/services/src/CompanyName.ProjectName.Application/IdentityServers/ApiResources/ApiResourceAppService.cs +++ b/aspnet-core/services/src/CompanyName.ProjectName.Application/IdentityServers/ApiResources/ApiResourceAppService.cs @@ -2,7 +2,7 @@ using System.Threading.Tasks; using CompanyName.ProjectName.IdentityServer; using CompanyName.ProjectName.IdentityServers.Dtos; -using CompanyName.ProjectName.Publics.Dtos; +using Lion.Abp.Extension; using Volo.Abp.Application.Dtos; using Volo.Abp.IdentityServer.ApiResources; diff --git a/aspnet-core/services/src/CompanyName.ProjectName.Application/IdentityServers/ApiScopes/ApiScopeAppService.cs b/aspnet-core/services/src/CompanyName.ProjectName.Application/IdentityServers/ApiScopes/ApiScopeAppService.cs index 536a794e..bcde6994 100644 --- a/aspnet-core/services/src/CompanyName.ProjectName.Application/IdentityServers/ApiScopes/ApiScopeAppService.cs +++ b/aspnet-core/services/src/CompanyName.ProjectName.Application/IdentityServers/ApiScopes/ApiScopeAppService.cs @@ -2,10 +2,9 @@ using System.Collections.Generic; using System.Linq; using System.Threading.Tasks; -using CompanyName.ProjectName.Extensions.Customs.Dtos; using CompanyName.ProjectName.IdentityServer; using CompanyName.ProjectName.IdentityServers.ApiScopes.Dtos; -using CompanyName.ProjectName.Publics.Dtos; +using Lion.Abp.Extension; using Volo.Abp.Application.Dtos; using Volo.Abp.IdentityServer.ApiScopes; diff --git a/aspnet-core/services/src/CompanyName.ProjectName.Application/IdentityServers/Clients/IdentityServerClientAppService.cs b/aspnet-core/services/src/CompanyName.ProjectName.Application/IdentityServers/Clients/IdentityServerClientAppService.cs index 911ad82a..46beee61 100644 --- a/aspnet-core/services/src/CompanyName.ProjectName.Application/IdentityServers/Clients/IdentityServerClientAppService.cs +++ b/aspnet-core/services/src/CompanyName.ProjectName.Application/IdentityServers/Clients/IdentityServerClientAppService.cs @@ -1,9 +1,7 @@ using System.Collections.Generic; -using System.Linq; using System.Threading.Tasks; -using CompanyName.ProjectName.Extensions.Customs.Dtos; using CompanyName.ProjectName.IdentityServer; -using CompanyName.ProjectName.Publics.Dtos; +using Lion.Abp.Extension; using Volo.Abp.Application.Dtos; using Volo.Abp.IdentityServer.Clients; diff --git a/aspnet-core/services/src/CompanyName.ProjectName.Application/IdentityServers/IdentityResources/IdentityResourceAppService.cs b/aspnet-core/services/src/CompanyName.ProjectName.Application/IdentityServers/IdentityResources/IdentityResourceAppService.cs index e63cf0f7..35777900 100644 --- a/aspnet-core/services/src/CompanyName.ProjectName.Application/IdentityServers/IdentityResources/IdentityResourceAppService.cs +++ b/aspnet-core/services/src/CompanyName.ProjectName.Application/IdentityServers/IdentityResources/IdentityResourceAppService.cs @@ -1,10 +1,9 @@ using System.Collections.Generic; -using System.Runtime.Serialization; using System.Threading.Tasks; using CompanyName.ProjectName.IdentityServer; using CompanyName.ProjectName.IdentityServers.IdentityResources; using CompanyName.ProjectName.IdentityServers.IdentityResources.Dtos; -using CompanyName.ProjectName.Publics.Dtos; +using Lion.Abp.Extension; using Volo.Abp.Application.Dtos; using Volo.Abp.IdentityServer.IdentityResources; diff --git a/aspnet-core/services/src/CompanyName.ProjectName.Application/ProjectNameApplicationModule.cs b/aspnet-core/services/src/CompanyName.ProjectName.Application/ProjectNameApplicationModule.cs index 94febc7a..ec546d15 100644 --- a/aspnet-core/services/src/CompanyName.ProjectName.Application/ProjectNameApplicationModule.cs +++ b/aspnet-core/services/src/CompanyName.ProjectName.Application/ProjectNameApplicationModule.cs @@ -1,6 +1,6 @@ using CompanyName.ProjectName.DataDictionaryManagement; +using CompanyName.ProjectName.FreeSqlRepository; using CompanyName.ProjectName.NotificationManagement; -using CompanyName.ProjectName.QueryManagement; using EasyAbp.Abp.SettingUi; using Volo.Abp.Account; using Volo.Abp.AuditLogging; @@ -24,11 +24,10 @@ namespace CompanyName.ProjectName typeof(AbpFeatureManagementApplicationModule), typeof(AbpSettingManagementApplicationModule), typeof(AbpAuditLoggingDomainModule), - typeof(QueryManagementDomainModule), typeof(DataDictionaryManagementApplicationModule), typeof(NotificationManagementApplicationModule), - typeof(QueryManagementApplicationModule), - typeof(AbpSettingUiApplicationModule) + typeof(AbpSettingUiApplicationModule), + typeof(FreeSqlRepositoryModule) )] public class ProjectNameApplicationModule : AbpModule { diff --git a/aspnet-core/services/src/CompanyName.ProjectName.Application/Users/LoginAppService.cs b/aspnet-core/services/src/CompanyName.ProjectName.Application/Users/LoginAppService.cs index 85dad261..e7652ef6 100644 --- a/aspnet-core/services/src/CompanyName.ProjectName.Application/Users/LoginAppService.cs +++ b/aspnet-core/services/src/CompanyName.ProjectName.Application/Users/LoginAppService.cs @@ -7,14 +7,10 @@ using System.Security.Claims; using System.Text; using System.Threading.Tasks; using CompanyName.ProjectName.ConfigurationOptions; -using CompanyName.ProjectName.Extensions.Customs.Http; -using CompanyName.ProjectName.QueryManagement.Systems.Users; using CompanyName.ProjectName.Users.Dtos; using IdentityModel; -using IdentityServer4; -using Microsoft.AspNetCore.Authentication; +using Lion.Abp.Extension; using Microsoft.AspNetCore.Http; -using Microsoft.Extensions.Logging; using Microsoft.Extensions.Options; using Microsoft.IdentityModel.Tokens; using Volo.Abp.Identity; @@ -85,7 +81,7 @@ namespace CompanyName.ProjectName.Users - public async Task BuildResult(IdentityUser user) + private async Task BuildResult(IdentityUser user) { if (user.LockoutEnabled) throw new Exception("当前用户已被锁定"); var roles = await _userManager.GetRolesAsync(user); diff --git a/aspnet-core/services/src/CompanyName.ProjectName.Application/Users/UserAppService.cs b/aspnet-core/services/src/CompanyName.ProjectName.Application/Users/UserAppService.cs index 06158b84..040d23af 100644 --- a/aspnet-core/services/src/CompanyName.ProjectName.Application/Users/UserAppService.cs +++ b/aspnet-core/services/src/CompanyName.ProjectName.Application/Users/UserAppService.cs @@ -2,7 +2,6 @@ using System.Collections.Generic; using System.Linq; using System.Threading.Tasks; -using CompanyName.ProjectName.QueryManagement.Systems.Users; using CompanyName.ProjectName.Users.Dtos; using Microsoft.AspNetCore.Identity; using Volo.Abp; diff --git a/aspnet-core/services/src/CompanyName.ProjectName.DbMigrator/appsettings.json b/aspnet-core/services/src/CompanyName.ProjectName.DbMigrator/appsettings.json index 1f210a15..24b4a3a1 100644 --- a/aspnet-core/services/src/CompanyName.ProjectName.DbMigrator/appsettings.json +++ b/aspnet-core/services/src/CompanyName.ProjectName.DbMigrator/appsettings.json @@ -1,5 +1,5 @@ { "ConnectionStrings": { - "Default": "Data Source=localhost;Database=CompanyNameProjectNameDB;uid=root;pwd=1q2w3E*;charset=utf8mb4;Allow User Variables=true;AllowLoadLocalInfile=true" + "Default": "Data Source=120.24.194.14;Database=CompanyNameProjectNameDB1;uid=root;pwd=1q2w3E*;charset=utf8mb4;Allow User Variables=true;AllowLoadLocalInfile=true" } } \ No newline at end of file diff --git a/aspnet-core/services/src/CompanyName.ProjectName.Domain.Shared/CompanyName.ProjectName.Domain.Shared.csproj b/aspnet-core/services/src/CompanyName.ProjectName.Domain.Shared/CompanyName.ProjectName.Domain.Shared.csproj index fe12cca8..b4043c2d 100644 --- a/aspnet-core/services/src/CompanyName.ProjectName.Domain.Shared/CompanyName.ProjectName.Domain.Shared.csproj +++ b/aspnet-core/services/src/CompanyName.ProjectName.Domain.Shared/CompanyName.ProjectName.Domain.Shared.csproj @@ -30,7 +30,9 @@ - + + + diff --git a/aspnet-core/services/src/CompanyName.ProjectName.Domain/CompanyName.ProjectName.Domain.csproj b/aspnet-core/services/src/CompanyName.ProjectName.Domain/CompanyName.ProjectName.Domain.csproj index 532052e2..06bbfec2 100644 --- a/aspnet-core/services/src/CompanyName.ProjectName.Domain/CompanyName.ProjectName.Domain.csproj +++ b/aspnet-core/services/src/CompanyName.ProjectName.Domain/CompanyName.ProjectName.Domain.csproj @@ -10,7 +10,6 @@ - diff --git a/aspnet-core/services/src/CompanyName.ProjectName.Domain/Data/Seeds/AbpSettingDataSeedContributor.cs b/aspnet-core/services/src/CompanyName.ProjectName.Domain/Data/Seeds/AbpSettingDataSeedContributor.cs new file mode 100644 index 00000000..8a3ac7ee --- /dev/null +++ b/aspnet-core/services/src/CompanyName.ProjectName.Domain/Data/Seeds/AbpSettingDataSeedContributor.cs @@ -0,0 +1,28 @@ +using System.Threading.Tasks; +using Volo.Abp.Data; +using Volo.Abp.DependencyInjection; +using Volo.Abp.SettingManagement; + +namespace CompanyName.ProjectName.Data.Seeds +{ + public class AbpSettingDataSeedContributor : IDataSeedContributor, ITransientDependency + { + private readonly ISettingManager _settingManager; + private const string DefaultLanguageKey = "Abp.Localization.DefaultLanguage"; + private const string DefaultLanguage = "zh-hans"; + public AbpSettingDataSeedContributor(ISettingManager settingManager) + { + _settingManager = settingManager; + } + + public async Task SeedAsync(DataSeedContext context) + { + // 设置默认语言 + var defaultLanguage = await _settingManager.GetOrNullGlobalAsync(DefaultLanguageKey); + if (defaultLanguage == null) + { + await _settingManager.SetGlobalAsync(DefaultLanguageKey, DefaultLanguage); + } + } + } +} \ No newline at end of file diff --git a/aspnet-core/services/src/CompanyName.ProjectName.Domain/IdentityServer/IdentityServerDataSeedContributor.cs b/aspnet-core/services/src/CompanyName.ProjectName.Domain/Data/Seeds/IdentityServerDataSeedContributor.cs similarity index 100% rename from aspnet-core/services/src/CompanyName.ProjectName.Domain/IdentityServer/IdentityServerDataSeedContributor.cs rename to aspnet-core/services/src/CompanyName.ProjectName.Domain/Data/Seeds/IdentityServerDataSeedContributor.cs diff --git a/aspnet-core/services/src/CompanyName.ProjectName.Domain/Users/UserDataSeedContributor.cs b/aspnet-core/services/src/CompanyName.ProjectName.Domain/Data/Seeds/UserDataSeedContributor.cs similarity index 100% rename from aspnet-core/services/src/CompanyName.ProjectName.Domain/Users/UserDataSeedContributor.cs rename to aspnet-core/services/src/CompanyName.ProjectName.Domain/Data/Seeds/UserDataSeedContributor.cs diff --git a/aspnet-core/services/src/CompanyName.ProjectName.Domain/ProjectNameDomainModule.cs b/aspnet-core/services/src/CompanyName.ProjectName.Domain/ProjectNameDomainModule.cs index b84cddf7..b12d04a3 100644 --- a/aspnet-core/services/src/CompanyName.ProjectName.Domain/ProjectNameDomainModule.cs +++ b/aspnet-core/services/src/CompanyName.ProjectName.Domain/ProjectNameDomainModule.cs @@ -3,7 +3,7 @@ using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.DependencyInjection.Extensions; using CompanyName.ProjectName.MultiTenancy; using CompanyName.ProjectName.NotificationManagement; -using CompanyName.ProjectName.QueryManagement; +using Lion.Abp.Domain; using Volo.Abp.AuditLogging; using Volo.Abp.BackgroundJobs; using Volo.Abp.Emailing; @@ -33,7 +33,7 @@ namespace CompanyName.ProjectName typeof(AbpEmailingModule), typeof(DataDictionaryManagementDomainModule), typeof(NotificationManagementDomainModule), - typeof(QueryManagementDomainModule) + typeof(LionAbpDomainModule) )] public class ProjectNameDomainModule : AbpModule { diff --git a/aspnet-core/services/src/CompanyName.ProjectName.EntityFrameworkCore/CompanyName.ProjectName.EntityFrameworkCore.csproj b/aspnet-core/services/src/CompanyName.ProjectName.EntityFrameworkCore/CompanyName.ProjectName.EntityFrameworkCore.csproj index 1af38423..546c884f 100644 --- a/aspnet-core/services/src/CompanyName.ProjectName.EntityFrameworkCore/CompanyName.ProjectName.EntityFrameworkCore.csproj +++ b/aspnet-core/services/src/CompanyName.ProjectName.EntityFrameworkCore/CompanyName.ProjectName.EntityFrameworkCore.csproj @@ -9,7 +9,6 @@ - diff --git a/aspnet-core/services/src/CompanyName.ProjectName.EntityFrameworkCore/EntityFrameworkCore/ProjectNameDbContext.cs b/aspnet-core/services/src/CompanyName.ProjectName.EntityFrameworkCore/EntityFrameworkCore/ProjectNameDbContext.cs index aff8f812..3da930f2 100644 --- a/aspnet-core/services/src/CompanyName.ProjectName.EntityFrameworkCore/EntityFrameworkCore/ProjectNameDbContext.cs +++ b/aspnet-core/services/src/CompanyName.ProjectName.EntityFrameworkCore/EntityFrameworkCore/ProjectNameDbContext.cs @@ -1,10 +1,24 @@ using CompanyName.ProjectName.NotificationManagement.EntityFrameworkCore; using Microsoft.EntityFrameworkCore; using CompanyName.ProjectName.Users; +using Volo.Abp.AuditLogging; +using Volo.Abp.AuditLogging.EntityFrameworkCore; +using Volo.Abp.BackgroundJobs; +using Volo.Abp.BackgroundJobs.EntityFrameworkCore; using Volo.Abp.Data; using Volo.Abp.EntityFrameworkCore; using Volo.Abp.EntityFrameworkCore.Modeling; +using Volo.Abp.FeatureManagement; +using Volo.Abp.FeatureManagement.EntityFrameworkCore; using Volo.Abp.Identity; +using Volo.Abp.Identity.EntityFrameworkCore; +using Volo.Abp.IdentityServer.EntityFrameworkCore; +using Volo.Abp.PermissionManagement; +using Volo.Abp.PermissionManagement.EntityFrameworkCore; +using Volo.Abp.SettingManagement; +using Volo.Abp.SettingManagement.EntityFrameworkCore; +using Volo.Abp.TenantManagement; +using Volo.Abp.TenantManagement.EntityFrameworkCore; using Volo.Abp.Users.EntityFrameworkCore; namespace CompanyName.ProjectName.EntityFrameworkCore @@ -19,9 +33,28 @@ namespace CompanyName.ProjectName.EntityFrameworkCore * used modules (as explained above). See ProjectNameMigrationsDbContext for migrations. */ [ConnectionStringName("Default")] - public class ProjectNameDbContext : AbpDbContext + public class ProjectNameDbContext : AbpDbContext, + IFeatureManagementDbContext, + IIdentityDbContext, + IPermissionManagementDbContext, + ISettingManagementDbContext, + ITenantManagementDbContext, + IBackgroundJobsDbContext, + IAuditLoggingDbContext { - public DbSet Users { get; set; } + public DbSet Users { get; } + public DbSet Roles { get; } + public DbSet ClaimTypes { get; } + public DbSet OrganizationUnits { get; } + public DbSet SecurityLogs { get; } + public DbSet LinkUsers { get; } + public DbSet FeatureValues { get; } + public DbSet PermissionGrants { get; } + public DbSet Settings { get; } + public DbSet Tenants { get; } + public DbSet TenantConnectionStrings { get; } + public DbSet BackgroundJobs { get; } + public DbSet AuditLogs { get; } /* Add DbSet properties for your Aggregate Roots / Entities here. * Also map them inside ProjectNameDbContextModelCreatingExtensions.ConfigureProjectName @@ -30,32 +63,21 @@ namespace CompanyName.ProjectName.EntityFrameworkCore public ProjectNameDbContext(DbContextOptions options) : base(options) { - } protected override void OnModelCreating(ModelBuilder builder) { base.OnModelCreating(builder); - /* Configure the shared tables (with included modules) here */ - - builder.Entity(b => - { - b.ToTable(AbpIdentityDbProperties.DbTablePrefix + "Users"); //Sharing the same table "AbpUsers" with the IdentityUser - - b.ConfigureByConvention(); - b.ConfigureAbpUser(); - - /* Configure mappings for your additional properties - * Also see the ProjectNameEfCoreEntityExtensionMappings class - */ - }); - - /* Configure your own tables/entities inside the ConfigureProjectName method */ - + builder.ConfigurePermissionManagement( ); + builder.ConfigureSettingManagement(); + builder.ConfigureBackgroundJobs(); + builder.ConfigureAuditLogging(); + builder.ConfigureIdentity(); + builder.ConfigureFeatureManagement(); + builder.ConfigureTenantManagement(); + builder.ConfigureIdentityServer(); builder.ConfigureProjectName(); - - } } -} +} \ No newline at end of file diff --git a/aspnet-core/services/src/CompanyName.ProjectName.EntityFrameworkCore/EntityFrameworkCore/ProjectNameEntityFrameworkCoreModule.cs b/aspnet-core/services/src/CompanyName.ProjectName.EntityFrameworkCore/EntityFrameworkCore/ProjectNameEntityFrameworkCoreModule.cs index dbc99cf0..d667772d 100644 --- a/aspnet-core/services/src/CompanyName.ProjectName.EntityFrameworkCore/EntityFrameworkCore/ProjectNameEntityFrameworkCoreModule.cs +++ b/aspnet-core/services/src/CompanyName.ProjectName.EntityFrameworkCore/EntityFrameworkCore/ProjectNameEntityFrameworkCoreModule.cs @@ -1,6 +1,5 @@ using CompanyName.ProjectName.DataDictionaryManagement.EntityFrameworkCore; using CompanyName.ProjectName.NotificationManagement.EntityFrameworkCore; -using CompanyName.ProjectName.QueryManagement.FreeSqlMySql; using Microsoft.Extensions.DependencyInjection; using Volo.Abp.AuditLogging.EntityFrameworkCore; using Volo.Abp.BackgroundJobs.EntityFrameworkCore; @@ -27,7 +26,6 @@ namespace CompanyName.ProjectName.EntityFrameworkCore typeof(AbpAuditLoggingEntityFrameworkCoreModule), typeof(AbpTenantManagementEntityFrameworkCoreModule), typeof(AbpFeatureManagementEntityFrameworkCoreModule), - typeof(QueryManagementFreeSqlMySqlModule), typeof(DataDictionaryManagementEntityFrameworkCoreModule), typeof(NotificationManagementEntityFrameworkCoreModule) )] diff --git a/aspnet-core/services/src/CompanyName.ProjectName.FreeSqlRepository/CompanyName.ProjectName.FreeSqlRepository.csproj b/aspnet-core/services/src/CompanyName.ProjectName.FreeSqlRepository/CompanyName.ProjectName.FreeSqlRepository.csproj new file mode 100644 index 00000000..e0208c3b --- /dev/null +++ b/aspnet-core/services/src/CompanyName.ProjectName.FreeSqlRepository/CompanyName.ProjectName.FreeSqlRepository.csproj @@ -0,0 +1,14 @@ + + + + net5.0 + + + + + + + + + + diff --git a/aspnet-core/modules/QueryManagement/src/CompanyName.ProjectName.QueryManagement.FreeSqlMySql/FreeSqlBasicRepository.cs b/aspnet-core/services/src/CompanyName.ProjectName.FreeSqlRepository/FreeSqlBasicRepository.cs similarity index 87% rename from aspnet-core/modules/QueryManagement/src/CompanyName.ProjectName.QueryManagement.FreeSqlMySql/FreeSqlBasicRepository.cs rename to aspnet-core/services/src/CompanyName.ProjectName.FreeSqlRepository/FreeSqlBasicRepository.cs index 26180461..bfcfefaa 100644 --- a/aspnet-core/modules/QueryManagement/src/CompanyName.ProjectName.QueryManagement.FreeSqlMySql/FreeSqlBasicRepository.cs +++ b/aspnet-core/services/src/CompanyName.ProjectName.FreeSqlRepository/FreeSqlBasicRepository.cs @@ -1,10 +1,9 @@ using System; using System.Threading; -using System.Threading.Tasks; using Volo.Abp.Domain.Services; using Volo.Abp.Threading; -namespace CompanyName.ProjectName.QueryManagement.FreeSqlMySql +namespace CompanyName.ProjectName.FreeSqlRepository { public abstract class FreeSqlBasicRepository : DomainService { @@ -18,4 +17,4 @@ namespace CompanyName.ProjectName.QueryManagement.FreeSqlMySql return CancellationTokenProvider.FallbackToProvider(preferredValue); } } -} +} \ No newline at end of file diff --git a/aspnet-core/modules/QueryManagement/src/CompanyName.ProjectName.QueryManagement.FreeSqlMySql/QueryManagementFreeSqlMySqlModule.cs b/aspnet-core/services/src/CompanyName.ProjectName.FreeSqlRepository/FreeSqlRepositoryModule.cs similarity index 53% rename from aspnet-core/modules/QueryManagement/src/CompanyName.ProjectName.QueryManagement.FreeSqlMySql/QueryManagementFreeSqlMySqlModule.cs rename to aspnet-core/services/src/CompanyName.ProjectName.FreeSqlRepository/FreeSqlRepositoryModule.cs index aaabfcd0..7a952c97 100644 --- a/aspnet-core/modules/QueryManagement/src/CompanyName.ProjectName.QueryManagement.FreeSqlMySql/QueryManagementFreeSqlMySqlModule.cs +++ b/aspnet-core/services/src/CompanyName.ProjectName.FreeSqlRepository/FreeSqlRepositoryModule.cs @@ -2,34 +2,23 @@ using Microsoft.Extensions.Configuration; using Microsoft.Extensions.DependencyInjection; using Volo.Abp.Modularity; -using Volo.Abp.VirtualFileSystem; -namespace CompanyName.ProjectName.QueryManagement.FreeSqlMySql +namespace CompanyName.ProjectName.FreeSqlRepository { - public class QueryManagementFreeSqlMySqlModule : AbpModule + public class FreeSqlRepositoryModule : AbpModule { public override void ConfigureServices(ServiceConfigurationContext context) { - ConfigureVirtualFileSystem(); - var configuration = context.Services.GetConfiguration(); - var connectionString = configuration.GetConnectionString(QueryManagementDbProperties.ConnectionStringName); + var connectionString = + configuration.GetConnectionString("Default"); var freeSql = new FreeSql.FreeSqlBuilder() .UseConnectionString(FreeSql.DataType.MySql, connectionString) .UseMonitorCommand(cmd => Console.WriteLine($"线程:{cmd.CommandText}\r\n")) .UseNoneCommandParameter(true) .Build(); - - context.Services.AddSingleton(freeSql); - } - - private void ConfigureVirtualFileSystem() - { - Configure(options => - { - options.FileSets.AddEmbedded(); - }); + context.Services.AddSingleton(freeSql); } } -} +} \ No newline at end of file diff --git a/aspnet-core/services/src/CompanyName.ProjectName.HttpApi/CompanyName.ProjectName.HttpApi.csproj b/aspnet-core/services/src/CompanyName.ProjectName.HttpApi/CompanyName.ProjectName.HttpApi.csproj index decec00b..70ebf8cd 100644 --- a/aspnet-core/services/src/CompanyName.ProjectName.HttpApi/CompanyName.ProjectName.HttpApi.csproj +++ b/aspnet-core/services/src/CompanyName.ProjectName.HttpApi/CompanyName.ProjectName.HttpApi.csproj @@ -10,7 +10,6 @@ - diff --git a/aspnet-core/services/src/CompanyName.ProjectName.HttpApi/Controllers/IdentityServers/ApiResourceController.cs b/aspnet-core/services/src/CompanyName.ProjectName.HttpApi/Controllers/IdentityServers/ApiResourceController.cs index 24ceb45b..f88f408a 100644 --- a/aspnet-core/services/src/CompanyName.ProjectName.HttpApi/Controllers/IdentityServers/ApiResourceController.cs +++ b/aspnet-core/services/src/CompanyName.ProjectName.HttpApi/Controllers/IdentityServers/ApiResourceController.cs @@ -3,7 +3,7 @@ using System.Threading.Tasks; using CompanyName.ProjectName.IdentityServers; using CompanyName.ProjectName.IdentityServers.Dtos; using CompanyName.ProjectName.Permissions; -using CompanyName.ProjectName.Publics.Dtos; +using Lion.Abp.Extension; using Microsoft.AspNetCore.Authorization; using Microsoft.AspNetCore.Mvc; using Swashbuckle.AspNetCore.Annotations; diff --git a/aspnet-core/services/src/CompanyName.ProjectName.HttpApi/Controllers/IdentityServers/ApiScopeController.cs b/aspnet-core/services/src/CompanyName.ProjectName.HttpApi/Controllers/IdentityServers/ApiScopeController.cs index 264c2316..acd8b107 100644 --- a/aspnet-core/services/src/CompanyName.ProjectName.HttpApi/Controllers/IdentityServers/ApiScopeController.cs +++ b/aspnet-core/services/src/CompanyName.ProjectName.HttpApi/Controllers/IdentityServers/ApiScopeController.cs @@ -1,11 +1,9 @@ -using System; -using System.Collections.Generic; +using System.Collections.Generic; using System.Threading.Tasks; -using CompanyName.ProjectName.Extensions.Customs.Dtos; using CompanyName.ProjectName.IdentityServers.ApiScopes; using CompanyName.ProjectName.IdentityServers.ApiScopes.Dtos; using CompanyName.ProjectName.Permissions; -using CompanyName.ProjectName.Publics.Dtos; +using Lion.Abp.Extension; using Microsoft.AspNetCore.Authorization; using Microsoft.AspNetCore.Mvc; using Swashbuckle.AspNetCore.Annotations; diff --git a/aspnet-core/services/src/CompanyName.ProjectName.HttpApi/Controllers/IdentityServers/ClientController.cs b/aspnet-core/services/src/CompanyName.ProjectName.HttpApi/Controllers/IdentityServers/ClientController.cs index a4a14c85..20636e9c 100644 --- a/aspnet-core/services/src/CompanyName.ProjectName.HttpApi/Controllers/IdentityServers/ClientController.cs +++ b/aspnet-core/services/src/CompanyName.ProjectName.HttpApi/Controllers/IdentityServers/ClientController.cs @@ -1,7 +1,7 @@ using System.Threading.Tasks; using CompanyName.ProjectName.IdentityServers.Clients; using CompanyName.ProjectName.Permissions; -using CompanyName.ProjectName.Publics.Dtos; +using Lion.Abp.Extension; using Microsoft.AspNetCore.Authorization; using Microsoft.AspNetCore.Mvc; using Swashbuckle.AspNetCore.Annotations; diff --git a/aspnet-core/services/src/CompanyName.ProjectName.HttpApi/Controllers/IdentityServers/IdentityResourceController.cs b/aspnet-core/services/src/CompanyName.ProjectName.HttpApi/Controllers/IdentityServers/IdentityResourceController.cs index da44dc5f..c2105368 100644 --- a/aspnet-core/services/src/CompanyName.ProjectName.HttpApi/Controllers/IdentityServers/IdentityResourceController.cs +++ b/aspnet-core/services/src/CompanyName.ProjectName.HttpApi/Controllers/IdentityServers/IdentityResourceController.cs @@ -3,7 +3,7 @@ using System.Threading.Tasks; using CompanyName.ProjectName.IdentityServers.IdentityResources; using CompanyName.ProjectName.IdentityServers.IdentityResources.Dtos; using CompanyName.ProjectName.Permissions; -using CompanyName.ProjectName.Publics.Dtos; +using Lion.Abp.Extension; using Microsoft.AspNetCore.Authorization; using Microsoft.AspNetCore.Mvc; using Swashbuckle.AspNetCore.Annotations; diff --git a/aspnet-core/services/src/CompanyName.ProjectName.HttpApi/Controllers/Systems/AccountController.cs b/aspnet-core/services/src/CompanyName.ProjectName.HttpApi/Controllers/Systems/AccountController.cs index 534f7577..8401f6e0 100644 --- a/aspnet-core/services/src/CompanyName.ProjectName.HttpApi/Controllers/Systems/AccountController.cs +++ b/aspnet-core/services/src/CompanyName.ProjectName.HttpApi/Controllers/Systems/AccountController.cs @@ -6,6 +6,9 @@ using Swashbuckle.AspNetCore.Annotations; namespace CompanyName.ProjectName.Controllers.Systems { + /// + /// 登录 + /// public class AccountController : ProjectNameController { private readonly ILoginAppService _loginAppService; diff --git a/aspnet-core/services/src/CompanyName.ProjectName.HttpApi/Controllers/Systems/RoleController.cs b/aspnet-core/services/src/CompanyName.ProjectName.HttpApi/Controllers/Systems/RoleController.cs index e1ad7b0a..3bf30d95 100644 --- a/aspnet-core/services/src/CompanyName.ProjectName.HttpApi/Controllers/Systems/RoleController.cs +++ b/aspnet-core/services/src/CompanyName.ProjectName.HttpApi/Controllers/Systems/RoleController.cs @@ -1,10 +1,8 @@ -using System.Collections.Generic; -using System.Threading.Tasks; -using CompanyName.ProjectName.Publics.Dtos; +using System.Threading.Tasks; using CompanyName.ProjectName.Roles; using CompanyName.ProjectName.Roles.Dtos; +using Lion.Abp.Extension; using Microsoft.AspNetCore.Authorization; -using Microsoft.AspNetCore.Identity; using Microsoft.AspNetCore.Mvc; using Swashbuckle.AspNetCore.Annotations; using Volo.Abp.Application.Dtos; diff --git a/aspnet-core/services/src/CompanyName.ProjectName.HttpApi/Controllers/Systems/UserController.cs b/aspnet-core/services/src/CompanyName.ProjectName.HttpApi/Controllers/Systems/UserController.cs index 7421d36a..a1ba04ee 100644 --- a/aspnet-core/services/src/CompanyName.ProjectName.HttpApi/Controllers/Systems/UserController.cs +++ b/aspnet-core/services/src/CompanyName.ProjectName.HttpApi/Controllers/Systems/UserController.cs @@ -1,9 +1,8 @@ -using System; -using System.Threading.Tasks; +using System.Threading.Tasks; using CompanyName.ProjectName.Permissions; -using CompanyName.ProjectName.Publics.Dtos; using CompanyName.ProjectName.Users; using CompanyName.ProjectName.Users.Dtos; +using Lion.Abp.Extension; using Microsoft.AspNetCore.Authorization; using Microsoft.AspNetCore.Mvc; using Swashbuckle.AspNetCore.Annotations; diff --git a/aspnet-core/services/src/CompanyName.ProjectName.HttpApi/Controllers/Tenants/TenantController.cs b/aspnet-core/services/src/CompanyName.ProjectName.HttpApi/Controllers/Tenants/TenantController.cs index b812c9f9..2d13724d 100644 --- a/aspnet-core/services/src/CompanyName.ProjectName.HttpApi/Controllers/Tenants/TenantController.cs +++ b/aspnet-core/services/src/CompanyName.ProjectName.HttpApi/Controllers/Tenants/TenantController.cs @@ -1,6 +1,6 @@ using System.Threading.Tasks; -using CompanyName.ProjectName.Publics.Dtos; using CompanyName.ProjectName.Tenants.Dtos; +using Lion.Abp.Extension; using Microsoft.AspNetCore.Authorization; using Microsoft.AspNetCore.Mvc; using Swashbuckle.AspNetCore.Annotations; diff --git a/aspnet-core/services/src/CompanyName.ProjectName.HttpApi/ProjectNameHttpApiModule.cs b/aspnet-core/services/src/CompanyName.ProjectName.HttpApi/ProjectNameHttpApiModule.cs index e1742ec1..2f080e53 100644 --- a/aspnet-core/services/src/CompanyName.ProjectName.HttpApi/ProjectNameHttpApiModule.cs +++ b/aspnet-core/services/src/CompanyName.ProjectName.HttpApi/ProjectNameHttpApiModule.cs @@ -2,8 +2,6 @@ using Localization.Resources.AbpUi; using CompanyName.ProjectName.Localization; using CompanyName.ProjectName.NotificationManagement; -using CompanyName.ProjectName.QueryManagement; -using EasyAbp.Abp.SettingUi; using Volo.Abp.Account; using Volo.Abp.FeatureManagement; using Volo.Abp.Identity; @@ -24,8 +22,7 @@ namespace CompanyName.ProjectName typeof(AbpFeatureManagementHttpApiModule), typeof(AbpSettingManagementHttpApiModule), typeof(DataDictionaryManagementHttpApiModule), - typeof(NotificationManagementHttpApiModule), - typeof(QueryManagementHttpApiModule) + typeof(NotificationManagementHttpApiModule) )] public class ProjectNameHttpApiModule : AbpModule { diff --git a/aspnet-core/shared/CompanyName.ProjectName.Shared.Hosting.Gateways/CompanyName.ProjectName.Shared.Hosting.Gateways.csproj b/aspnet-core/shared/CompanyName.ProjectName.Shared.Hosting.Gateways/CompanyName.ProjectName.Shared.Hosting.Gateways.csproj new file mode 100644 index 00000000..77428998 --- /dev/null +++ b/aspnet-core/shared/CompanyName.ProjectName.Shared.Hosting.Gateways/CompanyName.ProjectName.Shared.Hosting.Gateways.csproj @@ -0,0 +1,15 @@ + + + + net5.0 + + + + + + + + + + + diff --git a/aspnet-core/shared/CompanyName.ProjectName.Shared.Hosting.Gateways/SharedHostingGatewayModule.cs b/aspnet-core/shared/CompanyName.ProjectName.Shared.Hosting.Gateways/SharedHostingGatewayModule.cs new file mode 100644 index 00000000..ba2958cc --- /dev/null +++ b/aspnet-core/shared/CompanyName.ProjectName.Shared.Hosting.Gateways/SharedHostingGatewayModule.cs @@ -0,0 +1,30 @@ +using Microsoft.Extensions.DependencyInjection; +using Ocelot.DependencyInjection; +using Volo.Abp.Autofac; +using Volo.Abp.Modularity; +using Volo.Abp.Swashbuckle; + +namespace CompanyName.ProjectName.Shared.Hosting.Gateways +{ + [DependsOn( + typeof(AbpSwashbuckleModule), + typeof(AbpAutofacModule))] + public class SharedHostingGatewayModule : AbpModule + { + + public override void ConfigureServices(ServiceConfigurationContext context) + { + ConfigureOcelot(context); + } + + /// + /// Ocelot配置 + /// + private static void ConfigureOcelot(ServiceConfigurationContext context) + { + var configuration = context.Services.GetConfiguration(); + context.Services.AddOcelot(configuration); + } + + } +} \ No newline at end of file diff --git a/aspnet-core/shared/CompanyName.ProjectName.Shared.Hosting.Microservices/CompanyName.ProjectName.Shared.Hosting.Microservices.csproj b/aspnet-core/shared/CompanyName.ProjectName.Shared.Hosting.Microservices/CompanyName.ProjectName.Shared.Hosting.Microservices.csproj new file mode 100644 index 00000000..0536976b --- /dev/null +++ b/aspnet-core/shared/CompanyName.ProjectName.Shared.Hosting.Microservices/CompanyName.ProjectName.Shared.Hosting.Microservices.csproj @@ -0,0 +1,20 @@ + + + + net5.0 + + + + + + + + + + + + + + + + diff --git a/aspnet-core/shared/CompanyName.ProjectName.Shared.Hosting.Microservices/Microsoft/AspNetCore/Builder/ApplicationBuilderExtensions.cs b/aspnet-core/shared/CompanyName.ProjectName.Shared.Hosting.Microservices/Microsoft/AspNetCore/Builder/ApplicationBuilderExtensions.cs new file mode 100644 index 00000000..da755ea1 --- /dev/null +++ b/aspnet-core/shared/CompanyName.ProjectName.Shared.Hosting.Microservices/Microsoft/AspNetCore/Builder/ApplicationBuilderExtensions.cs @@ -0,0 +1,53 @@ +using System; +using Consul; +using Microsoft.Extensions.Configuration; +using Microsoft.Extensions.DependencyInjection; +using Microsoft.Extensions.Hosting; + +namespace Microsoft.AspNetCore.Builder +{ + public static class ApplicationBuilderExtensions + { + + public static string UseConsul(this IApplicationBuilder app) + { + var appLifetime = app.ApplicationServices.GetService(); + using var scope = app.ApplicationServices.CreateScope(); + var configuration = scope.ServiceProvider.GetService(); + + bool isEnabled = configuration.GetValue("Consul:Enabled"); + string serviceName = configuration.GetValue("Consul:Service"); + var appString = configuration.GetValue("App:SelfUrl"); + Uri appUrl = new Uri(appString, UriKind.Absolute); + + if (!isEnabled) + return String.Empty; + + Guid serviceId = Guid.NewGuid(); + string consulServiceId = $"{serviceName}:{serviceId}"; + + var client = scope.ServiceProvider.GetService(); + + var consulServiceRegistration = new AgentServiceRegistration + { + Name = serviceName, + ID = consulServiceId, + Address = appUrl.Host, + Port = appUrl.Port, + Check = new AgentServiceCheck + { + Status = HealthStatus.Passing, + DeregisterCriticalServiceAfter = TimeSpan.FromSeconds(5),//服务停止多久后注销 + Interval = TimeSpan.FromSeconds(3),//健康检查时间间隔,或者称为心跳 间隔 + HTTP = $"http://{appUrl.Host}:{appUrl.Port}/health",//健康检查地址 + Timeout = TimeSpan.FromSeconds(15) //超时时间 + } + }; + + client.Agent.ServiceRegister(consulServiceRegistration); + appLifetime.ApplicationStopping.Register(() => { client.Agent.ServiceDeregister(consulServiceRegistration.ID); }); + + return consulServiceId; + } + } +} \ No newline at end of file diff --git a/aspnet-core/shared/CompanyName.ProjectName.Shared.Hosting.Microservices/Microsoft/Extensions/DependencyInjection/ServiceCollectionExtensions.cs b/aspnet-core/shared/CompanyName.ProjectName.Shared.Hosting.Microservices/Microsoft/Extensions/DependencyInjection/ServiceCollectionExtensions.cs new file mode 100644 index 00000000..01dc5776 --- /dev/null +++ b/aspnet-core/shared/CompanyName.ProjectName.Shared.Hosting.Microservices/Microsoft/Extensions/DependencyInjection/ServiceCollectionExtensions.cs @@ -0,0 +1,19 @@ +using System; +using Consul; +using Microsoft.Extensions.Configuration; + +namespace Microsoft.Extensions.DependencyInjection +{ + public static class ServiceCollectionExtensions + { + public static IServiceCollection AddConsulConfig(this IServiceCollection services, IConfiguration configuration) + { + services.AddSingleton(p => new ConsulClient(consulConfig => + { + var address = configuration.GetValue("Consul:Host"); + consulConfig.Address = new Uri(address); + })); + return services; + } + } +} \ No newline at end of file diff --git a/aspnet-core/shared/CompanyName.ProjectName.Shared.Hosting.Microservices/SharedHostingMicroserviceModule.cs b/aspnet-core/shared/CompanyName.ProjectName.Shared.Hosting.Microservices/SharedHostingMicroserviceModule.cs new file mode 100644 index 00000000..abc11db6 --- /dev/null +++ b/aspnet-core/shared/CompanyName.ProjectName.Shared.Hosting.Microservices/SharedHostingMicroserviceModule.cs @@ -0,0 +1,104 @@ +using System; +using System.Linq; +using Microsoft.AspNetCore.Cors; +using Microsoft.Extensions.Configuration; +using Microsoft.Extensions.DependencyInjection; +using Volo.Abp.Autofac; +using Volo.Abp.Localization; +using Volo.Abp.Modularity; +using Volo.Abp.Swashbuckle; +using Volo.Abp.UI.Navigation.Urls; + +namespace DefaultNamespace +{ + [DependsOn( + typeof(AbpSwashbuckleModule), + typeof(AbpAutofacModule))] + public class SharedHostingMicroserviceModule : AbpModule + { + private const string DefaultCorsPolicyName = "Default"; + + public override void ConfigureServices(ServiceConfigurationContext context) + { + var configuration = context.Services.GetConfiguration(); + context.Services.AddConsulConfig(configuration); + ConfigureHealthChecks(context); + ConfigureLocalization(); + ConfigureCors(context); + ConfigureUrls(configuration); + + } + + /// + /// 配置跨域 + /// + private void ConfigureCors(ServiceConfigurationContext context) + { + var configuration = context.Services.GetConfiguration(); + context.Services.AddCors(options => + { + options.AddPolicy(DefaultCorsPolicyName, builder => + { + builder + .WithOrigins( + configuration["App:CorsOrigins"] + .Split(",", StringSplitOptions.RemoveEmptyEntries) + .Select(o => o.RemovePostFix("/")) + .ToArray() + ) + .WithAbpExposedHeaders() + .SetIsOriginAllowedToAllowWildcardSubdomains() + .AllowAnyHeader() + .AllowAnyMethod() + .AllowCredentials(); + }); + }); + } + + + /// + /// 站点配置 + /// + /// + private void ConfigureUrls(IConfiguration configuration) + { + Configure(options => + { + options.Applications["MVC"].RootUrl = configuration["App:SelfUrl"]; + }); + } + + /// + /// 多语言配置 + /// + private void ConfigureLocalization() + { + Configure(options => + { + options.Languages.Add(new LanguageInfo("ar", "ar", "العربية")); + options.Languages.Add(new LanguageInfo("cs", "cs", "Čeština")); + options.Languages.Add(new LanguageInfo("en", "en", "English")); + options.Languages.Add(new LanguageInfo("en-GB", "en-GB", "English (UK)")); + options.Languages.Add(new LanguageInfo("fr", "fr", "Français")); + options.Languages.Add(new LanguageInfo("hu", "hu", "Magyar")); + options.Languages.Add(new LanguageInfo("pt-BR", "pt-BR", "Português")); + options.Languages.Add(new LanguageInfo("ru", "ru", "Русский")); + options.Languages.Add(new LanguageInfo("tr", "tr", "Türkçe")); + options.Languages.Add(new LanguageInfo("zh-Hans", "zh-Hans", "简体中文")); + options.Languages.Add(new LanguageInfo("zh-Hant", "zh-Hant", "繁體中文")); + options.Languages.Add(new LanguageInfo("de-DE", "de-DE", "Deutsch", "de")); + options.Languages.Add(new LanguageInfo("es", "es", "Español", "es")); + }); + } + + /// + /// 健康检查 + /// + /// + private void ConfigureHealthChecks(ServiceConfigurationContext context) + { + // TODO 检查数据库和redis是否正常 AspNetCore.HealthChecks.Redis AspNetCore.HealthChecks.MySql + context.Services.AddHealthChecks(); + } + } +} \ No newline at end of file diff --git a/aspnet-core/shared/CompanyName.ProjectName.Shared.Hosting.Microservices/Swaggers/EnumSchemaFilter.cs b/aspnet-core/shared/CompanyName.ProjectName.Shared.Hosting.Microservices/Swaggers/EnumSchemaFilter.cs new file mode 100644 index 00000000..0cd7156f --- /dev/null +++ b/aspnet-core/shared/CompanyName.ProjectName.Shared.Hosting.Microservices/Swaggers/EnumSchemaFilter.cs @@ -0,0 +1,28 @@ +using System; +using System.Linq; +using Microsoft.OpenApi.Any; +using Microsoft.OpenApi.Models; +using Swashbuckle.AspNetCore.SwaggerGen; + +namespace DefaultNamespace.Swaggers +{ + /// + /// swagger 枚举映射, + /// 原因:前端代理生成枚举是数字 + /// + public class EnumSchemaFilter : ISchemaFilter + { + public void Apply(OpenApiSchema schema, SchemaFilterContext context) + { + if (context.Type.IsEnum) + { + var array = new OpenApiArray(); + array.AddRange(Enum.GetNames(context.Type).Select(n => new OpenApiString(n))); + // NSwag + schema.Extensions.Add("x-enumNames", array); + // Openapi-generator + schema.Extensions.Add("x-enum-varnames", array); + } + } + } +} \ No newline at end of file diff --git a/aspnet-core/shared/CompanyName.ProjectName.Shared.Hosting.Microservices/Swaggers/HiddenAbpDefaultApiFilter.cs b/aspnet-core/shared/CompanyName.ProjectName.Shared.Hosting.Microservices/Swaggers/HiddenAbpDefaultApiFilter.cs new file mode 100644 index 00000000..1b4bcd19 --- /dev/null +++ b/aspnet-core/shared/CompanyName.ProjectName.Shared.Hosting.Microservices/Swaggers/HiddenAbpDefaultApiFilter.cs @@ -0,0 +1,53 @@ +using System.Collections.Generic; +using System.Reflection; +using Microsoft.AspNetCore.Mvc.ApiExplorer; +using Microsoft.OpenApi.Models; +using Swashbuckle.AspNetCore.SwaggerGen; + +namespace DefaultNamespace.Swaggers +{ + /// + /// 在使用nswag的时候,原生默认的api导致生产的代理类存在问题 + /// 所有隐藏原生的api,重写路由 + /// + public class HiddenAbpDefaultApiFilter : IDocumentFilter + { + public void Apply(OpenApiDocument swaggerDoc, DocumentFilterContext context) + { + foreach (ApiDescription apiDescription in context.ApiDescriptions) + { + if (apiDescription.TryGetMethodInfo(out MethodInfo method)) + { + string key = "/" + apiDescription.RelativePath; + var reuslt = IsHidden(key); + if (reuslt) swaggerDoc.Paths.Remove(key); + } + } + } + + private bool IsHidden(string key) + { + var list = GetHiddenAbpDefaultApiList(); + foreach (var item in list) + { + if (key.Contains(item)) return true; + } + + return false; + } + + private List GetHiddenAbpDefaultApiList() + { + return new List() { + "/api/abp/multi-tenancy/tenants", + "/api/account", + "/api/feature-management/features", + "/api/permission-management/permissions", + "/api/identity/my-profile", + "/api/identity", + "/api/multi-tenancy/tenants", + "/api/setting-management/emailing" + }; + } + } +} \ No newline at end of file diff --git a/aspnet-core/shared/CompanyName.ProjectName.Shared.Hosting.Microservices/Volo/Abp/DefaultHttpExceptionStatusCodeFinder.cs b/aspnet-core/shared/CompanyName.ProjectName.Shared.Hosting.Microservices/Volo/Abp/DefaultHttpExceptionStatusCodeFinder.cs new file mode 100644 index 00000000..0ee9aff7 --- /dev/null +++ b/aspnet-core/shared/CompanyName.ProjectName.Shared.Hosting.Microservices/Volo/Abp/DefaultHttpExceptionStatusCodeFinder.cs @@ -0,0 +1,74 @@ +using System; +using System.Net; +using Microsoft.AspNetCore.Http; +using Microsoft.Extensions.Options; +using Volo.Abp.Authorization; +using Volo.Abp.DependencyInjection; +using Volo.Abp.Domain.Entities; +using Volo.Abp.ExceptionHandling; +using Volo.Abp.Validation; + +namespace Volo.Abp.AspNetCore.ExceptionHandling +{ + /// + /// 修改Abp 返回状态码 + /// 原因: 抛出BusinessException异常 不应该抛403异常 + /// + public class DefaultHttpExceptionStatusCodeFinder : IHttpExceptionStatusCodeFinder, ITransientDependency + { + protected AbpExceptionHttpStatusCodeOptions Options { get; } + + public DefaultHttpExceptionStatusCodeFinder( + IOptions options) + { + Options = options.Value; + } + + public HttpStatusCode GetStatusCode(HttpContext httpContext, Exception exception) + { + if (exception is IHasHttpStatusCode exceptionWithHttpStatusCode && + exceptionWithHttpStatusCode.HttpStatusCode > 0) + { + return (HttpStatusCode)exceptionWithHttpStatusCode.HttpStatusCode; + } + + if (exception is IHasErrorCode exceptionWithErrorCode && + !exceptionWithErrorCode.Code.IsNullOrWhiteSpace()) + { + if (Options.ErrorCodeToHttpStatusCodeMappings.TryGetValue(exceptionWithErrorCode.Code, out var status)) + { + return status; + } + } + + if (exception is AbpAuthorizationException) + { + return HttpStatusCode.Forbidden; + } + + //TODO: Handle SecurityException..? + + if (exception is AbpValidationException) + { + return HttpStatusCode.BadRequest; + } + + if (exception is EntityNotFoundException) + { + return HttpStatusCode.NotFound; + } + + if (exception is NotImplementedException) + { + return HttpStatusCode.NotImplemented; + } + + if (exception is IBusinessException) + { + return HttpStatusCode.InternalServerError; + } + + return HttpStatusCode.InternalServerError; + } + } +} \ No newline at end of file diff --git a/vben271/src/hooks/web/useSignalR.ts b/vben271/src/hooks/web/useSignalR.ts index 13869e50..5f45e0da 100644 --- a/vben271/src/hooks/web/useSignalR.ts +++ b/vben271/src/hooks/web/useSignalR.ts @@ -12,20 +12,7 @@ export function useSignalR() { //接收广播消息 connection.on('ReceiveBroadCastMessageAsync', ReceiveBroadCastMessageHandlerAsync); //开始连接 - connection.start().catch((err) => { - console.error('SignalR连接失败:' + err); - }); - // 当连接关闭时,尝试重新连接 - connection.onclose(() => { - try { - connection.start(); - console.info('尝试重新连接成功'); - } catch (err) { - setTimeout(() => { - connection = connectionsignalR(); - }, 5000); - } - }); + connection.start(); } /** @@ -34,10 +21,31 @@ export function useSignalR() { function connectionsignalR(): signalR.HubConnection { const userStore = useUserStoreWithOut(); const token = userStore.getToken; - const url = (import.meta.env.VITE_API_URL as string) + '/signalr/notification'; + + const url = (import.meta.env.VITE_Websocket_URL as string) + '/signalr/notification'; const connection = new signalR.HubConnectionBuilder() - .withUrl(url, { accessTokenFactory: () => token }) - .withAutomaticReconnect([1000, 3000, 5000, 8000, 10000, 15000]) + .withUrl(url, { + accessTokenFactory: () => token, + skipNegotiation: true, + transport: signalR.HttpTransportType.WebSockets, + }) + .withAutomaticReconnect({ + nextRetryDelayInMilliseconds: (retryContext) => { + //重连规则:重连次数<300:间隔1s;重试次数<3000:间隔3s;重试次数>3000:间隔30s + let count = retryContext.previousRetryCount / 300; + if (count < 1) { + //重试次数<300,间隔1s + return 1000; + } else if (count < 10) { + //重试次数>300:间隔5s + return 1000 * 5; + } //重试次数>3000:间隔30s + else { + return 1000 * 30; + } + }, + }) + .configureLogging(signalR.LogLevel.Error) .build(); return connection; } diff --git a/vben271/src/store/modules/permission.ts b/vben271/src/store/modules/permission.ts index 17e887ff..f9511e4f 100644 --- a/vben271/src/store/modules/permission.ts +++ b/vben271/src/store/modules/permission.ts @@ -176,7 +176,7 @@ export const usePermissionStore = defineStore({ // this.setFrontMenuList(menuList); // // Convert multi-level routing to level 2 routing // routes = flatMultiLevelRoutes(routes); - + debugger; const permissions = this.getPermCodeList; const roleRouteFilter = (route: AppRouteRecordRaw) => { const { meta } = route; From ec65ef463059f6a9a8d80981904133118344780a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=8E=8B=E5=86=9B?= <510423039@qq.com> Date: Sat, 6 Nov 2021 07:58:58 +0800 Subject: [PATCH 2/7] =?UTF-8?q?=E2=9C=A8=20=E8=B0=83=E6=95=B4=E9=A1=B9?= =?UTF-8?q?=E7=9B=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- aspnet-core/CompanyName.ProjectName.sln | 7 --- .../Lion.Abp.Domain/Lion.Abp.Domain.csproj | 12 ---- .../Lion.Abp.Domain/LionAbpDomainModule.cs | 13 ---- ...ame.DataDictionaryManagement.Domain.csproj | 1 - .../DataDictionaries/DataDictionaryManager.cs | 2 +- .../DataDictionaryDomainService.cs | 36 +++++++++++ .../DataDictionaryManagementDomainModule.cs | 6 +- ...agementDbContextModelCreatingExtensions.cs | 13 +--- ...tName.NotificationManagement.Domain.csproj | 1 - .../NotificationManagementDomainService.cs | 35 +++++++++-- .../INotificationManagementDbContext.cs | 2 +- .../NotificationManagementDbContext.cs | 2 +- ...agementDbContextModelCreatingExtensions.cs | 30 +-------- .../IdenityServerApiResourceManager.cs | 2 +- .../IdenityServerApiScopeManager.cs | 2 +- .../IdenityServerClientManager.cs | 2 +- .../IdentityServer/IdentityResourceManager.cs | 2 +- .../ProjectNameDomainModule.cs | 4 +- .../ProjectNameDomainService.cs} | 4 +- .../Users/AppUser.cs | 63 ------------------- .../Samples/SampleRepositoryTests.cs | 44 ------------- 21 files changed, 79 insertions(+), 204 deletions(-) delete mode 100644 aspnet-core/frameworks/Extensions/src/Lion.Abp.Domain/Lion.Abp.Domain.csproj delete mode 100644 aspnet-core/frameworks/Extensions/src/Lion.Abp.Domain/LionAbpDomainModule.cs create mode 100644 aspnet-core/modules/DataDictionaryManagement/src/CompanyName.ProjectName.DataDictionaryManagement.Domain/DataDictionaryDomainService.cs rename aspnet-core/{frameworks/Extensions/src/Lion.Abp.Domain/LionAbpDomainService.cs => services/src/CompanyName.ProjectName.Domain/ProjectNameDomainService.cs} (91%) delete mode 100644 aspnet-core/services/src/CompanyName.ProjectName.Domain/Users/AppUser.cs delete mode 100644 aspnet-core/services/test/CompanyName.ProjectName.EntityFrameworkCore.Tests/EntityFrameworkCore/Samples/SampleRepositoryTests.cs diff --git a/aspnet-core/CompanyName.ProjectName.sln b/aspnet-core/CompanyName.ProjectName.sln index 97d91200..085e899f 100644 --- a/aspnet-core/CompanyName.ProjectName.sln +++ b/aspnet-core/CompanyName.ProjectName.sln @@ -139,8 +139,6 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Lion.Abp.Cap", "frameworks\ EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Lion.Abp.Extension", "frameworks\Extensions\src\Lion.Abp.Extension\Lion.Abp.Extension.csproj", "{6848FA46-EFFF-4E0C-8EAA-145D8C440333}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Lion.Abp.Domain", "frameworks\Extensions\src\Lion.Abp.Domain\Lion.Abp.Domain.csproj", "{1EF5EF2B-323C-4DB0-B08A-37312A68E9DB}" -EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "gateways", "gateways", "{5C304CBC-F30D-413C-A0AF-8B6814A2D4A3}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CompanyName.ProjectName.PublicGateway", "gateways\CompanyName.ProjectName.PublicGateway\CompanyName.ProjectName.PublicGateway.csproj", "{870364BA-DD5C-4597-9047-BD8A0CA1CFBA}" @@ -331,10 +329,6 @@ Global {6848FA46-EFFF-4E0C-8EAA-145D8C440333}.Debug|Any CPU.Build.0 = Debug|Any CPU {6848FA46-EFFF-4E0C-8EAA-145D8C440333}.Release|Any CPU.ActiveCfg = Release|Any CPU {6848FA46-EFFF-4E0C-8EAA-145D8C440333}.Release|Any CPU.Build.0 = Release|Any CPU - {1EF5EF2B-323C-4DB0-B08A-37312A68E9DB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {1EF5EF2B-323C-4DB0-B08A-37312A68E9DB}.Debug|Any CPU.Build.0 = Debug|Any CPU - {1EF5EF2B-323C-4DB0-B08A-37312A68E9DB}.Release|Any CPU.ActiveCfg = Release|Any CPU - {1EF5EF2B-323C-4DB0-B08A-37312A68E9DB}.Release|Any CPU.Build.0 = Release|Any CPU {870364BA-DD5C-4597-9047-BD8A0CA1CFBA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {870364BA-DD5C-4597-9047-BD8A0CA1CFBA}.Debug|Any CPU.Build.0 = Debug|Any CPU {870364BA-DD5C-4597-9047-BD8A0CA1CFBA}.Release|Any CPU.ActiveCfg = Release|Any CPU @@ -412,7 +406,6 @@ Global {48D938A1-36E4-4AC1-9AF2-645CB75D4A05} = {1A57338B-65B1-4B8F-ABBD-83F4E8321D8F} {800F4482-EAC3-472B-AF07-53980D47AA41} = {11ED8435-B5AE-4BF3-9D4B-51FA1E4A18A6} {6848FA46-EFFF-4E0C-8EAA-145D8C440333} = {C4AC9352-C9F5-4096-8D73-13638232CFB9} - {1EF5EF2B-323C-4DB0-B08A-37312A68E9DB} = {C4AC9352-C9F5-4096-8D73-13638232CFB9} {870364BA-DD5C-4597-9047-BD8A0CA1CFBA} = {5C304CBC-F30D-413C-A0AF-8B6814A2D4A3} {D9108313-8D05-4F5F-9AA0-B443EC3374B6} = {5C304CBC-F30D-413C-A0AF-8B6814A2D4A3} {FC30B17B-F671-4E55-90C6-9F37E40B483D} = {CA9AC87F-097E-4F15-8393-4BC07735A5B0} diff --git a/aspnet-core/frameworks/Extensions/src/Lion.Abp.Domain/Lion.Abp.Domain.csproj b/aspnet-core/frameworks/Extensions/src/Lion.Abp.Domain/Lion.Abp.Domain.csproj deleted file mode 100644 index a34a15b3..00000000 --- a/aspnet-core/frameworks/Extensions/src/Lion.Abp.Domain/Lion.Abp.Domain.csproj +++ /dev/null @@ -1,12 +0,0 @@ - - - - net5.0 - - - - - - - - diff --git a/aspnet-core/frameworks/Extensions/src/Lion.Abp.Domain/LionAbpDomainModule.cs b/aspnet-core/frameworks/Extensions/src/Lion.Abp.Domain/LionAbpDomainModule.cs deleted file mode 100644 index 24820528..00000000 --- a/aspnet-core/frameworks/Extensions/src/Lion.Abp.Domain/LionAbpDomainModule.cs +++ /dev/null @@ -1,13 +0,0 @@ -using Volo.Abp.Domain; -using Volo.Abp.Modularity; -using Volo.Abp.ObjectMapping; - -namespace Lion.Abp.Domain -{ - [DependsOn( - typeof(AbpDddDomainModule), - typeof(AbpObjectMappingModule))] - public class LionAbpDomainModule : AbpModule - { - } -} \ No newline at end of file diff --git a/aspnet-core/modules/DataDictionaryManagement/src/CompanyName.ProjectName.DataDictionaryManagement.Domain/CompanyName.ProjectName.DataDictionaryManagement.Domain.csproj b/aspnet-core/modules/DataDictionaryManagement/src/CompanyName.ProjectName.DataDictionaryManagement.Domain/CompanyName.ProjectName.DataDictionaryManagement.Domain.csproj index 8a63951d..ab34e685 100644 --- a/aspnet-core/modules/DataDictionaryManagement/src/CompanyName.ProjectName.DataDictionaryManagement.Domain/CompanyName.ProjectName.DataDictionaryManagement.Domain.csproj +++ b/aspnet-core/modules/DataDictionaryManagement/src/CompanyName.ProjectName.DataDictionaryManagement.Domain/CompanyName.ProjectName.DataDictionaryManagement.Domain.csproj @@ -9,7 +9,6 @@ - diff --git a/aspnet-core/modules/DataDictionaryManagement/src/CompanyName.ProjectName.DataDictionaryManagement.Domain/DataDictionaries/DataDictionaryManager.cs b/aspnet-core/modules/DataDictionaryManagement/src/CompanyName.ProjectName.DataDictionaryManagement.Domain/DataDictionaries/DataDictionaryManager.cs index 6181438b..f435224a 100644 --- a/aspnet-core/modules/DataDictionaryManagement/src/CompanyName.ProjectName.DataDictionaryManagement.Domain/DataDictionaries/DataDictionaryManager.cs +++ b/aspnet-core/modules/DataDictionaryManagement/src/CompanyName.ProjectName.DataDictionaryManagement.Domain/DataDictionaries/DataDictionaryManager.cs @@ -8,7 +8,7 @@ using Volo.Abp.Domain.Services; namespace CompanyName.ProjectName.DataDictionaryManagement.DataDictionaries { - public class DataDictionaryManager : DomainService + public class DataDictionaryManager : DataDictionaryDomainService { private readonly IDataDictionaryRepository _dataDictionaryRepository; diff --git a/aspnet-core/modules/DataDictionaryManagement/src/CompanyName.ProjectName.DataDictionaryManagement.Domain/DataDictionaryDomainService.cs b/aspnet-core/modules/DataDictionaryManagement/src/CompanyName.ProjectName.DataDictionaryManagement.Domain/DataDictionaryDomainService.cs new file mode 100644 index 00000000..8787ce7a --- /dev/null +++ b/aspnet-core/modules/DataDictionaryManagement/src/CompanyName.ProjectName.DataDictionaryManagement.Domain/DataDictionaryDomainService.cs @@ -0,0 +1,36 @@ +using System; +using Microsoft.Extensions.DependencyInjection; +using Volo.Abp.Domain.Services; +using Volo.Abp.EventBus.Distributed; +using Volo.Abp.ObjectMapping; +using Volo.Abp.Uow; + +namespace CompanyName.ProjectName.DataDictionaryManagement +{ + public abstract class DataDictionaryDomainService : DomainService + { + protected Type ObjectMapperContext { get; set; } + + /// + /// 工作单元管理器 + /// + protected IUnitOfWorkManager UnitOfWorkManager => + LazyServiceProvider.LazyGetRequiredService(); + + /// + /// 分布式事件总线 + /// + protected IDistributedEventBus DistributedEventBus => + LazyServiceProvider.LazyGetRequiredService(); + + /// + /// 对象映射器 + /// + protected IObjectMapper ObjectMapper => LazyServiceProvider.LazyGetService( + provider => + ObjectMapperContext == null + ? provider.GetRequiredService() + : (IObjectMapper)provider.GetRequiredService( + typeof(IObjectMapper<>).MakeGenericType(ObjectMapperContext))); + } +} \ No newline at end of file diff --git a/aspnet-core/modules/DataDictionaryManagement/src/CompanyName.ProjectName.DataDictionaryManagement.Domain/DataDictionaryManagementDomainModule.cs b/aspnet-core/modules/DataDictionaryManagement/src/CompanyName.ProjectName.DataDictionaryManagement.Domain/DataDictionaryManagementDomainModule.cs index a4155a49..0cc1c567 100644 --- a/aspnet-core/modules/DataDictionaryManagement/src/CompanyName.ProjectName.DataDictionaryManagement.Domain/DataDictionaryManagementDomainModule.cs +++ b/aspnet-core/modules/DataDictionaryManagement/src/CompanyName.ProjectName.DataDictionaryManagement.Domain/DataDictionaryManagementDomainModule.cs @@ -1,13 +1,11 @@ -using Lion.Abp.Domain; -using Volo.Abp.Domain; +using Volo.Abp.Domain; using Volo.Abp.Modularity; namespace CompanyName.ProjectName.DataDictionaryManagement { [DependsOn( typeof(AbpDddDomainModule), - typeof(DataDictionaryManagementDomainSharedModule), - typeof(LionAbpDomainModule) + typeof(DataDictionaryManagementDomainSharedModule) )] public class DataDictionaryManagementDomainModule : AbpModule { diff --git a/aspnet-core/modules/DataDictionaryManagement/src/CompanyName.ProjectName.DataDictionaryManagement.EntityFrameworkCore/EntityFrameworkCore/DataDictionaryManagementDbContextModelCreatingExtensions.cs b/aspnet-core/modules/DataDictionaryManagement/src/CompanyName.ProjectName.DataDictionaryManagement.EntityFrameworkCore/EntityFrameworkCore/DataDictionaryManagementDbContextModelCreatingExtensions.cs index 359394c4..15c1fc86 100644 --- a/aspnet-core/modules/DataDictionaryManagement/src/CompanyName.ProjectName.DataDictionaryManagement.EntityFrameworkCore/EntityFrameworkCore/DataDictionaryManagementDbContextModelCreatingExtensions.cs +++ b/aspnet-core/modules/DataDictionaryManagement/src/CompanyName.ProjectName.DataDictionaryManagement.EntityFrameworkCore/EntityFrameworkCore/DataDictionaryManagementDbContextModelCreatingExtensions.cs @@ -9,20 +9,9 @@ namespace CompanyName.ProjectName.DataDictionaryManagement.EntityFrameworkCore public static class DataDictionaryManagementDbContextModelCreatingExtensions { public static void ConfigureDataDictionaryManagement( - this ModelBuilder builder, - Action optionsAction = null) + this ModelBuilder builder) { Check.NotNull(builder, nameof(builder)); - - var options = new DataDictionaryManagementModelBuilderConfigurationOptions( - DataDictionaryManagementDbProperties.DbTablePrefix, - DataDictionaryManagementDbProperties.DbSchema - ); - - optionsAction?.Invoke(options); - - - builder.Entity(b => { diff --git a/aspnet-core/modules/NotificationManagement/src/CompanyName.ProjectName.NotificationManagement.Domain/CompanyName.ProjectName.NotificationManagement.Domain.csproj b/aspnet-core/modules/NotificationManagement/src/CompanyName.ProjectName.NotificationManagement.Domain/CompanyName.ProjectName.NotificationManagement.Domain.csproj index b68988eb..0fb22869 100644 --- a/aspnet-core/modules/NotificationManagement/src/CompanyName.ProjectName.NotificationManagement.Domain/CompanyName.ProjectName.NotificationManagement.Domain.csproj +++ b/aspnet-core/modules/NotificationManagement/src/CompanyName.ProjectName.NotificationManagement.Domain/CompanyName.ProjectName.NotificationManagement.Domain.csproj @@ -9,7 +9,6 @@ - diff --git a/aspnet-core/modules/NotificationManagement/src/CompanyName.ProjectName.NotificationManagement.Domain/NotificationManagementDomainService.cs b/aspnet-core/modules/NotificationManagement/src/CompanyName.ProjectName.NotificationManagement.Domain/NotificationManagementDomainService.cs index 322431b5..3a23b73a 100644 --- a/aspnet-core/modules/NotificationManagement/src/CompanyName.ProjectName.NotificationManagement.Domain/NotificationManagementDomainService.cs +++ b/aspnet-core/modules/NotificationManagement/src/CompanyName.ProjectName.NotificationManagement.Domain/NotificationManagementDomainService.cs @@ -1,13 +1,36 @@ using System; -using Lion.Abp.Domain; +using Microsoft.Extensions.DependencyInjection; +using Volo.Abp.Domain.Services; +using Volo.Abp.EventBus.Distributed; +using Volo.Abp.ObjectMapping; +using Volo.Abp.Uow; namespace CompanyName.ProjectName.NotificationManagement { - public abstract class NotificationManagementDomainService : LionAbpDomainService + public abstract class NotificationManagementDomainService : DomainService { - protected NotificationManagementDomainService() - { - ObjectMapperContext = typeof(NotificationManagementDomainModule); - } + protected Type ObjectMapperContext { get; set; } + + /// + /// 工作单元管理器 + /// + protected IUnitOfWorkManager UnitOfWorkManager => + LazyServiceProvider.LazyGetRequiredService(); + + /// + /// 分布式事件总线 + /// + protected IDistributedEventBus DistributedEventBus => + LazyServiceProvider.LazyGetRequiredService(); + + /// + /// 对象映射器 + /// + protected IObjectMapper ObjectMapper => LazyServiceProvider.LazyGetService( + provider => + ObjectMapperContext == null + ? provider.GetRequiredService() + : (IObjectMapper)provider.GetRequiredService( + typeof(IObjectMapper<>).MakeGenericType(ObjectMapperContext))); } } \ No newline at end of file diff --git a/aspnet-core/modules/NotificationManagement/src/CompanyName.ProjectName.NotificationManagement.EntityFrameworkCore/EntityFrameworkCore/INotificationManagementDbContext.cs b/aspnet-core/modules/NotificationManagement/src/CompanyName.ProjectName.NotificationManagement.EntityFrameworkCore/EntityFrameworkCore/INotificationManagementDbContext.cs index 0911100c..57f40c57 100644 --- a/aspnet-core/modules/NotificationManagement/src/CompanyName.ProjectName.NotificationManagement.EntityFrameworkCore/EntityFrameworkCore/INotificationManagementDbContext.cs +++ b/aspnet-core/modules/NotificationManagement/src/CompanyName.ProjectName.NotificationManagement.EntityFrameworkCore/EntityFrameworkCore/INotificationManagementDbContext.cs @@ -12,6 +12,6 @@ namespace CompanyName.ProjectName.NotificationManagement.EntityFrameworkCore * DbSet Questions { get; } */ - DbSet Questions { get; set; } + DbSet Notifications { get; set; } } } \ No newline at end of file diff --git a/aspnet-core/modules/NotificationManagement/src/CompanyName.ProjectName.NotificationManagement.EntityFrameworkCore/EntityFrameworkCore/NotificationManagementDbContext.cs b/aspnet-core/modules/NotificationManagement/src/CompanyName.ProjectName.NotificationManagement.EntityFrameworkCore/EntityFrameworkCore/NotificationManagementDbContext.cs index 645a2b9b..6fc23c53 100644 --- a/aspnet-core/modules/NotificationManagement/src/CompanyName.ProjectName.NotificationManagement.EntityFrameworkCore/EntityFrameworkCore/NotificationManagementDbContext.cs +++ b/aspnet-core/modules/NotificationManagement/src/CompanyName.ProjectName.NotificationManagement.EntityFrameworkCore/EntityFrameworkCore/NotificationManagementDbContext.cs @@ -17,7 +17,7 @@ namespace CompanyName.ProjectName.NotificationManagement.EntityFrameworkCore { } - public DbSet Questions { get; set; } + public DbSet Notifications { get; set; } protected override void OnModelCreating(ModelBuilder builder) { diff --git a/aspnet-core/modules/NotificationManagement/src/CompanyName.ProjectName.NotificationManagement.EntityFrameworkCore/EntityFrameworkCore/NotificationManagementDbContextModelCreatingExtensions.cs b/aspnet-core/modules/NotificationManagement/src/CompanyName.ProjectName.NotificationManagement.EntityFrameworkCore/EntityFrameworkCore/NotificationManagementDbContextModelCreatingExtensions.cs index e57ffed2..da6dc690 100644 --- a/aspnet-core/modules/NotificationManagement/src/CompanyName.ProjectName.NotificationManagement.EntityFrameworkCore/EntityFrameworkCore/NotificationManagementDbContextModelCreatingExtensions.cs +++ b/aspnet-core/modules/NotificationManagement/src/CompanyName.ProjectName.NotificationManagement.EntityFrameworkCore/EntityFrameworkCore/NotificationManagementDbContextModelCreatingExtensions.cs @@ -9,38 +9,10 @@ namespace CompanyName.ProjectName.NotificationManagement.EntityFrameworkCore public static class NotificationManagementDbContextModelCreatingExtensions { public static void ConfigureNotificationManagement( - this ModelBuilder builder, - Action optionsAction = null) + this ModelBuilder builder) { Check.NotNull(builder, nameof(builder)); - var options = new NotificationManagementModelBuilderConfigurationOptions( - NotificationManagementDbProperties.DbTablePrefix, - NotificationManagementDbProperties.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.Entity(b => { b.ToTable(NotificationManagementDbProperties.DbTablePrefix + nameof(Notification), diff --git a/aspnet-core/services/src/CompanyName.ProjectName.Domain/IdentityServer/IdenityServerApiResourceManager.cs b/aspnet-core/services/src/CompanyName.ProjectName.Domain/IdentityServer/IdenityServerApiResourceManager.cs index 232d627d..71f46521 100644 --- a/aspnet-core/services/src/CompanyName.ProjectName.Domain/IdentityServer/IdenityServerApiResourceManager.cs +++ b/aspnet-core/services/src/CompanyName.ProjectName.Domain/IdentityServer/IdenityServerApiResourceManager.cs @@ -11,7 +11,7 @@ using IdentityModel; namespace CompanyName.ProjectName.IdentityServer { - public class IdenityServerApiResourceManager : DomainService + public class IdenityServerApiResourceManager : ProjectNameDomainService { private readonly IApiResourceRepository _apiResourceRepository; diff --git a/aspnet-core/services/src/CompanyName.ProjectName.Domain/IdentityServer/IdenityServerApiScopeManager.cs b/aspnet-core/services/src/CompanyName.ProjectName.Domain/IdentityServer/IdenityServerApiScopeManager.cs index 6900348a..1a45b37d 100644 --- a/aspnet-core/services/src/CompanyName.ProjectName.Domain/IdentityServer/IdenityServerApiScopeManager.cs +++ b/aspnet-core/services/src/CompanyName.ProjectName.Domain/IdentityServer/IdenityServerApiScopeManager.cs @@ -8,7 +8,7 @@ using Volo.Abp.IdentityServer.ApiScopes; namespace CompanyName.ProjectName.IdentityServer { - public class IdenityServerApiScopeManager : DomainService + public class IdenityServerApiScopeManager : ProjectNameDomainService { private readonly IApiScopeRepository _apiScopeRepository; diff --git a/aspnet-core/services/src/CompanyName.ProjectName.Domain/IdentityServer/IdenityServerClientManager.cs b/aspnet-core/services/src/CompanyName.ProjectName.Domain/IdentityServer/IdenityServerClientManager.cs index a7ed4a31..6b34e9e5 100644 --- a/aspnet-core/services/src/CompanyName.ProjectName.Domain/IdentityServer/IdenityServerClientManager.cs +++ b/aspnet-core/services/src/CompanyName.ProjectName.Domain/IdentityServer/IdenityServerClientManager.cs @@ -10,7 +10,7 @@ using Volo.Abp.IdentityServer.Clients; namespace CompanyName.ProjectName.IdentityServer { - public class IdenityServerClientManager : DomainService + public class IdenityServerClientManager : ProjectNameDomainService { private readonly IClientRepository _clientRepository; diff --git a/aspnet-core/services/src/CompanyName.ProjectName.Domain/IdentityServer/IdentityResourceManager.cs b/aspnet-core/services/src/CompanyName.ProjectName.Domain/IdentityServer/IdentityResourceManager.cs index 4e1a6826..ba93d0fb 100644 --- a/aspnet-core/services/src/CompanyName.ProjectName.Domain/IdentityServer/IdentityResourceManager.cs +++ b/aspnet-core/services/src/CompanyName.ProjectName.Domain/IdentityServer/IdentityResourceManager.cs @@ -8,7 +8,7 @@ using Volo.Abp.IdentityServer.IdentityResources; namespace CompanyName.ProjectName.IdentityServer { - public class IdentityResourceManager : DomainService + public class IdentityResourceManager : ProjectNameDomainService { private readonly IIdentityResourceRepository _identityResourceRepository; diff --git a/aspnet-core/services/src/CompanyName.ProjectName.Domain/ProjectNameDomainModule.cs b/aspnet-core/services/src/CompanyName.ProjectName.Domain/ProjectNameDomainModule.cs index b12d04a3..3e48701b 100644 --- a/aspnet-core/services/src/CompanyName.ProjectName.Domain/ProjectNameDomainModule.cs +++ b/aspnet-core/services/src/CompanyName.ProjectName.Domain/ProjectNameDomainModule.cs @@ -3,7 +3,6 @@ using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.DependencyInjection.Extensions; using CompanyName.ProjectName.MultiTenancy; using CompanyName.ProjectName.NotificationManagement; -using Lion.Abp.Domain; using Volo.Abp.AuditLogging; using Volo.Abp.BackgroundJobs; using Volo.Abp.Emailing; @@ -32,8 +31,7 @@ namespace CompanyName.ProjectName typeof(AbpTenantManagementDomainModule), typeof(AbpEmailingModule), typeof(DataDictionaryManagementDomainModule), - typeof(NotificationManagementDomainModule), - typeof(LionAbpDomainModule) + typeof(NotificationManagementDomainModule) )] public class ProjectNameDomainModule : AbpModule { diff --git a/aspnet-core/frameworks/Extensions/src/Lion.Abp.Domain/LionAbpDomainService.cs b/aspnet-core/services/src/CompanyName.ProjectName.Domain/ProjectNameDomainService.cs similarity index 91% rename from aspnet-core/frameworks/Extensions/src/Lion.Abp.Domain/LionAbpDomainService.cs rename to aspnet-core/services/src/CompanyName.ProjectName.Domain/ProjectNameDomainService.cs index 1a3f4c75..e400064f 100644 --- a/aspnet-core/frameworks/Extensions/src/Lion.Abp.Domain/LionAbpDomainService.cs +++ b/aspnet-core/services/src/CompanyName.ProjectName.Domain/ProjectNameDomainService.cs @@ -5,9 +5,9 @@ using Volo.Abp.EventBus.Distributed; using Volo.Abp.ObjectMapping; using Volo.Abp.Uow; -namespace Lion.Abp.Domain +namespace CompanyName.ProjectName { - public abstract class LionAbpDomainService : DomainService + public abstract class ProjectNameDomainService : DomainService { protected Type ObjectMapperContext { get; set; } diff --git a/aspnet-core/services/src/CompanyName.ProjectName.Domain/Users/AppUser.cs b/aspnet-core/services/src/CompanyName.ProjectName.Domain/Users/AppUser.cs deleted file mode 100644 index 1093d497..00000000 --- a/aspnet-core/services/src/CompanyName.ProjectName.Domain/Users/AppUser.cs +++ /dev/null @@ -1,63 +0,0 @@ -using System; -using Volo.Abp.Domain.Entities.Auditing; -using Volo.Abp.Users; - -namespace CompanyName.ProjectName.Users -{ - /* This entity shares the same table/collection ("AbpUsers" by default) with the - * IdentityUser entity of the Identity module. - * - * - You can define your custom properties into this class. - * - You never create or delete this entity, because it is Identity module's job. - * - You can query users from database with this entity. - * - You can update values of your custom properties. - */ - public class AppUser : FullAuditedAggregateRoot, IUser - { - #region Base properties - - /* These properties are shared with the IdentityUser entity of the Identity module. - * Do not change these properties through this class. Instead, use Identity module - * services (like IdentityUserManager) to change them. - * So, this properties are designed as read only! - */ - - public virtual Guid? TenantId { get; private set; } - - public virtual string UserName { get; private set; } - - public virtual string Name { get; private set; } - - public virtual string Surname { get; private set; } - - public virtual string Email { get; private set; } - - public virtual bool EmailConfirmed { get; private set; } - - public virtual string PhoneNumber { get; private set; } - - public virtual bool PhoneNumberConfirmed { get; private set; } - - #endregion - - /* Add your own properties here. Example: - * - * public string MyProperty { get; set; } - * - * If you add a property and using the EF Core, remember these; - * - * 1. Update ProjectNameDbContext.OnModelCreating - * to configure the mapping for your new property - * 2. Update ProjectNameEfCoreEntityExtensionMappings to extend the IdentityUser entity - * and add your new property to the migration. - * 3. Use the Add-Migration to add a new database migration. - * 4. Run the .DbMigrator project (or use the Update-Database command) to apply - * schema change to the database. - */ - - private AppUser() - { - - } - } -} diff --git a/aspnet-core/services/test/CompanyName.ProjectName.EntityFrameworkCore.Tests/EntityFrameworkCore/Samples/SampleRepositoryTests.cs b/aspnet-core/services/test/CompanyName.ProjectName.EntityFrameworkCore.Tests/EntityFrameworkCore/Samples/SampleRepositoryTests.cs deleted file mode 100644 index 7c3c49fd..00000000 --- a/aspnet-core/services/test/CompanyName.ProjectName.EntityFrameworkCore.Tests/EntityFrameworkCore/Samples/SampleRepositoryTests.cs +++ /dev/null @@ -1,44 +0,0 @@ -using Microsoft.EntityFrameworkCore; -using CompanyName.ProjectName.Users; -using Shouldly; -using System; -using System.Linq; -using System.Threading.Tasks; -using Volo.Abp.Domain.Repositories; -using Xunit; - -namespace CompanyName.ProjectName.EntityFrameworkCore.Samples -{ - /* This is just an example test class. - * Normally, you don't test ABP framework code - * (like default AppUser repository IRepository here). - * Only test your custom repository methods. - */ - public class SampleRepositoryTests : ProjectNameEntityFrameworkCoreTestBase - { - private readonly IRepository _appUserRepository; - - public SampleRepositoryTests() - { - _appUserRepository = GetRequiredService>(); - } - - [Fact] - public async Task Should_Query_AppUser() - { - /* Need to manually start Unit Of Work because - * FirstOrDefaultAsync should be executed while db connection / context is available. - */ - await WithUnitOfWorkAsync(async () => - { - //Act - var adminUser = await (await _appUserRepository.GetQueryableAsync()) - .Where(u => u.UserName == "admin") - .FirstOrDefaultAsync(); - - //Assert - adminUser.ShouldNotBeNull(); - }); - } - } -} From 1004fd8e16c66f9a54756ce008add2f9bf17866c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=8E=8B=E5=86=9B?= <510423039@qq.com> Date: Sat, 6 Nov 2021 08:26:36 +0800 Subject: [PATCH 3/7] =?UTF-8?q?=E2=9C=A8=20=E5=88=A0=E9=99=A4DbMigrations?= =?UTF-8?q?=E6=A8=A1=E5=9D=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- aspnet-core/CompanyName.ProjectName.sln | 7 --- ...taDictionaryManagement.HttpApi.Host.csproj | 1 - ...ompanyName.ProjectName.HttpApi.Host.csproj | 2 +- .../ProjectNameHttpApiHostModule.cs | 2 +- .../appsettings.Development.json | 2 +- ...panyName.ProjectName.IdentityServer.csproj | 2 +- .../ProjectNameIdentityServerModule.cs | 2 +- .../appsettings.Development.json | 2 +- .../CompanyName.ProjectName.DbMigrator.csproj | 2 +- .../ProjectNameDbMigratorModule.cs | 2 +- .../appsettings.json | 2 +- ...me.EntityFrameworkCore.DbMigrations.csproj | 21 -------- ...meEntityFrameworkCoreDbMigrationsModule.cs | 16 ------ .../ProjectNameMigrationsDbContext.cs | 54 ------------------- ...ame.ProjectName.EntityFrameworkCore.csproj | 45 +++++++++------- ...rameworkCoreProjectNameDbSchemaMigrator.cs | 4 +- .../ProjectNameDbContext.cs | 20 ++++++- .../ProjectNameMigrationsDbContextFactory.cs | 8 +-- .../20211106001555_Init.Designer.cs} | 19 +------ .../Migrations/20211106001555_Init.cs} | 0 .../ProjectNameDbContextModelSnapshot.cs} | 19 +------ ...ojectName.EntityFrameworkCore.Tests.csproj | 2 +- ...rojectNameEntityFrameworkCoreTestModule.cs | 6 +-- 23 files changed, 67 insertions(+), 173 deletions(-) delete mode 100644 aspnet-core/services/src/CompanyName.ProjectName.EntityFrameworkCore.DbMigrations/CompanyName.ProjectName.EntityFrameworkCore.DbMigrations.csproj delete mode 100644 aspnet-core/services/src/CompanyName.ProjectName.EntityFrameworkCore.DbMigrations/EntityFrameworkCore/ProjectNameEntityFrameworkCoreDbMigrationsModule.cs delete mode 100644 aspnet-core/services/src/CompanyName.ProjectName.EntityFrameworkCore.DbMigrations/EntityFrameworkCore/ProjectNameMigrationsDbContext.cs rename aspnet-core/services/src/{CompanyName.ProjectName.EntityFrameworkCore.DbMigrations => CompanyName.ProjectName.EntityFrameworkCore}/EntityFrameworkCore/EntityFrameworkCoreProjectNameDbSchemaMigrator.cs (93%) rename aspnet-core/services/src/{CompanyName.ProjectName.EntityFrameworkCore.DbMigrations => CompanyName.ProjectName.EntityFrameworkCore}/EntityFrameworkCore/ProjectNameMigrationsDbContextFactory.cs (82%) rename aspnet-core/services/src/{CompanyName.ProjectName.EntityFrameworkCore.DbMigrations/Migrations/20210903085042_Init.Designer.cs => CompanyName.ProjectName.EntityFrameworkCore/Migrations/20211106001555_Init.Designer.cs} (99%) rename aspnet-core/services/src/{CompanyName.ProjectName.EntityFrameworkCore.DbMigrations/Migrations/20210903085042_Init.cs => CompanyName.ProjectName.EntityFrameworkCore/Migrations/20211106001555_Init.cs} (100%) rename aspnet-core/services/src/{CompanyName.ProjectName.EntityFrameworkCore.DbMigrations/Migrations/ProjectNameMigrationsDbContextModelSnapshot.cs => CompanyName.ProjectName.EntityFrameworkCore/Migrations/ProjectNameDbContextModelSnapshot.cs} (99%) diff --git a/aspnet-core/CompanyName.ProjectName.sln b/aspnet-core/CompanyName.ProjectName.sln index 085e899f..180e541f 100644 --- a/aspnet-core/CompanyName.ProjectName.sln +++ b/aspnet-core/CompanyName.ProjectName.sln @@ -15,8 +15,6 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "test", "test", "{04DBDB01-7 EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "CompanyName.ProjectName.Application.Tests", "services\test\CompanyName.ProjectName.Application.Tests\CompanyName.ProjectName.Application.Tests.csproj", "{50B2631D-129C-47B3-A587-029CCD6099BC}" EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "CompanyName.ProjectName.EntityFrameworkCore.DbMigrations", "services\src\CompanyName.ProjectName.EntityFrameworkCore.DbMigrations\CompanyName.ProjectName.EntityFrameworkCore.DbMigrations.csproj", "{0372FA84-C517-4EB3-9A9F-B9ACAC0CA5E0}" -EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "CompanyName.ProjectName.Domain.Shared", "services\src\CompanyName.ProjectName.Domain.Shared\CompanyName.ProjectName.Domain.Shared.csproj", "{42F719ED-8413-4895-B5B4-5AB56079BC66}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "CompanyName.ProjectName.Application.Contracts", "services\src\CompanyName.ProjectName.Application.Contracts\CompanyName.ProjectName.Application.Contracts.csproj", "{520659C8-C734-4298-A3DA-B539DB9DFC0B}" @@ -169,10 +167,6 @@ Global {50B2631D-129C-47B3-A587-029CCD6099BC}.Debug|Any CPU.Build.0 = Debug|Any CPU {50B2631D-129C-47B3-A587-029CCD6099BC}.Release|Any CPU.ActiveCfg = Release|Any CPU {50B2631D-129C-47B3-A587-029CCD6099BC}.Release|Any CPU.Build.0 = Release|Any CPU - {0372FA84-C517-4EB3-9A9F-B9ACAC0CA5E0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {0372FA84-C517-4EB3-9A9F-B9ACAC0CA5E0}.Debug|Any CPU.Build.0 = Debug|Any CPU - {0372FA84-C517-4EB3-9A9F-B9ACAC0CA5E0}.Release|Any CPU.ActiveCfg = Release|Any CPU - {0372FA84-C517-4EB3-9A9F-B9ACAC0CA5E0}.Release|Any CPU.Build.0 = Release|Any CPU {42F719ED-8413-4895-B5B4-5AB56079BC66}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {42F719ED-8413-4895-B5B4-5AB56079BC66}.Debug|Any CPU.Build.0 = Debug|Any CPU {42F719ED-8413-4895-B5B4-5AB56079BC66}.Release|Any CPU.ActiveCfg = Release|Any CPU @@ -352,7 +346,6 @@ Global {CA9AC87F-097E-4F15-8393-4BC07735A5B0} = {2C861ADD-76E9-4B3B-8A3C-638EBB67D683} {04DBDB01-70F4-4E06-B468-8F87850B22BE} = {2C861ADD-76E9-4B3B-8A3C-638EBB67D683} {50B2631D-129C-47B3-A587-029CCD6099BC} = {04DBDB01-70F4-4E06-B468-8F87850B22BE} - {0372FA84-C517-4EB3-9A9F-B9ACAC0CA5E0} = {CA9AC87F-097E-4F15-8393-4BC07735A5B0} {42F719ED-8413-4895-B5B4-5AB56079BC66} = {CA9AC87F-097E-4F15-8393-4BC07735A5B0} {520659C8-C734-4298-A3DA-B539DB9DFC0B} = {CA9AC87F-097E-4F15-8393-4BC07735A5B0} {4164BDF7-F527-4E85-9CE6-E3C2D7426A27} = {CA9AC87F-097E-4F15-8393-4BC07735A5B0} diff --git a/aspnet-core/modules/DataDictionaryManagement/host/CompanyName.ProjectName.DataDictionaryManagement.HttpApi.Host/CompanyName.ProjectName.DataDictionaryManagement.HttpApi.Host.csproj b/aspnet-core/modules/DataDictionaryManagement/host/CompanyName.ProjectName.DataDictionaryManagement.HttpApi.Host/CompanyName.ProjectName.DataDictionaryManagement.HttpApi.Host.csproj index 0c612dbf..cc572c13 100644 --- a/aspnet-core/modules/DataDictionaryManagement/host/CompanyName.ProjectName.DataDictionaryManagement.HttpApi.Host/CompanyName.ProjectName.DataDictionaryManagement.HttpApi.Host.csproj +++ b/aspnet-core/modules/DataDictionaryManagement/host/CompanyName.ProjectName.DataDictionaryManagement.HttpApi.Host/CompanyName.ProjectName.DataDictionaryManagement.HttpApi.Host.csproj @@ -15,7 +15,6 @@ - diff --git a/aspnet-core/services/host/CompanyName.ProjectName.HttpApi.Host/CompanyName.ProjectName.HttpApi.Host.csproj b/aspnet-core/services/host/CompanyName.ProjectName.HttpApi.Host/CompanyName.ProjectName.HttpApi.Host.csproj index d9d44fac..f291110c 100644 --- a/aspnet-core/services/host/CompanyName.ProjectName.HttpApi.Host/CompanyName.ProjectName.HttpApi.Host.csproj +++ b/aspnet-core/services/host/CompanyName.ProjectName.HttpApi.Host/CompanyName.ProjectName.HttpApi.Host.csproj @@ -39,7 +39,7 @@ - + diff --git a/aspnet-core/services/host/CompanyName.ProjectName.HttpApi.Host/ProjectNameHttpApiHostModule.cs b/aspnet-core/services/host/CompanyName.ProjectName.HttpApi.Host/ProjectNameHttpApiHostModule.cs index b6ee4e6d..c477a14d 100644 --- a/aspnet-core/services/host/CompanyName.ProjectName.HttpApi.Host/ProjectNameHttpApiHostModule.cs +++ b/aspnet-core/services/host/CompanyName.ProjectName.HttpApi.Host/ProjectNameHttpApiHostModule.cs @@ -52,7 +52,7 @@ namespace CompanyName.ProjectName typeof(AbpCachingStackExchangeRedisModule), typeof(AbpAspNetCoreMvcUiMultiTenancyModule), typeof(ProjectNameApplicationModule), - typeof(ProjectNameEntityFrameworkCoreDbMigrationsModule), + typeof(ProjectNameEntityFrameworkCoreModule), typeof(AbpAspNetCoreSerilogModule), typeof(AbpSwashbuckleModule), typeof(AbpAccountWebModule), diff --git a/aspnet-core/services/host/CompanyName.ProjectName.HttpApi.Host/appsettings.Development.json b/aspnet-core/services/host/CompanyName.ProjectName.HttpApi.Host/appsettings.Development.json index 8690b060..cb3e6c63 100644 --- a/aspnet-core/services/host/CompanyName.ProjectName.HttpApi.Host/appsettings.Development.json +++ b/aspnet-core/services/host/CompanyName.ProjectName.HttpApi.Host/appsettings.Development.json @@ -15,7 +15,7 @@ "CorsOrigins": "https://*.ProjectName.com,http://localhost:4200,http://localhost:3100" }, "ConnectionStrings": { - "Default": "Data Source=localhost;Database=CompanyNameProjectNameDB;uid=root;pwd=1q2w3E*;charset=utf8mb4;Allow User Variables=true;AllowLoadLocalInfile=true" + "Default": "Data Source=localhost;Database=CompanyNameProjectNameDB20211106;uid=root;pwd=1q2w3E*;charset=utf8mb4;Allow User Variables=true;AllowLoadLocalInfile=true" }, "Redis": { "Configuration": "localhost,password=mypassword,defaultdatabase=1" diff --git a/aspnet-core/services/host/CompanyName.ProjectName.IdentityServer/CompanyName.ProjectName.IdentityServer.csproj b/aspnet-core/services/host/CompanyName.ProjectName.IdentityServer/CompanyName.ProjectName.IdentityServer.csproj index aae881e0..41e5f41f 100644 --- a/aspnet-core/services/host/CompanyName.ProjectName.IdentityServer/CompanyName.ProjectName.IdentityServer.csproj +++ b/aspnet-core/services/host/CompanyName.ProjectName.IdentityServer/CompanyName.ProjectName.IdentityServer.csproj @@ -45,7 +45,7 @@ - + diff --git a/aspnet-core/services/host/CompanyName.ProjectName.IdentityServer/ProjectNameIdentityServerModule.cs b/aspnet-core/services/host/CompanyName.ProjectName.IdentityServer/ProjectNameIdentityServerModule.cs index 6af8c091..ded2833d 100644 --- a/aspnet-core/services/host/CompanyName.ProjectName.IdentityServer/ProjectNameIdentityServerModule.cs +++ b/aspnet-core/services/host/CompanyName.ProjectName.IdentityServer/ProjectNameIdentityServerModule.cs @@ -45,7 +45,7 @@ namespace CompanyName.ProjectName typeof(AbpAccountWebIdentityServerModule), typeof(AbpAccountApplicationModule), typeof(AbpAspNetCoreMvcUiBasicThemeModule), - typeof(ProjectNameEntityFrameworkCoreDbMigrationsModule), + typeof(ProjectNameEntityFrameworkCoreModule), typeof(AbpAspNetCoreSerilogModule) )] public class ProjectNameIdentityServerModule : AbpModule diff --git a/aspnet-core/services/host/CompanyName.ProjectName.IdentityServer/appsettings.Development.json b/aspnet-core/services/host/CompanyName.ProjectName.IdentityServer/appsettings.Development.json index 03748433..0b328417 100644 --- a/aspnet-core/services/host/CompanyName.ProjectName.IdentityServer/appsettings.Development.json +++ b/aspnet-core/services/host/CompanyName.ProjectName.IdentityServer/appsettings.Development.json @@ -6,7 +6,7 @@ "RedirectAllowedUrls": "http://localhost:4200,https://localhost:44307" }, "ConnectionStrings": { - "Default": "Data Source=localhost;Database=CompanyNameProjectNameDB;uid=root;pwd=1q2w3E*;charset=utf8mb4;Allow User Variables=true;AllowLoadLocalInfile=true" + "Default": "Data Source=localhost;Database=CompanyNameProjectNameDB20211106;uid=root;pwd=1q2w3E*;charset=utf8mb4;Allow User Variables=true;AllowLoadLocalInfile=true" }, "Redis": { "Configuration": "localhost,password=mypassword,defaultdatabase=1" diff --git a/aspnet-core/services/src/CompanyName.ProjectName.DbMigrator/CompanyName.ProjectName.DbMigrator.csproj b/aspnet-core/services/src/CompanyName.ProjectName.DbMigrator/CompanyName.ProjectName.DbMigrator.csproj index 871713a1..8f036463 100644 --- a/aspnet-core/services/src/CompanyName.ProjectName.DbMigrator/CompanyName.ProjectName.DbMigrator.csproj +++ b/aspnet-core/services/src/CompanyName.ProjectName.DbMigrator/CompanyName.ProjectName.DbMigrator.csproj @@ -28,7 +28,7 @@ - + diff --git a/aspnet-core/services/src/CompanyName.ProjectName.DbMigrator/ProjectNameDbMigratorModule.cs b/aspnet-core/services/src/CompanyName.ProjectName.DbMigrator/ProjectNameDbMigratorModule.cs index 7a87799f..001cba66 100644 --- a/aspnet-core/services/src/CompanyName.ProjectName.DbMigrator/ProjectNameDbMigratorModule.cs +++ b/aspnet-core/services/src/CompanyName.ProjectName.DbMigrator/ProjectNameDbMigratorModule.cs @@ -7,7 +7,7 @@ namespace CompanyName.ProjectName.DbMigrator { [DependsOn( typeof(AbpAutofacModule), - typeof(ProjectNameEntityFrameworkCoreDbMigrationsModule), + typeof(ProjectNameEntityFrameworkCoreModule), typeof(ProjectNameApplicationContractsModule) )] public class ProjectNameDbMigratorModule : AbpModule diff --git a/aspnet-core/services/src/CompanyName.ProjectName.DbMigrator/appsettings.json b/aspnet-core/services/src/CompanyName.ProjectName.DbMigrator/appsettings.json index 24b4a3a1..9b330dd2 100644 --- a/aspnet-core/services/src/CompanyName.ProjectName.DbMigrator/appsettings.json +++ b/aspnet-core/services/src/CompanyName.ProjectName.DbMigrator/appsettings.json @@ -1,5 +1,5 @@ { "ConnectionStrings": { - "Default": "Data Source=120.24.194.14;Database=CompanyNameProjectNameDB1;uid=root;pwd=1q2w3E*;charset=utf8mb4;Allow User Variables=true;AllowLoadLocalInfile=true" + "Default": "Data Source=localhost;Database=CompanyNameProjectNameDB20211106;uid=root;pwd=1q2w3E*;charset=utf8mb4;Allow User Variables=true;AllowLoadLocalInfile=true" } } \ No newline at end of file diff --git a/aspnet-core/services/src/CompanyName.ProjectName.EntityFrameworkCore.DbMigrations/CompanyName.ProjectName.EntityFrameworkCore.DbMigrations.csproj b/aspnet-core/services/src/CompanyName.ProjectName.EntityFrameworkCore.DbMigrations/CompanyName.ProjectName.EntityFrameworkCore.DbMigrations.csproj deleted file mode 100644 index babde0a1..00000000 --- a/aspnet-core/services/src/CompanyName.ProjectName.EntityFrameworkCore.DbMigrations/CompanyName.ProjectName.EntityFrameworkCore.DbMigrations.csproj +++ /dev/null @@ -1,21 +0,0 @@ - - - - - - net5.0 - CompanyName.ProjectName - - - - - - - - - runtime; build; native; contentfiles; analyzers - compile; contentFiles; build; buildMultitargeting; buildTransitive; analyzers; native - - - - diff --git a/aspnet-core/services/src/CompanyName.ProjectName.EntityFrameworkCore.DbMigrations/EntityFrameworkCore/ProjectNameEntityFrameworkCoreDbMigrationsModule.cs b/aspnet-core/services/src/CompanyName.ProjectName.EntityFrameworkCore.DbMigrations/EntityFrameworkCore/ProjectNameEntityFrameworkCoreDbMigrationsModule.cs deleted file mode 100644 index 02684436..00000000 --- a/aspnet-core/services/src/CompanyName.ProjectName.EntityFrameworkCore.DbMigrations/EntityFrameworkCore/ProjectNameEntityFrameworkCoreDbMigrationsModule.cs +++ /dev/null @@ -1,16 +0,0 @@ -using Microsoft.Extensions.DependencyInjection; -using Volo.Abp.Modularity; - -namespace CompanyName.ProjectName.EntityFrameworkCore -{ - [DependsOn( - typeof(ProjectNameEntityFrameworkCoreModule) - )] - public class ProjectNameEntityFrameworkCoreDbMigrationsModule : AbpModule - { - public override void ConfigureServices(ServiceConfigurationContext context) - { - context.Services.AddAbpDbContext(); - } - } -} diff --git a/aspnet-core/services/src/CompanyName.ProjectName.EntityFrameworkCore.DbMigrations/EntityFrameworkCore/ProjectNameMigrationsDbContext.cs b/aspnet-core/services/src/CompanyName.ProjectName.EntityFrameworkCore.DbMigrations/EntityFrameworkCore/ProjectNameMigrationsDbContext.cs deleted file mode 100644 index 7eccf854..00000000 --- a/aspnet-core/services/src/CompanyName.ProjectName.EntityFrameworkCore.DbMigrations/EntityFrameworkCore/ProjectNameMigrationsDbContext.cs +++ /dev/null @@ -1,54 +0,0 @@ -using CompanyName.ProjectName.DataDictionaryManagement.EntityFrameworkCore; -using CompanyName.ProjectName.NotificationManagement.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore; -using Volo.Abp.AuditLogging.EntityFrameworkCore; -using Volo.Abp.BackgroundJobs.EntityFrameworkCore; -using Volo.Abp.EntityFrameworkCore; -using Volo.Abp.FeatureManagement.EntityFrameworkCore; -using Volo.Abp.Identity; -using Volo.Abp.Identity.EntityFrameworkCore; -using Volo.Abp.IdentityServer.EntityFrameworkCore; -using Volo.Abp.PermissionManagement.EntityFrameworkCore; -using Volo.Abp.SettingManagement.EntityFrameworkCore; -using Volo.Abp.TenantManagement.EntityFrameworkCore; - -namespace CompanyName.ProjectName.EntityFrameworkCore -{ - /* This DbContext is only used for database migrations. - * It is not used on runtime. See ProjectNameDbContext for the runtime DbContext. - * It is a unified model that includes configuration for - * all used modules and your application. - */ - public class ProjectNameMigrationsDbContext : AbpDbContext - { - public ProjectNameMigrationsDbContext(DbContextOptions options) - : base(options) - { - } - - protected override void OnModelCreating(ModelBuilder builder) - { - base.OnModelCreating(builder); - - /* Include modules to your migration db context */ - - builder.ConfigurePermissionManagement(); - builder.ConfigureSettingManagement(); - builder.ConfigureBackgroundJobs(); - builder.ConfigureAuditLogging(); - builder.ConfigureIdentity(); - builder.ConfigureIdentityServer(); - builder.ConfigureFeatureManagement(); - builder.ConfigureTenantManagement(); - - /* Configure your own tables/entities inside the ConfigureProjectName method */ - - builder.ConfigureProjectName(); - - // 数据字典 - builder.ConfigureDataDictionaryManagement(); - - builder.ConfigureNotificationManagement(); - } - } -} \ No newline at end of file diff --git a/aspnet-core/services/src/CompanyName.ProjectName.EntityFrameworkCore/CompanyName.ProjectName.EntityFrameworkCore.csproj b/aspnet-core/services/src/CompanyName.ProjectName.EntityFrameworkCore/CompanyName.ProjectName.EntityFrameworkCore.csproj index 546c884f..92e50f01 100644 --- a/aspnet-core/services/src/CompanyName.ProjectName.EntityFrameworkCore/CompanyName.ProjectName.EntityFrameworkCore.csproj +++ b/aspnet-core/services/src/CompanyName.ProjectName.EntityFrameworkCore/CompanyName.ProjectName.EntityFrameworkCore.csproj @@ -1,24 +1,29 @@  - - - net5.0 - CompanyName.ProjectName - - - - - - - - - - - - - - - - + + + net5.0 + CompanyName.ProjectName + + + + + + + + + + + + + + + + + + runtime; build; native; contentfiles; analyzers + compile; contentFiles; build; buildMultitargeting; buildTransitive; analyzers; native + + diff --git a/aspnet-core/services/src/CompanyName.ProjectName.EntityFrameworkCore.DbMigrations/EntityFrameworkCore/EntityFrameworkCoreProjectNameDbSchemaMigrator.cs b/aspnet-core/services/src/CompanyName.ProjectName.EntityFrameworkCore/EntityFrameworkCore/EntityFrameworkCoreProjectNameDbSchemaMigrator.cs similarity index 93% rename from aspnet-core/services/src/CompanyName.ProjectName.EntityFrameworkCore.DbMigrations/EntityFrameworkCore/EntityFrameworkCoreProjectNameDbSchemaMigrator.cs rename to aspnet-core/services/src/CompanyName.ProjectName.EntityFrameworkCore/EntityFrameworkCore/EntityFrameworkCoreProjectNameDbSchemaMigrator.cs index e9509f16..4d788744 100644 --- a/aspnet-core/services/src/CompanyName.ProjectName.EntityFrameworkCore.DbMigrations/EntityFrameworkCore/EntityFrameworkCoreProjectNameDbSchemaMigrator.cs +++ b/aspnet-core/services/src/CompanyName.ProjectName.EntityFrameworkCore/EntityFrameworkCore/EntityFrameworkCoreProjectNameDbSchemaMigrator.cs @@ -1,8 +1,8 @@ using System; using System.Threading.Tasks; -using Microsoft.EntityFrameworkCore; using Microsoft.Extensions.DependencyInjection; using CompanyName.ProjectName.Data; +using Microsoft.EntityFrameworkCore; using Volo.Abp.DependencyInjection; namespace CompanyName.ProjectName.EntityFrameworkCore @@ -27,7 +27,7 @@ namespace CompanyName.ProjectName.EntityFrameworkCore */ await _serviceProvider - .GetRequiredService() + .GetRequiredService() .Database .MigrateAsync(); } diff --git a/aspnet-core/services/src/CompanyName.ProjectName.EntityFrameworkCore/EntityFrameworkCore/ProjectNameDbContext.cs b/aspnet-core/services/src/CompanyName.ProjectName.EntityFrameworkCore/EntityFrameworkCore/ProjectNameDbContext.cs index 3da930f2..5d34127e 100644 --- a/aspnet-core/services/src/CompanyName.ProjectName.EntityFrameworkCore/EntityFrameworkCore/ProjectNameDbContext.cs +++ b/aspnet-core/services/src/CompanyName.ProjectName.EntityFrameworkCore/EntityFrameworkCore/ProjectNameDbContext.cs @@ -1,4 +1,7 @@ -using CompanyName.ProjectName.NotificationManagement.EntityFrameworkCore; +using CompanyName.ProjectName.DataDictionaryManagement; +using CompanyName.ProjectName.DataDictionaryManagement.EntityFrameworkCore; +using CompanyName.ProjectName.NotificationManagement; +using CompanyName.ProjectName.NotificationManagement.EntityFrameworkCore; using Microsoft.EntityFrameworkCore; using CompanyName.ProjectName.Users; using Volo.Abp.AuditLogging; @@ -67,6 +70,14 @@ namespace CompanyName.ProjectName.EntityFrameworkCore protected override void OnModelCreating(ModelBuilder builder) { + + // 如何设置表前缀 + // Abp框架表前缀 Abp得不建议修改表前缀 + // AbpCommonDbProperties.DbTablePrefix = "xxx"; + // 数据字典表前缀 + //DataDictionaryManagementDbProperties=“xxx” + // 通知模块 + //NotificationManagementDbProperties = "xxx" base.OnModelCreating(builder); builder.ConfigurePermissionManagement( ); @@ -78,6 +89,13 @@ namespace CompanyName.ProjectName.EntityFrameworkCore builder.ConfigureTenantManagement(); builder.ConfigureIdentityServer(); builder.ConfigureProjectName(); + + + // 数据字典 + builder.ConfigureDataDictionaryManagement(); + + // 消息通知 + builder.ConfigureNotificationManagement(); } } } \ No newline at end of file diff --git a/aspnet-core/services/src/CompanyName.ProjectName.EntityFrameworkCore.DbMigrations/EntityFrameworkCore/ProjectNameMigrationsDbContextFactory.cs b/aspnet-core/services/src/CompanyName.ProjectName.EntityFrameworkCore/EntityFrameworkCore/ProjectNameMigrationsDbContextFactory.cs similarity index 82% rename from aspnet-core/services/src/CompanyName.ProjectName.EntityFrameworkCore.DbMigrations/EntityFrameworkCore/ProjectNameMigrationsDbContextFactory.cs rename to aspnet-core/services/src/CompanyName.ProjectName.EntityFrameworkCore/EntityFrameworkCore/ProjectNameMigrationsDbContextFactory.cs index cb5598b6..cf2727cd 100644 --- a/aspnet-core/services/src/CompanyName.ProjectName.EntityFrameworkCore.DbMigrations/EntityFrameworkCore/ProjectNameMigrationsDbContextFactory.cs +++ b/aspnet-core/services/src/CompanyName.ProjectName.EntityFrameworkCore/EntityFrameworkCore/ProjectNameMigrationsDbContextFactory.cs @@ -7,18 +7,18 @@ namespace CompanyName.ProjectName.EntityFrameworkCore { /* This class is needed for EF Core console commands * (like Add-Migration and Update-Database commands) */ - public class ProjectNameMigrationsDbContextFactory : IDesignTimeDbContextFactory + public class ProjectNameMigrationsDbContextFactory : IDesignTimeDbContextFactory { - public ProjectNameMigrationsDbContext CreateDbContext(string[] args) + public ProjectNameDbContext CreateDbContext(string[] args) { ProjectNameEfCoreEntityExtensionMappings.Configure(); var configuration = BuildConfiguration(); - var builder = new DbContextOptionsBuilder() + var builder = new DbContextOptionsBuilder() .UseMySql(configuration.GetConnectionString("Default"), MySqlServerVersion.LatestSupportedServerVersion); - return new ProjectNameMigrationsDbContext(builder.Options); + return new ProjectNameDbContext(builder.Options); } private static IConfigurationRoot BuildConfiguration() diff --git a/aspnet-core/services/src/CompanyName.ProjectName.EntityFrameworkCore.DbMigrations/Migrations/20210903085042_Init.Designer.cs b/aspnet-core/services/src/CompanyName.ProjectName.EntityFrameworkCore/Migrations/20211106001555_Init.Designer.cs similarity index 99% rename from aspnet-core/services/src/CompanyName.ProjectName.EntityFrameworkCore.DbMigrations/Migrations/20210903085042_Init.Designer.cs rename to aspnet-core/services/src/CompanyName.ProjectName.EntityFrameworkCore/Migrations/20211106001555_Init.Designer.cs index 4687891b..93b9eadb 100644 --- a/aspnet-core/services/src/CompanyName.ProjectName.EntityFrameworkCore.DbMigrations/Migrations/20210903085042_Init.Designer.cs +++ b/aspnet-core/services/src/CompanyName.ProjectName.EntityFrameworkCore/Migrations/20211106001555_Init.Designer.cs @@ -9,8 +9,8 @@ using Volo.Abp.EntityFrameworkCore; namespace CompanyName.ProjectName.Migrations { - [DbContext(typeof(ProjectNameMigrationsDbContext))] - [Migration("20210903085042_Init")] + [DbContext(typeof(ProjectNameDbContext))] + [Migration("20211106001555_Init")] partial class Init { protected override void BuildTargetModel(ModelBuilder modelBuilder) @@ -263,7 +263,6 @@ namespace CompanyName.ProjectName.Migrations modelBuilder.Entity("Volo.Abp.AuditLogging.AuditLog", b => { b.Property("Id") - .ValueGeneratedOnAdd() .HasColumnType("char(36)"); b.Property("ApplicationName") @@ -371,7 +370,6 @@ namespace CompanyName.ProjectName.Migrations modelBuilder.Entity("Volo.Abp.AuditLogging.AuditLogAction", b => { b.Property("Id") - .ValueGeneratedOnAdd() .HasColumnType("char(36)"); b.Property("AuditLogId") @@ -421,7 +419,6 @@ namespace CompanyName.ProjectName.Migrations modelBuilder.Entity("Volo.Abp.AuditLogging.EntityChange", b => { b.Property("Id") - .ValueGeneratedOnAdd() .HasColumnType("char(36)"); b.Property("AuditLogId") @@ -471,7 +468,6 @@ namespace CompanyName.ProjectName.Migrations modelBuilder.Entity("Volo.Abp.AuditLogging.EntityPropertyChange", b => { b.Property("Id") - .ValueGeneratedOnAdd() .HasColumnType("char(36)"); b.Property("EntityChangeId") @@ -513,7 +509,6 @@ namespace CompanyName.ProjectName.Migrations modelBuilder.Entity("Volo.Abp.BackgroundJobs.BackgroundJobRecord", b => { b.Property("Id") - .ValueGeneratedOnAdd() .HasColumnType("char(36)"); b.Property("ConcurrencyStamp") @@ -571,7 +566,6 @@ namespace CompanyName.ProjectName.Migrations modelBuilder.Entity("Volo.Abp.FeatureManagement.FeatureValue", b => { b.Property("Id") - .ValueGeneratedOnAdd() .HasColumnType("char(36)"); b.Property("Name") @@ -602,7 +596,6 @@ namespace CompanyName.ProjectName.Migrations modelBuilder.Entity("Volo.Abp.Identity.IdentityClaimType", b => { b.Property("Id") - .ValueGeneratedOnAdd() .HasColumnType("char(36)"); b.Property("ConcurrencyStamp") @@ -649,7 +642,6 @@ namespace CompanyName.ProjectName.Migrations modelBuilder.Entity("Volo.Abp.Identity.IdentityLinkUser", b => { b.Property("Id") - .ValueGeneratedOnAdd() .HasColumnType("char(36)"); b.Property("SourceTenantId") @@ -675,7 +667,6 @@ namespace CompanyName.ProjectName.Migrations modelBuilder.Entity("Volo.Abp.Identity.IdentityRole", b => { b.Property("Id") - .ValueGeneratedOnAdd() .HasColumnType("char(36)"); b.Property("ConcurrencyStamp") @@ -752,7 +743,6 @@ namespace CompanyName.ProjectName.Migrations modelBuilder.Entity("Volo.Abp.Identity.IdentitySecurityLog", b => { b.Property("Id") - .ValueGeneratedOnAdd() .HasColumnType("char(36)"); b.Property("Action") @@ -827,7 +817,6 @@ namespace CompanyName.ProjectName.Migrations modelBuilder.Entity("Volo.Abp.Identity.IdentityUser", b => { b.Property("Id") - .ValueGeneratedOnAdd() .HasColumnType("char(36)"); b.Property("AccessFailedCount") @@ -1107,7 +1096,6 @@ namespace CompanyName.ProjectName.Migrations modelBuilder.Entity("Volo.Abp.Identity.OrganizationUnit", b => { b.Property("Id") - .ValueGeneratedOnAdd() .HasColumnType("char(36)"); b.Property("Code") @@ -2036,7 +2024,6 @@ namespace CompanyName.ProjectName.Migrations modelBuilder.Entity("Volo.Abp.PermissionManagement.PermissionGrant", b => { b.Property("Id") - .ValueGeneratedOnAdd() .HasColumnType("char(36)"); b.Property("Name") @@ -2068,7 +2055,6 @@ namespace CompanyName.ProjectName.Migrations modelBuilder.Entity("Volo.Abp.SettingManagement.Setting", b => { b.Property("Id") - .ValueGeneratedOnAdd() .HasColumnType("char(36)"); b.Property("Name") @@ -2099,7 +2085,6 @@ namespace CompanyName.ProjectName.Migrations modelBuilder.Entity("Volo.Abp.TenantManagement.Tenant", b => { b.Property("Id") - .ValueGeneratedOnAdd() .HasColumnType("char(36)"); b.Property("ConcurrencyStamp") diff --git a/aspnet-core/services/src/CompanyName.ProjectName.EntityFrameworkCore.DbMigrations/Migrations/20210903085042_Init.cs b/aspnet-core/services/src/CompanyName.ProjectName.EntityFrameworkCore/Migrations/20211106001555_Init.cs similarity index 100% rename from aspnet-core/services/src/CompanyName.ProjectName.EntityFrameworkCore.DbMigrations/Migrations/20210903085042_Init.cs rename to aspnet-core/services/src/CompanyName.ProjectName.EntityFrameworkCore/Migrations/20211106001555_Init.cs diff --git a/aspnet-core/services/src/CompanyName.ProjectName.EntityFrameworkCore.DbMigrations/Migrations/ProjectNameMigrationsDbContextModelSnapshot.cs b/aspnet-core/services/src/CompanyName.ProjectName.EntityFrameworkCore/Migrations/ProjectNameDbContextModelSnapshot.cs similarity index 99% rename from aspnet-core/services/src/CompanyName.ProjectName.EntityFrameworkCore.DbMigrations/Migrations/ProjectNameMigrationsDbContextModelSnapshot.cs rename to aspnet-core/services/src/CompanyName.ProjectName.EntityFrameworkCore/Migrations/ProjectNameDbContextModelSnapshot.cs index fbc1a605..e4ac2580 100644 --- a/aspnet-core/services/src/CompanyName.ProjectName.EntityFrameworkCore.DbMigrations/Migrations/ProjectNameMigrationsDbContextModelSnapshot.cs +++ b/aspnet-core/services/src/CompanyName.ProjectName.EntityFrameworkCore/Migrations/ProjectNameDbContextModelSnapshot.cs @@ -8,8 +8,8 @@ using Volo.Abp.EntityFrameworkCore; namespace CompanyName.ProjectName.Migrations { - [DbContext(typeof(ProjectNameMigrationsDbContext))] - partial class ProjectNameMigrationsDbContextModelSnapshot : ModelSnapshot + [DbContext(typeof(ProjectNameDbContext))] + partial class ProjectNameDbContextModelSnapshot : ModelSnapshot { protected override void BuildModel(ModelBuilder modelBuilder) { @@ -261,7 +261,6 @@ namespace CompanyName.ProjectName.Migrations modelBuilder.Entity("Volo.Abp.AuditLogging.AuditLog", b => { b.Property("Id") - .ValueGeneratedOnAdd() .HasColumnType("char(36)"); b.Property("ApplicationName") @@ -369,7 +368,6 @@ namespace CompanyName.ProjectName.Migrations modelBuilder.Entity("Volo.Abp.AuditLogging.AuditLogAction", b => { b.Property("Id") - .ValueGeneratedOnAdd() .HasColumnType("char(36)"); b.Property("AuditLogId") @@ -419,7 +417,6 @@ namespace CompanyName.ProjectName.Migrations modelBuilder.Entity("Volo.Abp.AuditLogging.EntityChange", b => { b.Property("Id") - .ValueGeneratedOnAdd() .HasColumnType("char(36)"); b.Property("AuditLogId") @@ -469,7 +466,6 @@ namespace CompanyName.ProjectName.Migrations modelBuilder.Entity("Volo.Abp.AuditLogging.EntityPropertyChange", b => { b.Property("Id") - .ValueGeneratedOnAdd() .HasColumnType("char(36)"); b.Property("EntityChangeId") @@ -511,7 +507,6 @@ namespace CompanyName.ProjectName.Migrations modelBuilder.Entity("Volo.Abp.BackgroundJobs.BackgroundJobRecord", b => { b.Property("Id") - .ValueGeneratedOnAdd() .HasColumnType("char(36)"); b.Property("ConcurrencyStamp") @@ -569,7 +564,6 @@ namespace CompanyName.ProjectName.Migrations modelBuilder.Entity("Volo.Abp.FeatureManagement.FeatureValue", b => { b.Property("Id") - .ValueGeneratedOnAdd() .HasColumnType("char(36)"); b.Property("Name") @@ -600,7 +594,6 @@ namespace CompanyName.ProjectName.Migrations modelBuilder.Entity("Volo.Abp.Identity.IdentityClaimType", b => { b.Property("Id") - .ValueGeneratedOnAdd() .HasColumnType("char(36)"); b.Property("ConcurrencyStamp") @@ -647,7 +640,6 @@ namespace CompanyName.ProjectName.Migrations modelBuilder.Entity("Volo.Abp.Identity.IdentityLinkUser", b => { b.Property("Id") - .ValueGeneratedOnAdd() .HasColumnType("char(36)"); b.Property("SourceTenantId") @@ -673,7 +665,6 @@ namespace CompanyName.ProjectName.Migrations modelBuilder.Entity("Volo.Abp.Identity.IdentityRole", b => { b.Property("Id") - .ValueGeneratedOnAdd() .HasColumnType("char(36)"); b.Property("ConcurrencyStamp") @@ -750,7 +741,6 @@ namespace CompanyName.ProjectName.Migrations modelBuilder.Entity("Volo.Abp.Identity.IdentitySecurityLog", b => { b.Property("Id") - .ValueGeneratedOnAdd() .HasColumnType("char(36)"); b.Property("Action") @@ -825,7 +815,6 @@ namespace CompanyName.ProjectName.Migrations modelBuilder.Entity("Volo.Abp.Identity.IdentityUser", b => { b.Property("Id") - .ValueGeneratedOnAdd() .HasColumnType("char(36)"); b.Property("AccessFailedCount") @@ -1105,7 +1094,6 @@ namespace CompanyName.ProjectName.Migrations modelBuilder.Entity("Volo.Abp.Identity.OrganizationUnit", b => { b.Property("Id") - .ValueGeneratedOnAdd() .HasColumnType("char(36)"); b.Property("Code") @@ -2034,7 +2022,6 @@ namespace CompanyName.ProjectName.Migrations modelBuilder.Entity("Volo.Abp.PermissionManagement.PermissionGrant", b => { b.Property("Id") - .ValueGeneratedOnAdd() .HasColumnType("char(36)"); b.Property("Name") @@ -2066,7 +2053,6 @@ namespace CompanyName.ProjectName.Migrations modelBuilder.Entity("Volo.Abp.SettingManagement.Setting", b => { b.Property("Id") - .ValueGeneratedOnAdd() .HasColumnType("char(36)"); b.Property("Name") @@ -2097,7 +2083,6 @@ namespace CompanyName.ProjectName.Migrations modelBuilder.Entity("Volo.Abp.TenantManagement.Tenant", b => { b.Property("Id") - .ValueGeneratedOnAdd() .HasColumnType("char(36)"); b.Property("ConcurrencyStamp") diff --git a/aspnet-core/services/test/CompanyName.ProjectName.EntityFrameworkCore.Tests/CompanyName.ProjectName.EntityFrameworkCore.Tests.csproj b/aspnet-core/services/test/CompanyName.ProjectName.EntityFrameworkCore.Tests/CompanyName.ProjectName.EntityFrameworkCore.Tests.csproj index 790890e8..0641af02 100644 --- a/aspnet-core/services/test/CompanyName.ProjectName.EntityFrameworkCore.Tests/CompanyName.ProjectName.EntityFrameworkCore.Tests.csproj +++ b/aspnet-core/services/test/CompanyName.ProjectName.EntityFrameworkCore.Tests/CompanyName.ProjectName.EntityFrameworkCore.Tests.csproj @@ -8,7 +8,7 @@ - + diff --git a/aspnet-core/services/test/CompanyName.ProjectName.EntityFrameworkCore.Tests/EntityFrameworkCore/ProjectNameEntityFrameworkCoreTestModule.cs b/aspnet-core/services/test/CompanyName.ProjectName.EntityFrameworkCore.Tests/EntityFrameworkCore/ProjectNameEntityFrameworkCoreTestModule.cs index fb8482e1..8d9831f5 100644 --- a/aspnet-core/services/test/CompanyName.ProjectName.EntityFrameworkCore.Tests/EntityFrameworkCore/ProjectNameEntityFrameworkCoreTestModule.cs +++ b/aspnet-core/services/test/CompanyName.ProjectName.EntityFrameworkCore.Tests/EntityFrameworkCore/ProjectNameEntityFrameworkCoreTestModule.cs @@ -11,8 +11,8 @@ using Volo.Abp.Modularity; namespace CompanyName.ProjectName.EntityFrameworkCore { [DependsOn( - typeof(ProjectNameEntityFrameworkCoreDbMigrationsModule), typeof(ProjectNameTestBaseModule), + typeof(ProjectNameEntityFrameworkCoreModule), typeof(AbpEntityFrameworkCoreSqliteModule) )] public class ProjectNameEntityFrameworkCoreTestModule : AbpModule @@ -47,11 +47,11 @@ namespace CompanyName.ProjectName.EntityFrameworkCore var connection = new SqliteConnection("Data Source=:memory:"); connection.Open(); - var options = new DbContextOptionsBuilder() + var options = new DbContextOptionsBuilder() .UseSqlite(connection) .Options; - using (var context = new ProjectNameMigrationsDbContext(options)) + using (var context = new ProjectNameDbContext(options)) { context.GetService().CreateTables(); } From d1a547e6cc853d80b60ce50b4051f071d20922b3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=8E=8B=E5=86=9B?= <510423039@qq.com> Date: Sat, 6 Nov 2021 09:05:12 +0800 Subject: [PATCH 4/7] =?UTF-8?q?=E2=9C=A8=20=E9=9B=86=E6=88=90Ocelot?= =?UTF-8?q?=E7=BD=91=E5=85=B3=EF=BC=8CConsul=20=E6=9C=8D=E5=8A=A1=E6=B3=A8?= =?UTF-8?q?=E5=86=8C=E5=92=8C=E5=8F=91=E7=8E=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../CompanyName.ProjectName.WebGateway.csproj | 3 +- .../Program.cs | 3 +- .../Properties/launchSettings.json | 21 +- .../Startup.cs | 35 +-- .../WebGatewayModule.cs | 98 ++++++++ .../appsettings.Consul.json | 48 ++++ .../appsettings.Development.json | 45 +++- .../appsettings.Production.json | 52 +++++ .../appsettings.json | 10 - ...ompanyName.ProjectName.HttpApi.Host.csproj | 1 + .../DefaultHttpExceptionStatusCodeFinder.cs | 73 ------ .../Extensions/Filters/EnumSchemaFilter.cs | 24 -- .../Filters/HiddenAbpDefaultApiFilter.cs | 56 ----- .../Extensions/Filters/SwaggerTagsFilter.cs | 36 --- .../ProjectNameHttpApiHostModule.cs | 220 ++++++------------ .../appsettings.Development.json | 6 + ...ProjectName.Shared.Hosting.Gateways.csproj | 2 + .../SharedHostingGatewayModule.cs | 4 +- .../Builder/ApplicationBuilderExtensions.cs | 1 - .../SharedHostingMicroserviceModule.cs | 26 ++- 20 files changed, 361 insertions(+), 403 deletions(-) create mode 100644 aspnet-core/gateways/CompanyName.ProjectName.WebGateway/WebGatewayModule.cs create mode 100644 aspnet-core/gateways/CompanyName.ProjectName.WebGateway/appsettings.Consul.json create mode 100644 aspnet-core/gateways/CompanyName.ProjectName.WebGateway/appsettings.Production.json delete mode 100644 aspnet-core/gateways/CompanyName.ProjectName.WebGateway/appsettings.json delete mode 100644 aspnet-core/services/host/CompanyName.ProjectName.HttpApi.Host/Extensions/Filters/DefaultHttpExceptionStatusCodeFinder.cs delete mode 100644 aspnet-core/services/host/CompanyName.ProjectName.HttpApi.Host/Extensions/Filters/EnumSchemaFilter.cs delete mode 100644 aspnet-core/services/host/CompanyName.ProjectName.HttpApi.Host/Extensions/Filters/HiddenAbpDefaultApiFilter.cs delete mode 100644 aspnet-core/services/host/CompanyName.ProjectName.HttpApi.Host/Extensions/Filters/SwaggerTagsFilter.cs diff --git a/aspnet-core/gateways/CompanyName.ProjectName.WebGateway/CompanyName.ProjectName.WebGateway.csproj b/aspnet-core/gateways/CompanyName.ProjectName.WebGateway/CompanyName.ProjectName.WebGateway.csproj index 11984f2d..5c2a3f4b 100644 --- a/aspnet-core/gateways/CompanyName.ProjectName.WebGateway/CompanyName.ProjectName.WebGateway.csproj +++ b/aspnet-core/gateways/CompanyName.ProjectName.WebGateway/CompanyName.ProjectName.WebGateway.csproj @@ -4,8 +4,9 @@ net5.0 + - + diff --git a/aspnet-core/gateways/CompanyName.ProjectName.WebGateway/Program.cs b/aspnet-core/gateways/CompanyName.ProjectName.WebGateway/Program.cs index b067d793..74b597a2 100644 --- a/aspnet-core/gateways/CompanyName.ProjectName.WebGateway/Program.cs +++ b/aspnet-core/gateways/CompanyName.ProjectName.WebGateway/Program.cs @@ -18,6 +18,7 @@ namespace CompanyName.ProjectName.WebGateway public static IHostBuilder CreateHostBuilder(string[] args) => Host.CreateDefaultBuilder(args) - .ConfigureWebHostDefaults(webBuilder => { webBuilder.UseStartup(); }); + .ConfigureWebHostDefaults(webBuilder => { webBuilder.UseStartup(); }) + .UseAutofac(); } } \ No newline at end of file diff --git a/aspnet-core/gateways/CompanyName.ProjectName.WebGateway/Properties/launchSettings.json b/aspnet-core/gateways/CompanyName.ProjectName.WebGateway/Properties/launchSettings.json index 793664c0..3a803e20 100644 --- a/aspnet-core/gateways/CompanyName.ProjectName.WebGateway/Properties/launchSettings.json +++ b/aspnet-core/gateways/CompanyName.ProjectName.WebGateway/Properties/launchSettings.json @@ -1,30 +1,13 @@ { "$schema": "http://json.schemastore.org/launchsettings.json", - "iisSettings": { - "windowsAuthentication": false, - "anonymousAuthentication": true, - "iisExpress": { - "applicationUrl": "http://localhost:2409", - "sslPort": 44302 - } - }, "profiles": { - "IIS Express": { - "commandName": "IISExpress", - "launchBrowser": true, - "launchUrl": "swagger", - "environmentVariables": { - "ASPNETCORE_ENVIRONMENT": "Development" - } - }, "CompanyName.ProjectName.WebGateway": { "commandName": "Project", - "dotnetRunMessages": "true", "launchBrowser": true, "launchUrl": "swagger", - "applicationUrl": "https://localhost:5001;http://localhost:5000", + "applicationUrl": "http://localhost:44314", "environmentVariables": { - "ASPNETCORE_ENVIRONMENT": "Development" + "ASPNETCORE_ENVIRONMENT": "Consul" } } } diff --git a/aspnet-core/gateways/CompanyName.ProjectName.WebGateway/Startup.cs b/aspnet-core/gateways/CompanyName.ProjectName.WebGateway/Startup.cs index 245a83b8..f7c37245 100644 --- a/aspnet-core/gateways/CompanyName.ProjectName.WebGateway/Startup.cs +++ b/aspnet-core/gateways/CompanyName.ProjectName.WebGateway/Startup.cs @@ -16,43 +16,14 @@ namespace CompanyName.ProjectName.WebGateway { public class Startup { - public Startup(IConfiguration configuration) - { - Configuration = configuration; - } - - public IConfiguration Configuration { get; } - - // This method gets called by the runtime. Use this method to add services to the container. public void ConfigureServices(IServiceCollection services) { - services.AddControllers(); - services.AddSwaggerGen(c => - { - c.SwaggerDoc("v1", - new OpenApiInfo - { Title = "CompanyName.ProjectName.WebGateway", Version = "v1" }); - }); + services.AddApplication(); } - // This method gets called by the runtime. Use this method to configure the HTTP request pipeline. - public void Configure(IApplicationBuilder app, IWebHostEnvironment env) + public void Configure(IApplicationBuilder app) { - if (env.IsDevelopment()) - { - app.UseDeveloperExceptionPage(); - app.UseSwagger(); - app.UseSwaggerUI(c => c.SwaggerEndpoint("/swagger/v1/swagger.json", - "CompanyName.ProjectName.WebGateway v1")); - } - - app.UseHttpsRedirection(); - - app.UseRouting(); - - app.UseAuthorization(); - - app.UseEndpoints(endpoints => { endpoints.MapControllers(); }); + app.InitializeApplication(); } } } \ No newline at end of file diff --git a/aspnet-core/gateways/CompanyName.ProjectName.WebGateway/WebGatewayModule.cs b/aspnet-core/gateways/CompanyName.ProjectName.WebGateway/WebGatewayModule.cs new file mode 100644 index 00000000..a6173de7 --- /dev/null +++ b/aspnet-core/gateways/CompanyName.ProjectName.WebGateway/WebGatewayModule.cs @@ -0,0 +1,98 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using CompanyName.ProjectName.Shared.Hosting.Gateways; +using Microsoft.AspNetCore.Builder; +using Microsoft.AspNetCore.Cors; +using Microsoft.Extensions.DependencyInjection; +using Microsoft.OpenApi.Models; +using Ocelot.Middleware; +using Swashbuckle.AspNetCore.SwaggerUI; +using Volo.Abp; +using Volo.Abp.Modularity; + +namespace CompanyName.ProjectName.WebGateway +{ + [DependsOn( + typeof(SharedHostingGatewayModule))] + public class WebGatewayModule : AbpModule + { + private const string DefaultCorsPolicyName = "Default"; + + public override void ConfigureServices(ServiceConfigurationContext context) + { + ConfigureCors(context); + ConfigureSwaggerServices(context); + } + + public override void OnApplicationInitialization(ApplicationInitializationContext context) + { + var app = context.GetApplicationBuilder(); + var env = context.GetEnvironment(); + app.UseCorrelationId(); + app.UseCors(DefaultCorsPolicyName); + app.UseRouting(); + app.UseSwagger(); + app.UseSwaggerUI(options => + { + options.SwaggerEndpoint("/ProjectName/swagger.json", "ProjectNameAPI"); + options.DefaultModelsExpandDepth(-1); + options.DocExpansion(DocExpansion.None); + }); + + app.UseConfiguredEndpoints(); + app.UseOcelot().Wait(); + } + + /// + /// 配置跨域 + /// + /// + private void ConfigureCors(ServiceConfigurationContext context) + { + var configuration = context.Services.GetConfiguration(); + context.Services.AddCors(options => + { + options.AddPolicy(DefaultCorsPolicyName, builder => + { + builder + .WithOrigins( + configuration["App:CorsOrigins"] + .Split(",", StringSplitOptions.RemoveEmptyEntries) + .Select(o => o.RemovePostFix("/")) + .ToArray() + ) + .WithAbpExposedHeaders() + .SetIsOriginAllowedToAllowWildcardSubdomains() + .AllowAnyHeader() + .AllowAnyMethod() + .AllowCredentials(); + }); + }); + } + + private static void ConfigureSwaggerServices(ServiceConfigurationContext context) + { + context.Services.AddSwaggerGen( + options => + { + options.SwaggerDoc("v1", new OpenApiInfo {Title = "WebGateway API", Version = "v1"}); + options.DocInclusionPredicate((docName, description) => true); + options.AddSecurityRequirement(new OpenApiSecurityRequirement + { + { + new OpenApiSecurityScheme + { + Reference = new OpenApiReference + { + Type = ReferenceType.SecurityScheme, Id = "Bearer" + } + }, + new List() + } + }); + + }); + } + } +} \ No newline at end of file diff --git a/aspnet-core/gateways/CompanyName.ProjectName.WebGateway/appsettings.Consul.json b/aspnet-core/gateways/CompanyName.ProjectName.WebGateway/appsettings.Consul.json new file mode 100644 index 00000000..af6745a1 --- /dev/null +++ b/aspnet-core/gateways/CompanyName.ProjectName.WebGateway/appsettings.Consul.json @@ -0,0 +1,48 @@ +{ + "Logging": { + "LogLevel": { + "Default": "Information", + "Microsoft": "Warning", + "Microsoft.Hosting.Lifetime": "Information" + } + }, + "AllowedHosts": "*", + "App": { + "SelfUrl": "http://localhost:44314", + "CorsOrigins": "http://localhost:4200" + }, + "GlobalConfiguration": { + }, + "Routes": [ + { + "DownstreamPathTemplate": "/swagger/ProjectName/swagger.json", + "DownstreamScheme": "http", + "ServiceName": "Project-Service", + "LoadBalancerOptions": { + "Type": "LeastConnection" + }, + "UpstreamPathTemplate": "/ProjectName/swagger.json", + "UpstreamHttpMethod": [ + "Get", + "Post", + "Put", + "Delete" + ] + }, + { + "DownstreamPathTemplate": "/{url}", + "DownstreamScheme": "http", + "ServiceName": "Project-Service", + "LoadBalancerOptions": { + "Type": "LeastConnection" + }, + "UpstreamPathTemplate": "/{url}", + "UpstreamHttpMethod": [ + "Get", + "Post", + "Put", + "Delete" + ] + } + ] +} diff --git a/aspnet-core/gateways/CompanyName.ProjectName.WebGateway/appsettings.Development.json b/aspnet-core/gateways/CompanyName.ProjectName.WebGateway/appsettings.Development.json index 8983e0fc..3f557e88 100644 --- a/aspnet-core/gateways/CompanyName.ProjectName.WebGateway/appsettings.Development.json +++ b/aspnet-core/gateways/CompanyName.ProjectName.WebGateway/appsettings.Development.json @@ -5,5 +5,48 @@ "Microsoft": "Warning", "Microsoft.Hosting.Lifetime": "Information" } - } + }, + "AllowedHosts": "*", + "App": { + "SelfUrl": "http://localhost:44314", + "CorsOrigins": "http://localhost:4200" + }, + "GlobalConfiguration": { + }, + "Routes": [ + { + "DownstreamPathTemplate": "/swagger/ProjectName/swagger.json", + "DownstreamScheme": "http", + "DownstreamHostAndPorts": [ + { + "Host": "localhost", + "Port": 44315 + } + ], + "UpstreamPathTemplate": "/ProjectName/swagger.json", + "UpstreamHttpMethod": [ + "Get", + "Post", + "Put", + "Delete" + ] + }, + { + "DownstreamPathTemplate": "/{url}", + "DownstreamScheme": "http", + "DownstreamHostAndPorts": [ + { + "Host": "localhost", + "Port": 44315 + } + ], + "UpstreamPathTemplate": "/{url}", + "UpstreamHttpMethod": [ + "Get", + "Post", + "Put", + "Delete" + ] + } + ] } diff --git a/aspnet-core/gateways/CompanyName.ProjectName.WebGateway/appsettings.Production.json b/aspnet-core/gateways/CompanyName.ProjectName.WebGateway/appsettings.Production.json new file mode 100644 index 00000000..3f557e88 --- /dev/null +++ b/aspnet-core/gateways/CompanyName.ProjectName.WebGateway/appsettings.Production.json @@ -0,0 +1,52 @@ +{ + "Logging": { + "LogLevel": { + "Default": "Information", + "Microsoft": "Warning", + "Microsoft.Hosting.Lifetime": "Information" + } + }, + "AllowedHosts": "*", + "App": { + "SelfUrl": "http://localhost:44314", + "CorsOrigins": "http://localhost:4200" + }, + "GlobalConfiguration": { + }, + "Routes": [ + { + "DownstreamPathTemplate": "/swagger/ProjectName/swagger.json", + "DownstreamScheme": "http", + "DownstreamHostAndPorts": [ + { + "Host": "localhost", + "Port": 44315 + } + ], + "UpstreamPathTemplate": "/ProjectName/swagger.json", + "UpstreamHttpMethod": [ + "Get", + "Post", + "Put", + "Delete" + ] + }, + { + "DownstreamPathTemplate": "/{url}", + "DownstreamScheme": "http", + "DownstreamHostAndPorts": [ + { + "Host": "localhost", + "Port": 44315 + } + ], + "UpstreamPathTemplate": "/{url}", + "UpstreamHttpMethod": [ + "Get", + "Post", + "Put", + "Delete" + ] + } + ] +} diff --git a/aspnet-core/gateways/CompanyName.ProjectName.WebGateway/appsettings.json b/aspnet-core/gateways/CompanyName.ProjectName.WebGateway/appsettings.json deleted file mode 100644 index d9d9a9bf..00000000 --- a/aspnet-core/gateways/CompanyName.ProjectName.WebGateway/appsettings.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "Logging": { - "LogLevel": { - "Default": "Information", - "Microsoft": "Warning", - "Microsoft.Hosting.Lifetime": "Information" - } - }, - "AllowedHosts": "*" -} diff --git a/aspnet-core/services/host/CompanyName.ProjectName.HttpApi.Host/CompanyName.ProjectName.HttpApi.Host.csproj b/aspnet-core/services/host/CompanyName.ProjectName.HttpApi.Host/CompanyName.ProjectName.HttpApi.Host.csproj index f291110c..a854124b 100644 --- a/aspnet-core/services/host/CompanyName.ProjectName.HttpApi.Host/CompanyName.ProjectName.HttpApi.Host.csproj +++ b/aspnet-core/services/host/CompanyName.ProjectName.HttpApi.Host/CompanyName.ProjectName.HttpApi.Host.csproj @@ -38,6 +38,7 @@ + diff --git a/aspnet-core/services/host/CompanyName.ProjectName.HttpApi.Host/Extensions/Filters/DefaultHttpExceptionStatusCodeFinder.cs b/aspnet-core/services/host/CompanyName.ProjectName.HttpApi.Host/Extensions/Filters/DefaultHttpExceptionStatusCodeFinder.cs deleted file mode 100644 index b125c71e..00000000 --- a/aspnet-core/services/host/CompanyName.ProjectName.HttpApi.Host/Extensions/Filters/DefaultHttpExceptionStatusCodeFinder.cs +++ /dev/null @@ -1,73 +0,0 @@ -using Microsoft.AspNetCore.Http; -using Microsoft.Extensions.Options; -using System; -using System.Net; -using Volo.Abp; -using Volo.Abp.AspNetCore.ExceptionHandling; -using Volo.Abp.Authorization; -using Volo.Abp.DependencyInjection; -using Volo.Abp.Domain.Entities; -using Volo.Abp.ExceptionHandling; -using Volo.Abp.Validation; - - namespace CompanyName.ProjectName.Extensions.Filters -{ - [Dependency(ReplaceServices = true)] - public class DefaultHttpExceptionStatusCodeFinder : IHttpExceptionStatusCodeFinder, ITransientDependency - { - protected AbpExceptionHttpStatusCodeOptions Options { get; } - - public DefaultHttpExceptionStatusCodeFinder( - IOptions options) - { - Options = options.Value; - } - - public HttpStatusCode GetStatusCode(HttpContext httpContext, Exception exception) - { - if (exception is IHasHttpStatusCode exceptionWithHttpStatusCode && - exceptionWithHttpStatusCode.HttpStatusCode > 0) - { - return (HttpStatusCode)exceptionWithHttpStatusCode.HttpStatusCode; - } - - if (exception is IHasErrorCode exceptionWithErrorCode && - !exceptionWithErrorCode.Code.IsNullOrWhiteSpace()) - { - if (Options.ErrorCodeToHttpStatusCodeMappings.TryGetValue(exceptionWithErrorCode.Code, out var status)) - { - return status; - } - } - - if (exception is AbpAuthorizationException) - { - return HttpStatusCode.Forbidden; - } - - //TODO: Handle SecurityException..? - - if (exception is AbpValidationException) - { - return HttpStatusCode.BadRequest; - } - - if (exception is EntityNotFoundException) - { - return HttpStatusCode.NotFound; - } - - if (exception is NotImplementedException) - { - return HttpStatusCode.NotImplemented; - } - - if (exception is IBusinessException) - { - return HttpStatusCode.InternalServerError; - } - - return HttpStatusCode.InternalServerError; - } - } -} diff --git a/aspnet-core/services/host/CompanyName.ProjectName.HttpApi.Host/Extensions/Filters/EnumSchemaFilter.cs b/aspnet-core/services/host/CompanyName.ProjectName.HttpApi.Host/Extensions/Filters/EnumSchemaFilter.cs deleted file mode 100644 index 63753cfa..00000000 --- a/aspnet-core/services/host/CompanyName.ProjectName.HttpApi.Host/Extensions/Filters/EnumSchemaFilter.cs +++ /dev/null @@ -1,24 +0,0 @@ -using System; -using System.Linq; -using Microsoft.OpenApi.Any; -using Microsoft.OpenApi.Models; -using Swashbuckle.AspNetCore.SwaggerGen; - -namespace CompanyName.ProjectName.Extensions.Filters -{ - public class EnumSchemaFilter : ISchemaFilter - { - public void Apply(OpenApiSchema schema, SchemaFilterContext context) - { - if (context.Type.IsEnum) - { - var array = new OpenApiArray(); - array.AddRange(Enum.GetNames(context.Type).Select(n => new OpenApiString(n))); - // NSwag - schema.Extensions.Add("x-enumNames", array); - // Openapi-generator - schema.Extensions.Add("x-enum-varnames", array); - } - } - } -} \ No newline at end of file diff --git a/aspnet-core/services/host/CompanyName.ProjectName.HttpApi.Host/Extensions/Filters/HiddenAbpDefaultApiFilter.cs b/aspnet-core/services/host/CompanyName.ProjectName.HttpApi.Host/Extensions/Filters/HiddenAbpDefaultApiFilter.cs deleted file mode 100644 index ec023a51..00000000 --- a/aspnet-core/services/host/CompanyName.ProjectName.HttpApi.Host/Extensions/Filters/HiddenAbpDefaultApiFilter.cs +++ /dev/null @@ -1,56 +0,0 @@ -using Microsoft.AspNetCore.Mvc.ApiExplorer; -using Microsoft.OpenApi.Models; -using Swashbuckle.AspNetCore.SwaggerGen; -using System; -using System.Collections.Generic; -using System.Linq; -using System.Reflection; -using System.Threading.Tasks; - -namespace CompanyName.ProjectName.Extensions.Filters -{ - /// - /// 在使用nswag的时候,原生默认的api导致生产的代理类存在问题 - /// 所有隐藏原生的api,重写路由 - /// - public class HiddenAbpDefaultApiFilter : IDocumentFilter - { - public void Apply(OpenApiDocument swaggerDoc, DocumentFilterContext context) - { - - foreach (ApiDescription apiDescription in context.ApiDescriptions) - { - if (apiDescription.TryGetMethodInfo(out MethodInfo method)) - { - string key = "/" + apiDescription.RelativePath; - var reuslt = IsHidden(key); - if(reuslt) swaggerDoc.Paths.Remove(key); - } - } - } - - private bool IsHidden(string key) - { - var list = GetHiddenAbpDefaultApiList(); - foreach (var item in list) - { - if (key.Contains(item)) return true; - } - return false; - } - - private List GetHiddenAbpDefaultApiList() - { - return new List() { - "/api/abp/multi-tenancy/tenants", - "/api/account", - "/api/feature-management/features", - "/api/permission-management/permissions", - "/api/identity/my-profile", - "/api/identity", - "/api/multi-tenancy/tenants", - "/api/setting-management/emailing" - }; - } - } -} diff --git a/aspnet-core/services/host/CompanyName.ProjectName.HttpApi.Host/Extensions/Filters/SwaggerTagsFilter.cs b/aspnet-core/services/host/CompanyName.ProjectName.HttpApi.Host/Extensions/Filters/SwaggerTagsFilter.cs deleted file mode 100644 index 46638c45..00000000 --- a/aspnet-core/services/host/CompanyName.ProjectName.HttpApi.Host/Extensions/Filters/SwaggerTagsFilter.cs +++ /dev/null @@ -1,36 +0,0 @@ -using Microsoft.AspNetCore.Mvc.Controllers; -using Microsoft.OpenApi.Models; -using Swashbuckle.AspNetCore.SwaggerGen; -using System; -using System.Collections.Generic; -using System.Linq; -using System.Threading.Tasks; - -namespace CompanyNameProjectName.Extensions.Filters -{ - /// - /// 把abp vnext 提供的api 归档 - /// - public class SwaggerTagsFilter : IOperationFilter - { - public const string DefaultTagName = "ABP Vnext 默认 Api"; - - public void Apply(OpenApiOperation operation, OperationFilterContext context) - { - var tag = GetChineseTag(context.ApiDescription.ActionDescriptor as ControllerActionDescriptor); - if (null != tag) - operation.Tags = new List { tag }; - } - - private static OpenApiTag GetChineseTag(ControllerActionDescriptor description) - { - if (null != description?.ControllerTypeInfo?.Namespace) - { - if (description.ControllerTypeInfo.Namespace.StartsWith("Volo.Abp") || description.ControllerTypeInfo.Namespace.StartsWith("Pages.Abp.MultiTenancy")) - return new OpenApiTag { Name = DefaultTagName }; - return null; - } - return null; - } - } -} diff --git a/aspnet-core/services/host/CompanyName.ProjectName.HttpApi.Host/ProjectNameHttpApiHostModule.cs b/aspnet-core/services/host/CompanyName.ProjectName.HttpApi.Host/ProjectNameHttpApiHostModule.cs index c477a14d..8b3d3c2a 100644 --- a/aspnet-core/services/host/CompanyName.ProjectName.HttpApi.Host/ProjectNameHttpApiHostModule.cs +++ b/aspnet-core/services/host/CompanyName.ProjectName.HttpApi.Host/ProjectNameHttpApiHostModule.cs @@ -1,18 +1,15 @@ using System; using System.Collections.Generic; using System.IO; -using System.Linq; using System.Text; using CompanyName.ProjectName.ConfigurationOptions; using Microsoft.AspNetCore.Authentication.JwtBearer; using Microsoft.AspNetCore.Builder; -using Microsoft.AspNetCore.Cors; using Microsoft.AspNetCore.DataProtection; using Microsoft.Extensions.Configuration; using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.Hosting; using CompanyName.ProjectName.EntityFrameworkCore; -using CompanyName.ProjectName.Extensions.Filters; using CompanyNameProjectName.Extensions.Filters; using Hangfire; using Hangfire.MySql; @@ -29,18 +26,17 @@ using Volo.Abp.Autofac; using Volo.Abp.BackgroundJobs; using Volo.Abp.BackgroundJobs.Hangfire; using Volo.Abp.Caching.StackExchangeRedis; -using Volo.Abp.Localization; using Volo.Abp.Modularity; using Volo.Abp.Swashbuckle; -using Volo.Abp.VirtualFileSystem; using System.Threading.Tasks; using CompanyName.ProjectName.Extensions; using CompanyName.ProjectName.MultiTenancy; +using DefaultNamespace; +using DefaultNamespace.Swaggers; using Lion.Abp.Cap; using Savorboard.CAP.InMemoryMessageQueue; using Serilog; using Swashbuckle.AspNetCore.SwaggerUI; -using Volo.Abp.AspNetCore.ExceptionHandling; using Volo.Abp.AspNetCore.MultiTenancy; using Volo.Abp.Caching; @@ -59,13 +55,15 @@ namespace CompanyName.ProjectName typeof(AbpAspNetCoreAuthenticationJwtBearerModule), typeof(AbpBackgroundJobsHangfireModule), typeof(LionAbpCapModule), - typeof(AbpAspNetCoreMultiTenancyModule) + typeof(AbpAspNetCoreMultiTenancyModule), + typeof(SharedHostingMicroserviceModule) )] public class ProjectNameHttpApiHostModule : AbpModule { private const string DefaultCorsPolicyName = "Default"; - public override void OnPostApplicationInitialization(ApplicationInitializationContext context) + public override void OnPostApplicationInitialization( + ApplicationInitializationContext context) { // context.CreateRecurringJob(); base.OnPostApplicationInitialization(context); @@ -74,77 +72,73 @@ namespace CompanyName.ProjectName public override void ConfigureServices(ServiceConfigurationContext context) { var configuration = context.Services.GetConfiguration(); - var hostingEnvironment = context.Services.GetHostingEnvironment(); - - //ConfigureConventionalControllers(); - //ConfigureAuthentication(context, configuration); - ConfigureLocalization(); ConfigureCache(context); - ConfigureVirtualFileSystem(context); - ConfigureCors(context, configuration); ConfigureSwaggerServices(context, configuration); ConfigureOptions(context); - ConfigureHealthChecks(context); ConfigureJwtAuthentication(context, configuration); ConfigureHangfireMysql(context); ConfigurationCap(context); ConfigurationStsHttpClient(context); - ConfigureAbpExceptions(context); } public override void OnApplicationInitialization(ApplicationInitializationContext context) { var app = context.GetApplicationBuilder(); + var configuration = context.GetConfiguration(); app.UseAbpRequestLocalization(); app.UseCorrelationId(); app.UseStaticFiles(); app.UseRouting(); app.UseCors(DefaultCorsPolicyName); app.UseAuthentication(); - + if (MultiTenancyConsts.IsEnabled) { app.UseMultiTenancy(); } - + app.UseAuthorization(); app.UseSwagger(); app.UseAbpSwaggerUI(options => { - options.SwaggerEndpoint("/swagger/v1/swagger.json", "ProjectName API"); + options.SwaggerEndpoint("/swagger/ProjectName/swagger.json", "ProjectName API"); options.DocExpansion(DocExpansion.None); options.DefaultModelsExpandDepth(-1); }); app.UseAuditing(); app.UseAbpSerilogEnrichers(); - app.UseSerilogRequestLogging(opts => { opts.EnrichDiagnosticContext = SerilogToEsExtensions.EnrichFromRequest; }); + app.UseSerilogRequestLogging(opts => + { + opts.EnrichDiagnosticContext = SerilogToEsExtensions.EnrichFromRequest; + }); app.UseUnitOfWork(); app.UseConfiguredEndpoints(); app.UseEndpoints(endpoints => { endpoints.MapHealthChecks("/health"); }); app.UseHangfireDashboard("/hangfire", new DashboardOptions() { - Authorization = new[] {new CustomHangfireAuthorizeFilter()}, + Authorization = new[] { new CustomHangfireAuthorizeFilter() }, IgnoreAntiforgeryToken = true }); - } - /// - /// 异常处理 - /// - /// - private void ConfigureAbpExceptions(ServiceConfigurationContext context) - { - context.Services.Configure(options => { options.SendExceptionsDetailsToClients = true; }); + if (configuration.GetValue("Consul:Enabled", false)) + { + app.UseConsul(); + } } - public void ConfigureHangfireMysql(ServiceConfigurationContext context) + + private void ConfigureHangfireMysql(ServiceConfigurationContext context) { - Configure(options => { options.IsJobExecutionEnabled = true; }); + Configure(options => + { + options.IsJobExecutionEnabled = true; + }); context.Services.AddHangfire(config => { - config.UseStorage(new MySqlStorage(context.Services.GetConfiguration().GetConnectionString("Default"), + config.UseStorage(new MySqlStorage( + context.Services.GetConfiguration().GetConnectionString("Default"), new MySqlStorageOptions() { //CommandBatchMaxTimeout = TimeSpan.FromMinutes(5), @@ -162,7 +156,8 @@ namespace CompanyName.ProjectName /// /// /// - private void ConfigureJwtAuthentication(ServiceConfigurationContext context, IConfiguration configuration) + private void ConfigureJwtAuthentication(ServiceConfigurationContext context, + IConfiguration configuration) { context.Services.AddAuthentication(options => { @@ -171,19 +166,21 @@ namespace CompanyName.ProjectName }) .AddJwtBearer(options => { - options.TokenValidationParameters = new Microsoft.IdentityModel.Tokens.TokenValidationParameters() - { - // 是否开启签名认证 - ValidateIssuerSigningKey = true, - ValidateIssuer = true, - ValidateAudience = true, - ValidateLifetime = true, - //ClockSkew = TimeSpan.Zero, - ValidIssuer = configuration["Jwt:Issuer"], - ValidAudience = configuration["Jwt:Audience"], - IssuerSigningKey = - new SymmetricSecurityKey(Encoding.ASCII.GetBytes(configuration["Jwt:SecurityKey"])) - }; + options.TokenValidationParameters = + new Microsoft.IdentityModel.Tokens.TokenValidationParameters() + { + // 是否开启签名认证 + ValidateIssuerSigningKey = true, + ValidateIssuer = true, + ValidateAudience = true, + ValidateLifetime = true, + //ClockSkew = TimeSpan.Zero, + ValidIssuer = configuration["Jwt:Issuer"], + ValidAudience = configuration["Jwt:Audience"], + IssuerSigningKey = + new SymmetricSecurityKey( + Encoding.ASCII.GetBytes(configuration["Jwt:SecurityKey"])) + }; options.Events = new JwtBearerEvents { @@ -198,9 +195,11 @@ namespace CompanyName.ProjectName } // 如果请求来自hangfire 或者cap - if (path.ToString().StartsWith("/hangfire") || path.ToString().StartsWith("/cap")) + if (path.ToString().StartsWith("/hangfire") || + path.ToString().StartsWith("/cap")) { - currentContext.HttpContext.Response.Headers.Remove("X-Frame-Options"); + currentContext.HttpContext.Response.Headers.Remove( + "X-Frame-Options"); if (!string.IsNullOrEmpty(accessToken)) { currentContext.Token = accessToken; @@ -229,7 +228,8 @@ namespace CompanyName.ProjectName /// private void ConfigureOptions(ServiceConfigurationContext context) { - context.Services.Configure(context.Services.GetConfiguration().GetSection("Jwt")); + context.Services.Configure(context.Services.GetConfiguration() + .GetSection("Jwt")); } /// @@ -237,7 +237,8 @@ namespace CompanyName.ProjectName /// private void ConfigureCache(ServiceConfigurationContext context) { - Configure(options => { options.KeyPrefix = "ProjectName:"; }); + Configure( + options => { options.KeyPrefix = "ProjectName:"; }); var configuration = context.Services.GetConfiguration(); var redis = ConnectionMultiplexer.Connect(configuration["Redis:Configuration"]); context.Services @@ -245,31 +246,6 @@ namespace CompanyName.ProjectName .PersistKeysToStackExchangeRedis(redis, "ProjectName-Protection-Keys"); } - private void ConfigureVirtualFileSystem(ServiceConfigurationContext context) - { - Configure(options => { options.FileSets.AddEmbedded(); }); - - // var hostingEnvironment = context.Services.GetHostingEnvironment(); - // - // if (hostingEnvironment.IsDevelopment()) - // { - // Configure(options => - // { - // options.FileSets.ReplaceEmbeddedByPhysical( - // Path.Combine(hostingEnvironment.ContentRootPath, - // $"..{Path.DirectorySeparatorChar}CompanyName.ProjectName.Domain.Shared")); - // options.FileSets.ReplaceEmbeddedByPhysical( - // Path.Combine(hostingEnvironment.ContentRootPath, - // $"..{Path.DirectorySeparatorChar}CompanyName.ProjectName.Domain")); - // options.FileSets.ReplaceEmbeddedByPhysical( - // Path.Combine(hostingEnvironment.ContentRootPath, - // $"..{Path.DirectorySeparatorChar}CompanyName.ProjectName.Application.Contracts")); - // options.FileSets.ReplaceEmbeddedByPhysical( - // Path.Combine(hostingEnvironment.ContentRootPath, - // $"..{Path.DirectorySeparatorChar}CompanyName.ProjectName.Application")); - // }); - // } - } private void ConfigurationStsHttpClient(ServiceConfigurationContext context) { @@ -277,7 +253,8 @@ namespace CompanyName.ProjectName options => { options.BaseAddress = - new Uri(context.Services.GetConfiguration().GetSection("HttpClient:Sts:Url").Value); + new Uri(context.Services.GetConfiguration().GetSection("HttpClient:Sts:Url") + .Value); }); } @@ -285,31 +262,19 @@ namespace CompanyName.ProjectName { Configure(options => { - options.ConventionalControllers.Create(typeof(ProjectNameApplicationModule).Assembly); + options.ConventionalControllers.Create(typeof(ProjectNameApplicationModule) + .Assembly); }); } - - /// - /// 健康检查 - /// - /// - private void ConfigureHealthChecks(ServiceConfigurationContext context) - { - var redisConnectionString = - context.Services.GetConfiguration().GetValue("Cache:Redis:ConnectionString"); - var redisDatabaseId = context.Services.GetConfiguration().GetValue("Cache:Redis:DatabaseId"); - var password = context.Services.GetConfiguration().GetValue("Cache:Redis:Password"); - var connectString = $"{redisConnectionString},password={password},defaultdatabase={redisDatabaseId}"; - context.Services.AddHealthChecks().AddRedis(redisConnectionString).AddMySql(connectString); - } - - private static void ConfigureSwaggerServices(ServiceConfigurationContext context, IConfiguration configuration) + private static void ConfigureSwaggerServices(ServiceConfigurationContext context, + IConfiguration configuration) { context.Services.AddSwaggerGen( options => { - options.SwaggerDoc("v1", new OpenApiInfo {Title = "CompanyNameProjectName API", Version = "v1"}); + options.SwaggerDoc("ProjectName", + new OpenApiInfo { Title = "CompanyNameProjectName API", Version = "v1" }); options.DocInclusionPredicate((docName, description) => true); options.EnableAnnotations(); // 启用注解 options.DocumentFilter(); @@ -321,15 +286,17 @@ namespace CompanyName.ProjectName options.IncludeXmlComments(xml, true); } - options.AddSecurityDefinition(JwtBearerDefaults.AuthenticationScheme, new OpenApiSecurityScheme() - { - Description = "Please enter into field the word 'Bearer' followed by a space and the JWT value", - Name = "Authorization", - In = ParameterLocation.Header, - Type = SecuritySchemeType.Http, - Scheme = JwtBearerDefaults.AuthenticationScheme, - BearerFormat = "JWT" - }); + options.AddSecurityDefinition(JwtBearerDefaults.AuthenticationScheme, + new OpenApiSecurityScheme() + { + Description = + "Please enter into field the word 'Bearer' followed by a space and the JWT value", + Name = "Authorization", + In = ParameterLocation.Header, + Type = SecuritySchemeType.Http, + Scheme = JwtBearerDefaults.AuthenticationScheme, + BearerFormat = "JWT" + }); options.AddSecurityRequirement(new OpenApiSecurityRequirement { { @@ -357,7 +324,8 @@ namespace CompanyName.ProjectName { new OpenApiSecurityScheme { - Reference = new OpenApiReference {Type = ReferenceType.SecurityScheme, Id = "ApiKey"} + Reference = new OpenApiReference + { Type = ReferenceType.SecurityScheme, Id = "ApiKey" } }, new string[] { } } @@ -365,48 +333,6 @@ namespace CompanyName.ProjectName }); } - private void ConfigureLocalization() - { - Configure(options => - { - options.Languages.Add(new LanguageInfo("ar", "ar", "العربية")); - options.Languages.Add(new LanguageInfo("cs", "cs", "Čeština")); - options.Languages.Add(new LanguageInfo("en", "en", "English")); - options.Languages.Add(new LanguageInfo("en-GB", "en-GB", "English (UK)")); - options.Languages.Add(new LanguageInfo("fr", "fr", "Français")); - options.Languages.Add(new LanguageInfo("hu", "hu", "Magyar")); - options.Languages.Add(new LanguageInfo("pt-BR", "pt-BR", "Português")); - options.Languages.Add(new LanguageInfo("ru", "ru", "Русский")); - options.Languages.Add(new LanguageInfo("tr", "tr", "Türkçe")); - options.Languages.Add(new LanguageInfo("zh-Hans", "zh-Hans", "简体中文")); - options.Languages.Add(new LanguageInfo("zh-Hant", "zh-Hant", "繁體中文")); - options.Languages.Add(new LanguageInfo("de-DE", "de-DE", "Deutsch", "de")); - options.Languages.Add(new LanguageInfo("es", "es", "Español", "es")); - }); - } - - private void ConfigureCors(ServiceConfigurationContext context, IConfiguration configuration) - { - context.Services.AddAntiforgery(o => o.SuppressXFrameOptionsHeader = true); - context.Services.AddCors(options => - { - options.AddPolicy(DefaultCorsPolicyName, builder => - { - builder - .WithOrigins( - configuration["App:CorsOrigins"] - .Split(",", StringSplitOptions.RemoveEmptyEntries) - .Select(o => o.RemovePostFix("/")) - .ToArray() - ) - .WithAbpExposedHeaders() - .SetIsOriginAllowedToAllowWildcardSubdomains() - .AllowAnyHeader() - .AllowAnyMethod() - .AllowCredentials(); - }); - }); - } private void ConfigurationCap(ServiceConfigurationContext context) { diff --git a/aspnet-core/services/host/CompanyName.ProjectName.HttpApi.Host/appsettings.Development.json b/aspnet-core/services/host/CompanyName.ProjectName.HttpApi.Host/appsettings.Development.json index cb3e6c63..07768ac3 100644 --- a/aspnet-core/services/host/CompanyName.ProjectName.HttpApi.Host/appsettings.Development.json +++ b/aspnet-core/services/host/CompanyName.ProjectName.HttpApi.Host/appsettings.Development.json @@ -12,6 +12,7 @@ } }, "App": { + "SelfUrl": "http://localhost:44315", "CorsOrigins": "https://*.ProjectName.com,http://localhost:4200,http://localhost:3100" }, "ConnectionStrings": { @@ -51,5 +52,10 @@ "Sts": { "Url": "http://localhost:44354" } + }, + "Consul": { + "Enabled": true, + "Host": "http://localhost:8500", + "Service": "Project-Service" } } \ No newline at end of file diff --git a/aspnet-core/shared/CompanyName.ProjectName.Shared.Hosting.Gateways/CompanyName.ProjectName.Shared.Hosting.Gateways.csproj b/aspnet-core/shared/CompanyName.ProjectName.Shared.Hosting.Gateways/CompanyName.ProjectName.Shared.Hosting.Gateways.csproj index 77428998..d24e8bae 100644 --- a/aspnet-core/shared/CompanyName.ProjectName.Shared.Hosting.Gateways/CompanyName.ProjectName.Shared.Hosting.Gateways.csproj +++ b/aspnet-core/shared/CompanyName.ProjectName.Shared.Hosting.Gateways/CompanyName.ProjectName.Shared.Hosting.Gateways.csproj @@ -5,6 +5,8 @@ + + diff --git a/aspnet-core/shared/CompanyName.ProjectName.Shared.Hosting.Gateways/SharedHostingGatewayModule.cs b/aspnet-core/shared/CompanyName.ProjectName.Shared.Hosting.Gateways/SharedHostingGatewayModule.cs index ba2958cc..f5585b39 100644 --- a/aspnet-core/shared/CompanyName.ProjectName.Shared.Hosting.Gateways/SharedHostingGatewayModule.cs +++ b/aspnet-core/shared/CompanyName.ProjectName.Shared.Hosting.Gateways/SharedHostingGatewayModule.cs @@ -1,5 +1,7 @@ using Microsoft.Extensions.DependencyInjection; using Ocelot.DependencyInjection; +using Ocelot.Provider.Consul; +using Ocelot.Provider.Polly; using Volo.Abp.Autofac; using Volo.Abp.Modularity; using Volo.Abp.Swashbuckle; @@ -23,7 +25,7 @@ namespace CompanyName.ProjectName.Shared.Hosting.Gateways private static void ConfigureOcelot(ServiceConfigurationContext context) { var configuration = context.Services.GetConfiguration(); - context.Services.AddOcelot(configuration); + context.Services.AddOcelot(configuration).AddConsul().AddPolly(); } } diff --git a/aspnet-core/shared/CompanyName.ProjectName.Shared.Hosting.Microservices/Microsoft/AspNetCore/Builder/ApplicationBuilderExtensions.cs b/aspnet-core/shared/CompanyName.ProjectName.Shared.Hosting.Microservices/Microsoft/AspNetCore/Builder/ApplicationBuilderExtensions.cs index da755ea1..64b8d1c3 100644 --- a/aspnet-core/shared/CompanyName.ProjectName.Shared.Hosting.Microservices/Microsoft/AspNetCore/Builder/ApplicationBuilderExtensions.cs +++ b/aspnet-core/shared/CompanyName.ProjectName.Shared.Hosting.Microservices/Microsoft/AspNetCore/Builder/ApplicationBuilderExtensions.cs @@ -36,7 +36,6 @@ namespace Microsoft.AspNetCore.Builder Port = appUrl.Port, Check = new AgentServiceCheck { - Status = HealthStatus.Passing, DeregisterCriticalServiceAfter = TimeSpan.FromSeconds(5),//服务停止多久后注销 Interval = TimeSpan.FromSeconds(3),//健康检查时间间隔,或者称为心跳 间隔 HTTP = $"http://{appUrl.Host}:{appUrl.Port}/health",//健康检查地址 diff --git a/aspnet-core/shared/CompanyName.ProjectName.Shared.Hosting.Microservices/SharedHostingMicroserviceModule.cs b/aspnet-core/shared/CompanyName.ProjectName.Shared.Hosting.Microservices/SharedHostingMicroserviceModule.cs index abc11db6..ef46b244 100644 --- a/aspnet-core/shared/CompanyName.ProjectName.Shared.Hosting.Microservices/SharedHostingMicroserviceModule.cs +++ b/aspnet-core/shared/CompanyName.ProjectName.Shared.Hosting.Microservices/SharedHostingMicroserviceModule.cs @@ -3,6 +3,7 @@ using System.Linq; using Microsoft.AspNetCore.Cors; using Microsoft.Extensions.Configuration; using Microsoft.Extensions.DependencyInjection; +using Volo.Abp.AspNetCore.ExceptionHandling; using Volo.Abp.Autofac; using Volo.Abp.Localization; using Volo.Abp.Modularity; @@ -26,7 +27,29 @@ namespace DefaultNamespace ConfigureLocalization(); ConfigureCors(context); ConfigureUrls(configuration); - + ConfigureAbpExceptions(context); + ConfigureConsul(context, configuration); + } + + private void ConfigureConsul(ServiceConfigurationContext context, + IConfiguration configuration) + { + if (configuration.GetValue("Consul:Enabled", false)) + { + context.Services.AddConsulConfig(configuration); + } + } + + /// + /// 异常处理 + /// + /// + private void ConfigureAbpExceptions(ServiceConfigurationContext context) + { + context.Services.Configure(options => + { + options.SendExceptionsDetailsToClients = true; + }); } /// @@ -98,6 +121,7 @@ namespace DefaultNamespace private void ConfigureHealthChecks(ServiceConfigurationContext context) { // TODO 检查数据库和redis是否正常 AspNetCore.HealthChecks.Redis AspNetCore.HealthChecks.MySql + // context.Services.AddHealthChecks().AddRedis(redisConnectionString).AddMySql(connectString); context.Services.AddHealthChecks(); } } From 1ce7b17c69ceaa432e14d1e49b2adb5fc9dfd8cc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=8E=8B=E5=86=9B?= <510423039@qq.com> Date: Sat, 6 Nov 2021 16:06:31 +0800 Subject: [PATCH 5/7] =?UTF-8?q?=E2=9C=A8=20=E9=9B=86=E6=88=90Ocelot?= =?UTF-8?q?=E7=BD=91=E5=85=B3=EF=BC=8CConsul=20=E6=9C=8D=E5=8A=A1=E6=B3=A8?= =?UTF-8?q?=E5=86=8C=E5=92=8C=E5=8F=91=E7=8E=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- aspnet-core/CompanyName.ProjectName.sln | 7 --- ...mpanyName.ProjectName.PublicGateway.csproj | 11 ---- .../Controllers/WeatherForecastController.cs | 40 ------------ .../Program.cs | 23 ------- .../Properties/launchSettings.json | 31 ---------- .../Startup.cs | 58 ------------------ .../WeatherForecast.cs | 15 ----- .../appsettings.Development.json | 9 --- .../appsettings.json | 10 --- .../Properties/launchSettings.json | 4 +- .../appsettings.Consul.json | 2 +- .../appsettings.Development.json | 2 +- .../ProjectNameHttpApiHostModule.cs | 5 +- .../Properties/launchSettings.json | 17 +----- .../appsettings.Consul.json | 61 +++++++++++++++++++ .../appsettings.Development.json | 2 +- .../appsettings.json | 2 - .../appsettings.secrets.json | 2 - .../Properties/launchSettings.json | 6 +- .../appsettings.json | 17 ------ .../appsettings.secrets.json | 2 - .../AbpApplicationConfigurationController.cs | 34 +++++++++++ .../IdentityServers/ApiResourceController.cs | 2 +- .../IdentityServers/ApiScopeController.cs | 2 +- .../IdentityServers/ClientController.cs | 2 +- .../IdentityResourceController.cs | 2 +- .../Controllers/Systems/AccountController.cs | 5 +- .../Controllers/Systems/AuditLogController.cs | 4 +- .../SharedHostingMicroserviceModule.cs | 2 +- .../Swaggers/EnumSchemaFilter.cs | 2 +- .../Swaggers/HiddenAbpDefaultApiFilter.cs | 2 +- vben271/.env.development | 4 +- vben271/src/hooks/web/useSignalR.ts | 4 +- vben271/src/store/modules/permission.ts | 13 ---- .../identityServers/clients/ClientUri.vue | 1 - 35 files changed, 120 insertions(+), 285 deletions(-) delete mode 100644 aspnet-core/gateways/CompanyName.ProjectName.PublicGateway/CompanyName.ProjectName.PublicGateway.csproj delete mode 100644 aspnet-core/gateways/CompanyName.ProjectName.PublicGateway/Controllers/WeatherForecastController.cs delete mode 100644 aspnet-core/gateways/CompanyName.ProjectName.PublicGateway/Program.cs delete mode 100644 aspnet-core/gateways/CompanyName.ProjectName.PublicGateway/Properties/launchSettings.json delete mode 100644 aspnet-core/gateways/CompanyName.ProjectName.PublicGateway/Startup.cs delete mode 100644 aspnet-core/gateways/CompanyName.ProjectName.PublicGateway/WeatherForecast.cs delete mode 100644 aspnet-core/gateways/CompanyName.ProjectName.PublicGateway/appsettings.Development.json delete mode 100644 aspnet-core/gateways/CompanyName.ProjectName.PublicGateway/appsettings.json create mode 100644 aspnet-core/services/host/CompanyName.ProjectName.HttpApi.Host/appsettings.Consul.json delete mode 100644 aspnet-core/services/host/CompanyName.ProjectName.HttpApi.Host/appsettings.json delete mode 100644 aspnet-core/services/host/CompanyName.ProjectName.HttpApi.Host/appsettings.secrets.json delete mode 100644 aspnet-core/services/host/CompanyName.ProjectName.IdentityServer/appsettings.json delete mode 100644 aspnet-core/services/host/CompanyName.ProjectName.IdentityServer/appsettings.secrets.json create mode 100644 aspnet-core/services/src/CompanyName.ProjectName.HttpApi/AbpApplicationConfigurationController.cs diff --git a/aspnet-core/CompanyName.ProjectName.sln b/aspnet-core/CompanyName.ProjectName.sln index 180e541f..aba6c067 100644 --- a/aspnet-core/CompanyName.ProjectName.sln +++ b/aspnet-core/CompanyName.ProjectName.sln @@ -139,8 +139,6 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Lion.Abp.Extension", "frame EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "gateways", "gateways", "{5C304CBC-F30D-413C-A0AF-8B6814A2D4A3}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CompanyName.ProjectName.PublicGateway", "gateways\CompanyName.ProjectName.PublicGateway\CompanyName.ProjectName.PublicGateway.csproj", "{870364BA-DD5C-4597-9047-BD8A0CA1CFBA}" -EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CompanyName.ProjectName.WebGateway", "gateways\CompanyName.ProjectName.WebGateway\CompanyName.ProjectName.WebGateway.csproj", "{D9108313-8D05-4F5F-9AA0-B443EC3374B6}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CompanyName.ProjectName.FreeSqlRepository", "services\src\CompanyName.ProjectName.FreeSqlRepository\CompanyName.ProjectName.FreeSqlRepository.csproj", "{FC30B17B-F671-4E55-90C6-9F37E40B483D}" @@ -323,10 +321,6 @@ Global {6848FA46-EFFF-4E0C-8EAA-145D8C440333}.Debug|Any CPU.Build.0 = Debug|Any CPU {6848FA46-EFFF-4E0C-8EAA-145D8C440333}.Release|Any CPU.ActiveCfg = Release|Any CPU {6848FA46-EFFF-4E0C-8EAA-145D8C440333}.Release|Any CPU.Build.0 = Release|Any CPU - {870364BA-DD5C-4597-9047-BD8A0CA1CFBA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {870364BA-DD5C-4597-9047-BD8A0CA1CFBA}.Debug|Any CPU.Build.0 = Debug|Any CPU - {870364BA-DD5C-4597-9047-BD8A0CA1CFBA}.Release|Any CPU.ActiveCfg = Release|Any CPU - {870364BA-DD5C-4597-9047-BD8A0CA1CFBA}.Release|Any CPU.Build.0 = Release|Any CPU {D9108313-8D05-4F5F-9AA0-B443EC3374B6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {D9108313-8D05-4F5F-9AA0-B443EC3374B6}.Debug|Any CPU.Build.0 = Debug|Any CPU {D9108313-8D05-4F5F-9AA0-B443EC3374B6}.Release|Any CPU.ActiveCfg = Release|Any CPU @@ -399,7 +393,6 @@ Global {48D938A1-36E4-4AC1-9AF2-645CB75D4A05} = {1A57338B-65B1-4B8F-ABBD-83F4E8321D8F} {800F4482-EAC3-472B-AF07-53980D47AA41} = {11ED8435-B5AE-4BF3-9D4B-51FA1E4A18A6} {6848FA46-EFFF-4E0C-8EAA-145D8C440333} = {C4AC9352-C9F5-4096-8D73-13638232CFB9} - {870364BA-DD5C-4597-9047-BD8A0CA1CFBA} = {5C304CBC-F30D-413C-A0AF-8B6814A2D4A3} {D9108313-8D05-4F5F-9AA0-B443EC3374B6} = {5C304CBC-F30D-413C-A0AF-8B6814A2D4A3} {FC30B17B-F671-4E55-90C6-9F37E40B483D} = {CA9AC87F-097E-4F15-8393-4BC07735A5B0} EndGlobalSection diff --git a/aspnet-core/gateways/CompanyName.ProjectName.PublicGateway/CompanyName.ProjectName.PublicGateway.csproj b/aspnet-core/gateways/CompanyName.ProjectName.PublicGateway/CompanyName.ProjectName.PublicGateway.csproj deleted file mode 100644 index 11984f2d..00000000 --- a/aspnet-core/gateways/CompanyName.ProjectName.PublicGateway/CompanyName.ProjectName.PublicGateway.csproj +++ /dev/null @@ -1,11 +0,0 @@ - - - - net5.0 - - - - - - - diff --git a/aspnet-core/gateways/CompanyName.ProjectName.PublicGateway/Controllers/WeatherForecastController.cs b/aspnet-core/gateways/CompanyName.ProjectName.PublicGateway/Controllers/WeatherForecastController.cs deleted file mode 100644 index 2af021d9..00000000 --- a/aspnet-core/gateways/CompanyName.ProjectName.PublicGateway/Controllers/WeatherForecastController.cs +++ /dev/null @@ -1,40 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Threading.Tasks; -using Microsoft.AspNetCore.Mvc; -using Microsoft.Extensions.Logging; - -namespace CompanyName.ProjectName.PublicGateway.Controllers -{ - [ApiController] - [Route("[controller]")] - public class WeatherForecastController : ControllerBase - { - private static readonly string[] Summaries = new[] - { - "Freezing", "Bracing", "Chilly", "Cool", "Mild", "Warm", "Balmy", "Hot", "Sweltering", - "Scorching" - }; - - private readonly ILogger _logger; - - public WeatherForecastController(ILogger logger) - { - _logger = logger; - } - - [HttpGet] - public IEnumerable Get() - { - var rng = new Random(); - return Enumerable.Range(1, 5).Select(index => new WeatherForecast - { - Date = DateTime.Now.AddDays(index), - TemperatureC = rng.Next(-20, 55), - Summary = Summaries[rng.Next(Summaries.Length)] - }) - .ToArray(); - } - } -} \ No newline at end of file diff --git a/aspnet-core/gateways/CompanyName.ProjectName.PublicGateway/Program.cs b/aspnet-core/gateways/CompanyName.ProjectName.PublicGateway/Program.cs deleted file mode 100644 index 6c2882f0..00000000 --- a/aspnet-core/gateways/CompanyName.ProjectName.PublicGateway/Program.cs +++ /dev/null @@ -1,23 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Threading.Tasks; -using Microsoft.AspNetCore.Hosting; -using Microsoft.Extensions.Configuration; -using Microsoft.Extensions.Hosting; -using Microsoft.Extensions.Logging; - -namespace CompanyName.ProjectName.PublicGateway -{ - public class Program - { - public static void Main(string[] args) - { - CreateHostBuilder(args).Build().Run(); - } - - public static IHostBuilder CreateHostBuilder(string[] args) => - Host.CreateDefaultBuilder(args) - .ConfigureWebHostDefaults(webBuilder => { webBuilder.UseStartup(); }); - } -} \ No newline at end of file diff --git a/aspnet-core/gateways/CompanyName.ProjectName.PublicGateway/Properties/launchSettings.json b/aspnet-core/gateways/CompanyName.ProjectName.PublicGateway/Properties/launchSettings.json deleted file mode 100644 index f0771cbb..00000000 --- a/aspnet-core/gateways/CompanyName.ProjectName.PublicGateway/Properties/launchSettings.json +++ /dev/null @@ -1,31 +0,0 @@ -{ - "$schema": "http://json.schemastore.org/launchsettings.json", - "iisSettings": { - "windowsAuthentication": false, - "anonymousAuthentication": true, - "iisExpress": { - "applicationUrl": "http://localhost:29877", - "sslPort": 44344 - } - }, - "profiles": { - "IIS Express": { - "commandName": "IISExpress", - "launchBrowser": true, - "launchUrl": "swagger", - "environmentVariables": { - "ASPNETCORE_ENVIRONMENT": "Development" - } - }, - "CompanyName.ProjectName.PublicGateway": { - "commandName": "Project", - "dotnetRunMessages": "true", - "launchBrowser": true, - "launchUrl": "swagger", - "applicationUrl": "https://localhost:5001;http://localhost:5000", - "environmentVariables": { - "ASPNETCORE_ENVIRONMENT": "Development" - } - } - } -} diff --git a/aspnet-core/gateways/CompanyName.ProjectName.PublicGateway/Startup.cs b/aspnet-core/gateways/CompanyName.ProjectName.PublicGateway/Startup.cs deleted file mode 100644 index 63ce8e33..00000000 --- a/aspnet-core/gateways/CompanyName.ProjectName.PublicGateway/Startup.cs +++ /dev/null @@ -1,58 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Threading.Tasks; -using Microsoft.AspNetCore.Builder; -using Microsoft.AspNetCore.Hosting; -using Microsoft.AspNetCore.HttpsPolicy; -using Microsoft.AspNetCore.Mvc; -using Microsoft.Extensions.Configuration; -using Microsoft.Extensions.DependencyInjection; -using Microsoft.Extensions.Hosting; -using Microsoft.Extensions.Logging; -using Microsoft.OpenApi.Models; - -namespace CompanyName.ProjectName.PublicGateway -{ - public class Startup - { - public Startup(IConfiguration configuration) - { - Configuration = configuration; - } - - public IConfiguration Configuration { get; } - - // This method gets called by the runtime. Use this method to add services to the container. - public void ConfigureServices(IServiceCollection services) - { - services.AddControllers(); - services.AddSwaggerGen(c => - { - c.SwaggerDoc("v1", - new OpenApiInfo - { Title = "CompanyName.ProjectName.PublicGateway", Version = "v1" }); - }); - } - - // This method gets called by the runtime. Use this method to configure the HTTP request pipeline. - public void Configure(IApplicationBuilder app, IWebHostEnvironment env) - { - if (env.IsDevelopment()) - { - app.UseDeveloperExceptionPage(); - app.UseSwagger(); - app.UseSwaggerUI(c => c.SwaggerEndpoint("/swagger/v1/swagger.json", - "CompanyName.ProjectName.PublicGateway v1")); - } - - app.UseHttpsRedirection(); - - app.UseRouting(); - - app.UseAuthorization(); - - app.UseEndpoints(endpoints => { endpoints.MapControllers(); }); - } - } -} \ No newline at end of file diff --git a/aspnet-core/gateways/CompanyName.ProjectName.PublicGateway/WeatherForecast.cs b/aspnet-core/gateways/CompanyName.ProjectName.PublicGateway/WeatherForecast.cs deleted file mode 100644 index 298c8728..00000000 --- a/aspnet-core/gateways/CompanyName.ProjectName.PublicGateway/WeatherForecast.cs +++ /dev/null @@ -1,15 +0,0 @@ -using System; - -namespace CompanyName.ProjectName.PublicGateway -{ - public class WeatherForecast - { - public DateTime Date { get; set; } - - public int TemperatureC { get; set; } - - public int TemperatureF => 32 + (int)(TemperatureC / 0.5556); - - public string Summary { get; set; } - } -} \ No newline at end of file diff --git a/aspnet-core/gateways/CompanyName.ProjectName.PublicGateway/appsettings.Development.json b/aspnet-core/gateways/CompanyName.ProjectName.PublicGateway/appsettings.Development.json deleted file mode 100644 index 8983e0fc..00000000 --- a/aspnet-core/gateways/CompanyName.ProjectName.PublicGateway/appsettings.Development.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "Logging": { - "LogLevel": { - "Default": "Information", - "Microsoft": "Warning", - "Microsoft.Hosting.Lifetime": "Information" - } - } -} diff --git a/aspnet-core/gateways/CompanyName.ProjectName.PublicGateway/appsettings.json b/aspnet-core/gateways/CompanyName.ProjectName.PublicGateway/appsettings.json deleted file mode 100644 index d9d9a9bf..00000000 --- a/aspnet-core/gateways/CompanyName.ProjectName.PublicGateway/appsettings.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "Logging": { - "LogLevel": { - "Default": "Information", - "Microsoft": "Warning", - "Microsoft.Hosting.Lifetime": "Information" - } - }, - "AllowedHosts": "*" -} diff --git a/aspnet-core/gateways/CompanyName.ProjectName.WebGateway/Properties/launchSettings.json b/aspnet-core/gateways/CompanyName.ProjectName.WebGateway/Properties/launchSettings.json index 3a803e20..e2aab069 100644 --- a/aspnet-core/gateways/CompanyName.ProjectName.WebGateway/Properties/launchSettings.json +++ b/aspnet-core/gateways/CompanyName.ProjectName.WebGateway/Properties/launchSettings.json @@ -3,11 +3,11 @@ "profiles": { "CompanyName.ProjectName.WebGateway": { "commandName": "Project", - "launchBrowser": true, + "launchBrowser": false, "launchUrl": "swagger", "applicationUrl": "http://localhost:44314", "environmentVariables": { - "ASPNETCORE_ENVIRONMENT": "Consul" + "ASPNETCORE_ENVIRONMENT": "Development" } } } diff --git a/aspnet-core/gateways/CompanyName.ProjectName.WebGateway/appsettings.Consul.json b/aspnet-core/gateways/CompanyName.ProjectName.WebGateway/appsettings.Consul.json index af6745a1..4776e807 100644 --- a/aspnet-core/gateways/CompanyName.ProjectName.WebGateway/appsettings.Consul.json +++ b/aspnet-core/gateways/CompanyName.ProjectName.WebGateway/appsettings.Consul.json @@ -36,7 +36,7 @@ "LoadBalancerOptions": { "Type": "LeastConnection" }, - "UpstreamPathTemplate": "/{url}", + "UpstreamPathTemplate": "/gateway/{url}", "UpstreamHttpMethod": [ "Get", "Post", diff --git a/aspnet-core/gateways/CompanyName.ProjectName.WebGateway/appsettings.Development.json b/aspnet-core/gateways/CompanyName.ProjectName.WebGateway/appsettings.Development.json index 3f557e88..0c877400 100644 --- a/aspnet-core/gateways/CompanyName.ProjectName.WebGateway/appsettings.Development.json +++ b/aspnet-core/gateways/CompanyName.ProjectName.WebGateway/appsettings.Development.json @@ -40,7 +40,7 @@ "Port": 44315 } ], - "UpstreamPathTemplate": "/{url}", + "UpstreamPathTemplate": "/gateway/{url}", "UpstreamHttpMethod": [ "Get", "Post", diff --git a/aspnet-core/services/host/CompanyName.ProjectName.HttpApi.Host/ProjectNameHttpApiHostModule.cs b/aspnet-core/services/host/CompanyName.ProjectName.HttpApi.Host/ProjectNameHttpApiHostModule.cs index 8b3d3c2a..9371638c 100644 --- a/aspnet-core/services/host/CompanyName.ProjectName.HttpApi.Host/ProjectNameHttpApiHostModule.cs +++ b/aspnet-core/services/host/CompanyName.ProjectName.HttpApi.Host/ProjectNameHttpApiHostModule.cs @@ -31,8 +31,7 @@ using Volo.Abp.Swashbuckle; using System.Threading.Tasks; using CompanyName.ProjectName.Extensions; using CompanyName.ProjectName.MultiTenancy; -using DefaultNamespace; -using DefaultNamespace.Swaggers; +using CompanyName.ProjectName.Swaggers; using Lion.Abp.Cap; using Savorboard.CAP.InMemoryMessageQueue; using Serilog; @@ -79,6 +78,8 @@ namespace CompanyName.ProjectName ConfigureHangfireMysql(context); ConfigurationCap(context); ConfigurationStsHttpClient(context); + + } public override void OnApplicationInitialization(ApplicationInitializationContext context) diff --git a/aspnet-core/services/host/CompanyName.ProjectName.HttpApi.Host/Properties/launchSettings.json b/aspnet-core/services/host/CompanyName.ProjectName.HttpApi.Host/Properties/launchSettings.json index 6fce9433..f6d4def0 100644 --- a/aspnet-core/services/host/CompanyName.ProjectName.HttpApi.Host/Properties/launchSettings.json +++ b/aspnet-core/services/host/CompanyName.ProjectName.HttpApi.Host/Properties/launchSettings.json @@ -1,23 +1,8 @@ { - "iisSettings": { - "windowsAuthentication": false, - "anonymousAuthentication": true, - "iisExpress": { - "applicationUrl": "https://localhost:44315", - "sslPort": 44315 - } - }, "profiles": { - "IIS Express": { - "commandName": "IISExpress", - "launchBrowser": true, - "environmentVariables": { - "ASPNETCORE_ENVIRONMENT": "Development" - } - }, "CompanyName.ProjectName.HttpApi.Host": { "commandName": "Project", - "launchBrowser": true, + "launchBrowser": false, "applicationUrl": "http://localhost:44315", "environmentVariables": { "ASPNETCORE_ENVIRONMENT": "Development" diff --git a/aspnet-core/services/host/CompanyName.ProjectName.HttpApi.Host/appsettings.Consul.json b/aspnet-core/services/host/CompanyName.ProjectName.HttpApi.Host/appsettings.Consul.json new file mode 100644 index 00000000..07768ac3 --- /dev/null +++ b/aspnet-core/services/host/CompanyName.ProjectName.HttpApi.Host/appsettings.Consul.json @@ -0,0 +1,61 @@ +{ + "Serilog": { + "MinimumLevel": { + "Default": "Information", + "Override": { + "Microsoft": "Information", + "Volo.Abp": "Information", + "Hangfire": "Information", + "DotNetCore.CAP": "Information", + "Serilog.AspNetCore": "Information" + } + } + }, + "App": { + "SelfUrl": "http://localhost:44315", + "CorsOrigins": "https://*.ProjectName.com,http://localhost:4200,http://localhost:3100" + }, + "ConnectionStrings": { + "Default": "Data Source=localhost;Database=CompanyNameProjectNameDB20211106;uid=root;pwd=1q2w3E*;charset=utf8mb4;Allow User Variables=true;AllowLoadLocalInfile=true" + }, + "Redis": { + "Configuration": "localhost,password=mypassword,defaultdatabase=1" + }, + "Jwt": { + "Audience": "CompanyNameProjectName", + //客户端标识 + "SecurityKey": "dzehzRz9a8asdfasfdadfasdfasdfafsdadfasbasdf=", + "Issuer": "CompanyNameProjectName", + //签发者 + "ExpirationTime": 24 + //过期时间 hour + }, + "Cap": { + "Enabled": "false", + "RabbitMq": { + "HostName": "localhost", + "UserName": "admin", + "Password": "admin" + } + }, + "LogToElasticSearch": { + "Enabled": "false", + "ElasticSearch": { + "Url": "http://es.cn", + "IndexFormat": "companyname.projectname.development", + "UserName": "elastic", + "Password": "aVVhjQ95RP7nbwNy", + "DashboardIndex": "companyname.projectname" + } + }, + "HttpClient": { + "Sts": { + "Url": "http://localhost:44354" + } + }, + "Consul": { + "Enabled": true, + "Host": "http://localhost:8500", + "Service": "Project-Service" + } +} \ No newline at end of file diff --git a/aspnet-core/services/host/CompanyName.ProjectName.HttpApi.Host/appsettings.Development.json b/aspnet-core/services/host/CompanyName.ProjectName.HttpApi.Host/appsettings.Development.json index 07768ac3..51a34d72 100644 --- a/aspnet-core/services/host/CompanyName.ProjectName.HttpApi.Host/appsettings.Development.json +++ b/aspnet-core/services/host/CompanyName.ProjectName.HttpApi.Host/appsettings.Development.json @@ -54,7 +54,7 @@ } }, "Consul": { - "Enabled": true, + "Enabled": false, "Host": "http://localhost:8500", "Service": "Project-Service" } diff --git a/aspnet-core/services/host/CompanyName.ProjectName.HttpApi.Host/appsettings.json b/aspnet-core/services/host/CompanyName.ProjectName.HttpApi.Host/appsettings.json deleted file mode 100644 index 7a73a41b..00000000 --- a/aspnet-core/services/host/CompanyName.ProjectName.HttpApi.Host/appsettings.json +++ /dev/null @@ -1,2 +0,0 @@ -{ -} \ No newline at end of file diff --git a/aspnet-core/services/host/CompanyName.ProjectName.HttpApi.Host/appsettings.secrets.json b/aspnet-core/services/host/CompanyName.ProjectName.HttpApi.Host/appsettings.secrets.json deleted file mode 100644 index 7a73a41b..00000000 --- a/aspnet-core/services/host/CompanyName.ProjectName.HttpApi.Host/appsettings.secrets.json +++ /dev/null @@ -1,2 +0,0 @@ -{ -} \ No newline at end of file diff --git a/aspnet-core/services/host/CompanyName.ProjectName.IdentityServer/Properties/launchSettings.json b/aspnet-core/services/host/CompanyName.ProjectName.IdentityServer/Properties/launchSettings.json index 4cb3979f..f9d652c2 100644 --- a/aspnet-core/services/host/CompanyName.ProjectName.IdentityServer/Properties/launchSettings.json +++ b/aspnet-core/services/host/CompanyName.ProjectName.IdentityServer/Properties/launchSettings.json @@ -1,13 +1,11 @@ { - "profiles": { - "CompanyName.ProjectName.IdentityServer": { "commandName": "Project", - "launchBrowser": true, + "launchBrowser": false, "applicationUrl": "http://localhost:44354", "environmentVariables": { - "ASPNETCORE_ENVIRONMENT": "Production" + "ASPNETCORE_ENVIRONMENT": "Development" } } } diff --git a/aspnet-core/services/host/CompanyName.ProjectName.IdentityServer/appsettings.json b/aspnet-core/services/host/CompanyName.ProjectName.IdentityServer/appsettings.json deleted file mode 100644 index 8873bd7b..00000000 --- a/aspnet-core/services/host/CompanyName.ProjectName.IdentityServer/appsettings.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "App": { - "SelfUrl": "https://localhost:44354", - "ClientUrl": "http://localhost:4200", - "CorsOrigins": "https://*.ProjectName.com,http://localhost:4200,https://localhost:44307,https://localhost:44315", - "RedirectAllowedUrls": "http://localhost:4200,https://localhost:44307" - }, - "ConnectionStrings": { - "Default": "Data Source=localhost;Database=CompanyNameProjectNameDB;uid=root;pwd=1q2w3E*;charset=utf8mb4;Allow User Variables=true;AllowLoadLocalInfile=true" - }, - "Redis": { - "Configuration": "localhost,password=mypassword" - }, - "StringEncryption": { - "DefaultPassPhrase": "YFLtqf75HkDnKR0n" - } -} diff --git a/aspnet-core/services/host/CompanyName.ProjectName.IdentityServer/appsettings.secrets.json b/aspnet-core/services/host/CompanyName.ProjectName.IdentityServer/appsettings.secrets.json deleted file mode 100644 index 7a73a41b..00000000 --- a/aspnet-core/services/host/CompanyName.ProjectName.IdentityServer/appsettings.secrets.json +++ /dev/null @@ -1,2 +0,0 @@ -{ -} \ No newline at end of file diff --git a/aspnet-core/services/src/CompanyName.ProjectName.HttpApi/AbpApplicationConfigurationController.cs b/aspnet-core/services/src/CompanyName.ProjectName.HttpApi/AbpApplicationConfigurationController.cs new file mode 100644 index 00000000..78966b7c --- /dev/null +++ b/aspnet-core/services/src/CompanyName.ProjectName.HttpApi/AbpApplicationConfigurationController.cs @@ -0,0 +1,34 @@ +// using System.Threading.Tasks; +// using Microsoft.AspNetCore.Mvc; +// using Volo.Abp.Application.Services; +// using Volo.Abp.AspNetCore.Mvc; +// using Volo.Abp.AspNetCore.Mvc.AntiForgery; +// using Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations; +// using Volo.Abp.DependencyInjection; +// +// namespace CompanyName.ProjectName.WebGateway.Controllers +// { +// [Dependency(ReplaceServices = true)] +// [ExposeServices(typeof(IAbpApplicationConfigurationAppService))] +// [Route("ProjectName")] +// public class ProjectNameAbpApplicationConfigurationController : AbpController,IAbpApplicationConfigurationAppService +// { +// private readonly IAbpApplicationConfigurationAppService _applicationConfigurationAppService; +// private readonly IAbpAntiForgeryManager _antiForgeryManager; +// +// public ProjectNameAbpApplicationConfigurationController( +// IAbpApplicationConfigurationAppService applicationConfigurationAppService, +// IAbpAntiForgeryManager antiForgeryManager) +// { +// _applicationConfigurationAppService = applicationConfigurationAppService; +// _antiForgeryManager = antiForgeryManager; +// } +// +// [HttpGet("api/abp/application-configuration")] +// public async Task GetAsync() +// { +// _antiForgeryManager.SetCookie(); +// return await _applicationConfigurationAppService.GetAsync(); +// } +// } +// } \ No newline at end of file diff --git a/aspnet-core/services/src/CompanyName.ProjectName.HttpApi/Controllers/IdentityServers/ApiResourceController.cs b/aspnet-core/services/src/CompanyName.ProjectName.HttpApi/Controllers/IdentityServers/ApiResourceController.cs index f88f408a..5d1d40c7 100644 --- a/aspnet-core/services/src/CompanyName.ProjectName.HttpApi/Controllers/IdentityServers/ApiResourceController.cs +++ b/aspnet-core/services/src/CompanyName.ProjectName.HttpApi/Controllers/IdentityServers/ApiResourceController.cs @@ -13,7 +13,7 @@ namespace CompanyName.ProjectName.Controllers.IdentityServers { [Route("IdentityServer/ApiResource")] [Authorize(Policy = ProjectNamePermissions.IdentityServer.ApiResource.Default)] - public class ApiResourceController : ProjectNameController + public class ApiResourceController : ProjectNameController,IApiResourceAppService { private readonly IApiResourceAppService _apiResourceAppService; diff --git a/aspnet-core/services/src/CompanyName.ProjectName.HttpApi/Controllers/IdentityServers/ApiScopeController.cs b/aspnet-core/services/src/CompanyName.ProjectName.HttpApi/Controllers/IdentityServers/ApiScopeController.cs index acd8b107..57bf03a7 100644 --- a/aspnet-core/services/src/CompanyName.ProjectName.HttpApi/Controllers/IdentityServers/ApiScopeController.cs +++ b/aspnet-core/services/src/CompanyName.ProjectName.HttpApi/Controllers/IdentityServers/ApiScopeController.cs @@ -13,7 +13,7 @@ namespace CompanyName.ProjectName.Controllers.IdentityServers { [Route("IdentityServer/ApiScope")] [Authorize(Policy = ProjectNamePermissions.IdentityServer.ApiScope.Default)] - public class ApiScopeController:ProjectNameController + public class ApiScopeController:ProjectNameController,IApiScopeAppService { private readonly IApiScopeAppService _apiScopeAppService; diff --git a/aspnet-core/services/src/CompanyName.ProjectName.HttpApi/Controllers/IdentityServers/ClientController.cs b/aspnet-core/services/src/CompanyName.ProjectName.HttpApi/Controllers/IdentityServers/ClientController.cs index 20636e9c..a5da6983 100644 --- a/aspnet-core/services/src/CompanyName.ProjectName.HttpApi/Controllers/IdentityServers/ClientController.cs +++ b/aspnet-core/services/src/CompanyName.ProjectName.HttpApi/Controllers/IdentityServers/ClientController.cs @@ -11,7 +11,7 @@ namespace CompanyName.ProjectName.Controllers.IdentityServers { [Route("IdentityServer/Client")] [Authorize(Policy = ProjectNamePermissions.IdentityServer.Client.Default)] - public class ClientController : ProjectNameController + public class ClientController : ProjectNameController,IIdentityServerClientAppService { private readonly IIdentityServerClientAppService _identityServerClientAppService; diff --git a/aspnet-core/services/src/CompanyName.ProjectName.HttpApi/Controllers/IdentityServers/IdentityResourceController.cs b/aspnet-core/services/src/CompanyName.ProjectName.HttpApi/Controllers/IdentityServers/IdentityResourceController.cs index c2105368..941f8bfc 100644 --- a/aspnet-core/services/src/CompanyName.ProjectName.HttpApi/Controllers/IdentityServers/IdentityResourceController.cs +++ b/aspnet-core/services/src/CompanyName.ProjectName.HttpApi/Controllers/IdentityServers/IdentityResourceController.cs @@ -13,7 +13,7 @@ namespace CompanyName.ProjectName.Controllers.IdentityServers { [Route("IdentityServer/IdentityResource")] [Authorize(Policy = ProjectNamePermissions.IdentityServer.IdentityResources.Default)] - public class IdentityResourceController : ProjectNameController + public class IdentityResourceController : ProjectNameController,IIdentityResourceAppService { private readonly IIdentityResourceAppService _identityResourceAppService; diff --git a/aspnet-core/services/src/CompanyName.ProjectName.HttpApi/Controllers/Systems/AccountController.cs b/aspnet-core/services/src/CompanyName.ProjectName.HttpApi/Controllers/Systems/AccountController.cs index 8401f6e0..be7f12e0 100644 --- a/aspnet-core/services/src/CompanyName.ProjectName.HttpApi/Controllers/Systems/AccountController.cs +++ b/aspnet-core/services/src/CompanyName.ProjectName.HttpApi/Controllers/Systems/AccountController.cs @@ -6,10 +6,7 @@ using Swashbuckle.AspNetCore.Annotations; namespace CompanyName.ProjectName.Controllers.Systems { - /// - /// 登录 - /// - public class AccountController : ProjectNameController + public class AccountController : ProjectNameController,ILoginAppService { private readonly ILoginAppService _loginAppService; diff --git a/aspnet-core/services/src/CompanyName.ProjectName.HttpApi/Controllers/Systems/AuditLogController.cs b/aspnet-core/services/src/CompanyName.ProjectName.HttpApi/Controllers/Systems/AuditLogController.cs index c145851a..96585061 100644 --- a/aspnet-core/services/src/CompanyName.ProjectName.HttpApi/Controllers/Systems/AuditLogController.cs +++ b/aspnet-core/services/src/CompanyName.ProjectName.HttpApi/Controllers/Systems/AuditLogController.cs @@ -12,7 +12,7 @@ namespace CompanyName.ProjectName.Controllers.Systems { [Route("AuditLogs")] [Authorize(Policy = IdentityPermissions.Users.Default)] - public class AuditLogController : ProjectNameController + public class AuditLogController : ProjectNameController,IAuditLogAppService { private readonly IAuditLogAppService _auditLogAppService; @@ -24,7 +24,7 @@ namespace CompanyName.ProjectName.Controllers.Systems [HttpPost("page")] [Authorize(Policy = ProjectNamePermissions.SystemManagement.AuditLog)] [SwaggerOperation(summary: "分页获取用户信息", Tags = new[] {"AuditLogs"})] - public Task> ListAsync(PagingAuditLogListInput input) + public Task> GetListAsync(PagingAuditLogListInput input) { return _auditLogAppService.GetListAsync(input); } diff --git a/aspnet-core/shared/CompanyName.ProjectName.Shared.Hosting.Microservices/SharedHostingMicroserviceModule.cs b/aspnet-core/shared/CompanyName.ProjectName.Shared.Hosting.Microservices/SharedHostingMicroserviceModule.cs index ef46b244..18935619 100644 --- a/aspnet-core/shared/CompanyName.ProjectName.Shared.Hosting.Microservices/SharedHostingMicroserviceModule.cs +++ b/aspnet-core/shared/CompanyName.ProjectName.Shared.Hosting.Microservices/SharedHostingMicroserviceModule.cs @@ -10,7 +10,7 @@ using Volo.Abp.Modularity; using Volo.Abp.Swashbuckle; using Volo.Abp.UI.Navigation.Urls; -namespace DefaultNamespace +namespace CompanyName.ProjectName { [DependsOn( typeof(AbpSwashbuckleModule), diff --git a/aspnet-core/shared/CompanyName.ProjectName.Shared.Hosting.Microservices/Swaggers/EnumSchemaFilter.cs b/aspnet-core/shared/CompanyName.ProjectName.Shared.Hosting.Microservices/Swaggers/EnumSchemaFilter.cs index 0cd7156f..9131492b 100644 --- a/aspnet-core/shared/CompanyName.ProjectName.Shared.Hosting.Microservices/Swaggers/EnumSchemaFilter.cs +++ b/aspnet-core/shared/CompanyName.ProjectName.Shared.Hosting.Microservices/Swaggers/EnumSchemaFilter.cs @@ -4,7 +4,7 @@ using Microsoft.OpenApi.Any; using Microsoft.OpenApi.Models; using Swashbuckle.AspNetCore.SwaggerGen; -namespace DefaultNamespace.Swaggers +namespace CompanyName.ProjectName.Swaggers { /// /// swagger 枚举映射, diff --git a/aspnet-core/shared/CompanyName.ProjectName.Shared.Hosting.Microservices/Swaggers/HiddenAbpDefaultApiFilter.cs b/aspnet-core/shared/CompanyName.ProjectName.Shared.Hosting.Microservices/Swaggers/HiddenAbpDefaultApiFilter.cs index 1b4bcd19..7e66beca 100644 --- a/aspnet-core/shared/CompanyName.ProjectName.Shared.Hosting.Microservices/Swaggers/HiddenAbpDefaultApiFilter.cs +++ b/aspnet-core/shared/CompanyName.ProjectName.Shared.Hosting.Microservices/Swaggers/HiddenAbpDefaultApiFilter.cs @@ -4,7 +4,7 @@ using Microsoft.AspNetCore.Mvc.ApiExplorer; using Microsoft.OpenApi.Models; using Swashbuckle.AspNetCore.SwaggerGen; -namespace DefaultNamespace.Swaggers +namespace CompanyName.ProjectName.Swaggers { /// /// 在使用nswag的时候,原生默认的api导致生产的代理类存在问题 diff --git a/vben271/.env.development b/vben271/.env.development index 9117223f..0ffa73bb 100644 --- a/vben271/.env.development +++ b/vben271/.env.development @@ -24,8 +24,8 @@ VITE_GLOB_API_URL_PREFIX= VITE_BUILD_COMPRESS = 'none' # 认证授权服务器地址 -VITE_AUTH_URL='http://localhost:44354' +VITE_AUTH_URL= http://localhost:44354 # 接口地址 -VITE_API_URL= http://localhost:44315 \ No newline at end of file +VITE_API_URL= http://localhost:44314/gateway \ No newline at end of file diff --git a/vben271/src/hooks/web/useSignalR.ts b/vben271/src/hooks/web/useSignalR.ts index 5f45e0da..3f2333de 100644 --- a/vben271/src/hooks/web/useSignalR.ts +++ b/vben271/src/hooks/web/useSignalR.ts @@ -22,7 +22,7 @@ export function useSignalR() { const userStore = useUserStoreWithOut(); const token = userStore.getToken; - const url = (import.meta.env.VITE_Websocket_URL as string) + '/signalr/notification'; + const url = (import.meta.env.VITE_API_URL as string) + '/signalr/notification'; const connection = new signalR.HubConnectionBuilder() .withUrl(url, { accessTokenFactory: () => token, @@ -45,7 +45,7 @@ export function useSignalR() { } }, }) - .configureLogging(signalR.LogLevel.Error) + .configureLogging(signalR.LogLevel.Debug) .build(); return connection; } diff --git a/vben271/src/store/modules/permission.ts b/vben271/src/store/modules/permission.ts index f9511e4f..3a6b3f6f 100644 --- a/vben271/src/store/modules/permission.ts +++ b/vben271/src/store/modules/permission.ts @@ -164,19 +164,6 @@ export const usePermissionStore = defineStore({ break; case PermissionModeEnum.ROUTE_MAPPING: - // routes = filter(asyncRoutes, routeFilter); - // routes = routes.filter(routeFilter); - // const menuList = transformRouteToMenu(routes, true); - // routes = filter(routes, routeRemoveIgnoreFilter); - // routes = routes.filter(routeRemoveIgnoreFilter); - // menuList.sort((a, b) => { - // return (a.meta?.orderNo || 0) - (b.meta?.orderNo || 0); - // }); - - // this.setFrontMenuList(menuList); - // // Convert multi-level routing to level 2 routing - // routes = flatMultiLevelRoutes(routes); - debugger; const permissions = this.getPermCodeList; const roleRouteFilter = (route: AppRouteRecordRaw) => { const { meta } = route; diff --git a/vben271/src/views/identityServers/clients/ClientUri.vue b/vben271/src/views/identityServers/clients/ClientUri.vue index 51da0f89..bf67bcd3 100644 --- a/vben271/src/views/identityServers/clients/ClientUri.vue +++ b/vben271/src/views/identityServers/clients/ClientUri.vue @@ -122,7 +122,6 @@ }; const handleRemoveLogoutRedirectUri = async (redirectUri: string) => { - debugger; await removeLogoutRedirectUriAsync({ clientId: state.currentClient.clientId, uri: redirectUri, From d38c1bdf81d03f19594d3f228fea673b3a8fd474 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=8E=8B=E5=86=9B?= <510423039@qq.com> Date: Sat, 6 Nov 2021 22:00:24 +0800 Subject: [PATCH 6/7] =?UTF-8?q?=E2=9C=A8=20=E9=9B=86=E6=88=90Ocelot?= =?UTF-8?q?=E7=BD=91=E5=85=B3=EF=BC=8CConsul=20=E6=9C=8D=E5=8A=A1=E6=B3=A8?= =?UTF-8?q?=E5=86=8C=E5=92=8C=E5=8F=91=E7=8E=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Controllers/WeatherForecastController.cs | 40 ------------------- .../WeatherForecast.cs | 15 ------- .../WebGatewayModule.cs | 1 + .../appsettings.Development.json | 17 ++++++++ .../ProjectNameHttpApiHostModule.cs | 2 +- vben271/.env.development | 4 +- vben271/src/hooks/web/useSignalR.ts | 2 +- 7 files changed, 23 insertions(+), 58 deletions(-) delete mode 100644 aspnet-core/gateways/CompanyName.ProjectName.WebGateway/Controllers/WeatherForecastController.cs delete mode 100644 aspnet-core/gateways/CompanyName.ProjectName.WebGateway/WeatherForecast.cs diff --git a/aspnet-core/gateways/CompanyName.ProjectName.WebGateway/Controllers/WeatherForecastController.cs b/aspnet-core/gateways/CompanyName.ProjectName.WebGateway/Controllers/WeatherForecastController.cs deleted file mode 100644 index 4b0dd1c0..00000000 --- a/aspnet-core/gateways/CompanyName.ProjectName.WebGateway/Controllers/WeatherForecastController.cs +++ /dev/null @@ -1,40 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Threading.Tasks; -using Microsoft.AspNetCore.Mvc; -using Microsoft.Extensions.Logging; - -namespace CompanyName.ProjectName.WebGateway.Controllers -{ - [ApiController] - [Route("[controller]")] - public class WeatherForecastController : ControllerBase - { - private static readonly string[] Summaries = new[] - { - "Freezing", "Bracing", "Chilly", "Cool", "Mild", "Warm", "Balmy", "Hot", "Sweltering", - "Scorching" - }; - - private readonly ILogger _logger; - - public WeatherForecastController(ILogger logger) - { - _logger = logger; - } - - [HttpGet] - public IEnumerable Get() - { - var rng = new Random(); - return Enumerable.Range(1, 5).Select(index => new WeatherForecast - { - Date = DateTime.Now.AddDays(index), - TemperatureC = rng.Next(-20, 55), - Summary = Summaries[rng.Next(Summaries.Length)] - }) - .ToArray(); - } - } -} \ No newline at end of file diff --git a/aspnet-core/gateways/CompanyName.ProjectName.WebGateway/WeatherForecast.cs b/aspnet-core/gateways/CompanyName.ProjectName.WebGateway/WeatherForecast.cs deleted file mode 100644 index d258003e..00000000 --- a/aspnet-core/gateways/CompanyName.ProjectName.WebGateway/WeatherForecast.cs +++ /dev/null @@ -1,15 +0,0 @@ -using System; - -namespace CompanyName.ProjectName.WebGateway -{ - public class WeatherForecast - { - public DateTime Date { get; set; } - - public int TemperatureC { get; set; } - - public int TemperatureF => 32 + (int)(TemperatureC / 0.5556); - - public string Summary { get; set; } - } -} \ No newline at end of file diff --git a/aspnet-core/gateways/CompanyName.ProjectName.WebGateway/WebGatewayModule.cs b/aspnet-core/gateways/CompanyName.ProjectName.WebGateway/WebGatewayModule.cs index a6173de7..77623827 100644 --- a/aspnet-core/gateways/CompanyName.ProjectName.WebGateway/WebGatewayModule.cs +++ b/aspnet-core/gateways/CompanyName.ProjectName.WebGateway/WebGatewayModule.cs @@ -41,6 +41,7 @@ namespace CompanyName.ProjectName.WebGateway }); app.UseConfiguredEndpoints(); + app.UseWebSockets(); app.UseOcelot().Wait(); } diff --git a/aspnet-core/gateways/CompanyName.ProjectName.WebGateway/appsettings.Development.json b/aspnet-core/gateways/CompanyName.ProjectName.WebGateway/appsettings.Development.json index 0c877400..f92fb6ab 100644 --- a/aspnet-core/gateways/CompanyName.ProjectName.WebGateway/appsettings.Development.json +++ b/aspnet-core/gateways/CompanyName.ProjectName.WebGateway/appsettings.Development.json @@ -47,6 +47,23 @@ "Put", "Delete" ] + }, + { + "DownstreamPathTemplate": "/{url}", + "DownstreamScheme": "ws", + "DownstreamHostAndPorts": [ + { + "Host": "localhost", + "Port": 44315 + } + ], + "UpstreamPathTemplate": "/ws/{url}", + "UpstreamHttpMethod": [ + "Get", + "Post", + "Put", + "Delete" + ] } ] } diff --git a/aspnet-core/services/host/CompanyName.ProjectName.HttpApi.Host/ProjectNameHttpApiHostModule.cs b/aspnet-core/services/host/CompanyName.ProjectName.HttpApi.Host/ProjectNameHttpApiHostModule.cs index 9371638c..43a15ac7 100644 --- a/aspnet-core/services/host/CompanyName.ProjectName.HttpApi.Host/ProjectNameHttpApiHostModule.cs +++ b/aspnet-core/services/host/CompanyName.ProjectName.HttpApi.Host/ProjectNameHttpApiHostModule.cs @@ -122,7 +122,7 @@ namespace CompanyName.ProjectName Authorization = new[] { new CustomHangfireAuthorizeFilter() }, IgnoreAntiforgeryToken = true }); - + if (configuration.GetValue("Consul:Enabled", false)) { app.UseConsul(); diff --git a/vben271/.env.development b/vben271/.env.development index 0ffa73bb..dd597682 100644 --- a/vben271/.env.development +++ b/vben271/.env.development @@ -28,4 +28,6 @@ VITE_AUTH_URL= http://localhost:44354 # 接口地址 -VITE_API_URL= http://localhost:44314/gateway \ No newline at end of file +VITE_API_URL= http://localhost:44314/gateway + +VITE_WEBSOCKE_URL= http://localhost:44314 \ No newline at end of file diff --git a/vben271/src/hooks/web/useSignalR.ts b/vben271/src/hooks/web/useSignalR.ts index 3f2333de..54542f34 100644 --- a/vben271/src/hooks/web/useSignalR.ts +++ b/vben271/src/hooks/web/useSignalR.ts @@ -22,7 +22,7 @@ export function useSignalR() { const userStore = useUserStoreWithOut(); const token = userStore.getToken; - const url = (import.meta.env.VITE_API_URL as string) + '/signalr/notification'; + const url = (import.meta.env.VITE_WEBSOCKE_URL as string) + '/ws/signalr/notification'; const connection = new signalR.HubConnectionBuilder() .withUrl(url, { accessTokenFactory: () => token, From 18c058a00b59d5134162841b6dbfe53600d2ebac Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=8E=8B=E5=86=9B?= <510423039@qq.com> Date: Sun, 7 Nov 2021 12:14:30 +0800 Subject: [PATCH 7/7] =?UTF-8?q?=E2=9C=A8=20=E9=9B=86=E6=88=90Ocelot?= =?UTF-8?q?=E7=BD=91=E5=85=B3=EF=BC=8CConsul=20=E6=9C=8D=E5=8A=A1=E6=B3=A8?= =?UTF-8?q?=E5=86=8C=E5=92=8C=E5=8F=91=E7=8E=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Readme.md | 10 +++- .../ICommandNotificationAppService.cs | 24 -------- .../Notifications/INotificationAppService.cs | 15 +++++ .../Samples/ISampleAppService.cs | 12 ---- .../Samples/SampleDto.cs | 7 --- .../CommandNotificationAppService.cs | 30 ---------- ...ficationCreatedDistributedEventHandler.cs} | 4 +- .../Notifications/NotificationAppService.cs | 12 ++++ .../Samples/SampleAppService.cs | 29 ---------- .../DapperNotificationRepository.cs | 56 ++++++++++--------- .../Notifications/NotificationController.cs | 10 ++-- .../Samples/SampleAppService_Tests.cs | 30 ---------- .../Samples/SampleManager_Tests.cs | 17 ------ .../Samples/SampleRepository_Tests.cs | 12 ---- .../Samples/SampleRepository_Tests.cs | 22 -------- .../ProjectNameHttpApiHostModule.cs | 4 +- .../ProjectNameIdentityServerModule.cs | 7 --- .../appsettings.secrets.json | 2 - .../Seeds/AbpSettingDataSeedContributor.cs | 6 +- ...ctName.Shared.Hosting.Microservices.csproj | 1 + 20 files changed, 75 insertions(+), 235 deletions(-) delete mode 100644 aspnet-core/modules/NotificationManagement/src/CompanyName.ProjectName.NotificationManagement.Application.Contracts/Notifications/ICommandNotificationAppService.cs delete mode 100644 aspnet-core/modules/NotificationManagement/src/CompanyName.ProjectName.NotificationManagement.Application.Contracts/Samples/ISampleAppService.cs delete mode 100644 aspnet-core/modules/NotificationManagement/src/CompanyName.ProjectName.NotificationManagement.Application.Contracts/Samples/SampleDto.cs delete mode 100644 aspnet-core/modules/NotificationManagement/src/CompanyName.ProjectName.NotificationManagement.Application/Notifications/CommandNotificationAppService.cs rename aspnet-core/modules/NotificationManagement/src/CompanyName.ProjectName.NotificationManagement.Application/Notifications/DistributedEventHandlers/{CreatedNotificationDistributedEventHandler.cs => NotificationCreatedDistributedEventHandler.cs} (89%) delete mode 100644 aspnet-core/modules/NotificationManagement/src/CompanyName.ProjectName.NotificationManagement.Application/Samples/SampleAppService.cs delete mode 100644 aspnet-core/modules/NotificationManagement/test/CompanyName.ProjectName.NotificationManagement.Application.Tests/Samples/SampleAppService_Tests.cs delete mode 100644 aspnet-core/modules/NotificationManagement/test/CompanyName.ProjectName.NotificationManagement.Domain.Tests/Samples/SampleManager_Tests.cs delete mode 100644 aspnet-core/modules/NotificationManagement/test/CompanyName.ProjectName.NotificationManagement.EntityFrameworkCore.Tests/EntityFrameworkCore/Samples/SampleRepository_Tests.cs delete mode 100644 aspnet-core/modules/NotificationManagement/test/CompanyName.ProjectName.NotificationManagement.TestBase/Samples/SampleRepository_Tests.cs delete mode 100644 aspnet-core/services/src/CompanyName.ProjectName.DbMigrator/appsettings.secrets.json diff --git a/Readme.md b/Readme.md index 604050f2..923f834b 100644 --- a/Readme.md +++ b/Readme.md @@ -35,9 +35,13 @@ - [x] 用户管理 - [x] 角色管理 - [x] 审计日志 -- [x] 后台任务(hangfire) -- [x] 集成事件(dotnetcore.cap) -- [x] IdentityServer4 - [x] 客户端管理 - [x] Api 资源管理 - [x] ApiScope 管理 - [x] Identity 资源管理 +- [x] 后台任务 +- [x] 集成事件 +- [x] IdentityServer4 + - [x] 客户端管理 + - [x] Api 资源管理 + - [x] ApiScope 管理 + - [x] Identity 资源管理 - [x] SinglaR 消息通知 - [x] 多语言 - [x] FreeSql diff --git a/aspnet-core/modules/NotificationManagement/src/CompanyName.ProjectName.NotificationManagement.Application.Contracts/Notifications/ICommandNotificationAppService.cs b/aspnet-core/modules/NotificationManagement/src/CompanyName.ProjectName.NotificationManagement.Application.Contracts/Notifications/ICommandNotificationAppService.cs deleted file mode 100644 index 132c360f..00000000 --- a/aspnet-core/modules/NotificationManagement/src/CompanyName.ProjectName.NotificationManagement.Application.Contracts/Notifications/ICommandNotificationAppService.cs +++ /dev/null @@ -1,24 +0,0 @@ -using System.Threading.Tasks; -using Volo.Abp.Application.Services; -using CompanyName.ProjectName.NotificationManagement.Notifications.Dtos; - -namespace CompanyName.ProjectName.NotificationManagement.Notifications -{ - public interface ICommandNotificationAppService : IApplicationService - { - /// - /// 消息设置为已读 - /// - /// - /// - Task SetReadAsync(SetReadInput input); - - /// - /// 创建一个消息 - /// 测试使用 - /// - /// - /// - Task CreateAsync(CreateNotificationInput input); - } -} \ No newline at end of file diff --git a/aspnet-core/modules/NotificationManagement/src/CompanyName.ProjectName.NotificationManagement.Application.Contracts/Notifications/INotificationAppService.cs b/aspnet-core/modules/NotificationManagement/src/CompanyName.ProjectName.NotificationManagement.Application.Contracts/Notifications/INotificationAppService.cs index c2617707..91bf6982 100644 --- a/aspnet-core/modules/NotificationManagement/src/CompanyName.ProjectName.NotificationManagement.Application.Contracts/Notifications/INotificationAppService.cs +++ b/aspnet-core/modules/NotificationManagement/src/CompanyName.ProjectName.NotificationManagement.Application.Contracts/Notifications/INotificationAppService.cs @@ -12,5 +12,20 @@ namespace CompanyName.ProjectName.NotificationManagement.Notifications /// /// Task SendMessageAsync(string title, string content, MessageType messageType, List users); + + /// + /// 消息设置为已读 + /// + /// + /// + Task SetReadAsync(SetReadInput input); + + /// + /// 创建一个消息 + /// 测试使用 + /// + /// + /// + Task CreateAsync(CreateNotificationInput input); } } \ No newline at end of file diff --git a/aspnet-core/modules/NotificationManagement/src/CompanyName.ProjectName.NotificationManagement.Application.Contracts/Samples/ISampleAppService.cs b/aspnet-core/modules/NotificationManagement/src/CompanyName.ProjectName.NotificationManagement.Application.Contracts/Samples/ISampleAppService.cs deleted file mode 100644 index ef610631..00000000 --- a/aspnet-core/modules/NotificationManagement/src/CompanyName.ProjectName.NotificationManagement.Application.Contracts/Samples/ISampleAppService.cs +++ /dev/null @@ -1,12 +0,0 @@ -using System.Threading.Tasks; -using Volo.Abp.Application.Services; - -namespace CompanyName.ProjectName.NotificationManagement.Samples -{ - public interface ISampleAppService : IApplicationService - { - Task GetAsync(); - - Task GetAuthorizedAsync(); - } -} diff --git a/aspnet-core/modules/NotificationManagement/src/CompanyName.ProjectName.NotificationManagement.Application.Contracts/Samples/SampleDto.cs b/aspnet-core/modules/NotificationManagement/src/CompanyName.ProjectName.NotificationManagement.Application.Contracts/Samples/SampleDto.cs deleted file mode 100644 index 601f2917..00000000 --- a/aspnet-core/modules/NotificationManagement/src/CompanyName.ProjectName.NotificationManagement.Application.Contracts/Samples/SampleDto.cs +++ /dev/null @@ -1,7 +0,0 @@ -namespace CompanyName.ProjectName.NotificationManagement.Samples -{ - public class SampleDto - { - public int Value { get; set; } - } -} \ No newline at end of file diff --git a/aspnet-core/modules/NotificationManagement/src/CompanyName.ProjectName.NotificationManagement.Application/Notifications/CommandNotificationAppService.cs b/aspnet-core/modules/NotificationManagement/src/CompanyName.ProjectName.NotificationManagement.Application/Notifications/CommandNotificationAppService.cs deleted file mode 100644 index 10efd5d6..00000000 --- a/aspnet-core/modules/NotificationManagement/src/CompanyName.ProjectName.NotificationManagement.Application/Notifications/CommandNotificationAppService.cs +++ /dev/null @@ -1,30 +0,0 @@ -using System.Threading.Tasks; -using CompanyName.ProjectName.NotificationManagement.Notifications.Dtos; -using Volo.Abp.Users; - -namespace CompanyName.ProjectName.NotificationManagement.Notifications -{ - public class CommandNotificationAppService : NotificationManagementAppService, ICommandNotificationAppService - { - private readonly NotificationManager _notificationManager; - - private readonly ICurrentUser _currentUser; - public CommandNotificationAppService(NotificationManager notificationManager, ICurrentUser currentUser) - { - _notificationManager = notificationManager; - _currentUser = currentUser; - } - - public Task SetReadAsync(SetReadInput input) - { - return _notificationManager.SetReadAsync(input.Id, input.ReceiveId); - } - - public async Task CreateAsync(CreateNotificationInput input) - { - if (_currentUser.Id != null) - await _notificationManager.CreateAsync(input.Title, input.Content, _currentUser.Id.Value, input.ReceiveIds, - input.MessageType); - } - } -} \ No newline at end of file diff --git a/aspnet-core/modules/NotificationManagement/src/CompanyName.ProjectName.NotificationManagement.Application/Notifications/DistributedEventHandlers/CreatedNotificationDistributedEventHandler.cs b/aspnet-core/modules/NotificationManagement/src/CompanyName.ProjectName.NotificationManagement.Application/Notifications/DistributedEventHandlers/NotificationCreatedDistributedEventHandler.cs similarity index 89% rename from aspnet-core/modules/NotificationManagement/src/CompanyName.ProjectName.NotificationManagement.Application/Notifications/DistributedEventHandlers/CreatedNotificationDistributedEventHandler.cs rename to aspnet-core/modules/NotificationManagement/src/CompanyName.ProjectName.NotificationManagement.Application/Notifications/DistributedEventHandlers/NotificationCreatedDistributedEventHandler.cs index 4ac3f81c..acd0c069 100644 --- a/aspnet-core/modules/NotificationManagement/src/CompanyName.ProjectName.NotificationManagement.Application/Notifications/DistributedEventHandlers/CreatedNotificationDistributedEventHandler.cs +++ b/aspnet-core/modules/NotificationManagement/src/CompanyName.ProjectName.NotificationManagement.Application/Notifications/DistributedEventHandlers/NotificationCreatedDistributedEventHandler.cs @@ -10,12 +10,12 @@ namespace CompanyName.ProjectName.NotificationManagement.Notifications.Distribut /// 创建消息事件处理 /// public class - CreatedNotificationDistributedEventHandler : IDistributedEventHandler, + NotificationCreatedDistributedEventHandler : IDistributedEventHandler, ITransientDependency { private readonly INotificationAppService _hubAppService; - public CreatedNotificationDistributedEventHandler(INotificationAppService hubAppService) + public NotificationCreatedDistributedEventHandler(INotificationAppService hubAppService) { _hubAppService = hubAppService; } diff --git a/aspnet-core/modules/NotificationManagement/src/CompanyName.ProjectName.NotificationManagement.Application/Notifications/NotificationAppService.cs b/aspnet-core/modules/NotificationManagement/src/CompanyName.ProjectName.NotificationManagement.Application/Notifications/NotificationAppService.cs index 2f11de40..e6a86d47 100644 --- a/aspnet-core/modules/NotificationManagement/src/CompanyName.ProjectName.NotificationManagement.Application/Notifications/NotificationAppService.cs +++ b/aspnet-core/modules/NotificationManagement/src/CompanyName.ProjectName.NotificationManagement.Application/Notifications/NotificationAppService.cs @@ -24,6 +24,18 @@ namespace CompanyName.ProjectName.NotificationManagement.Notifications _currentUser = currentUser; } + public Task SetReadAsync(SetReadInput input) + { + return _notificationManager.SetReadAsync(input.Id, input.ReceiveId); + } + + public async Task CreateAsync(CreateNotificationInput input) + { + if (_currentUser.Id != null) + await _notificationManager.CreateAsync(input.Title, input.Content, _currentUser.Id.Value, input.ReceiveIds, + input.MessageType); + } + /// /// 发送消息 /// diff --git a/aspnet-core/modules/NotificationManagement/src/CompanyName.ProjectName.NotificationManagement.Application/Samples/SampleAppService.cs b/aspnet-core/modules/NotificationManagement/src/CompanyName.ProjectName.NotificationManagement.Application/Samples/SampleAppService.cs deleted file mode 100644 index 19b780b8..00000000 --- a/aspnet-core/modules/NotificationManagement/src/CompanyName.ProjectName.NotificationManagement.Application/Samples/SampleAppService.cs +++ /dev/null @@ -1,29 +0,0 @@ -using System.Threading.Tasks; -using Microsoft.AspNetCore.Authorization; - -namespace CompanyName.ProjectName.NotificationManagement.Samples -{ - public class SampleAppService : NotificationManagementAppService, ISampleAppService - { - public Task GetAsync() - { - return Task.FromResult( - new SampleDto - { - Value = 42 - } - ); - } - - [Authorize] - public Task GetAuthorizedAsync() - { - return Task.FromResult( - new SampleDto - { - Value = 42 - } - ); - } - } -} \ No newline at end of file diff --git a/aspnet-core/modules/NotificationManagement/src/CompanyName.ProjectName.NotificationManagement.EntityFrameworkCore/EntityFrameworkCore/Notifications/DapperNotificationRepository.cs b/aspnet-core/modules/NotificationManagement/src/CompanyName.ProjectName.NotificationManagement.EntityFrameworkCore/EntityFrameworkCore/Notifications/DapperNotificationRepository.cs index f2ad6bc3..b2133f6e 100644 --- a/aspnet-core/modules/NotificationManagement/src/CompanyName.ProjectName.NotificationManagement.EntityFrameworkCore/EntityFrameworkCore/Notifications/DapperNotificationRepository.cs +++ b/aspnet-core/modules/NotificationManagement/src/CompanyName.ProjectName.NotificationManagement.EntityFrameworkCore/EntityFrameworkCore/Notifications/DapperNotificationRepository.cs @@ -11,10 +11,11 @@ using Volo.Abp.EntityFrameworkCore; namespace CompanyName.ProjectName.NotificationManagement.EntityFrameworkCore.Notifications { - public class DapperNotificationRepository : DapperRepository, + public class DapperNotificationRepository : DapperRepository, IDapperNotificationRepository { - public DapperNotificationRepository(IDbContextProvider dbContextProvider) : + public DapperNotificationRepository( + IDbContextProvider dbContextProvider) : base(dbContextProvider) { } @@ -23,16 +24,18 @@ namespace CompanyName.ProjectName.NotificationManagement.EntityFrameworkCore.Not /// 分页查询广播消息 /// /// - public async Task> GetPageBroadCastNotificationByUserIdAsync( - Guid userId, - int maxResultCount = 10, - int skipCount = 0, - CancellationToken cancellationToken = default) + public async Task> + GetPageBroadCastNotificationByUserIdAsync( + Guid userId, + int maxResultCount = 10, + int skipCount = 0, + CancellationToken cancellationToken = default) { var sql = BuildPageBroadCastSql(); sql += $" LIMIT {maxResultCount} OFFSET {skipCount}"; var tran = await GetDbTransactionAsync(); - return (await (await GetDbConnectionAsync()).QueryAsync(sql, new {userId}, + return (await (await GetDbConnectionAsync()).QueryAsync( + sql, new { userId }, transaction: tran)) .ToList(); } @@ -47,7 +50,8 @@ namespace CompanyName.ProjectName.NotificationManagement.EntityFrameworkCore.Not { var sql = BuildPageBroadCastCountSql(); var tran = await GetDbTransactionAsync(); - return (await (await GetDbConnectionAsync()).QueryAsync(sql, new {userId}, transaction: tran)) + return (await (await GetDbConnectionAsync()).QueryAsync(sql, new { userId }, + transaction: tran)) .FirstOrDefault(); } @@ -64,7 +68,8 @@ namespace CompanyName.ProjectName.NotificationManagement.EntityFrameworkCore.Not var sql = BuildPageTextSql(); sql += $" LIMIT {maxResultCount} OFFSET {skipCount}"; var tran = await GetDbTransactionAsync(); - return (await (await GetDbConnectionAsync()).QueryAsync(sql, new {userId}, + return (await (await GetDbConnectionAsync()).QueryAsync( + sql, new { userId }, transaction: tran)) .ToList(); } @@ -79,7 +84,8 @@ namespace CompanyName.ProjectName.NotificationManagement.EntityFrameworkCore.Not { var sql = BuildPageTextCountSql(); var tran = await GetDbTransactionAsync(); - return (await (await GetDbConnectionAsync()).QueryAsync(sql, new {userId}, transaction: tran)) + return (await (await GetDbConnectionAsync()).QueryAsync(sql, new { userId }, + transaction: tran)) .FirstOrDefault(); } @@ -91,8 +97,8 @@ namespace CompanyName.ProjectName.NotificationManagement.EntityFrameworkCore.Not + "a.Content," + "a.CreationTime, " + "b.Read " - + "from Notification a " - + "left join NotificationSubscription b on b.NotificationId=a.Id " + + $"from {NotificationManagementDbProperties.DbTablePrefix}Notification a " + + $"left join {NotificationManagementDbProperties.DbTablePrefix}NotificationSubscription b on b.NotificationId=a.Id " + "where a.IsDeleted=0 " + "and a.MessageType=20 " + "and b.ReceiveId=@userId " @@ -104,7 +110,7 @@ namespace CompanyName.ProjectName.NotificationManagement.EntityFrameworkCore.Not return "select " + "count(1) as count " + "from Notification a " - + "left join NotificationSubscription b on b.NotificationId=a.Id " + + $"left join {NotificationManagementDbProperties.DbTablePrefix}NotificationSubscription b on b.NotificationId=a.Id " + "where a.IsDeleted=0 " + "and a.MessageType=20 " + "and b.ReceiveId=@userId "; @@ -114,21 +120,21 @@ namespace CompanyName.ProjectName.NotificationManagement.EntityFrameworkCore.Not { return "select count(1) as count from (" + "select a.Id, a.Title, a.Content, a.CreationTime, a.SenderId, false as \"Read\" " - + "from Notification a " + + $"from {NotificationManagementDbProperties.DbTablePrefix}Notification a " + "where a.IsDeleted = 0 " + "and a.MessageType = 10 " + "and a.Id not in " + " (select NotificationId " - + "from NotificationSubscription b " - + " where b.ReceiveId = '39febd0a-4c5d-d3b8-b223-ef49e7a3d7e2') " + + $"from {NotificationManagementDbProperties.DbTablePrefix}NotificationSubscription b " + + " where b.ReceiveId = @userId) " + "union " + " select a.Id, a.Title, a.Content, a.CreationTime, a.SenderId, true as \"Read\" " - + "from Notification a " + + $"from {NotificationManagementDbProperties.DbTablePrefix}Notification a " + " where a.IsDeleted = 0 " + " and a.MessageType = 10 " + "and a.Id in " - + " (select NotificationId " - + "from NotificationSubscription b " + + $" (select {NotificationManagementDbProperties.DbTablePrefix}NotificationId " + + $"from {NotificationManagementDbProperties.DbTablePrefix}NotificationSubscription b " + "where b.ReceiveId = @userId) " + " ) as tt "; } @@ -137,21 +143,21 @@ namespace CompanyName.ProjectName.NotificationManagement.EntityFrameworkCore.Not { return "select * from (" + "select a.Id, a.Title, a.Content, a.CreationTime, a.SenderId, false as \"Read\" " - + "from Notification a " + + $"from {NotificationManagementDbProperties.DbTablePrefix}Notification a " + "where a.IsDeleted = 0 " + "and a.MessageType = 10 " + "and a.Id not in " + " (select NotificationId " - + "from NotificationSubscription b " - + " where b.ReceiveId = '39febd0a-4c5d-d3b8-b223-ef49e7a3d7e2') " + + $"from {NotificationManagementDbProperties.DbTablePrefix}NotificationSubscription b " + + " where b.ReceiveId = @userId) " + "union" + " select a.Id, a.Title, a.Content, a.CreationTime, a.SenderId, true as \"Read\" " - + "from Notification a " + + $"from {NotificationManagementDbProperties.DbTablePrefix}Notification a " + " where a.IsDeleted = 0 " + " and a.MessageType = 10 " + "and a.Id in " + " (select NotificationId " - + "from NotificationSubscription b " + + $"from {NotificationManagementDbProperties.DbTablePrefix}NotificationSubscription b " + "where b.ReceiveId = @userId)" + " ) as tt order by tt.Read,tt.CreationTime "; } diff --git a/aspnet-core/modules/NotificationManagement/src/CompanyName.ProjectName.NotificationManagement.HttpApi/Notifications/NotificationController.cs b/aspnet-core/modules/NotificationManagement/src/CompanyName.ProjectName.NotificationManagement.HttpApi/Notifications/NotificationController.cs index d906a85d..9f9b5e9e 100644 --- a/aspnet-core/modules/NotificationManagement/src/CompanyName.ProjectName.NotificationManagement.HttpApi/Notifications/NotificationController.cs +++ b/aspnet-core/modules/NotificationManagement/src/CompanyName.ProjectName.NotificationManagement.HttpApi/Notifications/NotificationController.cs @@ -12,13 +12,13 @@ namespace CompanyName.ProjectName.NotificationManagement.Notifications public class NotificationController : AbpController, IApplicationService { private readonly IQueryNotificationAppService _queryNotificationAppService; - private readonly ICommandNotificationAppService _commandNotificationAppService; + private readonly INotificationAppService _notificationAppService; public NotificationController(IQueryNotificationAppService queryNotificationAppService, - ICommandNotificationAppService commandNotificationAppService) + INotificationAppService notificationAppService) { _queryNotificationAppService = queryNotificationAppService; - _commandNotificationAppService = commandNotificationAppService; + _notificationAppService = notificationAppService; } @@ -52,14 +52,14 @@ namespace CompanyName.ProjectName.NotificationManagement.Notifications [SwaggerOperation(summary: "消息设置为已读", Tags = new[] {"Notification"})] public Task SetReadAsync(SetReadInput input) { - return _commandNotificationAppService.SetReadAsync(input); + return _notificationAppService.SetReadAsync(input); } [HttpPost("Create")] [SwaggerOperation(summary: "创建消息-测试使用", Tags = new[] {"Notification"})] public Task CreateAsync(CreateNotificationInput input) { - return _commandNotificationAppService.CreateAsync(input); + return _notificationAppService.CreateAsync(input); } } } \ No newline at end of file diff --git a/aspnet-core/modules/NotificationManagement/test/CompanyName.ProjectName.NotificationManagement.Application.Tests/Samples/SampleAppService_Tests.cs b/aspnet-core/modules/NotificationManagement/test/CompanyName.ProjectName.NotificationManagement.Application.Tests/Samples/SampleAppService_Tests.cs deleted file mode 100644 index 6b83c537..00000000 --- a/aspnet-core/modules/NotificationManagement/test/CompanyName.ProjectName.NotificationManagement.Application.Tests/Samples/SampleAppService_Tests.cs +++ /dev/null @@ -1,30 +0,0 @@ -using System.Threading.Tasks; -using Shouldly; -using Xunit; - -namespace CompanyName.ProjectName.NotificationManagement.Samples -{ - public class SampleAppService_Tests : NotificationManagementApplicationTestBase - { - private readonly ISampleAppService _sampleAppService; - - public SampleAppService_Tests() - { - _sampleAppService = GetRequiredService(); - } - - [Fact] - public async Task GetAsync() - { - var result = await _sampleAppService.GetAsync(); - result.Value.ShouldBe(42); - } - - [Fact] - public async Task GetAuthorizedAsync() - { - var result = await _sampleAppService.GetAuthorizedAsync(); - result.Value.ShouldBe(42); - } - } -} diff --git a/aspnet-core/modules/NotificationManagement/test/CompanyName.ProjectName.NotificationManagement.Domain.Tests/Samples/SampleManager_Tests.cs b/aspnet-core/modules/NotificationManagement/test/CompanyName.ProjectName.NotificationManagement.Domain.Tests/Samples/SampleManager_Tests.cs deleted file mode 100644 index f2d24a34..00000000 --- a/aspnet-core/modules/NotificationManagement/test/CompanyName.ProjectName.NotificationManagement.Domain.Tests/Samples/SampleManager_Tests.cs +++ /dev/null @@ -1,17 +0,0 @@ -using System.Threading.Tasks; -using Xunit; - -namespace CompanyName.ProjectName.NotificationManagement.Samples -{ - public class SampleManager_Tests : NotificationManagementDomainTestBase - { - //private readonly SampleManager _sampleManager; - - public SampleManager_Tests() - { - //_sampleManager = GetRequiredService(); - } - - - } -} diff --git a/aspnet-core/modules/NotificationManagement/test/CompanyName.ProjectName.NotificationManagement.EntityFrameworkCore.Tests/EntityFrameworkCore/Samples/SampleRepository_Tests.cs b/aspnet-core/modules/NotificationManagement/test/CompanyName.ProjectName.NotificationManagement.EntityFrameworkCore.Tests/EntityFrameworkCore/Samples/SampleRepository_Tests.cs deleted file mode 100644 index 5c96e1cb..00000000 --- a/aspnet-core/modules/NotificationManagement/test/CompanyName.ProjectName.NotificationManagement.EntityFrameworkCore.Tests/EntityFrameworkCore/Samples/SampleRepository_Tests.cs +++ /dev/null @@ -1,12 +0,0 @@ -using CompanyName.ProjectName.NotificationManagement.Samples; - -namespace CompanyName.ProjectName.NotificationManagement.EntityFrameworkCore.Samples -{ - public class SampleRepository_Tests : SampleRepository_Tests - { - /* Don't write custom repository tests here, instead write to - * the base class. - * One exception can be some specific tests related to EF core. - */ - } -} diff --git a/aspnet-core/modules/NotificationManagement/test/CompanyName.ProjectName.NotificationManagement.TestBase/Samples/SampleRepository_Tests.cs b/aspnet-core/modules/NotificationManagement/test/CompanyName.ProjectName.NotificationManagement.TestBase/Samples/SampleRepository_Tests.cs deleted file mode 100644 index a4863403..00000000 --- a/aspnet-core/modules/NotificationManagement/test/CompanyName.ProjectName.NotificationManagement.TestBase/Samples/SampleRepository_Tests.cs +++ /dev/null @@ -1,22 +0,0 @@ -using System.Threading.Tasks; -using Volo.Abp.Modularity; -using Xunit; - -namespace CompanyName.ProjectName.NotificationManagement.Samples -{ - /* Write your custom repository tests like that, in this project, as abstract classes. - * Then inherit these abstract classes from EF Core & MongoDB test projects. - * In this way, both database providers are tests with the same set tests. - */ - public abstract class SampleRepository_Tests : NotificationManagementTestBase - where TStartupModule : IAbpModule - { - //private readonly ISampleRepository _sampleRepository; - - protected SampleRepository_Tests() - { - //_sampleRepository = GetRequiredService(); - } - - } -} diff --git a/aspnet-core/services/host/CompanyName.ProjectName.HttpApi.Host/ProjectNameHttpApiHostModule.cs b/aspnet-core/services/host/CompanyName.ProjectName.HttpApi.Host/ProjectNameHttpApiHostModule.cs index 43a15ac7..f5734fed 100644 --- a/aspnet-core/services/host/CompanyName.ProjectName.HttpApi.Host/ProjectNameHttpApiHostModule.cs +++ b/aspnet-core/services/host/CompanyName.ProjectName.HttpApi.Host/ProjectNameHttpApiHostModule.cs @@ -78,8 +78,6 @@ namespace CompanyName.ProjectName ConfigureHangfireMysql(context); ConfigurationCap(context); ConfigurationStsHttpClient(context); - - } public override void OnApplicationInitialization(ApplicationInitializationContext context) @@ -122,7 +120,7 @@ namespace CompanyName.ProjectName Authorization = new[] { new CustomHangfireAuthorizeFilter() }, IgnoreAntiforgeryToken = true }); - + if (configuration.GetValue("Consul:Enabled", false)) { app.UseConsul(); diff --git a/aspnet-core/services/host/CompanyName.ProjectName.IdentityServer/ProjectNameIdentityServerModule.cs b/aspnet-core/services/host/CompanyName.ProjectName.IdentityServer/ProjectNameIdentityServerModule.cs index ded2833d..024b928e 100644 --- a/aspnet-core/services/host/CompanyName.ProjectName.IdentityServer/ProjectNameIdentityServerModule.cs +++ b/aspnet-core/services/host/CompanyName.ProjectName.IdentityServer/ProjectNameIdentityServerModule.cs @@ -1,5 +1,4 @@ using System; -using System.IO; using System.Linq; using Localization.Resources.AbpUi; using Microsoft.AspNetCore.Builder; @@ -11,16 +10,11 @@ using CompanyName.ProjectName.EntityFrameworkCore; using CompanyName.ProjectName.Extensions; using CompanyName.ProjectName.Localization; using CompanyName.ProjectName.MultiTenancy; -using IdentityServer4.Configuration; -using IdentityServer4.Extensions; -using IdentityServer4.Models; using Microsoft.Extensions.Configuration; using StackExchange.Redis; using Volo.Abp; using Volo.Abp.Account; using Volo.Abp.Account.Web; -using Volo.Abp.AspNetCore.Mvc.UI; -using Volo.Abp.AspNetCore.Mvc.UI.Bootstrap; using Volo.Abp.AspNetCore.Mvc.UI.Bundling; using Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic; using Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic.Bundling; @@ -34,7 +28,6 @@ using Volo.Abp.Caching.StackExchangeRedis; using Volo.Abp.Localization; using Volo.Abp.Modularity; using Volo.Abp.UI.Navigation.Urls; -using Volo.Abp.UI; using Volo.Abp.VirtualFileSystem; namespace CompanyName.ProjectName diff --git a/aspnet-core/services/src/CompanyName.ProjectName.DbMigrator/appsettings.secrets.json b/aspnet-core/services/src/CompanyName.ProjectName.DbMigrator/appsettings.secrets.json deleted file mode 100644 index 7a73a41b..00000000 --- a/aspnet-core/services/src/CompanyName.ProjectName.DbMigrator/appsettings.secrets.json +++ /dev/null @@ -1,2 +0,0 @@ -{ -} \ No newline at end of file diff --git a/aspnet-core/services/src/CompanyName.ProjectName.Domain/Data/Seeds/AbpSettingDataSeedContributor.cs b/aspnet-core/services/src/CompanyName.ProjectName.Domain/Data/Seeds/AbpSettingDataSeedContributor.cs index 8a3ac7ee..de8af03d 100644 --- a/aspnet-core/services/src/CompanyName.ProjectName.Domain/Data/Seeds/AbpSettingDataSeedContributor.cs +++ b/aspnet-core/services/src/CompanyName.ProjectName.Domain/Data/Seeds/AbpSettingDataSeedContributor.cs @@ -18,11 +18,7 @@ namespace CompanyName.ProjectName.Data.Seeds public async Task SeedAsync(DataSeedContext context) { // 设置默认语言 - var defaultLanguage = await _settingManager.GetOrNullGlobalAsync(DefaultLanguageKey); - if (defaultLanguage == null) - { - await _settingManager.SetGlobalAsync(DefaultLanguageKey, DefaultLanguage); - } + await _settingManager.SetGlobalAsync(DefaultLanguageKey, DefaultLanguage); } } } \ No newline at end of file diff --git a/aspnet-core/shared/CompanyName.ProjectName.Shared.Hosting.Microservices/CompanyName.ProjectName.Shared.Hosting.Microservices.csproj b/aspnet-core/shared/CompanyName.ProjectName.Shared.Hosting.Microservices/CompanyName.ProjectName.Shared.Hosting.Microservices.csproj index 0536976b..7b36972d 100644 --- a/aspnet-core/shared/CompanyName.ProjectName.Shared.Hosting.Microservices/CompanyName.ProjectName.Shared.Hosting.Microservices.csproj +++ b/aspnet-core/shared/CompanyName.ProjectName.Shared.Hosting.Microservices/CompanyName.ProjectName.Shared.Hosting.Microservices.csproj @@ -7,6 +7,7 @@ +