diff --git a/aspnet-core/LINGYUN.MicroService.SingleProject.sln b/aspnet-core/LINGYUN.MicroService.SingleProject.sln index 13ef7de93..ca3249d45 100644 --- a/aspnet-core/LINGYUN.MicroService.SingleProject.sln +++ b/aspnet-core/LINGYUN.MicroService.SingleProject.sln @@ -606,12 +606,16 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "cap", "cap", "{7C35101B-EA2 EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "LINGYUN.Abp.EventBus.CAP", "framework\common\LINGYUN.Abp.EventBus.CAP\LINGYUN.Abp.EventBus.CAP.csproj", "{4539FCDB-7192-442C-BD9B-0AC71E882F4F}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "LINGYUN.Abp.AuditLogging.IP2Region", "framework\auditing\LINGYUN.Abp.AuditLogging.IP2Region\LINGYUN.Abp.AuditLogging.IP2Region.csproj", "{DFDF367D-EDE1-4365-90F9-32F529117B60}" -EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "LY.MicroService.Applications.Single.EntityFrameworkCore.SqlServer", "migrations\LY.MicroService.Applications.Single.EntityFrameworkCore.SqlServer\LY.MicroService.Applications.Single.EntityFrameworkCore.SqlServer.csproj", "{30EEF879-CFF7-4661-89CB-9CB68328D008}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "LY.AIO.Applications.Single", "services\LY.AIO.Applications.Single\LY.AIO.Applications.Single.csproj", "{37740138-D088-46F5-83A8-8A8180FE65D8}" EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "LINGYUN.Abp.IP.Location", "framework\common\LINGYUN.Abp.IP.Location\LINGYUN.Abp.IP.Location.csproj", "{5BE31786-EAAB-4C86-8FFF-C07F27FBFD1C}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "LINGYUN.Abp.AuditLogging.IP.Location", "framework\auditing\LINGYUN.Abp.AuditLogging.IP.Location\LINGYUN.Abp.AuditLogging.IP.Location.csproj", "{77B3C7A4-15C7-4EFF-8451-4F13B4CCA4AE}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "LY.MicroService.Applications.Single.EntityFrameworkCore.MySql", "migrations\LY.MicroService.Applications.Single.EntityFrameworkCore.MySql\LY.MicroService.Applications.Single.EntityFrameworkCore.MySql.csproj", "{746813A9-4221-42D8-AAB5-66CB69EC844F}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -1598,26 +1602,6 @@ Global {4539FCDB-7192-442C-BD9B-0AC71E882F4F}.Debug|Any CPU.Build.0 = Debug|Any CPU {4539FCDB-7192-442C-BD9B-0AC71E882F4F}.Release|Any CPU.ActiveCfg = Release|Any CPU {4539FCDB-7192-442C-BD9B-0AC71E882F4F}.Release|Any CPU.Build.0 = Release|Any CPU - {DFDF367D-EDE1-4365-90F9-32F529117B60}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {DFDF367D-EDE1-4365-90F9-32F529117B60}.Debug|Any CPU.Build.0 = Debug|Any CPU - {DFDF367D-EDE1-4365-90F9-32F529117B60}.Release|Any CPU.ActiveCfg = Release|Any CPU - {DFDF367D-EDE1-4365-90F9-32F529117B60}.Release|Any CPU.Build.0 = Release|Any CPU - {8D0C8993-580A-4585-BE3B-87895C76FC89}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {8D0C8993-580A-4585-BE3B-87895C76FC89}.Debug|Any CPU.Build.0 = Debug|Any CPU - {8D0C8993-580A-4585-BE3B-87895C76FC89}.Release|Any CPU.ActiveCfg = Release|Any CPU - {8D0C8993-580A-4585-BE3B-87895C76FC89}.Release|Any CPU.Build.0 = Release|Any CPU - {AA742577-63B0-4188-AA36-AC6E0ED99BB6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {AA742577-63B0-4188-AA36-AC6E0ED99BB6}.Debug|Any CPU.Build.0 = Debug|Any CPU - {AA742577-63B0-4188-AA36-AC6E0ED99BB6}.Release|Any CPU.ActiveCfg = Release|Any CPU - {AA742577-63B0-4188-AA36-AC6E0ED99BB6}.Release|Any CPU.Build.0 = Release|Any CPU - {5A07FFDF-F979-44F9-BE24-81D6A25BEADB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {5A07FFDF-F979-44F9-BE24-81D6A25BEADB}.Debug|Any CPU.Build.0 = Debug|Any CPU - {5A07FFDF-F979-44F9-BE24-81D6A25BEADB}.Release|Any CPU.ActiveCfg = Release|Any CPU - {5A07FFDF-F979-44F9-BE24-81D6A25BEADB}.Release|Any CPU.Build.0 = Release|Any CPU - {2B167D92-2327-4679-9096-49F274FABE0C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {2B167D92-2327-4679-9096-49F274FABE0C}.Debug|Any CPU.Build.0 = Debug|Any CPU - {2B167D92-2327-4679-9096-49F274FABE0C}.Release|Any CPU.ActiveCfg = Release|Any CPU - {2B167D92-2327-4679-9096-49F274FABE0C}.Release|Any CPU.Build.0 = Release|Any CPU {30EEF879-CFF7-4661-89CB-9CB68328D008}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {30EEF879-CFF7-4661-89CB-9CB68328D008}.Debug|Any CPU.Build.0 = Debug|Any CPU {30EEF879-CFF7-4661-89CB-9CB68328D008}.Release|Any CPU.ActiveCfg = Release|Any CPU @@ -1626,6 +1610,18 @@ Global {37740138-D088-46F5-83A8-8A8180FE65D8}.Debug|Any CPU.Build.0 = Debug|Any CPU {37740138-D088-46F5-83A8-8A8180FE65D8}.Release|Any CPU.ActiveCfg = Release|Any CPU {37740138-D088-46F5-83A8-8A8180FE65D8}.Release|Any CPU.Build.0 = Release|Any CPU + {5BE31786-EAAB-4C86-8FFF-C07F27FBFD1C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {5BE31786-EAAB-4C86-8FFF-C07F27FBFD1C}.Debug|Any CPU.Build.0 = Debug|Any CPU + {5BE31786-EAAB-4C86-8FFF-C07F27FBFD1C}.Release|Any CPU.ActiveCfg = Release|Any CPU + {5BE31786-EAAB-4C86-8FFF-C07F27FBFD1C}.Release|Any CPU.Build.0 = Release|Any CPU + {77B3C7A4-15C7-4EFF-8451-4F13B4CCA4AE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {77B3C7A4-15C7-4EFF-8451-4F13B4CCA4AE}.Debug|Any CPU.Build.0 = Debug|Any CPU + {77B3C7A4-15C7-4EFF-8451-4F13B4CCA4AE}.Release|Any CPU.ActiveCfg = Release|Any CPU + {77B3C7A4-15C7-4EFF-8451-4F13B4CCA4AE}.Release|Any CPU.Build.0 = Release|Any CPU + {746813A9-4221-42D8-AAB5-66CB69EC844F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {746813A9-4221-42D8-AAB5-66CB69EC844F}.Debug|Any CPU.Build.0 = Debug|Any CPU + {746813A9-4221-42D8-AAB5-66CB69EC844F}.Release|Any CPU.ActiveCfg = Release|Any CPU + {746813A9-4221-42D8-AAB5-66CB69EC844F}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE @@ -1920,13 +1916,11 @@ Global {BC7A8662-4313-4F1D-B267-9B1B69444CD3} = {3AD66E47-B667-40D1-AE61-F5EC186241F7} {7C35101B-EA29-4B3D-B424-FAD625977E4D} = {99B7CBDE-A251-4738-97F0-DB1DB484BEE1} {4539FCDB-7192-442C-BD9B-0AC71E882F4F} = {7C35101B-EA29-4B3D-B424-FAD625977E4D} - {DFDF367D-EDE1-4365-90F9-32F529117B60} = {C22741F9-FC56-4AE3-B543-9F15C779D345} - {8D0C8993-580A-4585-BE3B-87895C76FC89} = {07DFEB1E-ED92-4E97-A801-FAB2D70F4F35} - {AA742577-63B0-4188-AA36-AC6E0ED99BB6} = {07DFEB1E-ED92-4E97-A801-FAB2D70F4F35} - {5A07FFDF-F979-44F9-BE24-81D6A25BEADB} = {0D69B63D-F082-4D57-9FF0-355642C56993} - {2B167D92-2327-4679-9096-49F274FABE0C} = {0D69B63D-F082-4D57-9FF0-355642C56993} {30EEF879-CFF7-4661-89CB-9CB68328D008} = {0D69B63D-F082-4D57-9FF0-355642C56993} {37740138-D088-46F5-83A8-8A8180FE65D8} = {B4247B78-34BC-4A3F-91A4-661F7DCD6E10} + {5BE31786-EAAB-4C86-8FFF-C07F27FBFD1C} = {99B7CBDE-A251-4738-97F0-DB1DB484BEE1} + {77B3C7A4-15C7-4EFF-8451-4F13B4CCA4AE} = {C22741F9-FC56-4AE3-B543-9F15C779D345} + {746813A9-4221-42D8-AAB5-66CB69EC844F} = {0D69B63D-F082-4D57-9FF0-355642C56993} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {711A43C0-A2F8-4E5C-9B9F-F2551E4B3FF1} diff --git a/aspnet-core/migrations/LY.MicroService.Applications.Single.EntityFrameworkCore.SqlServer/SingleMigrationsEntityFrameworkCoreSqlServerModule.cs b/aspnet-core/migrations/LY.MicroService.Applications.Single.EntityFrameworkCore.SqlServer/SingleMigrationsEntityFrameworkCoreSqlServerModule.cs index e08840d28..14d105c29 100644 --- a/aspnet-core/migrations/LY.MicroService.Applications.Single.EntityFrameworkCore.SqlServer/SingleMigrationsEntityFrameworkCoreSqlServerModule.cs +++ b/aspnet-core/migrations/LY.MicroService.Applications.Single.EntityFrameworkCore.SqlServer/SingleMigrationsEntityFrameworkCoreSqlServerModule.cs @@ -1,4 +1,4 @@ -using LINGYUN.Abp.Elsa.EntityFrameworkCore.SqlServer; +// using LINGYUN.Abp.Elsa.EntityFrameworkCore.SqlServer; using Microsoft.Extensions.DependencyInjection; using System; using Volo.Abp.EntityFrameworkCore; @@ -9,7 +9,7 @@ namespace LY.MicroService.Applications.Single.EntityFrameworkCore.SqlServer; [DependsOn( typeof(AbpEntityFrameworkCoreSqlServerModule), - typeof(AbpElsaEntityFrameworkCoreSqlServerModule), + // typeof(AbpElsaEntityFrameworkCoreSqlServerModule), typeof(SingleMigrationsEntityFrameworkCoreModule) )] public class SingleMigrationsEntityFrameworkCoreSqlServerModule : AbpModule diff --git a/aspnet-core/modules/identity/LINGYUN.Abp.Identity.Session.AspNetCore/LINGYUN.Abp.Identity.Session.AspNetCore.csproj b/aspnet-core/modules/identity/LINGYUN.Abp.Identity.Session.AspNetCore/LINGYUN.Abp.Identity.Session.AspNetCore.csproj index 5cbdce85f..4359bdaeb 100644 --- a/aspnet-core/modules/identity/LINGYUN.Abp.Identity.Session.AspNetCore/LINGYUN.Abp.Identity.Session.AspNetCore.csproj +++ b/aspnet-core/modules/identity/LINGYUN.Abp.Identity.Session.AspNetCore/LINGYUN.Abp.Identity.Session.AspNetCore.csproj @@ -18,7 +18,7 @@ - + diff --git a/aspnet-core/modules/identity/LINGYUN.Abp.Identity.Session.AspNetCore/LINGYUN/Abp/Identity/Session/AspNetCore/AbpIdentitySessionAspNetCoreModule.cs b/aspnet-core/modules/identity/LINGYUN.Abp.Identity.Session.AspNetCore/LINGYUN/Abp/Identity/Session/AspNetCore/AbpIdentitySessionAspNetCoreModule.cs index 31d0a0f79..7975a5165 100644 --- a/aspnet-core/modules/identity/LINGYUN.Abp.Identity.Session.AspNetCore/LINGYUN/Abp/Identity/Session/AspNetCore/AbpIdentitySessionAspNetCoreModule.cs +++ b/aspnet-core/modules/identity/LINGYUN.Abp.Identity.Session.AspNetCore/LINGYUN/Abp/Identity/Session/AspNetCore/AbpIdentitySessionAspNetCoreModule.cs @@ -1,18 +1,12 @@ -using LINGYUN.Abp.IP2Region; -using Microsoft.Extensions.DependencyInjection; -using Microsoft.Extensions.DependencyInjection.Extensions; +using LINGYUN.Abp.IP.Location; using Volo.Abp.AspNetCore; using Volo.Abp.Modularity; namespace LINGYUN.Abp.Identity.Session.AspNetCore; [DependsOn(typeof(AbpAspNetCoreModule))] -[DependsOn(typeof(AbpIP2RegionModule))] +[DependsOn(typeof(AbpIPLocationModule))] [DependsOn(typeof(AbpIdentitySessionModule))] public class AbpIdentitySessionAspNetCoreModule : AbpModule { - public override void ConfigureServices(ServiceConfigurationContext context) - { - context.Services.Replace(ServiceDescriptor.Singleton()); - } } diff --git a/aspnet-core/modules/identity/LINGYUN.Abp.Identity.Session.AspNetCore/LINGYUN/Abp/Identity/Session/AspNetCore/HttpContextDeviceInfoProvider.cs b/aspnet-core/modules/identity/LINGYUN.Abp.Identity.Session.AspNetCore/LINGYUN/Abp/Identity/Session/AspNetCore/HttpContextDeviceInfoProvider.cs index ff529367a..54fc37871 100644 --- a/aspnet-core/modules/identity/LINGYUN.Abp.Identity.Session.AspNetCore/LINGYUN/Abp/Identity/Session/AspNetCore/HttpContextDeviceInfoProvider.cs +++ b/aspnet-core/modules/identity/LINGYUN.Abp.Identity.Session.AspNetCore/LINGYUN/Abp/Identity/Session/AspNetCore/HttpContextDeviceInfoProvider.cs @@ -1,5 +1,5 @@ using DeviceDetectorNET; -using LINGYUN.Abp.IP2Region; +using LINGYUN.Abp.IP.Location; using Microsoft.Extensions.Options; using System; using System.Threading.Tasks; @@ -9,16 +9,16 @@ namespace LINGYUN.Abp.Identity.Session.AspNetCore; public class HttpContextDeviceInfoProvider : IDeviceInfoProvider, ITransientDependency { - protected IIpLocationInfoProvider IpLocationInfoProvider { get; } + protected IIPLocationResolver IPLocationResolver { get; } protected IWebClientInfoProvider WebClientInfoProvider { get; } protected AbpIdentitySessionAspNetCoreOptions Options { get; } public HttpContextDeviceInfoProvider( - IIpLocationInfoProvider ipLocationInfoProvider, + IIPLocationResolver iPLocationResolver, IWebClientInfoProvider webClientInfoProvider, IOptions options) { - IpLocationInfoProvider = ipLocationInfoProvider; + IPLocationResolver = iPLocationResolver; WebClientInfoProvider = webClientInfoProvider; Options = options.Value; } @@ -51,8 +51,8 @@ public async virtual Task GetDeviceInfoAsync() protected async virtual Task GetRegion(string ipAddress) { - var locationInfo = await IpLocationInfoProvider.GetLocationInfoAsync(ipAddress); - return locationInfo?.Remarks; + var locationInfo = await IPLocationResolver.ResolveAsync(ipAddress); + return locationInfo.Location?.Remarks; } private class BrowserDeviceInfo diff --git a/aspnet-core/modules/openIddict/LINGYUN.Abp.OpenIddict.AspNetCore.Session/LINGYUN/Abp/OpenIddict/AspNetCore/Session/AbpOpenIddictAspNetCoreSessionModule.cs b/aspnet-core/modules/openIddict/LINGYUN.Abp.OpenIddict.AspNetCore.Session/LINGYUN/Abp/OpenIddict/AspNetCore/Session/AbpOpenIddictAspNetCoreSessionModule.cs index bd864582f..9b527d0de 100644 --- a/aspnet-core/modules/openIddict/LINGYUN.Abp.OpenIddict.AspNetCore.Session/LINGYUN/Abp/OpenIddict/AspNetCore/Session/AbpOpenIddictAspNetCoreSessionModule.cs +++ b/aspnet-core/modules/openIddict/LINGYUN.Abp.OpenIddict.AspNetCore.Session/LINGYUN/Abp/OpenIddict/AspNetCore/Session/AbpOpenIddictAspNetCoreSessionModule.cs @@ -3,15 +3,14 @@ using LINGYUN.Abp.Identity.Session.AspNetCore; using Microsoft.Extensions.DependencyInjection; using Volo.Abp.Modularity; -using Volo.Abp.OpenIddict; using static OpenIddict.Abstractions.OpenIddictConstants; namespace LINGYUN.Abp.OpenIddict.AspNetCore.Session; [DependsOn( - typeof(AbpIdentitySessionAspNetCoreModule), typeof(AbpIdentityDomainModule), - typeof(AbpOpenIddictAspNetCoreModule))] + typeof(AbpIdentitySessionAspNetCoreModule) + )] public class AbpOpenIddictAspNetCoreSessionModule : AbpModule { public override void PreConfigureServices(ServiceConfigurationContext context) diff --git a/aspnet-core/services/LY.MicroService.Applications.Single/LY.MicroService.Applications.Single.csproj b/aspnet-core/services/LY.MicroService.Applications.Single/LY.MicroService.Applications.Single.csproj index a364b58e5..f19b3c14a 100644 --- a/aspnet-core/services/LY.MicroService.Applications.Single/LY.MicroService.Applications.Single.csproj +++ b/aspnet-core/services/LY.MicroService.Applications.Single/LY.MicroService.Applications.Single.csproj @@ -64,7 +64,7 @@ - + @@ -84,6 +84,7 @@ + @@ -119,10 +120,10 @@ + - diff --git a/aspnet-core/services/LY.MicroService.Applications.Single/MicroServiceApplicationsSingleModule.Configure.cs b/aspnet-core/services/LY.MicroService.Applications.Single/MicroServiceApplicationsSingleModule.Configure.cs index 1369a8cc9..6b72a8062 100644 --- a/aspnet-core/services/LY.MicroService.Applications.Single/MicroServiceApplicationsSingleModule.Configure.cs +++ b/aspnet-core/services/LY.MicroService.Applications.Single/MicroServiceApplicationsSingleModule.Configure.cs @@ -1,5 +1,6 @@ using DotNetCore.CAP; using Microsoft.Extensions.Configuration; +using Microsoft.Extensions.DependencyInjection.Extensions; using Savorboard.CAP.InMemoryMessageQueue; using VoloAbpExceptionHandlingOptions = Volo.Abp.AspNetCore.ExceptionHandling.AbpExceptionHandlingOptions; @@ -799,9 +800,12 @@ private void ConfigureSecurity(IServiceCollection services, IConfiguration confi options.AutoValidate = false; }); - services.Replace(ServiceLifetime.Scoped); services.AddAuthentication() + .AddCookie(CookieAuthenticationDefaults.AuthenticationScheme, options => + { + options.ExpireTimeSpan = TimeSpan.FromDays(365); + }) .AddAbpJwtBearer(options => { configuration.GetSection("AuthServer").Bind(options); @@ -830,6 +834,8 @@ private void ConfigureSecurity(IServiceCollection services, IConfiguration confi } services.AddSameSiteCookiePolicy(); + // 处理cookie中过时的ajax请求判断 + services.Replace(ServiceDescriptor.Scoped()); } private void ConfigureCors(IServiceCollection services, IConfiguration configuration) diff --git a/aspnet-core/services/LY.MicroService.Applications.Single/MicroServiceApplicationsSingleModule.cs b/aspnet-core/services/LY.MicroService.Applications.Single/MicroServiceApplicationsSingleModule.cs index b88ddfe77..34e3acd3f 100644 --- a/aspnet-core/services/LY.MicroService.Applications.Single/MicroServiceApplicationsSingleModule.cs +++ b/aspnet-core/services/LY.MicroService.Applications.Single/MicroServiceApplicationsSingleModule.cs @@ -1,40 +1,88 @@ -using LINGYUN.Abp.AuditLogging.IP2Region; +using LINGYUN.Abp.AuditLogging.IP.Location; using LINGYUN.Abp.EventBus.CAP; +using LINGYUN.Abp.IP2Region; +using LY.MicroService.Applications.Single.EntityFrameworkCore; +using LY.MicroService.Applications.Single.EntityFrameworkCore.MySql; using Volo.Abp.MailKit; namespace LY.MicroService.Applications.Single; [DependsOn( + // 账户模块 应用服务 typeof(AbpAccountApplicationModule), + // 账户模块 控制器 typeof(AbpAccountHttpApiModule), + // 账户模块 OpenIddict集成 typeof(AbpAccountWebOpenIddictModule), + // 账户模块 模板 + typeof(AbpAccountTemplatesModule), + + // 审计日志模块 应用服务 typeof(AbpAuditingApplicationModule), + // 审计日志模块 控制器 typeof(AbpAuditingHttpApiModule), - typeof(AbpAuditLoggingIP2RegionModule), + // 审计日志模块 IP 地址定位 + typeof(AbpAuditLoggingIPLocationModule), + // 审计日志模块 实体框架 typeof(AbpAuditLoggingEntityFrameworkCoreModule), + + // 缓存模块 Redis集成 + typeof(AbpCachingStackExchangeRedisModule), + // 缓存管理模块 Redis集成 typeof(AbpCachingManagementStackExchangeRedisModule), + // 缓存管理模块 应用服务 typeof(AbpCachingManagementApplicationModule), + // 缓存管理模块 控制器 typeof(AbpCachingManagementHttpApiModule), + + // 身份认证模块 会话管理集成 typeof(AbpIdentityAspNetCoreSessionModule), + // 身份认证模块 会话中间件 typeof(AbpIdentitySessionAspNetCoreModule), + // 身份认证模块 通知集成 typeof(AbpIdentityNotificationsModule), + // 身份认证模块 组织机构集成 + typeof(AbpIdentityOrganizaztionUnitsModule), + // 身份认证模块 微信身份标识 + typeof(AbpIdentityWeChatModule), + // 身份认证模块 领域服务 typeof(AbpIdentityDomainModule), + // 身份认证模块 应用服务 typeof(AbpIdentityApplicationModule), + // 身份认证模块 控制器 typeof(AbpIdentityHttpApiModule), + // 身份认证模块 实体框架 typeof(AbpIdentityEntityFrameworkCoreModule), + + // 多语言管理模块 领域服务 typeof(AbpLocalizationManagementDomainModule), + // 多语言管理模块 应用服务 typeof(AbpLocalizationManagementApplicationModule), + // 多语言管理模块 控制器 typeof(AbpLocalizationManagementHttpApiModule), + // 多语言管理模块 实体框架 typeof(AbpLocalizationManagementEntityFrameworkCoreModule), + + // Serilog扩展模块 应用程序信息 typeof(AbpSerilogEnrichersApplicationModule), + // Serilog扩展模块 全局唯一Id typeof(AbpSerilogEnrichersUniqueIdModule), + + // 消息模块 领域服务 typeof(AbpMessageServiceDomainModule), + // 消息模块 应用服务 typeof(AbpMessageServiceApplicationModule), + // 消息模块 控制器 typeof(AbpMessageServiceHttpApiModule), + // 消息模块 实体框架 typeof(AbpMessageServiceEntityFrameworkCoreModule), + // 通知模块 领域服务 typeof(AbpNotificationsDomainModule), + // 通知模块 应用服务 typeof(AbpNotificationsApplicationModule), + // 通知模块 控制器 typeof(AbpNotificationsHttpApiModule), + // 通知模块 实体框架 typeof(AbpNotificationsEntityFrameworkCoreModule), //typeof(AbpIdentityServerSessionModule), @@ -42,154 +90,269 @@ namespace LY.MicroService.Applications.Single; //typeof(AbpIdentityServerHttpApiModule), //typeof(AbpIdentityServerEntityFrameworkCoreModule), + // OpenIddict扩展模块 自定义身份标识 typeof(LINGYUN.Abp.OpenIddict.AspNetCore.AbpOpenIddictAspNetCoreModule), + // OpenIddict扩展模块 会话 typeof(AbpOpenIddictAspNetCoreSessionModule), + // OpenIddict扩展模块 应用服务 typeof(AbpOpenIddictApplicationModule), + // OpenIddict扩展模块 控制器 typeof(AbpOpenIddictHttpApiModule), + // OpenIddict扩展模块 实体框架 typeof(AbpOpenIddictEntityFrameworkCoreModule), + // OpenIddict扩展模块 短信认证 typeof(AbpOpenIddictSmsModule), + // OpenIddict扩展模块 平台认证 typeof(AbpOpenIddictPortalModule), + // OpenIddict扩展模块 微信认证 typeof(AbpOpenIddictWeChatModule), + // OpenIddict扩展模块 企业微信认证 typeof(AbpOpenIddictWeChatWorkModule), //typeof(AbpOssManagementMinioModule), // 取消注释以使用Minio + // 对象存储模块 文件系统 typeof(AbpOssManagementFileSystemModule), + // 对象存储模块 图片处理 typeof(AbpOssManagementImagingModule), + // 对象存储模块 应用服务 typeof(AbpOssManagementDomainModule), + // 对象存储模块 控制器 typeof(AbpOssManagementApplicationModule), + // 对象存储模块 控制器 typeof(AbpOssManagementHttpApiModule), + // 对象存储模块 设置管理 typeof(AbpOssManagementSettingManagementModule), + // 图形处理模块 typeof(AbpImagingImageSharpModule), + // 平台模块 领域服务 typeof(PlatformDomainModule), + // 平台模块 应用服务 typeof(PlatformApplicationModule), + // 平台模块 控制器 typeof(PlatformHttpApiModule), + // 平台模块 实体框架 typeof(PlatformEntityFrameworkCoreModule), + // 平台模块 VueVbenAdmin设置 typeof(PlatformSettingsVueVbenAdminModule), + // 平台模块 VueVbenAdmin主题 typeof(PlatformThemeVueVbenAdminModule), + // 平台模块 VueVbenAdmin导航 typeof(AbpUINavigationVueVbenAdminModule), + // Saas模块 领域服务 typeof(AbpSaasDomainModule), + // Saas模块 应用服务 typeof(AbpSaasApplicationModule), + // Saas模块 控制器 typeof(AbpSaasHttpApiModule), + // Saas模块 实体框架 typeof(AbpSaasEntityFrameworkCoreModule), + // 任务管理模块 领域服务 typeof(TaskManagementDomainModule), + // 任务管理模块 应用服务 typeof(TaskManagementApplicationModule), + // 任务管理模块 控制器 typeof(TaskManagementHttpApiModule), + // 任务管理模块 实体框架 typeof(TaskManagementEntityFrameworkCoreModule), + // 文本模板模块 领域服务 typeof(AbpTextTemplatingDomainModule), + // 文本模板模块 应用服务 typeof(AbpTextTemplatingApplicationModule), + // 文本模板模块 控制器 typeof(AbpTextTemplatingHttpApiModule), + // 文本模板模块 实体框架 typeof(AbpTextTemplatingEntityFrameworkCoreModule), + // Webhooks模块 领域服务 typeof(AbpWebhooksModule), + // Webhooks模块 事件总线 typeof(AbpWebhooksEventBusModule), + // Webhooks模块 身份认证事件 typeof(AbpWebhooksIdentityModule), + // Webhooks模块 Saas事件 typeof(AbpWebhooksSaasModule), + // Webhooks模块 应用服务 typeof(WebhooksManagementDomainModule), + // Webhooks模块 控制器 typeof(WebhooksManagementApplicationModule), + // Webhooks模块 控制器 typeof(WebhooksManagementHttpApiModule), + // Webhooks模块 实体框架 typeof(WebhooksManagementEntityFrameworkCoreModule), + // 功能管理模块 应用服务 typeof(LINGYUN.Abp.FeatureManagement.AbpFeatureManagementApplicationModule), + // 功能管理模块 控制器 typeof(LINGYUN.Abp.FeatureManagement.HttpApi.AbpFeatureManagementHttpApiModule), + // 功能管理模块 实体框架 typeof(AbpFeatureManagementEntityFrameworkCoreModule), + // 设置管理模块 领域服务 typeof(AbpSettingManagementDomainModule), + // 设置管理模块 应用服务 typeof(AbpSettingManagementApplicationModule), + // 设置管理模块 控制器 typeof(AbpSettingManagementHttpApiModule), + // 设置管理模块 实体框架 typeof(AbpSettingManagementEntityFrameworkCoreModule), + // 权限管理模块 应用服务 typeof(LINGYUN.Abp.PermissionManagement.AbpPermissionManagementApplicationModule), + // 权限管理模块 控制器 typeof(AbpPermissionManagementHttpApiModule), + // 权限管理模块 身份认证集成 typeof(AbpPermissionManagementDomainIdentityModule), + // 权限管理模块 OpenIddict集成 typeof(AbpPermissionManagementDomainOpenIddictModule), // typeof(AbpPermissionManagementDomainIdentityServerModule), + // 权限管理模块 实体框架 typeof(AbpPermissionManagementEntityFrameworkCoreModule), + // 权限管理模块 组织机构集成 typeof(AbpPermissionManagementDomainOrganizationUnitsModule), // 组织机构权限管理 - typeof(SingleMigrationsEntityFrameworkCoreModule), - typeof(AbpEntityFrameworkCoreMySQLModule), + // 单体服务实体框架迁移模块 + typeof(SingleMigrationsEntityFrameworkCoreMySqlModule), + // 实体框架MySQL集成 + // typeof(AbpEntityFrameworkCoreMySQLModule), + // 短信模块 阿里云集成 typeof(AbpAliyunSmsModule), + // 阿里云模块 设置管理 typeof(AbpAliyunSettingManagementModule), + // 认证模块 腾讯QQ集成 typeof(AbpAuthenticationQQModule), + // 认证模块 微信集成 typeof(AbpAuthenticationWeChatModule), + // 认证模块 JWT认证 + typeof(AbpAspNetCoreAuthenticationJwtBearerModule), + // 授权模块 组织机构集成 typeof(AbpAuthorizationOrganizationUnitsModule), - typeof(AbpIdentityOrganizaztionUnitsModule), + // 后台任务模块 typeof(AbpBackgroundTasksModule), + // 后台任务模块 行为处理 typeof(AbpBackgroundTasksActivitiesModule), + // 后台任务模块 分布式锁 typeof(AbpBackgroundTasksDistributedLockingModule), + // 后台任务模块 事件总线 typeof(AbpBackgroundTasksEventBusModule), + // 后台任务模块 异常处理 typeof(AbpBackgroundTasksExceptionHandlingModule), + // 后台任务模块 默认作业 typeof(AbpBackgroundTasksJobsModule), + // 后台任务模块 通知 typeof(AbpBackgroundTasksNotificationsModule), + // 后台任务模块 Quartz集成 typeof(AbpBackgroundTasksQuartzModule), + // 数据审计模块 应用服务 typeof(AbpDataProtectionManagementApplicationModule), + // 数据审计模块 控制器 typeof(AbpDataProtectionManagementHttpApiModule), + // 数据审计模块 实体框架 typeof(AbpDataProtectionManagementEntityFrameworkCoreModule), + // Demo模块 应用服务 typeof(AbpDemoApplicationModule), + // Demo模块 控制器 typeof(AbpDemoHttpApiModule), + // Demo模块 实体框架 typeof(AbpDemoEntityFrameworkCoreModule), + // Dapr模块 客户端 typeof(AbpDaprClientModule), + // 异常处理模块 typeof(AbpExceptionHandlingModule), + // 异常处理模块 邮件通知 typeof(AbpEmailingExceptionHandlingModule), + + // 功能限制模块 typeof(AbpFeaturesLimitValidationModule), + // 客户端功能限制模块 Redis集成 typeof(AbpFeaturesValidationRedisClientModule), + // 多语言模块 typeof(AbpAspNetCoreMvcLocalizationModule), - + // 多语言模块 语言映射 typeof(AbpLocalizationCultureMapModule), + // 多语言模块 持久化 typeof(AbpLocalizationPersistenceModule), + // OpenApi模块 授权 typeof(AbpOpenApiAuthorizationModule), + // 消息模块 实时框架 typeof(AbpIMSignalRModule), + // 通知模块 typeof(AbpNotificationsModule), + // 通知模块 默认通知 typeof(AbpNotificationsCommonModule), + // 通知模块 实时框架 typeof(AbpNotificationsSignalRModule), + // 通知模块 邮件通知 typeof(AbpNotificationsEmailingModule), + // 通知模块 微信小程序 + typeof(AbpNotificationsWeChatMiniProgramModule), + // 多租户模块 版本 typeof(AbpMultiTenancyEditionsModule), + // 腾讯QQ模块 typeof(AbpTencentQQModule), + // 腾讯云模块 设置管理 typeof(AbpTencentCloudSettingManagementModule), - typeof(AbpIdentityWeChatModule), - typeof(AbpNotificationsWeChatMiniProgramModule), + // 微信模块 微信小程序 typeof(AbpWeChatMiniProgramModule), + // 微信模块 微信公众号 typeof(AbpWeChatOfficialModule), + // 微信模块 微信公众号 应用服务 typeof(AbpWeChatOfficialApplicationModule), + // 微信模块 微信公众号 控制器 typeof(AbpWeChatOfficialHttpApiModule), + // 微信模块 企业微信 typeof(AbpWeChatWorkModule), + // 微信模块 企业微信 应用服务 typeof(AbpWeChatWorkApplicationModule), + // 微信模块 企业微信 控制器 typeof(AbpWeChatWorkHttpApiModule), + // 微信模块 微信公众号 事件处理 typeof(AbpWeChatOfficialHandlersModule), + // 微信模块 企业微信 事件处理 typeof(AbpWeChatWorkHandlersModule), + // 微信模块 设置管理 typeof(AbpWeChatSettingManagementModule), + // 数据迁移模块 typeof(AbpDataDbMigratorModule), + // IP解析模块 IP2Region集成 + typeof(AbpIP2RegionModule), + // 分布式Id生成器模块 typeof(AbpIdGeneratorModule), + // 自定义导航模块 typeof(AbpUINavigationModule), - typeof(AbpAccountTemplatesModule), - typeof(AbpAspNetCoreAuthenticationJwtBearerModule), - typeof(AbpCachingStackExchangeRedisModule), + // Elsa工作流模块 typeof(AbpElsaModule), + // Elsa工作流模块 工作流服务器 typeof(AbpElsaServerModule), + // Elsa工作流模块 活动 typeof(AbpElsaActivitiesModule), + // Elsa工作流模块 实体框架 typeof(AbpElsaEntityFrameworkCoreModule), + // Elsa工作流模块 MySql集成 typeof(AbpElsaEntityFrameworkCoreMySqlModule), + // CAP事件总线模块 typeof(AbpCAPEventBusModule), + // 数据导出模块 MiniExcel集成 typeof(AbpExporterMiniExcelModule), + typeof(AbpAspNetCoreMvcUiMultiTenancyModule), typeof(AbpAspNetCoreSerilogModule), typeof(AbpHttpClientWrapperModule), diff --git a/aspnet-core/tests/LINGYUN.Abp.IP2Region.Tests/LINGYUN/Abp/IP2Region/SearcherTest.cs b/aspnet-core/tests/LINGYUN.Abp.IP2Region.Tests/LINGYUN/Abp/IP2Region/SearcherTest.cs index a8b249ce9..dbc9fcec0 100644 --- a/aspnet-core/tests/LINGYUN.Abp.IP2Region.Tests/LINGYUN/Abp/IP2Region/SearcherTest.cs +++ b/aspnet-core/tests/LINGYUN.Abp.IP2Region.Tests/LINGYUN/Abp/IP2Region/SearcherTest.cs @@ -1,4 +1,5 @@ using IP2Region.Net.XDB; +using LINGYUN.Abp.IP.Location; using Shouldly; using System; using System.IO; @@ -24,9 +25,9 @@ public SearcherTest() [InlineData("220.246.0.1", "中国香港")] public async void TestSearchLocation(string ip, string shouleBeRemarks) { - var provider = GetRequiredService(); - var locationInfo = await provider.GetLocationInfoAsync(ip); - locationInfo.Remarks.ShouldBe(shouleBeRemarks); + var resolver = GetRequiredService(); + var result = await resolver.ResolveAsync(ip); + result.Location.Remarks.ShouldBe(shouleBeRemarks); } [Theory]