Browse Source

Merge pull request #1066 from colinin/some-commits

feat(other): Some commits.
pull/1067/head
yx lin 2 years ago
committed by GitHub
parent
commit
d0b3e8334a
No known key found for this signature in database GPG Key ID: B5690EEEBB952194
  1. 2
      Directory.Packages.props
  2. 621
      aspnet-core/LINGYUN.MicroService.All.sln
  3. 48
      aspnet-core/LINGYUN.MicroService.SingleProject.sln
  4. 11
      aspnet-core/modules/auditing/LINGYUN.Abp.Auditing.Application/LINGYUN/Abp/Auditing/AbpAuditingMapperProfile.cs
  5. 2
      aspnet-core/modules/data-protection/LINGYUN.Abp.DataProtectionManagement.EntityFrameworkCore/LINGYUN/Abp/DataProtectionManagement/EntityFrameworkCore/AbpDataProtectionManagementDbContext.cs
  6. 6
      aspnet-core/modules/permissions-management/LINGYUN.Abp.PermissionManagement.Application/LINGYUN/Abp/PermissionManagement/Definitions/PermissionDefinitionAppService.cs
  7. 11
      aspnet-core/modules/permissions-management/LINGYUN.Abp.PermissionManagement.Application/LINGYUN/Abp/PermissionManagement/Definitions/PermissionGroupDefinitionAppService.cs
  8. 60
      aspnet-core/modules/realtime-notifications/LINGYUN.Abp.Notifications.HttpApi.Client/ClientProxies/LINGYUN/Abp/Notifications/Definitions/Groups/NotificationGroupDefinitionClientProxy.Generated.cs
  9. 7
      aspnet-core/modules/realtime-notifications/LINGYUN.Abp.Notifications.HttpApi.Client/ClientProxies/LINGYUN/Abp/Notifications/Definitions/Groups/NotificationGroupDefinitionClientProxy.cs
  10. 60
      aspnet-core/modules/realtime-notifications/LINGYUN.Abp.Notifications.HttpApi.Client/ClientProxies/LINGYUN/Abp/Notifications/Definitions/Notifications/NotificationDefinitionClientProxy.Generated.cs
  11. 7
      aspnet-core/modules/realtime-notifications/LINGYUN.Abp.Notifications.HttpApi.Client/ClientProxies/LINGYUN/Abp/Notifications/Definitions/Notifications/NotificationDefinitionClientProxy.cs
  12. 51
      aspnet-core/modules/realtime-notifications/LINGYUN.Abp.Notifications.HttpApi.Client/ClientProxies/LINGYUN/Abp/Notifications/MyNotificationClientProxy.Generated.cs
  13. 7
      aspnet-core/modules/realtime-notifications/LINGYUN.Abp.Notifications.HttpApi.Client/ClientProxies/LINGYUN/Abp/Notifications/MyNotificationClientProxy.cs
  14. 56
      aspnet-core/modules/realtime-notifications/LINGYUN.Abp.Notifications.HttpApi.Client/ClientProxies/LINGYUN/Abp/Notifications/MySubscriptionClientProxy.Generated.cs
  15. 7
      aspnet-core/modules/realtime-notifications/LINGYUN.Abp.Notifications.HttpApi.Client/ClientProxies/LINGYUN/Abp/Notifications/MySubscriptionClientProxy.cs
  16. 39
      aspnet-core/modules/realtime-notifications/LINGYUN.Abp.Notifications.HttpApi.Client/ClientProxies/LINGYUN/Abp/Notifications/NotificationClientProxy.Generated.cs
  17. 7
      aspnet-core/modules/realtime-notifications/LINGYUN.Abp.Notifications.HttpApi.Client/ClientProxies/LINGYUN/Abp/Notifications/NotificationClientProxy.cs
  18. 1413
      aspnet-core/modules/realtime-notifications/LINGYUN.Abp.Notifications.HttpApi.Client/ClientProxies/notifications-generate-proxy.json
  19. 3
      aspnet-core/modules/realtime-notifications/LINGYUN.Abp.Notifications.HttpApi.Client/FodyWeavers.xml
  20. 30
      aspnet-core/modules/realtime-notifications/LINGYUN.Abp.Notifications.HttpApi.Client/FodyWeavers.xsd
  21. 23
      aspnet-core/modules/realtime-notifications/LINGYUN.Abp.Notifications.HttpApi.Client/LINGYUN.Abp.Notifications.HttpApi.Client.csproj
  22. 19
      aspnet-core/modules/realtime-notifications/LINGYUN.Abp.Notifications.HttpApi.Client/LINGYUN/Abp/Notifications/AbpNotificationsHttpApiClientModule.cs
  23. 112
      aspnet-core/services/LY.MicroService.Applications.Single/AbpDynamicFeatureDefinitionStoreInMemoryCache.cs
  24. 13
      aspnet-core/services/LY.MicroService.Applications.Single/LY.MicroService.Applications.Single.csproj
  25. 35
      aspnet-core/services/LY.MicroService.Applications.Single/MicroServiceApplicationsSingleModule.Configure.cs
  26. 27
      aspnet-core/services/LY.MicroService.Applications.Single/MicroServiceApplicationsSingleModule.cs
  27. 24
      aspnet-core/services/LY.MicroService.Applications.Single/appsettings.Development.json
  28. 4
      aspnet-core/services/LY.MicroService.Applications.Single/appsettings.json
  29. 13
      aspnet-core/tests/LINGYUN.Abp.IP2Region.Tests/LINGYUN/Abp/IP2Region/SearcherTest.cs

2
Directory.Packages.props

@ -186,6 +186,8 @@
<PackageVersion Include="DotNetCore.CAP.MySql" Version="$(DotNetCoreCAPPackageVersion)" /> <PackageVersion Include="DotNetCore.CAP.MySql" Version="$(DotNetCoreCAPPackageVersion)" />
<PackageVersion Include="DotNetCore.CAP.OpenTelemetry" Version="$(DotNetCoreCAPPackageVersion)" /> <PackageVersion Include="DotNetCore.CAP.OpenTelemetry" Version="$(DotNetCoreCAPPackageVersion)" />
<PackageVersion Include="DotNetCore.CAP.RabbitMQ" Version="$(DotNetCoreCAPPackageVersion)" /> <PackageVersion Include="DotNetCore.CAP.RabbitMQ" Version="$(DotNetCoreCAPPackageVersion)" />
<PackageVersion Include="DotNetCore.CAP.InMemoryStorage" Version="$(DotNetCoreCAPPackageVersion)" />
<PackageVersion Include="Savorboard.CAP.InMemoryMessageQueue" Version="$(DotNetCoreCAPPackageVersion)" />
</ItemGroup> </ItemGroup>
<!-- Serilog --> <!-- Serilog -->
<ItemGroup> <ItemGroup>

621
aspnet-core/LINGYUN.MicroService.All.sln

File diff suppressed because it is too large

48
aspnet-core/LINGYUN.MicroService.SingleProject.sln

@ -1,4 +1,3 @@

Microsoft Visual Studio Solution File, Format Version 12.00 Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 17 # Visual Studio Version 17
VisualStudioVersion = 17.0.31903.59 VisualStudioVersion = 17.0.31903.59
@ -439,10 +438,6 @@ EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "LINGYUN.Abp.AspNetCore.HttpOverrides", "framework\common\LINGYUN.Abp.AspNetCore.HttpOverrides\LINGYUN.Abp.AspNetCore.HttpOverrides.csproj", "{D67EBE62-C541-45E4-957E-D1D11BE74F68}" Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "LINGYUN.Abp.AspNetCore.HttpOverrides", "framework\common\LINGYUN.Abp.AspNetCore.HttpOverrides\LINGYUN.Abp.AspNetCore.HttpOverrides.csproj", "{D67EBE62-C541-45E4-957E-D1D11BE74F68}"
EndProject EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "single-project", "single-project", "{0D69B63D-F082-4D57-9FF0-355642C56993}" Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "single-project", "single-project", "{0D69B63D-F082-4D57-9FF0-355642C56993}"
ProjectSection(SolutionItems) = preProject
migrations\Migrate.ps1 = migrations\Migrate.ps1
migrations\MigrateEn.ps1 = migrations\MigrateEn.ps1
EndProjectSection
EndProject EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "LY.MicroService.Applications.Single.EntityFrameworkCore", "migrations\LY.MicroService.Applications.Single.EntityFrameworkCore\LY.MicroService.Applications.Single.EntityFrameworkCore.csproj", "{7623D363-F0BD-400C-B8AB-3FD9699D92D9}" Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "LY.MicroService.Applications.Single.EntityFrameworkCore", "migrations\LY.MicroService.Applications.Single.EntityFrameworkCore\LY.MicroService.Applications.Single.EntityFrameworkCore.csproj", "{7623D363-F0BD-400C-B8AB-3FD9699D92D9}"
EndProject EndProject
@ -606,13 +601,11 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "LINGYUN.Abp.OssManagement.M
EndProject EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "LINGYUN.Abp.OssManagement.Imaging", "modules\oss-management\LINGYUN.Abp.OssManagement.Imaging\LINGYUN.Abp.OssManagement.Imaging.csproj", "{BC7A8662-4313-4F1D-B267-9B1B69444CD3}" Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "LINGYUN.Abp.OssManagement.Imaging", "modules\oss-management\LINGYUN.Abp.OssManagement.Imaging\LINGYUN.Abp.OssManagement.Imaging.csproj", "{BC7A8662-4313-4F1D-B267-9B1B69444CD3}"
EndProject EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "LINGYUN.Abp.Elsa.EntityFrameworkCore.PostgreSql", "modules\elsa\LINGYUN.Abp.Elsa.EntityFrameworkCore.PostgreSql\LINGYUN.Abp.Elsa.EntityFrameworkCore.PostgreSql.csproj", "{8D0C8993-580A-4585-BE3B-87895C76FC89}" Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "cap", "cap", "{7C35101B-EA29-4B3D-B424-FAD625977E4D}"
EndProject EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "LINGYUN.Abp.Elsa.EntityFrameworkCore.SqlServer", "modules\elsa\LINGYUN.Abp.Elsa.EntityFrameworkCore.SqlServer\LINGYUN.Abp.Elsa.EntityFrameworkCore.SqlServer.csproj", "{AA742577-63B0-4188-AA36-AC6E0ED99BB6}" 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 EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "LY.MicroService.Applications.Single.EntityFrameworkCore.PostgreSql", "migrations\LY.MicroService.Applications.Single.EntityFrameworkCore.PostgreSql\LY.MicroService.Applications.Single.EntityFrameworkCore.PostgreSql.csproj", "{5A07FFDF-F979-44F9-BE24-81D6A25BEADB}" 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.MySql", "migrations\LY.MicroService.Applications.Single.EntityFrameworkCore.MySql\LY.MicroService.Applications.Single.EntityFrameworkCore.MySql.csproj", "{2B167D92-2327-4679-9096-49F274FABE0C}"
EndProject EndProject
Global Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution GlobalSection(SolutionConfigurationPlatforms) = preSolution
@ -1288,10 +1281,10 @@ Global
{F94E77C1-61E0-4FE8-9ECD-10A0102342E9}.Debug|Any CPU.Build.0 = Debug|Any CPU {F94E77C1-61E0-4FE8-9ECD-10A0102342E9}.Debug|Any CPU.Build.0 = Debug|Any CPU
{F94E77C1-61E0-4FE8-9ECD-10A0102342E9}.Release|Any CPU.ActiveCfg = Release|Any CPU {F94E77C1-61E0-4FE8-9ECD-10A0102342E9}.Release|Any CPU.ActiveCfg = Release|Any CPU
{F94E77C1-61E0-4FE8-9ECD-10A0102342E9}.Release|Any CPU.Build.0 = Release|Any CPU {F94E77C1-61E0-4FE8-9ECD-10A0102342E9}.Release|Any CPU.Build.0 = Release|Any CPU
{83D2F8F2-82C7-4919-9B65-D0FBF0B5324C}.Release|Any CPU.ActiveCfg = Release|Any CPU
{83D2F8F2-82C7-4919-9B65-D0FBF0B5324C}.Release|Any CPU.Build.0 = Release|Any CPU
{83D2F8F2-82C7-4919-9B65-D0FBF0B5324C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {83D2F8F2-82C7-4919-9B65-D0FBF0B5324C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{83D2F8F2-82C7-4919-9B65-D0FBF0B5324C}.Debug|Any CPU.Build.0 = Debug|Any CPU {83D2F8F2-82C7-4919-9B65-D0FBF0B5324C}.Debug|Any CPU.Build.0 = Debug|Any CPU
{83D2F8F2-82C7-4919-9B65-D0FBF0B5324C}.Release|Any CPU.ActiveCfg = Release|Any CPU
{83D2F8F2-82C7-4919-9B65-D0FBF0B5324C}.Release|Any CPU.Build.0 = Release|Any CPU
{CAEF3248-527D-48B7-9C98-929AC573C381}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {CAEF3248-527D-48B7-9C98-929AC573C381}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{CAEF3248-527D-48B7-9C98-929AC573C381}.Debug|Any CPU.Build.0 = Debug|Any CPU {CAEF3248-527D-48B7-9C98-929AC573C381}.Debug|Any CPU.Build.0 = Debug|Any CPU
{CAEF3248-527D-48B7-9C98-929AC573C381}.Release|Any CPU.ActiveCfg = Release|Any CPU {CAEF3248-527D-48B7-9C98-929AC573C381}.Release|Any CPU.ActiveCfg = Release|Any CPU
@ -1596,22 +1589,14 @@ Global
{BC7A8662-4313-4F1D-B267-9B1B69444CD3}.Debug|Any CPU.Build.0 = Debug|Any CPU {BC7A8662-4313-4F1D-B267-9B1B69444CD3}.Debug|Any CPU.Build.0 = Debug|Any CPU
{BC7A8662-4313-4F1D-B267-9B1B69444CD3}.Release|Any CPU.ActiveCfg = Release|Any CPU {BC7A8662-4313-4F1D-B267-9B1B69444CD3}.Release|Any CPU.ActiveCfg = Release|Any CPU
{BC7A8662-4313-4F1D-B267-9B1B69444CD3}.Release|Any CPU.Build.0 = Release|Any CPU {BC7A8662-4313-4F1D-B267-9B1B69444CD3}.Release|Any CPU.Build.0 = Release|Any CPU
{8D0C8993-580A-4585-BE3B-87895C76FC89}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {4539FCDB-7192-442C-BD9B-0AC71E882F4F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{8D0C8993-580A-4585-BE3B-87895C76FC89}.Debug|Any CPU.Build.0 = Debug|Any CPU {4539FCDB-7192-442C-BD9B-0AC71E882F4F}.Debug|Any CPU.Build.0 = Debug|Any CPU
{8D0C8993-580A-4585-BE3B-87895C76FC89}.Release|Any CPU.ActiveCfg = Release|Any CPU {4539FCDB-7192-442C-BD9B-0AC71E882F4F}.Release|Any CPU.ActiveCfg = Release|Any CPU
{8D0C8993-580A-4585-BE3B-87895C76FC89}.Release|Any CPU.Build.0 = Release|Any CPU {4539FCDB-7192-442C-BD9B-0AC71E882F4F}.Release|Any CPU.Build.0 = Release|Any CPU
{AA742577-63B0-4188-AA36-AC6E0ED99BB6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {DFDF367D-EDE1-4365-90F9-32F529117B60}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{AA742577-63B0-4188-AA36-AC6E0ED99BB6}.Debug|Any CPU.Build.0 = Debug|Any CPU {DFDF367D-EDE1-4365-90F9-32F529117B60}.Debug|Any CPU.Build.0 = Debug|Any CPU
{AA742577-63B0-4188-AA36-AC6E0ED99BB6}.Release|Any CPU.ActiveCfg = Release|Any CPU {DFDF367D-EDE1-4365-90F9-32F529117B60}.Release|Any CPU.ActiveCfg = Release|Any CPU
{AA742577-63B0-4188-AA36-AC6E0ED99BB6}.Release|Any CPU.Build.0 = Release|Any CPU {DFDF367D-EDE1-4365-90F9-32F529117B60}.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
EndGlobalSection EndGlobalSection
GlobalSection(SolutionProperties) = preSolution GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE HideSolutionNode = FALSE
@ -1904,10 +1889,9 @@ Global
{319428B9-CE7F-4027-92FA-6311C4CE95FB} = {4A2CF141-F32D-45A0-8665-B3705667A6D2} {319428B9-CE7F-4027-92FA-6311C4CE95FB} = {4A2CF141-F32D-45A0-8665-B3705667A6D2}
{9AE3E97E-8846-4315-9546-FF97E97FD49F} = {3AD66E47-B667-40D1-AE61-F5EC186241F7} {9AE3E97E-8846-4315-9546-FF97E97FD49F} = {3AD66E47-B667-40D1-AE61-F5EC186241F7}
{BC7A8662-4313-4F1D-B267-9B1B69444CD3} = {3AD66E47-B667-40D1-AE61-F5EC186241F7} {BC7A8662-4313-4F1D-B267-9B1B69444CD3} = {3AD66E47-B667-40D1-AE61-F5EC186241F7}
{8D0C8993-580A-4585-BE3B-87895C76FC89} = {07DFEB1E-ED92-4E97-A801-FAB2D70F4F35} {7C35101B-EA29-4B3D-B424-FAD625977E4D} = {99B7CBDE-A251-4738-97F0-DB1DB484BEE1}
{AA742577-63B0-4188-AA36-AC6E0ED99BB6} = {07DFEB1E-ED92-4E97-A801-FAB2D70F4F35} {4539FCDB-7192-442C-BD9B-0AC71E882F4F} = {7C35101B-EA29-4B3D-B424-FAD625977E4D}
{5A07FFDF-F979-44F9-BE24-81D6A25BEADB} = {0D69B63D-F082-4D57-9FF0-355642C56993} {DFDF367D-EDE1-4365-90F9-32F529117B60} = {C22741F9-FC56-4AE3-B543-9F15C779D345}
{2B167D92-2327-4679-9096-49F274FABE0C} = {0D69B63D-F082-4D57-9FF0-355642C56993}
EndGlobalSection EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {711A43C0-A2F8-4E5C-9B9F-F2551E4B3FF1} SolutionGuid = {711A43C0-A2F8-4E5C-9B9F-F2551E4B3FF1}

11
aspnet-core/modules/auditing/LINGYUN.Abp.Auditing.Application/LINGYUN/Abp/Auditing/AbpAuditingMapperProfile.cs

@ -4,6 +4,7 @@ using LINGYUN.Abp.Auditing.Logging;
using LINGYUN.Abp.Auditing.SecurityLogs; using LINGYUN.Abp.Auditing.SecurityLogs;
using LINGYUN.Abp.AuditLogging; using LINGYUN.Abp.AuditLogging;
using LINGYUN.Abp.Logging; using LINGYUN.Abp.Logging;
using Volo.Abp.ObjectExtending;
namespace LINGYUN.Abp.Auditing; namespace LINGYUN.Abp.Auditing;
@ -12,16 +13,16 @@ public class AbpAuditingMapperProfile : Profile
public AbpAuditingMapperProfile() public AbpAuditingMapperProfile()
{ {
CreateMap<AuditLogAction, AuditLogActionDto>() CreateMap<AuditLogAction, AuditLogActionDto>()
.MapExtraProperties(); .MapExtraProperties(MappingPropertyDefinitionChecks.None);
CreateMap<EntityPropertyChange, EntityPropertyChangeDto>(); CreateMap<EntityPropertyChange, EntityPropertyChangeDto>();
CreateMap<EntityChangeWithUsername, EntityChangeWithUsernameDto>(); CreateMap<EntityChangeWithUsername, EntityChangeWithUsernameDto>();
CreateMap<EntityChange, EntityChangeDto>() CreateMap<EntityChange, EntityChangeDto>()
.MapExtraProperties(); .MapExtraProperties(MappingPropertyDefinitionChecks.None);
CreateMap<AuditLog, AuditLogDto>() CreateMap<AuditLog, AuditLogDto>()
.MapExtraProperties(); .MapExtraProperties(MappingPropertyDefinitionChecks.None);
CreateMap<SecurityLog, SecurityLogDto>() CreateMap<SecurityLog, SecurityLogDto>(MemberList.Destination)
.MapExtraProperties(); .MapExtraProperties(MappingPropertyDefinitionChecks.None);
CreateMap<LogField, LogFieldDto>(); CreateMap<LogField, LogFieldDto>();
CreateMap<LogException, LogExceptionDto>(); CreateMap<LogException, LogExceptionDto>();

2
aspnet-core/modules/data-protection/LINGYUN.Abp.DataProtectionManagement.EntityFrameworkCore/LINGYUN/Abp/DataProtectionManagement/EntityFrameworkCore/AbpDataProtectionManagementDbContext.cs

@ -15,6 +15,6 @@ public class AbpDataProtectionManagementDbContext : AbpDbContext<AbpDataProtecti
{ {
base.OnModelCreating(modelBuilder); base.OnModelCreating(modelBuilder);
modelBuilder.ConfigureDataProtectionManagement(); ; modelBuilder.ConfigureDataProtectionManagement();
} }
} }

6
aspnet-core/modules/permissions-management/LINGYUN.Abp.PermissionManagement.Application/LINGYUN/Abp/PermissionManagement/Definitions/PermissionDefinitionAppService.cs

@ -91,6 +91,12 @@ public class PermissionDefinitionAppService : PermissionManagementAppServiceBase
[Authorize(PermissionManagementPermissionNames.Definition.Delete)] [Authorize(PermissionManagementPermissionNames.Definition.Delete)]
public async virtual Task DeleteAsync(string name) public async virtual Task DeleteAsync(string name)
{ {
if (await _staticPermissionDefinitionStore.GetOrNullAsync(name) != null)
{
throw new BusinessException(PermissionManagementErrorCodes.GroupDefinition.StaticGroupNotAllowedChanged)
.WithData("Name", name);
}
var definitionRecord = await FindByNameAsync(name); var definitionRecord = await FindByNameAsync(name);
if (definitionRecord != null) if (definitionRecord != null)

11
aspnet-core/modules/permissions-management/LINGYUN.Abp.PermissionManagement.Application/LINGYUN/Abp/PermissionManagement/Definitions/PermissionGroupDefinitionAppService.cs

@ -78,6 +78,13 @@ public class PermissionGroupDefinitionAppService : PermissionManagementAppServic
[Authorize(PermissionManagementPermissionNames.GroupDefinition.Delete)] [Authorize(PermissionManagementPermissionNames.GroupDefinition.Delete)]
public async virtual Task DeleteAsync(string name) public async virtual Task DeleteAsync(string name)
{ {
var staticGroups = await _staticPermissionDefinitionStore.GetGroupsAsync();
if (staticGroups.Any(g => g.Name == name))
{
throw new BusinessException(PermissionManagementErrorCodes.GroupDefinition.StaticGroupNotAllowedChanged)
.WithData("Name", name);
}
var groupDefinitionRecord = await FindByNameAsync(name); var groupDefinitionRecord = await FindByNameAsync(name);
if (groupDefinitionRecord != null) if (groupDefinitionRecord != null)
@ -133,8 +140,8 @@ public class PermissionGroupDefinitionAppService : PermissionManagementAppServic
[Authorize(PermissionManagementPermissionNames.GroupDefinition.Update)] [Authorize(PermissionManagementPermissionNames.GroupDefinition.Update)]
public async virtual Task<PermissionGroupDefinitionDto> UpdateAsync(string name, PermissionGroupDefinitionUpdateDto input) public async virtual Task<PermissionGroupDefinitionDto> UpdateAsync(string name, PermissionGroupDefinitionUpdateDto input)
{ {
var groupDefinition = await _permissionDefinitionManager.GetGroupOrNullAsync(name); var staticGroups = await _staticPermissionDefinitionStore.GetGroupsAsync();
if (groupDefinition != null) if (staticGroups.Any(g => g.Name == name))
{ {
throw new BusinessException(PermissionManagementErrorCodes.GroupDefinition.StaticGroupNotAllowedChanged) throw new BusinessException(PermissionManagementErrorCodes.GroupDefinition.StaticGroupNotAllowedChanged)
.WithData("Name", name); .WithData("Name", name);

60
aspnet-core/modules/realtime-notifications/LINGYUN.Abp.Notifications.HttpApi.Client/ClientProxies/LINGYUN/Abp/Notifications/Definitions/Groups/NotificationGroupDefinitionClientProxy.Generated.cs

@ -0,0 +1,60 @@
// This file is automatically generated by ABP framework to use MVC Controllers from CSharp
using LINGYUN.Abp.Notifications.Definitions.Groups;
using System;
using System.Collections.Generic;
using System.Threading.Tasks;
using Volo.Abp;
using Volo.Abp.Application.Dtos;
using Volo.Abp.DependencyInjection;
using Volo.Abp.Http.Client;
using Volo.Abp.Http.Client.ClientProxying;
using Volo.Abp.Http.Modeling;
// ReSharper disable once CheckNamespace
namespace LINGYUN.Abp.Notifications.Definitions.Groups;
[Dependency(ReplaceServices = true)]
[ExposeServices(typeof(INotificationGroupDefinitionAppService), typeof(NotificationGroupDefinitionClientProxy))]
public partial class NotificationGroupDefinitionClientProxy : ClientProxyBase<INotificationGroupDefinitionAppService>, INotificationGroupDefinitionAppService
{
public virtual async Task<NotificationGroupDefinitionDto> CreateAsync(NotificationGroupDefinitionCreateDto input)
{
return await RequestAsync<NotificationGroupDefinitionDto>(nameof(CreateAsync), new ClientProxyRequestTypeValue
{
{ typeof(NotificationGroupDefinitionCreateDto), input }
});
}
public virtual async Task DeleteAsync(string name)
{
await RequestAsync(nameof(DeleteAsync), new ClientProxyRequestTypeValue
{
{ typeof(string), name }
});
}
public virtual async Task<NotificationGroupDefinitionDto> GetAsync(string name)
{
return await RequestAsync<NotificationGroupDefinitionDto>(nameof(GetAsync), new ClientProxyRequestTypeValue
{
{ typeof(string), name }
});
}
public virtual async Task<ListResultDto<NotificationGroupDefinitionDto>> GetListAsync(NotificationGroupDefinitionGetListInput input)
{
return await RequestAsync<ListResultDto<NotificationGroupDefinitionDto>>(nameof(GetListAsync), new ClientProxyRequestTypeValue
{
{ typeof(NotificationGroupDefinitionGetListInput), input }
});
}
public virtual async Task<NotificationGroupDefinitionDto> UpdateAsync(string name, NotificationGroupDefinitionUpdateDto input)
{
return await RequestAsync<NotificationGroupDefinitionDto>(nameof(UpdateAsync), new ClientProxyRequestTypeValue
{
{ typeof(string), name },
{ typeof(NotificationGroupDefinitionUpdateDto), input }
});
}
}

7
aspnet-core/modules/realtime-notifications/LINGYUN.Abp.Notifications.HttpApi.Client/ClientProxies/LINGYUN/Abp/Notifications/Definitions/Groups/NotificationGroupDefinitionClientProxy.cs

@ -0,0 +1,7 @@
// This file is part of NotificationGroupDefinitionClientProxy, you can customize it here
// ReSharper disable once CheckNamespace
namespace LINGYUN.Abp.Notifications.Definitions.Groups;
public partial class NotificationGroupDefinitionClientProxy
{
}

60
aspnet-core/modules/realtime-notifications/LINGYUN.Abp.Notifications.HttpApi.Client/ClientProxies/LINGYUN/Abp/Notifications/Definitions/Notifications/NotificationDefinitionClientProxy.Generated.cs

@ -0,0 +1,60 @@
// This file is automatically generated by ABP framework to use MVC Controllers from CSharp
using LINGYUN.Abp.Notifications.Definitions.Notifications;
using System;
using System.Collections.Generic;
using System.Threading.Tasks;
using Volo.Abp;
using Volo.Abp.Application.Dtos;
using Volo.Abp.DependencyInjection;
using Volo.Abp.Http.Client;
using Volo.Abp.Http.Client.ClientProxying;
using Volo.Abp.Http.Modeling;
// ReSharper disable once CheckNamespace
namespace LINGYUN.Abp.Notifications.Definitions.Notifications;
[Dependency(ReplaceServices = true)]
[ExposeServices(typeof(INotificationDefinitionAppService), typeof(NotificationDefinitionClientProxy))]
public partial class NotificationDefinitionClientProxy : ClientProxyBase<INotificationDefinitionAppService>, INotificationDefinitionAppService
{
public virtual async Task<NotificationDefinitionDto> CreateAsync(NotificationDefinitionCreateDto input)
{
return await RequestAsync<NotificationDefinitionDto>(nameof(CreateAsync), new ClientProxyRequestTypeValue
{
{ typeof(NotificationDefinitionCreateDto), input }
});
}
public virtual async Task DeleteAsync(string name)
{
await RequestAsync(nameof(DeleteAsync), new ClientProxyRequestTypeValue
{
{ typeof(string), name }
});
}
public virtual async Task<NotificationDefinitionDto> GetAsync(string name)
{
return await RequestAsync<NotificationDefinitionDto>(nameof(GetAsync), new ClientProxyRequestTypeValue
{
{ typeof(string), name }
});
}
public virtual async Task<ListResultDto<NotificationDefinitionDto>> GetListAsync(NotificationDefinitionGetListInput input)
{
return await RequestAsync<ListResultDto<NotificationDefinitionDto>>(nameof(GetListAsync), new ClientProxyRequestTypeValue
{
{ typeof(NotificationDefinitionGetListInput), input }
});
}
public virtual async Task<NotificationDefinitionDto> UpdateAsync(string name, NotificationDefinitionUpdateDto input)
{
return await RequestAsync<NotificationDefinitionDto>(nameof(UpdateAsync), new ClientProxyRequestTypeValue
{
{ typeof(string), name },
{ typeof(NotificationDefinitionUpdateDto), input }
});
}
}

7
aspnet-core/modules/realtime-notifications/LINGYUN.Abp.Notifications.HttpApi.Client/ClientProxies/LINGYUN/Abp/Notifications/Definitions/Notifications/NotificationDefinitionClientProxy.cs

@ -0,0 +1,7 @@
// This file is part of NotificationDefinitionClientProxy, you can customize it here
// ReSharper disable once CheckNamespace
namespace LINGYUN.Abp.Notifications.Definitions.Notifications;
public partial class NotificationDefinitionClientProxy
{
}

51
aspnet-core/modules/realtime-notifications/LINGYUN.Abp.Notifications.HttpApi.Client/ClientProxies/LINGYUN/Abp/Notifications/MyNotificationClientProxy.Generated.cs

@ -0,0 +1,51 @@
// This file is automatically generated by ABP framework to use MVC Controllers from CSharp
using LINGYUN.Abp.Notifications;
using System;
using System.Collections.Generic;
using System.Threading.Tasks;
using Volo.Abp;
using Volo.Abp.Application.Dtos;
using Volo.Abp.DependencyInjection;
using Volo.Abp.Http.Client;
using Volo.Abp.Http.Client.ClientProxying;
using Volo.Abp.Http.Modeling;
// ReSharper disable once CheckNamespace
namespace LINGYUN.Abp.Notifications;
[Dependency(ReplaceServices = true)]
[ExposeServices(typeof(IMyNotificationAppService), typeof(MyNotificationClientProxy))]
public partial class MyNotificationClientProxy : ClientProxyBase<IMyNotificationAppService>, IMyNotificationAppService
{
public virtual async Task MarkReadStateAsync(NotificationMarkReadStateInput input)
{
await RequestAsync(nameof(MarkReadStateAsync), new ClientProxyRequestTypeValue
{
{ typeof(NotificationMarkReadStateInput), input }
});
}
public virtual async Task DeleteAsync(long id)
{
await RequestAsync(nameof(DeleteAsync), new ClientProxyRequestTypeValue
{
{ typeof(long), id }
});
}
public virtual async Task<UserNotificationDto> GetAsync(long id)
{
return await RequestAsync<UserNotificationDto>(nameof(GetAsync), new ClientProxyRequestTypeValue
{
{ typeof(long), id }
});
}
public virtual async Task<PagedResultDto<UserNotificationDto>> GetListAsync(UserNotificationGetByPagedDto input)
{
return await RequestAsync<PagedResultDto<UserNotificationDto>>(nameof(GetListAsync), new ClientProxyRequestTypeValue
{
{ typeof(UserNotificationGetByPagedDto), input }
});
}
}

7
aspnet-core/modules/realtime-notifications/LINGYUN.Abp.Notifications.HttpApi.Client/ClientProxies/LINGYUN/Abp/Notifications/MyNotificationClientProxy.cs

@ -0,0 +1,7 @@
// This file is part of MyNotificationClientProxy, you can customize it here
// ReSharper disable once CheckNamespace
namespace LINGYUN.Abp.Notifications;
public partial class MyNotificationClientProxy
{
}

56
aspnet-core/modules/realtime-notifications/LINGYUN.Abp.Notifications.HttpApi.Client/ClientProxies/LINGYUN/Abp/Notifications/MySubscriptionClientProxy.Generated.cs

@ -0,0 +1,56 @@
// This file is automatically generated by ABP framework to use MVC Controllers from CSharp
using LINGYUN.Abp.Notifications;
using System;
using System.Collections.Generic;
using System.Threading.Tasks;
using Volo.Abp;
using Volo.Abp.Application.Dtos;
using Volo.Abp.DependencyInjection;
using Volo.Abp.Http.Client;
using Volo.Abp.Http.Client.ClientProxying;
using Volo.Abp.Http.Modeling;
// ReSharper disable once CheckNamespace
namespace LINGYUN.Abp.Notifications;
[Dependency(ReplaceServices = true)]
[ExposeServices(typeof(IMySubscriptionAppService), typeof(MySubscriptionClientProxy))]
public partial class MySubscriptionClientProxy : ClientProxyBase<IMySubscriptionAppService>, IMySubscriptionAppService
{
public virtual async Task<ListResultDto<UserSubscreNotificationDto>> GetAllListAsync()
{
return await RequestAsync<ListResultDto<UserSubscreNotificationDto>>(nameof(GetAllListAsync));
}
public virtual async Task<PagedResultDto<UserSubscreNotificationDto>> GetListAsync(SubscriptionsGetByPagedDto input)
{
return await RequestAsync<PagedResultDto<UserSubscreNotificationDto>>(nameof(GetListAsync), new ClientProxyRequestTypeValue
{
{ typeof(SubscriptionsGetByPagedDto), input }
});
}
public virtual async Task<UserSubscriptionsResult> IsSubscribedAsync(SubscriptionsGetByNameDto input)
{
return await RequestAsync<UserSubscriptionsResult>(nameof(IsSubscribedAsync), new ClientProxyRequestTypeValue
{
{ typeof(SubscriptionsGetByNameDto), input }
});
}
public virtual async Task SubscribeAsync(SubscriptionsGetByNameDto input)
{
await RequestAsync(nameof(SubscribeAsync), new ClientProxyRequestTypeValue
{
{ typeof(SubscriptionsGetByNameDto), input }
});
}
public virtual async Task UnSubscribeAsync(SubscriptionsGetByNameDto input)
{
await RequestAsync(nameof(UnSubscribeAsync), new ClientProxyRequestTypeValue
{
{ typeof(SubscriptionsGetByNameDto), input }
});
}
}

7
aspnet-core/modules/realtime-notifications/LINGYUN.Abp.Notifications.HttpApi.Client/ClientProxies/LINGYUN/Abp/Notifications/MySubscriptionClientProxy.cs

@ -0,0 +1,7 @@
// This file is part of MySubscriptionClientProxy, you can customize it here
// ReSharper disable once CheckNamespace
namespace LINGYUN.Abp.Notifications;
public partial class MySubscriptionClientProxy
{
}

39
aspnet-core/modules/realtime-notifications/LINGYUN.Abp.Notifications.HttpApi.Client/ClientProxies/LINGYUN/Abp/Notifications/NotificationClientProxy.Generated.cs

@ -0,0 +1,39 @@
// This file is automatically generated by ABP framework to use MVC Controllers from CSharp
using System.Threading.Tasks;
using Volo.Abp.Application.Dtos;
using Volo.Abp.DependencyInjection;
using Volo.Abp.Http.Client.ClientProxying;
// ReSharper disable once CheckNamespace
namespace LINGYUN.Abp.Notifications;
[Dependency(ReplaceServices = true)]
[ExposeServices(typeof(INotificationAppService), typeof(NotificationClientProxy))]
public partial class NotificationClientProxy : ClientProxyBase<INotificationAppService>, INotificationAppService
{
public virtual async Task SendAsync(NotificationSendDto input)
{
await RequestAsync(nameof(SendAsync), new ClientProxyRequestTypeValue
{
{ typeof(NotificationSendDto), input }
});
}
public virtual async Task<ListResultDto<NotificationGroupDto>> GetAssignableNotifiersAsync()
{
return await RequestAsync<ListResultDto<NotificationGroupDto>>(nameof(GetAssignableNotifiersAsync));
}
public virtual async Task<ListResultDto<NotificationTemplateDto>> GetAssignableTemplatesAsync()
{
return await RequestAsync<ListResultDto<NotificationTemplateDto>>(nameof(GetAssignableTemplatesAsync));
}
public virtual async Task SendAsync(NotificationTemplateSendDto input)
{
await RequestAsync(nameof(SendAsync), new ClientProxyRequestTypeValue
{
{ typeof(NotificationTemplateSendDto), input }
});
}
}

7
aspnet-core/modules/realtime-notifications/LINGYUN.Abp.Notifications.HttpApi.Client/ClientProxies/LINGYUN/Abp/Notifications/NotificationClientProxy.cs

@ -0,0 +1,7 @@
// This file is part of NotificationClientProxy, you can customize it here
// ReSharper disable once CheckNamespace
namespace LINGYUN.Abp.Notifications;
public partial class NotificationClientProxy
{
}

1413
aspnet-core/modules/realtime-notifications/LINGYUN.Abp.Notifications.HttpApi.Client/ClientProxies/notifications-generate-proxy.json

File diff suppressed because it is too large

3
aspnet-core/modules/realtime-notifications/LINGYUN.Abp.Notifications.HttpApi.Client/FodyWeavers.xml

@ -0,0 +1,3 @@
<Weavers xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="FodyWeavers.xsd">
<ConfigureAwait ContinueOnCapturedContext="false" />
</Weavers>

30
aspnet-core/modules/realtime-notifications/LINGYUN.Abp.Notifications.HttpApi.Client/FodyWeavers.xsd

@ -0,0 +1,30 @@
<?xml version="1.0" encoding="utf-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
<!-- This file was generated by Fody. Manual changes to this file will be lost when your project is rebuilt. -->
<xs:element name="Weavers">
<xs:complexType>
<xs:all>
<xs:element name="ConfigureAwait" minOccurs="0" maxOccurs="1">
<xs:complexType>
<xs:attribute name="ContinueOnCapturedContext" type="xs:boolean" />
</xs:complexType>
</xs:element>
</xs:all>
<xs:attribute name="VerifyAssembly" type="xs:boolean">
<xs:annotation>
<xs:documentation>'true' to run assembly verification (PEVerify) on the target assembly after all weavers have been executed.</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="VerifyIgnoreCodes" type="xs:string">
<xs:annotation>
<xs:documentation>A comma-separated list of error codes that can be safely ignored in assembly verification.</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="GenerateXsd" type="xs:boolean">
<xs:annotation>
<xs:documentation>'false' to turn off automatic generation of the XML Schema file.</xs:documentation>
</xs:annotation>
</xs:attribute>
</xs:complexType>
</xs:element>
</xs:schema>

23
aspnet-core/modules/realtime-notifications/LINGYUN.Abp.Notifications.HttpApi.Client/LINGYUN.Abp.Notifications.HttpApi.Client.csproj

@ -0,0 +1,23 @@
<Project Sdk="Microsoft.NET.Sdk">
<Import Project="..\..\..\..\configureawait.props" />
<Import Project="..\..\..\..\common.props" />
<PropertyGroup>
<TargetFramework>netstandard2.0</TargetFramework>
<RootNamespace />
</PropertyGroup>
<ItemGroup>
<EmbeddedResource Include="ClientProxies\notifications-generate-proxy.json" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="Volo.Abp.Http.Client" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\LINGYUN.Abp.Notifications.Application.Contracts\LINGYUN.Abp.Notifications.Application.Contracts.csproj" />
</ItemGroup>
</Project>

19
aspnet-core/modules/realtime-notifications/LINGYUN.Abp.Notifications.HttpApi.Client/LINGYUN/Abp/Notifications/AbpNotificationsHttpApiClientModule.cs

@ -0,0 +1,19 @@
using Microsoft.Extensions.DependencyInjection;
using Volo.Abp.Http.Client;
using Volo.Abp.Modularity;
namespace LINGYUN.Abp.Notifications;
[DependsOn(
typeof(AbpHttpClientModule),
typeof(AbpNotificationsApplicationContractsModule))]
public class AbpNotificationsHttpApiClientModule : AbpModule
{
public override void ConfigureServices(ServiceConfigurationContext context)
{
context.Services.AddStaticHttpClientProxies(
typeof(AbpNotificationsApplicationContractsModule).Assembly,
AbpNotificationsRemoteServiceConsts.RemoteServiceName
);
}
}

112
aspnet-core/services/LY.MicroService.Applications.Single/AbpDynamicFeatureDefinitionStoreInMemoryCache.cs

@ -0,0 +1,112 @@

using Volo.Abp.DependencyInjection;
namespace LY.MicroService.Applications.Single;
[Dependency(ServiceLifetime.Singleton, ReplaceServices = true)]
public class AbpDynamicFeatureDefinitionStoreInMemoryCache : IDynamicFeatureDefinitionStoreInMemoryCache
{
public string CacheStamp { get; set; }
protected IDictionary<string, FeatureGroupDefinition> FeatureGroupDefinitions { get; }
protected IDictionary<string, FeatureDefinition> FeatureDefinitions { get; }
protected StringValueTypeSerializer StateCheckerSerializer { get; }
protected ILocalizableStringSerializer LocalizableStringSerializer { get; }
public SemaphoreSlim SyncSemaphore { get; } = new(1, 1);
public DateTime? LastCheckTime { get; set; }
public AbpDynamicFeatureDefinitionStoreInMemoryCache(
StringValueTypeSerializer stateCheckerSerializer,
ILocalizableStringSerializer localizableStringSerializer)
{
StateCheckerSerializer = stateCheckerSerializer;
LocalizableStringSerializer = localizableStringSerializer;
FeatureGroupDefinitions = new Dictionary<string, FeatureGroupDefinition>();
FeatureDefinitions = new Dictionary<string, FeatureDefinition>();
}
public Task FillAsync(
List<FeatureGroupDefinitionRecord> featureGroupRecords,
List<FeatureDefinitionRecord> featureRecords)
{
FeatureGroupDefinitions.Clear();
FeatureDefinitions.Clear();
var context = new FeatureDefinitionContext();
foreach (var featureGroupRecord in featureGroupRecords)
{
var featureGroup = context.AddGroup(
featureGroupRecord.Name,
featureGroupRecord.DisplayName != null ? LocalizableStringSerializer.Deserialize(featureGroupRecord.DisplayName) : null
);
FeatureGroupDefinitions[featureGroup.Name] = featureGroup;
foreach (var property in featureGroupRecord.ExtraProperties)
{
featureGroup[property.Key] = property.Value;
}
var featureRecordsInThisGroup = featureRecords
.Where(p => p.GroupName == featureGroup.Name);
foreach (var featureRecord in featureRecordsInThisGroup.Where(x => x.ParentName == null))
{
AddFeatureRecursively(featureGroup, featureRecord, featureRecords);
}
}
return Task.CompletedTask;
}
public FeatureDefinition GetFeatureOrNull(string name)
{
return FeatureDefinitions.GetOrDefault(name);
}
public IReadOnlyList<FeatureDefinition> GetFeatures()
{
return FeatureDefinitions.Values.ToList();
}
public IReadOnlyList<FeatureGroupDefinition> GetGroups()
{
return FeatureGroupDefinitions.Values.ToList();
}
private void AddFeatureRecursively(ICanCreateChildFeature featureContainer,
FeatureDefinitionRecord featureRecord,
List<FeatureDefinitionRecord> allFeatureRecords)
{
var feature = featureContainer.CreateChildFeature(
featureRecord.Name,
featureRecord.DefaultValue,
featureRecord.DisplayName != null ? LocalizableStringSerializer.Deserialize(featureRecord.DisplayName) : null,
featureRecord.Description != null ? LocalizableStringSerializer.Deserialize(featureRecord.Description) : null,
StateCheckerSerializer.Deserialize(featureRecord.ValueType),
featureRecord.IsVisibleToClients,
featureRecord.IsAvailableToHost
);
FeatureDefinitions[feature.Name] = feature;
if (!featureRecord.AllowedProviders.IsNullOrWhiteSpace())
{
feature.AllowedProviders.AddRange(featureRecord.AllowedProviders.Split(','));
}
foreach (var property in featureRecord.ExtraProperties)
{
feature[property.Key] = property.Value;
}
foreach (var subFeature in allFeatureRecords.Where(p => p.ParentName == featureRecord.Name))
{
AddFeatureRecursively(feature, subFeature, allFeatureRecords);
}
}
}

13
aspnet-core/services/LY.MicroService.Applications.Single/LY.MicroService.Applications.Single.csproj

@ -11,6 +11,12 @@
<ItemGroup> <ItemGroup>
<PackageReference Include="DistributedLock.Redis" /> <PackageReference Include="DistributedLock.Redis" />
<PackageReference Include="DotNetCore.CAP.Dashboard" />
<PackageReference Include="DotNetCore.CAP.MySql" />
<PackageReference Include="DotNetCore.CAP.RabbitMQ" />
<PackageReference Include="DotNetCore.CAP.OpenTelemetry" />
<PackageReference Include="DotNetCore.CAP.InMemoryStorage" />
<PackageReference Include="Savorboard.CAP.InMemoryMessageQueue" />
<PackageReference Include="Elsa.Activities.Email" /> <PackageReference Include="Elsa.Activities.Email" />
<PackageReference Include="Elsa.Activities.Http" /> <PackageReference Include="Elsa.Activities.Http" />
<PackageReference Include="Elsa.Activities.UserTask" /> <PackageReference Include="Elsa.Activities.UserTask" />
@ -38,8 +44,7 @@
<PackageReference Include="Volo.Abp.AspNetCore.Authentication.JwtBearer" /> <PackageReference Include="Volo.Abp.AspNetCore.Authentication.JwtBearer" />
<PackageReference Include="Volo.Abp.Autofac" /> <PackageReference Include="Volo.Abp.Autofac" />
<PackageReference Include="Volo.Abp.Caching.StackExchangeRedis" /> <PackageReference Include="Volo.Abp.Caching.StackExchangeRedis" />
<!-- <PackageReference Include="Volo.Abp.EntityFrameworkCore.MySQL" />--> <PackageReference Include="Volo.Abp.EntityFrameworkCore.MySQL" />
<PackageReference Include="Volo.Abp.EntityFrameworkCore.PostgreSql" />
<PackageReference Include="Volo.Abp.FeatureManagement.Application" /> <PackageReference Include="Volo.Abp.FeatureManagement.Application" />
<PackageReference Include="Volo.Abp.FeatureManagement.EntityFrameworkCore" /> <PackageReference Include="Volo.Abp.FeatureManagement.EntityFrameworkCore" />
<PackageReference Include="Volo.Abp.FeatureManagement.HttpApi" /> <PackageReference Include="Volo.Abp.FeatureManagement.HttpApi" />
@ -59,6 +64,7 @@
<ItemGroup> <ItemGroup>
<ProjectReference Include="..\..\framework\auditing\LINGYUN.Abp.AuditLogging.EntityFrameworkCore\LINGYUN.Abp.AuditLogging.EntityFrameworkCore.csproj" /> <ProjectReference Include="..\..\framework\auditing\LINGYUN.Abp.AuditLogging.EntityFrameworkCore\LINGYUN.Abp.AuditLogging.EntityFrameworkCore.csproj" />
<ProjectReference Include="..\..\framework\auditing\LINGYUN.Abp.AuditLogging.IP2Region\LINGYUN.Abp.AuditLogging.IP2Region.csproj" />
<ProjectReference Include="..\..\framework\auditing\LINGYUN.Abp.AuditLogging\LINGYUN.Abp.AuditLogging.csproj" /> <ProjectReference Include="..\..\framework\auditing\LINGYUN.Abp.AuditLogging\LINGYUN.Abp.AuditLogging.csproj" />
<ProjectReference Include="..\..\framework\authentication\LINGYUN.Abp.Authentication.QQ\LINGYUN.Abp.Authentication.QQ.csproj" /> <ProjectReference Include="..\..\framework\authentication\LINGYUN.Abp.Authentication.QQ\LINGYUN.Abp.Authentication.QQ.csproj" />
<ProjectReference Include="..\..\framework\authentication\LINGYUN.Abp.Authentication.WeChat\LINGYUN.Abp.Authentication.WeChat.csproj" /> <ProjectReference Include="..\..\framework\authentication\LINGYUN.Abp.Authentication.WeChat\LINGYUN.Abp.Authentication.WeChat.csproj" />
@ -70,6 +76,7 @@
<ProjectReference Include="..\..\framework\cloud-tencent\LINGYUN.Abp.Tencent\LINGYUN.Abp.Tencent.csproj" /> <ProjectReference Include="..\..\framework\cloud-tencent\LINGYUN.Abp.Tencent\LINGYUN.Abp.Tencent.csproj" />
<ProjectReference Include="..\..\framework\common\LINGYUN.Abp.AspNetCore.HttpOverrides\LINGYUN.Abp.AspNetCore.HttpOverrides.csproj" /> <ProjectReference Include="..\..\framework\common\LINGYUN.Abp.AspNetCore.HttpOverrides\LINGYUN.Abp.AspNetCore.HttpOverrides.csproj" />
<ProjectReference Include="..\..\framework\common\LINGYUN.Abp.Data.DbMigrator\LINGYUN.Abp.Data.DbMigrator.csproj" /> <ProjectReference Include="..\..\framework\common\LINGYUN.Abp.Data.DbMigrator\LINGYUN.Abp.Data.DbMigrator.csproj" />
<ProjectReference Include="..\..\framework\common\LINGYUN.Abp.EventBus.CAP\LINGYUN.Abp.EventBus.CAP.csproj" />
<ProjectReference Include="..\..\framework\common\LINGYUN.Abp.ExceptionHandling.Emailing\LINGYUN.Abp.ExceptionHandling.Emailing.csproj" /> <ProjectReference Include="..\..\framework\common\LINGYUN.Abp.ExceptionHandling.Emailing\LINGYUN.Abp.ExceptionHandling.Emailing.csproj" />
<ProjectReference Include="..\..\framework\common\LINGYUN.Abp.ExceptionHandling\LINGYUN.Abp.ExceptionHandling.csproj" /> <ProjectReference Include="..\..\framework\common\LINGYUN.Abp.ExceptionHandling\LINGYUN.Abp.ExceptionHandling.csproj" />
<ProjectReference Include="..\..\framework\common\LINGYUN.Abp.Features.LimitValidation.Redis.Client\LINGYUN.Abp.Features.LimitValidation.Redis.Client.csproj" /> <ProjectReference Include="..\..\framework\common\LINGYUN.Abp.Features.LimitValidation.Redis.Client\LINGYUN.Abp.Features.LimitValidation.Redis.Client.csproj" />
@ -115,6 +122,7 @@
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<ProjectReference Include="..\..\migrations\LY.MicroService.Applications.Single.EntityFrameworkCore\LY.MicroService.Applications.Single.EntityFrameworkCore.csproj" />
<ProjectReference Include="..\..\modules\account\LINGYUN.Abp.Account.Application.Contracts\LINGYUN.Abp.Account.Application.Contracts.csproj" /> <ProjectReference Include="..\..\modules\account\LINGYUN.Abp.Account.Application.Contracts\LINGYUN.Abp.Account.Application.Contracts.csproj" />
<ProjectReference Include="..\..\modules\account\LINGYUN.Abp.Account.Application\LINGYUN.Abp.Account.Application.csproj" /> <ProjectReference Include="..\..\modules\account\LINGYUN.Abp.Account.Application\LINGYUN.Abp.Account.Application.csproj" />
<ProjectReference Include="..\..\modules\account\LINGYUN.Abp.Account.HttpApi\LINGYUN.Abp.Account.HttpApi.csproj" /> <ProjectReference Include="..\..\modules\account\LINGYUN.Abp.Account.HttpApi\LINGYUN.Abp.Account.HttpApi.csproj" />
@ -141,7 +149,6 @@
<ProjectReference Include="..\..\modules\elsa\LINGYUN.Abp.Elsa.Activities.Webhooks\LINGYUN.Abp.Elsa.Activities.Webhooks.csproj" /> <ProjectReference Include="..\..\modules\elsa\LINGYUN.Abp.Elsa.Activities.Webhooks\LINGYUN.Abp.Elsa.Activities.Webhooks.csproj" />
<ProjectReference Include="..\..\modules\elsa\LINGYUN.Abp.Elsa.Activities\LINGYUN.Abp.Elsa.Activities.csproj" /> <ProjectReference Include="..\..\modules\elsa\LINGYUN.Abp.Elsa.Activities\LINGYUN.Abp.Elsa.Activities.csproj" />
<ProjectReference Include="..\..\modules\elsa\LINGYUN.Abp.Elsa.EntityFrameworkCore.MySql\LINGYUN.Abp.Elsa.EntityFrameworkCore.MySql.csproj" /> <ProjectReference Include="..\..\modules\elsa\LINGYUN.Abp.Elsa.EntityFrameworkCore.MySql\LINGYUN.Abp.Elsa.EntityFrameworkCore.MySql.csproj" />
<!-- <ProjectReference Include="..\..\modules\elsa\LINGYUN.Abp.Elsa.EntityFrameworkCore.PostgreSql\LINGYUN.Abp.Elsa.EntityFrameworkCore.PostgreSql.csproj" /> -->
<ProjectReference Include="..\..\modules\elsa\LINGYUN.Abp.Elsa.EntityFrameworkCore\LINGYUN.Abp.Elsa.EntityFrameworkCore.csproj" /> <ProjectReference Include="..\..\modules\elsa\LINGYUN.Abp.Elsa.EntityFrameworkCore\LINGYUN.Abp.Elsa.EntityFrameworkCore.csproj" />
<ProjectReference Include="..\..\modules\elsa\LINGYUN.Abp.Elsa.Server\LINGYUN.Abp.Elsa.Server.csproj" /> <ProjectReference Include="..\..\modules\elsa\LINGYUN.Abp.Elsa.Server\LINGYUN.Abp.Elsa.Server.csproj" />
<ProjectReference Include="..\..\modules\elsa\LINGYUN.Abp.Elsa\LINGYUN.Abp.Elsa.csproj" /> <ProjectReference Include="..\..\modules\elsa\LINGYUN.Abp.Elsa\LINGYUN.Abp.Elsa.csproj" />

35
aspnet-core/services/LY.MicroService.Applications.Single/MicroServiceApplicationsSingleModule.Configure.cs

@ -1,3 +1,6 @@
using DotNetCore.CAP;
using Microsoft.Extensions.Configuration;
using Savorboard.CAP.InMemoryMessageQueue;
using VoloAbpExceptionHandlingOptions = Volo.Abp.AspNetCore.ExceptionHandling.AbpExceptionHandlingOptions; using VoloAbpExceptionHandlingOptions = Volo.Abp.AspNetCore.ExceptionHandling.AbpExceptionHandlingOptions;
namespace LY.MicroService.Applications.Single; namespace LY.MicroService.Applications.Single;
@ -34,6 +37,28 @@ public partial class MicroServiceApplicationsSingleModule
} }
} }
private void PreConfigureCAP(IConfiguration configuration)
{
PreConfigure<CapOptions>(options =>
{
options.UseDashboard();
if (!configuration.GetValue<bool>("CAP:IsEnabled"))
{
options.UseInMemoryStorage().UseInMemoryMessageQueue();
return;
}
options
.UseMySql(sqlOptions =>
{
configuration.GetSection("CAP:MySql").Bind(sqlOptions);
})
.UseRabbitMQ(rabbitMQOptions =>
{
configuration.GetSection("CAP:RabbitMQ").Bind(rabbitMQOptions);
});
});
}
private void PreConfigureAuthServer(IConfiguration configuration) private void PreConfigureAuthServer(IConfiguration configuration)
{ {
PreConfigure<OpenIddictBuilder>(builder => PreConfigure<OpenIddictBuilder>(builder =>
@ -480,13 +505,14 @@ public partial class MicroServiceApplicationsSingleModule
}); });
} }
private void ConfigureDbContext() private void ConfigureDbContext(IConfiguration configuration)
{ {
Configure<AbpDbConnectionOptions>(options =>
{
configuration.GetSection("Databases").Bind(options.Databases);
});
Configure<AbpDbContextOptions>(options => Configure<AbpDbContextOptions>(options =>
{ {
// AppContext.SetSwitch("Npgsql.EnableLegacyTimestampBehavior", true);//解决PostgreSql设置为utc时间后无法写入local时区的问题
// options.UseNpgsql();
options.UseMySQL(); options.UseMySQL();
}); });
} }
@ -848,3 +874,4 @@ public partial class MicroServiceApplicationsSingleModule
}); });
} }
} }

27
aspnet-core/services/LY.MicroService.Applications.Single/MicroServiceApplicationsSingleModule.cs

@ -1,3 +1,5 @@
using LINGYUN.Abp.AuditLogging.IP2Region;
using LINGYUN.Abp.EventBus.CAP;
using Volo.Abp.MailKit; using Volo.Abp.MailKit;
namespace LY.MicroService.Applications.Single; namespace LY.MicroService.Applications.Single;
@ -8,6 +10,7 @@ namespace LY.MicroService.Applications.Single;
typeof(AbpAccountWebOpenIddictModule), typeof(AbpAccountWebOpenIddictModule),
typeof(AbpAuditingApplicationModule), typeof(AbpAuditingApplicationModule),
typeof(AbpAuditingHttpApiModule), typeof(AbpAuditingHttpApiModule),
typeof(AbpAuditLoggingIP2RegionModule),
typeof(AbpAuditLoggingEntityFrameworkCoreModule), typeof(AbpAuditLoggingEntityFrameworkCoreModule),
typeof(AbpCachingManagementStackExchangeRedisModule), typeof(AbpCachingManagementStackExchangeRedisModule),
typeof(AbpCachingManagementApplicationModule), typeof(AbpCachingManagementApplicationModule),
@ -107,7 +110,7 @@ namespace LY.MicroService.Applications.Single;
typeof(AbpPermissionManagementEntityFrameworkCoreModule), typeof(AbpPermissionManagementEntityFrameworkCoreModule),
typeof(AbpPermissionManagementDomainOrganizationUnitsModule), // 组织机构权限管理 typeof(AbpPermissionManagementDomainOrganizationUnitsModule), // 组织机构权限管理
// typeof(AbpEntityFrameworkCorePostgreSqlModule), typeof(SingleMigrationsEntityFrameworkCoreModule),
typeof(AbpEntityFrameworkCoreMySQLModule), typeof(AbpEntityFrameworkCoreMySQLModule),
typeof(AbpAliyunSmsModule), typeof(AbpAliyunSmsModule),
@ -177,16 +180,14 @@ namespace LY.MicroService.Applications.Single;
typeof(AbpAccountTemplatesModule), typeof(AbpAccountTemplatesModule),
typeof(AbpAspNetCoreAuthenticationJwtBearerModule), typeof(AbpAspNetCoreAuthenticationJwtBearerModule),
typeof(AbpCachingStackExchangeRedisModule), typeof(AbpCachingStackExchangeRedisModule),
// typeof(AbpElsaModule),
// typeof(AbpElsaServerModule), typeof(AbpElsaModule),
// typeof(AbpElsaActivitiesModule), typeof(AbpElsaServerModule),
// typeof(AbpElsaEntityFrameworkCoreModule), typeof(AbpElsaActivitiesModule),
// typeof(AbpElsaEntityFrameworkCorePostgreSqlModule), typeof(AbpElsaEntityFrameworkCoreModule),
// typeof(AbpElsaModule), typeof(AbpElsaEntityFrameworkCoreMySqlModule),
// typeof(AbpElsaServerModule),
// typeof(AbpElsaActivitiesModule), typeof(AbpCAPEventBusModule),
// typeof(AbpElsaEntityFrameworkCoreModule),
// typeof(AbpElsaEntityFrameworkCoreMySqlModule),
typeof(AbpExporterMiniExcelModule), typeof(AbpExporterMiniExcelModule),
typeof(AbpAspNetCoreMvcUiMultiTenancyModule), typeof(AbpAspNetCoreMvcUiMultiTenancyModule),
@ -197,7 +198,6 @@ namespace LY.MicroService.Applications.Single;
typeof(AbpAspNetCoreHttpOverridesModule), typeof(AbpAspNetCoreHttpOverridesModule),
typeof(AbpAspNetCoreMvcUiBasicThemeModule), typeof(AbpAspNetCoreMvcUiBasicThemeModule),
typeof(AbpMailKitModule), typeof(AbpMailKitModule),
typeof(AbpEventBusModule),
typeof(AbpAutofacModule) typeof(AbpAutofacModule)
)] )]
public partial class MicroServiceApplicationsSingleModule : AbpModule public partial class MicroServiceApplicationsSingleModule : AbpModule
@ -211,6 +211,7 @@ public partial class MicroServiceApplicationsSingleModule : AbpModule
PreConfigureFeature(); PreConfigureFeature();
PreConfigureIdentity(); PreConfigureIdentity();
PreConfigureApp(configuration); PreConfigureApp(configuration);
PreConfigureCAP(configuration);
PreConfigureQuartz(configuration); PreConfigureQuartz(configuration);
PreConfigureAuthServer(configuration); PreConfigureAuthServer(configuration);
PreConfigureElsa(context.Services, configuration); PreConfigureElsa(context.Services, configuration);
@ -226,7 +227,6 @@ public partial class MicroServiceApplicationsSingleModule : AbpModule
ConfigureWrapper(); ConfigureWrapper();
ConfigureExporter(); ConfigureExporter();
ConfigureAuditing(); ConfigureAuditing();
ConfigureDbContext();
ConfigureIdempotent(); ConfigureIdempotent();
ConfigureMvcUiTheme(); ConfigureMvcUiTheme();
ConfigureDataSeeder(); ConfigureDataSeeder();
@ -240,6 +240,7 @@ public partial class MicroServiceApplicationsSingleModule : AbpModule
ConfigureCaching(configuration); ConfigureCaching(configuration);
ConfigureAuditing(configuration); ConfigureAuditing(configuration);
ConfigureIdentity(configuration); ConfigureIdentity(configuration);
ConfigureDbContext(configuration);
ConfigureAuthServer(configuration); ConfigureAuthServer(configuration);
ConfigureSwagger(context.Services); ConfigureSwagger(context.Services);
ConfigureEndpoints(context.Services); ConfigureEndpoints(context.Services);

24
aspnet-core/services/LY.MicroService.Applications.Single/appsettings.Development.json

@ -27,6 +27,29 @@
"Auditing": { "Auditing": {
"AllEntitiesSelector": true "AllEntitiesSelector": true
}, },
"CAP": {
"IsEnabled": false,
"EventBus": {
"DefaultGroupName": "Platform",
"GroupNamePrefix": "Dev",
"Version": "v1",
"FailedRetryInterval": 300,
"FailedRetryCount": 10
},
"MySql": {
"TableNamePrefix": "pt_event",
"ConnectionString": "Server=127.0.0.1;Database=Platform-V70;User Id=root;Password=123456;SslMode=None"
},
"RabbitMQ": {
"HostName": "127.0.0.1",
"Port": 5672,
"UserName": "admin",
"Password": "123456",
"ExchangeName": "LINGYUN.Abp.Application",
"VirtualHost": "/"
}
},
"DistributedCache": { "DistributedCache": {
"HideErrors": true, "HideErrors": true,
"KeyPrefix": "LINGYUN.Abp.Application", "KeyPrefix": "LINGYUN.Abp.Application",
@ -274,3 +297,4 @@
] ]
} }
} }

4
aspnet-core/services/LY.MicroService.Applications.Single/appsettings.json

@ -1,6 +1,6 @@
{ {
"Clock": { "CAP": {
"Kind": "Local" "IsEnabled": false
}, },
"Forwarded": { "Forwarded": {
"ForwardedHeaders": "XForwardedFor,XForwardedProto" "ForwardedHeaders": "XForwardedFor,XForwardedProto"

13
aspnet-core/tests/LINGYUN.Abp.IP2Region.Tests/LINGYUN/Abp/IP2Region/SearcherTest.cs

@ -1,4 +1,5 @@
using IP2Region.Net.XDB; using IP2Region.Net.XDB;
using Shouldly;
using System; using System;
using System.IO; using System.IO;
using System.Linq; using System.Linq;
@ -16,6 +17,18 @@ public class SearcherTest : AbpIP2RegionTestBase
_xdbStream = virtualFileProvider.GetFileInfo("/LINGYUN/Abp/IP2Region/Resources/ip2region.xdb").CreateReadStream(); _xdbStream = virtualFileProvider.GetFileInfo("/LINGYUN/Abp/IP2Region/Resources/ip2region.xdb").CreateReadStream();
} }
[Theory]
[InlineData("8.8.8.8", "美国")]
[InlineData("36.133.108.1", "重庆市")]
[InlineData("111.26.31.1", "吉林省吉林市")]
[InlineData("220.246.0.1", "中国香港")]
public async void TestSearchLocation(string ip, string shouleBeRemarks)
{
var provider = GetRequiredService<IIpLocationInfoProvider>();
var locationInfo = await provider.GetLocationInfoAsync(ip);
locationInfo.Remarks.ShouldBe(shouleBeRemarks);
}
[Theory] [Theory]
[InlineData("114.114.114.114")] [InlineData("114.114.114.114")]
[InlineData("119.29.29.29")] [InlineData("119.29.29.29")]

Loading…
Cancel
Save