Browse Source

⬆️ 升级abp5.2.0

✨  添加批量导入插件
pull/39/head 5.2.0.1
王军 5 years ago
parent
commit
5943e2b471
  1. 3
      aspnet-core/Directory.Build.props
  2. 68
      aspnet-core/Lion.AbpPro.sln
  3. 2
      aspnet-core/global.json
  4. 128
      aspnet-core/modules/AuditLoggingManagement/host/Lion.AbpPro.AuditLoggingManagement.HttpApi.Host/AuditLoggingManagementHttpApiHostModule.cs
  5. 13
      aspnet-core/modules/AuditLoggingManagement/host/Lion.AbpPro.AuditLoggingManagement.HttpApi.Host/Controllers/HomeController.cs
  6. 25
      aspnet-core/modules/AuditLoggingManagement/host/Lion.AbpPro.AuditLoggingManagement.HttpApi.Host/EntityFrameworkCore/AuditLoggingManagementHttpApiHostMigrationsDbContext.cs
  7. 25
      aspnet-core/modules/AuditLoggingManagement/host/Lion.AbpPro.AuditLoggingManagement.HttpApi.Host/EntityFrameworkCore/AuditLoggingManagementHttpApiHostMigrationsDbContextFactory.cs
  8. 38
      aspnet-core/modules/AuditLoggingManagement/host/Lion.AbpPro.AuditLoggingManagement.HttpApi.Host/Lion.AbpPro.AuditLoggingManagement.HttpApi.Host.csproj
  9. 164
      aspnet-core/modules/AuditLoggingManagement/host/Lion.AbpPro.AuditLoggingManagement.HttpApi.Host/Logs/logs.txt
  10. 325
      aspnet-core/modules/AuditLoggingManagement/host/Lion.AbpPro.AuditLoggingManagement.HttpApi.Host/Migrations/20220302122446_Init.Designer.cs
  11. 203
      aspnet-core/modules/AuditLoggingManagement/host/Lion.AbpPro.AuditLoggingManagement.HttpApi.Host/Migrations/20220302122446_Init.cs
  12. 323
      aspnet-core/modules/AuditLoggingManagement/host/Lion.AbpPro.AuditLoggingManagement.HttpApi.Host/Migrations/AuditLoggingManagementHttpApiHostMigrationsDbContextModelSnapshot.cs
  13. 48
      aspnet-core/modules/AuditLoggingManagement/host/Lion.AbpPro.AuditLoggingManagement.HttpApi.Host/Program.cs
  14. 14
      aspnet-core/modules/AuditLoggingManagement/host/Lion.AbpPro.AuditLoggingManagement.HttpApi.Host/Properties/launchSettings.json
  15. 15
      aspnet-core/modules/AuditLoggingManagement/host/Lion.AbpPro.AuditLoggingManagement.HttpApi.Host/Startup.cs
  16. 11
      aspnet-core/modules/AuditLoggingManagement/host/Lion.AbpPro.AuditLoggingManagement.HttpApi.Host/appsettings.Development.json
  17. 12
      aspnet-core/modules/AuditLoggingManagement/host/Lion.AbpPro.AuditLoggingManagement.HttpApi.Host/appsettings.json
  18. 18
      aspnet-core/modules/AuditLoggingManagement/src/Lion.AbpPro.AuditLoggingManagement.Application.Contracts/AuditLoggingManagementApplicationContractsModule.cs
  19. 19
      aspnet-core/modules/AuditLoggingManagement/src/Lion.AbpPro.AuditLoggingManagement.Application.Contracts/AuditLogs/Dtos/AuditLogActionOutput.cs
  20. 39
      aspnet-core/modules/AuditLoggingManagement/src/Lion.AbpPro.AuditLoggingManagement.Application.Contracts/AuditLogs/Dtos/AuditLogOutput.cs
  21. 31
      aspnet-core/modules/AuditLoggingManagement/src/Lion.AbpPro.AuditLoggingManagement.Application.Contracts/AuditLogs/Dtos/EntityChangeOutput.cs
  22. 23
      aspnet-core/modules/AuditLoggingManagement/src/Lion.AbpPro.AuditLoggingManagement.Application.Contracts/AuditLogs/Dtos/EntityPropertyChangeOutput.cs
  23. 41
      aspnet-core/modules/AuditLoggingManagement/src/Lion.AbpPro.AuditLoggingManagement.Application.Contracts/AuditLogs/Dtos/GetAuditLogsInput.cs
  24. 32
      aspnet-core/modules/AuditLoggingManagement/src/Lion.AbpPro.AuditLoggingManagement.Application.Contracts/AuditLogs/Dtos/GetEntityChangesInput.cs
  25. 17
      aspnet-core/modules/AuditLoggingManagement/src/Lion.AbpPro.AuditLoggingManagement.Application.Contracts/AuditLogs/IAuditLogAppService.cs
  26. 20
      aspnet-core/modules/AuditLoggingManagement/src/Lion.AbpPro.AuditLoggingManagement.Application.Contracts/Lion.AbpPro.AuditLoggingManagement.Application.Contracts.csproj
  27. 24
      aspnet-core/modules/AuditLoggingManagement/src/Lion.AbpPro.AuditLoggingManagement.Application.Contracts/Permissions/AuditLogManagementPermissionDefinitionProvider.cs
  28. 21
      aspnet-core/modules/AuditLoggingManagement/src/Lion.AbpPro.AuditLoggingManagement.Application.Contracts/Permissions/AuditLogManagementPermissions.cs
  29. 14
      aspnet-core/modules/AuditLoggingManagement/src/Lion.AbpPro.AuditLoggingManagement.Application/AuditLoggingManagementAppServiceBase.cs
  30. 28
      aspnet-core/modules/AuditLoggingManagement/src/Lion.AbpPro.AuditLoggingManagement.Application/AuditLoggingManagementApplicationModule.cs
  31. 86
      aspnet-core/modules/AuditLoggingManagement/src/Lion.AbpPro.AuditLoggingManagement.Application/AuditLogs/AuditLogAppService.cs
  32. 17
      aspnet-core/modules/AuditLoggingManagement/src/Lion.AbpPro.AuditLoggingManagement.Application/AuditLogs/Mappers/AuditLogApplicationAutoMapperProfile.cs
  33. 17
      aspnet-core/modules/AuditLoggingManagement/src/Lion.AbpPro.AuditLoggingManagement.Application/Lion.AbpPro.AuditLoggingManagement.Application.csproj
  34. 19
      aspnet-core/modules/AuditLoggingManagement/src/Lion.AbpPro.AuditLoggingManagement.Domain.Shared/AuditLogManagementDomainErrorCodes.cs
  35. 39
      aspnet-core/modules/AuditLoggingManagement/src/Lion.AbpPro.AuditLoggingManagement.Domain.Shared/AuditLoggManagementDomainSharedModule.cs
  36. 24
      aspnet-core/modules/AuditLoggingManagement/src/Lion.AbpPro.AuditLoggingManagement.Domain.Shared/Lion.AbpPro.AuditLoggingManagement.Domain.Shared.csproj
  37. 6
      aspnet-core/modules/AuditLoggingManagement/src/Lion.AbpPro.AuditLoggingManagement.Domain.Shared/Localization/AuditLogManagement/en.json
  38. 6
      aspnet-core/modules/AuditLoggingManagement/src/Lion.AbpPro.AuditLoggingManagement.Domain.Shared/Localization/AuditLogManagement/zh-Hans.json
  39. 14
      aspnet-core/modules/AuditLoggingManagement/src/Lion.AbpPro.AuditLoggingManagement.Domain.Shared/Localization/AuditLogManagementResource.cs
  40. 18
      aspnet-core/modules/AuditLoggingManagement/src/Lion.AbpPro.AuditLoggingManagement.HttpApi.Client/AuditLoggingManagementHttpApiClientModule.cs
  41. 16
      aspnet-core/modules/AuditLoggingManagement/src/Lion.AbpPro.AuditLoggingManagement.HttpApi.Client/Lion.AbpPro.AuditLoggingManagement.HttpApi.Client.csproj
  42. 22
      aspnet-core/modules/AuditLoggingManagement/src/Lion.AbpPro.AuditLoggingManagement.HttpApi/AuditLoggingManagementHttpApiModule.cs
  43. 51
      aspnet-core/modules/AuditLoggingManagement/src/Lion.AbpPro.AuditLoggingManagement.HttpApi/AuditLogs/AuditLogController.cs
  44. 18
      aspnet-core/modules/AuditLoggingManagement/src/Lion.AbpPro.AuditLoggingManagement.HttpApi/Lion.AbpPro.AuditLoggingManagement.HttpApi.csproj
  45. 23
      aspnet-core/modules/AuditLoggingManagement/test/Lion.AbpPro.AuditLoggingManagement.Application.Tests/Lion.AbpPro.AuditLoggingManagement.Application.Tests.csproj
  46. 13
      aspnet-core/modules/AuditLoggingManagement/test/Lion.AbpPro.AuditLoggingManagement.Application.Tests/UnitTest1.cs
  47. 23
      aspnet-core/modules/AuditLoggingManagement/test/Lion.AbpPro.AuditLoggingManagement.TestBase/Lion.AbpPro.AuditLoggingManagement.TestBase.csproj
  48. 2
      aspnet-core/services/host/Lion.AbpPro.HttpApi.Host/appsettings.json
  49. 3
      aspnet-core/services/src/Lion.AbpPro.Application.Contracts/Users/Dtos/LoginInput.cs
  50. 11
      aspnet-core/services/src/Lion.AbpPro.Domain/Users/IBulkImportUserRepository.cs
  51. 5
      aspnet-core/services/src/Lion.AbpPro.EntityFrameworkCore/EntityFrameworkCore/AbpProEntityFrameworkCoreModule.cs
  52. 29
      aspnet-core/services/src/Lion.AbpPro.EntityFrameworkCore/EntityFrameworkCore/Users/BulkImportUserRepository.cs
  53. 1
      aspnet-core/services/src/Lion.AbpPro.EntityFrameworkCore/Lion.AbpPro.EntityFrameworkCore.csproj
  54. 4
      aspnet-core/services/test/Lion.AbpPro.EntityFrameworkCore.Tests/EntityFrameworkCore/AbpProEntityFrameworkCoreTestModule.cs
  55. 1
      aspnet-core/services/test/Lion.AbpPro.EntityFrameworkCore.Tests/Lion.AbpPro.EntityFrameworkCore.Tests.csproj

3
aspnet-core/Directory.Build.props

@ -1,7 +1,7 @@
<Project>
<PropertyGroup>
<AbpPackageVersion>5.1.4</AbpPackageVersion>
<AbpPackageVersion>5.2.0</AbpPackageVersion>
<DotNetCoreCAPVersion>6.0.0</DotNetCoreCAPVersion>
<MicrosoftVersion>6.0.0</MicrosoftVersion>
<SystemComponentModelAnnotationsVersion>6.0.0-preview.4.21253.7</SystemComponentModelAnnotationsVersion>
@ -29,6 +29,7 @@
<XunitrunnervisualstudioVersion>2.4.3</XunitrunnervisualstudioVersion>
<OcelotVersion>17.0.0</OcelotVersion>
<MagicodesIEExcelVersion>2.6.1</MagicodesIEExcelVersion>
<ZackEFCoreBatchVersion>6.0.11</ZackEFCoreBatchVersion>
</PropertyGroup>
</Project>

68
aspnet-core/Lion.AbpPro.sln

@ -168,30 +168,6 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Lion.AbpPro.FileManagement.
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Lion.AbpPro.FileManagement.HttpApi.Host", "modules\FileManagement\host\Lion.AbpPro.FileManagement.HttpApi.Host\Lion.AbpPro.FileManagement.HttpApi.Host.csproj", "{831CD22A-AC6E-4515-AB24-8C96B34C717F}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "AuditLoggingManagement", "AuditLoggingManagement", "{5D994A2D-4ABB-47B7-B1CB-474E6B6C5437}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "host", "host", "{1C6F6BDF-F309-49F5-80F9-152CB1F883AB}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{03DAEDDF-7E80-41AD-883B-FEB89992F18B}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "test", "test", "{61DF4305-D331-40A8-9F71-792D9793AF9F}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Lion.AbpPro.AuditLoggingManagement.HttpApi.Host", "modules\AuditLoggingManagement\host\Lion.AbpPro.AuditLoggingManagement.HttpApi.Host\Lion.AbpPro.AuditLoggingManagement.HttpApi.Host.csproj", "{56AF025A-9F18-4097-9B5A-855C56E9AA04}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Lion.AbpPro.AuditLoggingManagement.Application", "modules\AuditLoggingManagement\src\Lion.AbpPro.AuditLoggingManagement.Application\Lion.AbpPro.AuditLoggingManagement.Application.csproj", "{A49FCA2B-998A-4A4A-9ADE-523AB083CFBA}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Lion.AbpPro.AuditLoggingManagement.Application.Contracts", "modules\AuditLoggingManagement\src\Lion.AbpPro.AuditLoggingManagement.Application.Contracts\Lion.AbpPro.AuditLoggingManagement.Application.Contracts.csproj", "{5BBF431C-8617-47A6-B10A-AE5665BF1E1F}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Lion.AbpPro.AuditLoggingManagement.Domain.Shared", "modules\AuditLoggingManagement\src\Lion.AbpPro.AuditLoggingManagement.Domain.Shared\Lion.AbpPro.AuditLoggingManagement.Domain.Shared.csproj", "{994971ED-A7E5-438E-AAE3-C4F61111BFB4}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Lion.AbpPro.AuditLoggingManagement.HttpApi", "modules\AuditLoggingManagement\src\Lion.AbpPro.AuditLoggingManagement.HttpApi\Lion.AbpPro.AuditLoggingManagement.HttpApi.csproj", "{63B86B76-F3ED-40E2-8F72-808B4A5FB1DE}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Lion.AbpPro.AuditLoggingManagement.HttpApi.Client", "modules\AuditLoggingManagement\src\Lion.AbpPro.AuditLoggingManagement.HttpApi.Client\Lion.AbpPro.AuditLoggingManagement.HttpApi.Client.csproj", "{C28EEDC0-6D83-4D7C-AED3-F6F49AEA5E02}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Lion.AbpPro.AuditLoggingManagement.Application.Tests", "modules\AuditLoggingManagement\test\Lion.AbpPro.AuditLoggingManagement.Application.Tests\Lion.AbpPro.AuditLoggingManagement.Application.Tests.csproj", "{DDC5801F-8E0D-4290-9585-EF60C7FC98E5}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Lion.AbpPro.AuditLoggingManagement.TestBase", "modules\AuditLoggingManagement\test\Lion.AbpPro.AuditLoggingManagement.TestBase\Lion.AbpPro.AuditLoggingManagement.TestBase.csproj", "{97ACF365-2693-4352-8EDD-EE26995D3215}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
@ -422,38 +398,6 @@ Global
{831CD22A-AC6E-4515-AB24-8C96B34C717F}.Debug|Any CPU.Build.0 = Debug|Any CPU
{831CD22A-AC6E-4515-AB24-8C96B34C717F}.Release|Any CPU.ActiveCfg = Release|Any CPU
{831CD22A-AC6E-4515-AB24-8C96B34C717F}.Release|Any CPU.Build.0 = Release|Any CPU
{56AF025A-9F18-4097-9B5A-855C56E9AA04}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{56AF025A-9F18-4097-9B5A-855C56E9AA04}.Debug|Any CPU.Build.0 = Debug|Any CPU
{56AF025A-9F18-4097-9B5A-855C56E9AA04}.Release|Any CPU.ActiveCfg = Release|Any CPU
{56AF025A-9F18-4097-9B5A-855C56E9AA04}.Release|Any CPU.Build.0 = Release|Any CPU
{A49FCA2B-998A-4A4A-9ADE-523AB083CFBA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{A49FCA2B-998A-4A4A-9ADE-523AB083CFBA}.Debug|Any CPU.Build.0 = Debug|Any CPU
{A49FCA2B-998A-4A4A-9ADE-523AB083CFBA}.Release|Any CPU.ActiveCfg = Release|Any CPU
{A49FCA2B-998A-4A4A-9ADE-523AB083CFBA}.Release|Any CPU.Build.0 = Release|Any CPU
{5BBF431C-8617-47A6-B10A-AE5665BF1E1F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{5BBF431C-8617-47A6-B10A-AE5665BF1E1F}.Debug|Any CPU.Build.0 = Debug|Any CPU
{5BBF431C-8617-47A6-B10A-AE5665BF1E1F}.Release|Any CPU.ActiveCfg = Release|Any CPU
{5BBF431C-8617-47A6-B10A-AE5665BF1E1F}.Release|Any CPU.Build.0 = Release|Any CPU
{994971ED-A7E5-438E-AAE3-C4F61111BFB4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{994971ED-A7E5-438E-AAE3-C4F61111BFB4}.Debug|Any CPU.Build.0 = Debug|Any CPU
{994971ED-A7E5-438E-AAE3-C4F61111BFB4}.Release|Any CPU.ActiveCfg = Release|Any CPU
{994971ED-A7E5-438E-AAE3-C4F61111BFB4}.Release|Any CPU.Build.0 = Release|Any CPU
{63B86B76-F3ED-40E2-8F72-808B4A5FB1DE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{63B86B76-F3ED-40E2-8F72-808B4A5FB1DE}.Debug|Any CPU.Build.0 = Debug|Any CPU
{63B86B76-F3ED-40E2-8F72-808B4A5FB1DE}.Release|Any CPU.ActiveCfg = Release|Any CPU
{63B86B76-F3ED-40E2-8F72-808B4A5FB1DE}.Release|Any CPU.Build.0 = Release|Any CPU
{C28EEDC0-6D83-4D7C-AED3-F6F49AEA5E02}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{C28EEDC0-6D83-4D7C-AED3-F6F49AEA5E02}.Debug|Any CPU.Build.0 = Debug|Any CPU
{C28EEDC0-6D83-4D7C-AED3-F6F49AEA5E02}.Release|Any CPU.ActiveCfg = Release|Any CPU
{C28EEDC0-6D83-4D7C-AED3-F6F49AEA5E02}.Release|Any CPU.Build.0 = Release|Any CPU
{DDC5801F-8E0D-4290-9585-EF60C7FC98E5}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{DDC5801F-8E0D-4290-9585-EF60C7FC98E5}.Debug|Any CPU.Build.0 = Debug|Any CPU
{DDC5801F-8E0D-4290-9585-EF60C7FC98E5}.Release|Any CPU.ActiveCfg = Release|Any CPU
{DDC5801F-8E0D-4290-9585-EF60C7FC98E5}.Release|Any CPU.Build.0 = Release|Any CPU
{97ACF365-2693-4352-8EDD-EE26995D3215}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{97ACF365-2693-4352-8EDD-EE26995D3215}.Debug|Any CPU.Build.0 = Debug|Any CPU
{97ACF365-2693-4352-8EDD-EE26995D3215}.Release|Any CPU.ActiveCfg = Release|Any CPU
{97ACF365-2693-4352-8EDD-EE26995D3215}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
@ -533,18 +477,6 @@ Global
{9201AEE4-2E6D-4A48-805F-3F3C6878BC0B} = {40BF21CB-4520-45A6-A588-5FFB95BAC87C}
{78589964-923E-4803-9B74-183487C3ED0F} = {40BF21CB-4520-45A6-A588-5FFB95BAC87C}
{831CD22A-AC6E-4515-AB24-8C96B34C717F} = {C188A1F4-9601-42E5-9A0A-B282E13EAC41}
{5D994A2D-4ABB-47B7-B1CB-474E6B6C5437} = {F8A8EB2A-2D4B-464F-9A13-F8F7B6A8FAA3}
{1C6F6BDF-F309-49F5-80F9-152CB1F883AB} = {5D994A2D-4ABB-47B7-B1CB-474E6B6C5437}
{03DAEDDF-7E80-41AD-883B-FEB89992F18B} = {5D994A2D-4ABB-47B7-B1CB-474E6B6C5437}
{61DF4305-D331-40A8-9F71-792D9793AF9F} = {5D994A2D-4ABB-47B7-B1CB-474E6B6C5437}
{56AF025A-9F18-4097-9B5A-855C56E9AA04} = {1C6F6BDF-F309-49F5-80F9-152CB1F883AB}
{A49FCA2B-998A-4A4A-9ADE-523AB083CFBA} = {03DAEDDF-7E80-41AD-883B-FEB89992F18B}
{5BBF431C-8617-47A6-B10A-AE5665BF1E1F} = {03DAEDDF-7E80-41AD-883B-FEB89992F18B}
{994971ED-A7E5-438E-AAE3-C4F61111BFB4} = {03DAEDDF-7E80-41AD-883B-FEB89992F18B}
{63B86B76-F3ED-40E2-8F72-808B4A5FB1DE} = {03DAEDDF-7E80-41AD-883B-FEB89992F18B}
{C28EEDC0-6D83-4D7C-AED3-F6F49AEA5E02} = {03DAEDDF-7E80-41AD-883B-FEB89992F18B}
{DDC5801F-8E0D-4290-9585-EF60C7FC98E5} = {61DF4305-D331-40A8-9F71-792D9793AF9F}
{97ACF365-2693-4352-8EDD-EE26995D3215} = {61DF4305-D331-40A8-9F71-792D9793AF9F}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {28315BFD-90E7-4E14-A2EA-F3D23AF4126F}

2
aspnet-core/global.json

@ -1,6 +1,6 @@
{
"sdk": {
"version": "6.0.100",
"version": "6.0.201",
"rollForward": "latestFeature"
}
}

128
aspnet-core/modules/AuditLoggingManagement/host/Lion.AbpPro.AuditLoggingManagement.HttpApi.Host/AuditLoggingManagementHttpApiHostModule.cs

@ -1,128 +0,0 @@
using Lion.AbpPro.Shared.Hosting.Microservices;
using Microsoft.AspNetCore.Authentication.JwtBearer;
using Microsoft.OpenApi.Models;
using Volo.Abp;
using Volo.Abp.AspNetCore.Serilog;
using Volo.Abp.AuditLogging.EntityFrameworkCore;
using Volo.Abp.Autofac;
using Volo.Abp.EntityFrameworkCore;
using Volo.Abp.EntityFrameworkCore.MySQL;
using Volo.Abp.Modularity;
namespace Lion.AbpPro.AuditLoggingManagement.HttpApi.Host
{
[DependsOn(
typeof(AuditLoggingManagementApplicationModule),
typeof(AuditLoggingManagementHttpApiModule),
typeof(AbpAuditLoggingEntityFrameworkCoreModule),
typeof(SharedHostingMicroserviceModule),
typeof(AbpAutofacModule),
typeof(AbpEntityFrameworkCoreMySQLModule),
typeof(AbpAspNetCoreSerilogModule)
)]
public class AuditLoggingManagementHttpApiHostModule : AbpModule
{
public override void ConfigureServices(ServiceConfigurationContext context)
{
ConfigureSwaggerServices(context);
ConfigureDB(context);
}
public override void OnApplicationInitialization(ApplicationInitializationContext context)
{
var app = context.GetApplicationBuilder();
var env = context.GetEnvironment();
if (env.IsDevelopment())
{
app.UseDeveloperExceptionPage(); // 建议开启,方便开发排错
}
app.UseHttpsRedirection();
app.UseCorrelationId();
app.UseStaticFiles();
app.UseRouting();
app.UseAuthentication();
app.UseAbpRequestLocalization();
app.UseAuthorization();
app.UseSwagger();
app.UseAbpSwaggerUI(options =>
{
options.SwaggerEndpoint("/swagger/v1/swagger.json", "AuditLoggingManagement API");
});
app.UseAuditing();
app.UseAbpSerilogEnrichers();
app.UseConfiguredEndpoints();
}
/// <summary>
/// 配置SwaggerUI
/// </summary>
/// <param name="context"></param>
private static void ConfigureSwaggerServices(ServiceConfigurationContext context)
{
context.Services.AddSwaggerGen(
options =>
{
options.SwaggerDoc("v1", new OpenApiInfo { Title = "AuditLoggingManagement API", Version = "v1" });
options.DocInclusionPredicate((docName, description) => true);
#region 添加token
options.AddSecurityDefinition(JwtBearerDefaults.AuthenticationScheme, new OpenApiSecurityScheme()
{
Description = "请输入Token",
Name = "Authorization",
In = ParameterLocation.Header,
Type = SecuritySchemeType.Http,
Scheme = JwtBearerDefaults.AuthenticationScheme,
BearerFormat = "JWT"
});
options.AddSecurityRequirement(new OpenApiSecurityRequirement
{
{
new OpenApiSecurityScheme
{
Reference = new OpenApiReference
{
Type = ReferenceType.SecurityScheme, Id = "Bearer"
}
},
new List<string>()
}
});
options.AddSecurityDefinition("ApiKey", new OpenApiSecurityScheme()
{
Type = SecuritySchemeType.ApiKey,
In = ParameterLocation.Header,
Name = "Accept-Language",
Description = "多语言设置,系统预设语言有zh-Hans、en,默认为zh-Hans"
});
options.AddSecurityRequirement(new OpenApiSecurityRequirement
{
{
new OpenApiSecurityScheme
{
Reference = new OpenApiReference{ Type = ReferenceType.SecurityScheme, Id = "ApiKey" }
},
Array.Empty<string>()
}
});
#endregion
});
}
private void ConfigureDB(ServiceConfigurationContext context)
{
Configure<AbpDbContextOptions>(options =>
{
options.UseMySQL();
});
}
}
}

13
aspnet-core/modules/AuditLoggingManagement/host/Lion.AbpPro.AuditLoggingManagement.HttpApi.Host/Controllers/HomeController.cs

@ -1,13 +0,0 @@
using Microsoft.AspNetCore.Mvc;
using Volo.Abp.AspNetCore.Mvc;
namespace Lion.AbpPro.AuditLoggingManagement.HttpApi.Host.Controllers
{
public class HomeController : AbpController
{
public ActionResult Index()
{
return Redirect("~/swagger");
}
}
}

25
aspnet-core/modules/AuditLoggingManagement/host/Lion.AbpPro.AuditLoggingManagement.HttpApi.Host/EntityFrameworkCore/AuditLoggingManagementHttpApiHostMigrationsDbContext.cs

@ -1,25 +0,0 @@
using Microsoft.EntityFrameworkCore;
using Volo.Abp.AuditLogging;
using Volo.Abp.AuditLogging.EntityFrameworkCore;
using Volo.Abp.Data;
using Volo.Abp.EntityFrameworkCore;
namespace Lion.AbpPro.AuditLoggingManagement.HttpApi.Host.EntityFrameworkCore
{
[ConnectionStringName("AbpAuditLogging")]
public class AuditLoggingManagementHttpApiHostMigrationsDbContext : AbpDbContext<AuditLoggingManagementHttpApiHostMigrationsDbContext>
{
public DbSet<AuditLog> AuditLogs { get; set; }
public AuditLoggingManagementHttpApiHostMigrationsDbContext(DbContextOptions<AuditLoggingManagementHttpApiHostMigrationsDbContext> options)
: base(options)
{
}
protected override void OnModelCreating(ModelBuilder modelBuilder)
{
base.OnModelCreating(modelBuilder);
modelBuilder.ConfigureAuditLogging();
}
}
}

25
aspnet-core/modules/AuditLoggingManagement/host/Lion.AbpPro.AuditLoggingManagement.HttpApi.Host/EntityFrameworkCore/AuditLoggingManagementHttpApiHostMigrationsDbContextFactory.cs

@ -1,25 +0,0 @@
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Design;
namespace Lion.AbpPro.AuditLoggingManagement.HttpApi.Host.EntityFrameworkCore
{
public class AuditLoggingManagementHttpApiHostMigrationsDbContextFactory : IDesignTimeDbContextFactory<AuditLoggingManagementHttpApiHostMigrationsDbContext>
{
public AuditLoggingManagementHttpApiHostMigrationsDbContext CreateDbContext(string[] args)
{
var configuration = BuildConfiguration();
var builder = new DbContextOptionsBuilder<AuditLoggingManagementHttpApiHostMigrationsDbContext>()
.UseMySql(configuration.GetConnectionString("AbpAuditLogging"), MySqlServerVersion.LatestSupportedServerVersion);
return new AuditLoggingManagementHttpApiHostMigrationsDbContext(builder.Options);
}
private static IConfigurationRoot BuildConfiguration()
{
var builder = new ConfigurationBuilder()
.SetBasePath(Directory.GetCurrentDirectory())
.AddJsonFile("appsettings.json", optional: false);
return builder.Build();
}
}
}

38
aspnet-core/modules/AuditLoggingManagement/host/Lion.AbpPro.AuditLoggingManagement.HttpApi.Host/Lion.AbpPro.AuditLoggingManagement.HttpApi.Host.csproj

@ -1,38 +0,0 @@
<Project Sdk="Microsoft.NET.Sdk.Web">
<Import Project="../../../../common.props" />
<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<RootNamespace>Lion.AbpPro.AuditLoggingManagement.HttpApi.Host</RootNamespace>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.EntityFrameworkCore.Tools" Version="6.0.2">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
</ItemGroup>
<ItemGroup>
<PackageReference Include="Volo.Abp.Autofac" Version="$(AbpPackageVersion)" />
<PackageReference Include="Volo.Abp.Data" Version="$(AbpPackageVersion)" />
<PackageReference Include="Volo.Abp.AuditLogging.EntityFrameworkCore" Version="$(AbpPackageVersion)" />
<PackageReference Include="Volo.Abp.EntityFrameworkCore.MySQL" Version="$(AbpPackageVersion)" />
<PackageReference Include="Volo.Abp.AspNetCore.Serilog" Version="$(AbpPackageVersion)" />
<PackageReference Include="Volo.Abp.Swashbuckle" Version="$(AbpPackageVersion)" />
<PackageReference Include="Volo.Abp.AspNetCore.Authentication.JwtBearer" Version="$(AbpPackageVersion)" />
<PackageReference Include="Swashbuckle.AspNetCore" Version="6.2.3" />
<PackageReference Include="Serilog.Sinks.Async" Version="1.5.0" />
<PackageReference Include="Serilog.Sinks.File" Version="5.0.0" />
<PackageReference Include="Serilog.Sinks.Console" Version="4.0.1" />
<PackageReference Include="Serilog.AspNetCore" Version="5.0.0" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\..\..\shared\Lion.AbpPro.Shared.Hosting.Microservices\Lion.AbpPro.Shared.Hosting.Microservices.csproj" />
<ProjectReference Include="..\..\src\Lion.AbpPro.AuditLoggingManagement.Application\Lion.AbpPro.AuditLoggingManagement.Application.csproj" />
<ProjectReference Include="..\..\src\Lion.AbpPro.AuditLoggingManagement.HttpApi\Lion.AbpPro.AuditLoggingManagement.HttpApi.csproj" />
</ItemGroup>
</Project>

164
aspnet-core/modules/AuditLoggingManagement/host/Lion.AbpPro.AuditLoggingManagement.HttpApi.Host/Logs/logs.txt

@ -1,164 +0,0 @@
2022-03-13 21:59:37.640 +08:00 [INF] Starting web host.
2022-03-13 21:59:49.022 +08:00 [INF] User profile is available. Using 'C:\Users\Administrator\AppData\Local\ASP.NET\DataProtection-Keys' as key repository and Windows DPAPI to encrypt keys at rest.
2022-03-13 21:59:49.247 +08:00 [INF] Creating key {d1749119-66b3-48ae-9d21-6a34e636a937} with creation date 2022-03-13 13:59:49Z, activation date 2022-03-14 14:01:47Z, and expiration date 2022-06-11 13:59:49Z.
2022-03-13 21:59:49.259 +08:00 [INF] Writing data to file 'C:\Users\Administrator\AppData\Local\ASP.NET\DataProtection-Keys\key-d1749119-66b3-48ae-9d21-6a34e636a937.xml'.
2022-03-13 21:59:49.408 +08:00 [INF] Loaded ABP modules:
2022-03-13 21:59:49.408 +08:00 [INF] - Lion.AbpPro.AuditLoggingManagement.HttpApi.Host.AuditLoggingManagementHttpApiHostModule
2022-03-13 21:59:49.408 +08:00 [INF] - Lion.AbpPro.AuditLoggingManagement.AuditLoggingManagementApplicationModule
2022-03-13 21:59:49.408 +08:00 [INF] - Volo.Abp.Application.AbpDddApplicationModule
2022-03-13 21:59:49.408 +08:00 [INF] - Volo.Abp.Domain.AbpDddDomainModule
2022-03-13 21:59:49.408 +08:00 [INF] - Volo.Abp.Auditing.AbpAuditingModule
2022-03-13 21:59:49.408 +08:00 [INF] - Volo.Abp.Data.AbpDataModule
2022-03-13 21:59:49.408 +08:00 [INF] - Volo.Abp.ObjectExtending.AbpObjectExtendingModule
2022-03-13 21:59:49.408 +08:00 [INF] - Volo.Abp.Localization.AbpLocalizationAbstractionsModule
2022-03-13 21:59:49.408 +08:00 [INF] - Volo.Abp.Validation.AbpValidationAbstractionsModule
2022-03-13 21:59:49.408 +08:00 [INF] - Volo.Abp.Uow.AbpUnitOfWorkModule
2022-03-13 21:59:49.408 +08:00 [INF] - Volo.Abp.EventBus.Abstractions.AbpEventBusAbstractionsModule
2022-03-13 21:59:49.408 +08:00 [INF] - Volo.Abp.Json.AbpJsonModule
2022-03-13 21:59:49.408 +08:00 [INF] - Volo.Abp.Timing.AbpTimingModule
2022-03-13 21:59:49.408 +08:00 [INF] - Volo.Abp.Localization.AbpLocalizationModule
2022-03-13 21:59:49.408 +08:00 [INF] - Volo.Abp.VirtualFileSystem.AbpVirtualFileSystemModule
2022-03-13 21:59:49.408 +08:00 [INF] - Volo.Abp.Settings.AbpSettingsModule
2022-03-13 21:59:49.408 +08:00 [INF] - Volo.Abp.Security.AbpSecurityModule
2022-03-13 21:59:49.408 +08:00 [INF] - Volo.Abp.MultiTenancy.AbpMultiTenancyModule
2022-03-13 21:59:49.408 +08:00 [INF] - Volo.Abp.Threading.AbpThreadingModule
2022-03-13 21:59:49.408 +08:00 [INF] - Volo.Abp.Auditing.AbpAuditingContractsModule
2022-03-13 21:59:49.408 +08:00 [INF] - Volo.Abp.EventBus.AbpEventBusModule
2022-03-13 21:59:49.408 +08:00 [INF] - Volo.Abp.Guids.AbpGuidsModule
2022-03-13 21:59:49.408 +08:00 [INF] - Volo.Abp.BackgroundWorkers.AbpBackgroundWorkersModule
2022-03-13 21:59:49.408 +08:00 [INF] - Volo.Abp.DistributedLocking.AbpDistributedLockingAbstractionsModule
2022-03-13 21:59:49.408 +08:00 [INF] - Volo.Abp.ObjectMapping.AbpObjectMappingModule
2022-03-13 21:59:49.408 +08:00 [INF] - Volo.Abp.ExceptionHandling.AbpExceptionHandlingModule
2022-03-13 21:59:49.408 +08:00 [INF] - Volo.Abp.Specifications.AbpSpecificationsModule
2022-03-13 21:59:49.408 +08:00 [INF] - Volo.Abp.Application.AbpDddApplicationContractsModule
2022-03-13 21:59:49.408 +08:00 [INF] - Volo.Abp.Validation.AbpValidationModule
2022-03-13 21:59:49.408 +08:00 [INF] - Volo.Abp.Authorization.AbpAuthorizationModule
2022-03-13 21:59:49.408 +08:00 [INF] - Volo.Abp.Authorization.AbpAuthorizationAbstractionsModule
2022-03-13 21:59:49.408 +08:00 [INF] - Volo.Abp.Http.AbpHttpAbstractionsModule
2022-03-13 21:59:49.408 +08:00 [INF] - Volo.Abp.Features.AbpFeaturesModule
2022-03-13 21:59:49.408 +08:00 [INF] - Volo.Abp.GlobalFeatures.AbpGlobalFeaturesModule
2022-03-13 21:59:49.408 +08:00 [INF] - Volo.Abp.Autofac.AbpAutofacModule
2022-03-13 21:59:49.408 +08:00 [INF] - Volo.Abp.Castle.AbpCastleCoreModule
2022-03-13 21:59:49.408 +08:00 [INF] - Lion.AbpPro.AuditLoggingManagement.AuditLoggingManagementApplicationContractsModule
2022-03-13 21:59:49.408 +08:00 [INF] - Lion.AbpPro.AuditLoggingManagement.Domain.Shared.AuditLoggManagementDomainSharedModule
2022-03-13 21:59:49.408 +08:00 [INF] - Volo.Abp.AuditLogging.AbpAuditLoggingDomainSharedModule
2022-03-13 21:59:49.408 +08:00 [INF] - Volo.Abp.AuditLogging.AbpAuditLoggingDomainModule
2022-03-13 21:59:49.408 +08:00 [INF] - Volo.Abp.AutoMapper.AbpAutoMapperModule
2022-03-13 21:59:49.408 +08:00 [INF] - Lion.AbpPro.AuditLoggingManagement.AuditLoggingManagementHttpApiModule
2022-03-13 21:59:49.408 +08:00 [INF] - Volo.Abp.AspNetCore.Mvc.AbpAspNetCoreMvcModule
2022-03-13 21:59:49.408 +08:00 [INF] - Volo.Abp.AspNetCore.AbpAspNetCoreModule
2022-03-13 21:59:49.408 +08:00 [INF] - Volo.Abp.Http.AbpHttpModule
2022-03-13 21:59:49.408 +08:00 [INF] - Volo.Abp.Minify.AbpMinifyModule
2022-03-13 21:59:49.409 +08:00 [INF] - Volo.Abp.ApiVersioning.AbpApiVersioningAbstractionsModule
2022-03-13 21:59:49.409 +08:00 [INF] - Volo.Abp.AspNetCore.Mvc.AbpAspNetCoreMvcContractsModule
2022-03-13 21:59:49.409 +08:00 [INF] - Volo.Abp.UI.Navigation.AbpUiNavigationModule
2022-03-13 21:59:49.409 +08:00 [INF] - Volo.Abp.UI.AbpUiModule
2022-03-13 21:59:49.409 +08:00 [INF] - Volo.Abp.AuditLogging.EntityFrameworkCore.AbpAuditLoggingEntityFrameworkCoreModule
2022-03-13 21:59:49.409 +08:00 [INF] - Volo.Abp.EntityFrameworkCore.AbpEntityFrameworkCoreModule
2022-03-13 21:59:49.409 +08:00 [INF] - Lion.AbpPro.Shared.Hosting.Microservices.SharedHostingMicroserviceModule
2022-03-13 21:59:49.409 +08:00 [INF] - Volo.Abp.Swashbuckle.AbpSwashbuckleModule
2022-03-13 21:59:49.409 +08:00 [INF] - Volo.Abp.EntityFrameworkCore.MySQL.AbpEntityFrameworkCoreMySQLModule
2022-03-13 21:59:49.409 +08:00 [INF] - Volo.Abp.AspNetCore.Serilog.AbpAspNetCoreSerilogModule
2022-03-13 21:59:51.169 +08:00 [INF] Initialized all ABP modules.
2022-03-13 21:59:51.455 +08:00 [INF] Now listening on: http://localhost:5105
2022-03-13 21:59:51.455 +08:00 [INF] Application started. Press Ctrl+C to shut down.
2022-03-13 21:59:51.455 +08:00 [INF] Hosting environment: Development
2022-03-13 21:59:51.455 +08:00 [INF] Content root path: D:\工作\abp-vnext-pro\aspnet-core\modules\AuditLoggingManagement\host\Lion.AbpPro.AuditLoggingManagement.HttpApi.Host
2022-03-13 21:59:52.244 +08:00 [INF] Request starting HTTP/1.1 GET http://localhost:5105/swagger - -
2022-03-13 21:59:52.386 +08:00 [WRN] Failed to determine the https port for redirect.
2022-03-13 21:59:52.753 +08:00 [INF] Request finished HTTP/1.1 GET http://localhost:5105/swagger - - - 301 0 - 507.5604ms
2022-03-13 21:59:52.760 +08:00 [INF] Request starting HTTP/1.1 GET http://localhost:5105/swagger/index.html - -
2022-03-13 21:59:53.102 +08:00 [INF] Request starting HTTP/1.1 GET http://localhost:5105/swagger/swagger-ui.css - -
2022-03-13 21:59:53.104 +08:00 [INF] Request starting HTTP/1.1 GET http://localhost:5105/swagger/ui/abp.js - -
2022-03-13 21:59:53.104 +08:00 [INF] Request starting HTTP/1.1 GET http://localhost:5105/swagger/ui/abp.swagger.js - -
2022-03-13 21:59:53.116 +08:00 [INF] Request starting HTTP/1.1 GET http://localhost:5105/swagger/swagger-ui-standalone-preset.js - -
2022-03-13 21:59:53.116 +08:00 [INF] Request starting HTTP/1.1 GET http://localhost:5105/swagger/swagger-ui-bundle.js - -
2022-03-13 21:59:53.147 +08:00 [INF] Request finished HTTP/1.1 GET http://localhost:5105/swagger/index.html - - - 200 - text/html;charset=utf-8 386.3674ms
2022-03-13 21:59:53.152 +08:00 [INF] Request starting HTTP/1.1 GET http://localhost:5105/_framework/aspnetcore-browser-refresh.js - -
2022-03-13 21:59:53.155 +08:00 [INF] Request finished HTTP/1.1 GET http://localhost:5105/_framework/aspnetcore-browser-refresh.js - - - 200 11981 application/javascript;+charset=utf-8 3.2127ms
2022-03-13 21:59:53.159 +08:00 [INF] Sending file. Request path: '/swagger/ui/abp.js'. Physical path: 'N/A'
2022-03-13 21:59:53.159 +08:00 [INF] Request finished HTTP/1.1 GET http://localhost:5105/swagger/ui/abp.js - - - 200 3122 application/javascript 55.8511ms
2022-03-13 21:59:53.160 +08:00 [INF] Sending file. Request path: '/swagger/ui/abp.swagger.js'. Physical path: 'N/A'
2022-03-13 21:59:53.161 +08:00 [INF] Request finished HTTP/1.1 GET http://localhost:5105/swagger/ui/abp.swagger.js - - - 200 1057 application/javascript 56.7627ms
2022-03-13 21:59:53.173 +08:00 [INF] Sending file. Request path: '/swagger-ui-standalone-preset.js'. Physical path: 'N/A'
2022-03-13 21:59:53.173 +08:00 [INF] Sending file. Request path: '/swagger-ui.css'. Physical path: 'N/A'
2022-03-13 21:59:53.173 +08:00 [INF] Request finished HTTP/1.1 GET http://localhost:5105/swagger/swagger-ui-standalone-preset.js - - - 200 337162 application/javascript 57.8838ms
2022-03-13 21:59:53.174 +08:00 [INF] Request finished HTTP/1.1 GET http://localhost:5105/swagger/swagger-ui.css - - - 200 143632 text/css 72.0725ms
2022-03-13 21:59:53.218 +08:00 [INF] Sending file. Request path: '/swagger-ui-bundle.js'. Physical path: 'N/A'
2022-03-13 21:59:53.219 +08:00 [INF] Request finished HTTP/1.1 GET http://localhost:5105/swagger/swagger-ui-bundle.js - - - 200 1092889 application/javascript 103.0417ms
2022-03-13 21:59:53.525 +08:00 [INF] Request starting HTTP/1.1 GET http://localhost:5105/swagger/v1/swagger.json - -
2022-03-13 21:59:53.591 +08:00 [INF] Request starting HTTP/1.1 GET http://localhost:5105/swagger/favicon-32x32.png - -
2022-03-13 21:59:53.591 +08:00 [INF] Sending file. Request path: '/favicon-32x32.png'. Physical path: 'N/A'
2022-03-13 21:59:53.592 +08:00 [INF] Request finished HTTP/1.1 GET http://localhost:5105/swagger/favicon-32x32.png - - - 200 628 image/png 0.9992ms
2022-03-13 21:59:53.860 +08:00 [INF] Request finished HTTP/1.1 GET http://localhost:5105/swagger/v1/swagger.json - - - 200 - application/json;charset=utf-8 335.1265ms
2022-03-13 22:01:20.351 +08:00 [INF] Starting web host.
2022-03-13 22:01:23.783 +08:00 [INF] User profile is available. Using 'C:\Users\Administrator\AppData\Local\ASP.NET\DataProtection-Keys' as key repository and Windows DPAPI to encrypt keys at rest.
2022-03-13 22:01:23.903 +08:00 [INF] Loaded ABP modules:
2022-03-13 22:01:23.903 +08:00 [INF] - Lion.AbpPro.AuditLoggingManagement.HttpApi.Host.AuditLoggingManagementHttpApiHostModule
2022-03-13 22:01:23.903 +08:00 [INF] - Lion.AbpPro.AuditLoggingManagement.AuditLoggingManagementApplicationModule
2022-03-13 22:01:23.903 +08:00 [INF] - Volo.Abp.Application.AbpDddApplicationModule
2022-03-13 22:01:23.903 +08:00 [INF] - Volo.Abp.Domain.AbpDddDomainModule
2022-03-13 22:01:23.903 +08:00 [INF] - Volo.Abp.Auditing.AbpAuditingModule
2022-03-13 22:01:23.903 +08:00 [INF] - Volo.Abp.Data.AbpDataModule
2022-03-13 22:01:23.903 +08:00 [INF] - Volo.Abp.ObjectExtending.AbpObjectExtendingModule
2022-03-13 22:01:23.903 +08:00 [INF] - Volo.Abp.Localization.AbpLocalizationAbstractionsModule
2022-03-13 22:01:23.903 +08:00 [INF] - Volo.Abp.Validation.AbpValidationAbstractionsModule
2022-03-13 22:01:23.903 +08:00 [INF] - Volo.Abp.Uow.AbpUnitOfWorkModule
2022-03-13 22:01:23.903 +08:00 [INF] - Volo.Abp.EventBus.Abstractions.AbpEventBusAbstractionsModule
2022-03-13 22:01:23.903 +08:00 [INF] - Volo.Abp.Json.AbpJsonModule
2022-03-13 22:01:23.903 +08:00 [INF] - Volo.Abp.Timing.AbpTimingModule
2022-03-13 22:01:23.903 +08:00 [INF] - Volo.Abp.Localization.AbpLocalizationModule
2022-03-13 22:01:23.903 +08:00 [INF] - Volo.Abp.VirtualFileSystem.AbpVirtualFileSystemModule
2022-03-13 22:01:23.903 +08:00 [INF] - Volo.Abp.Settings.AbpSettingsModule
2022-03-13 22:01:23.903 +08:00 [INF] - Volo.Abp.Security.AbpSecurityModule
2022-03-13 22:01:23.903 +08:00 [INF] - Volo.Abp.MultiTenancy.AbpMultiTenancyModule
2022-03-13 22:01:23.903 +08:00 [INF] - Volo.Abp.Threading.AbpThreadingModule
2022-03-13 22:01:23.903 +08:00 [INF] - Volo.Abp.Auditing.AbpAuditingContractsModule
2022-03-13 22:01:23.903 +08:00 [INF] - Volo.Abp.EventBus.AbpEventBusModule
2022-03-13 22:01:23.903 +08:00 [INF] - Volo.Abp.Guids.AbpGuidsModule
2022-03-13 22:01:23.903 +08:00 [INF] - Volo.Abp.BackgroundWorkers.AbpBackgroundWorkersModule
2022-03-13 22:01:23.903 +08:00 [INF] - Volo.Abp.DistributedLocking.AbpDistributedLockingAbstractionsModule
2022-03-13 22:01:23.903 +08:00 [INF] - Volo.Abp.ObjectMapping.AbpObjectMappingModule
2022-03-13 22:01:23.903 +08:00 [INF] - Volo.Abp.ExceptionHandling.AbpExceptionHandlingModule
2022-03-13 22:01:23.903 +08:00 [INF] - Volo.Abp.Specifications.AbpSpecificationsModule
2022-03-13 22:01:23.903 +08:00 [INF] - Volo.Abp.Application.AbpDddApplicationContractsModule
2022-03-13 22:01:23.903 +08:00 [INF] - Volo.Abp.Validation.AbpValidationModule
2022-03-13 22:01:23.903 +08:00 [INF] - Volo.Abp.Authorization.AbpAuthorizationModule
2022-03-13 22:01:23.903 +08:00 [INF] - Volo.Abp.Authorization.AbpAuthorizationAbstractionsModule
2022-03-13 22:01:23.903 +08:00 [INF] - Volo.Abp.Http.AbpHttpAbstractionsModule
2022-03-13 22:01:23.903 +08:00 [INF] - Volo.Abp.Features.AbpFeaturesModule
2022-03-13 22:01:23.904 +08:00 [INF] - Volo.Abp.GlobalFeatures.AbpGlobalFeaturesModule
2022-03-13 22:01:23.904 +08:00 [INF] - Volo.Abp.Autofac.AbpAutofacModule
2022-03-13 22:01:23.904 +08:00 [INF] - Volo.Abp.Castle.AbpCastleCoreModule
2022-03-13 22:01:23.904 +08:00 [INF] - Lion.AbpPro.AuditLoggingManagement.AuditLoggingManagementApplicationContractsModule
2022-03-13 22:01:23.904 +08:00 [INF] - Lion.AbpPro.AuditLoggingManagement.Domain.Shared.AuditLoggManagementDomainSharedModule
2022-03-13 22:01:23.904 +08:00 [INF] - Volo.Abp.AuditLogging.AbpAuditLoggingDomainSharedModule
2022-03-13 22:01:23.904 +08:00 [INF] - Volo.Abp.AuditLogging.AbpAuditLoggingDomainModule
2022-03-13 22:01:23.904 +08:00 [INF] - Volo.Abp.AutoMapper.AbpAutoMapperModule
2022-03-13 22:01:23.904 +08:00 [INF] - Lion.AbpPro.AuditLoggingManagement.AuditLoggingManagementHttpApiModule
2022-03-13 22:01:23.904 +08:00 [INF] - Volo.Abp.AspNetCore.Mvc.AbpAspNetCoreMvcModule
2022-03-13 22:01:23.904 +08:00 [INF] - Volo.Abp.AspNetCore.AbpAspNetCoreModule
2022-03-13 22:01:23.904 +08:00 [INF] - Volo.Abp.Http.AbpHttpModule
2022-03-13 22:01:23.904 +08:00 [INF] - Volo.Abp.Minify.AbpMinifyModule
2022-03-13 22:01:23.904 +08:00 [INF] - Volo.Abp.ApiVersioning.AbpApiVersioningAbstractionsModule
2022-03-13 22:01:23.904 +08:00 [INF] - Volo.Abp.AspNetCore.Mvc.AbpAspNetCoreMvcContractsModule
2022-03-13 22:01:23.904 +08:00 [INF] - Volo.Abp.UI.Navigation.AbpUiNavigationModule
2022-03-13 22:01:23.904 +08:00 [INF] - Volo.Abp.UI.AbpUiModule
2022-03-13 22:01:23.904 +08:00 [INF] - Volo.Abp.AuditLogging.EntityFrameworkCore.AbpAuditLoggingEntityFrameworkCoreModule
2022-03-13 22:01:23.904 +08:00 [INF] - Volo.Abp.EntityFrameworkCore.AbpEntityFrameworkCoreModule
2022-03-13 22:01:23.904 +08:00 [INF] - Lion.AbpPro.Shared.Hosting.Microservices.SharedHostingMicroserviceModule
2022-03-13 22:01:23.904 +08:00 [INF] - Volo.Abp.Swashbuckle.AbpSwashbuckleModule
2022-03-13 22:01:23.904 +08:00 [INF] - Volo.Abp.EntityFrameworkCore.MySQL.AbpEntityFrameworkCoreMySQLModule
2022-03-13 22:01:23.904 +08:00 [INF] - Volo.Abp.AspNetCore.Serilog.AbpAspNetCoreSerilogModule
2022-03-13 22:01:24.509 +08:00 [INF] Initialized all ABP modules.
2022-03-13 22:01:24.611 +08:00 [INF] Now listening on: http://localhost:5105
2022-03-13 22:01:24.611 +08:00 [INF] Application started. Press Ctrl+C to shut down.
2022-03-13 22:01:24.611 +08:00 [INF] Hosting environment: Development
2022-03-13 22:01:24.611 +08:00 [INF] Content root path: D:\工作\abp-vnext-pro\aspnet-core\modules\AuditLoggingManagement\host\Lion.AbpPro.AuditLoggingManagement.HttpApi.Host
2022-03-13 22:01:25.476 +08:00 [INF] Request starting HTTP/1.1 GET http://localhost:5105/swagger/index.html - -
2022-03-13 22:01:25.533 +08:00 [WRN] Failed to determine the https port for redirect.
2022-03-13 22:01:25.908 +08:00 [INF] Request starting HTTP/1.1 GET http://localhost:5105/_framework/aspnetcore-browser-refresh.js - -
2022-03-13 22:01:25.911 +08:00 [INF] Request finished HTTP/1.1 GET http://localhost:5105/_framework/aspnetcore-browser-refresh.js - - - 200 11981 application/javascript;+charset=utf-8 2.4372ms
2022-03-13 22:01:25.915 +08:00 [INF] Request finished HTTP/1.1 GET http://localhost:5105/swagger/index.html - - - 200 - text/html;charset=utf-8 441.9388ms
2022-03-13 22:01:26.243 +08:00 [INF] Request starting HTTP/1.1 GET http://localhost:5105/swagger/v1/swagger.json - -
2022-03-13 22:01:26.487 +08:00 [INF] Request finished HTTP/1.1 GET http://localhost:5105/swagger/v1/swagger.json - - - 200 - application/json;charset=utf-8 244.4706ms

325
aspnet-core/modules/AuditLoggingManagement/host/Lion.AbpPro.AuditLoggingManagement.HttpApi.Host/Migrations/20220302122446_Init.Designer.cs

@ -1,325 +0,0 @@
// <auto-generated />
using System;
using Lion.AbpPro.AuditLoggingManagement.HttpApi.Host.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.EntityFrameworkCore.Migrations;
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
using Volo.Abp.EntityFrameworkCore;
#nullable disable
namespace Lion.AbpPro.AuditLoggingManagement.HttpApi.Host.Migrations
{
[DbContext(typeof(AuditLoggingManagementHttpApiHostMigrationsDbContext))]
[Migration("20220302122446_Init")]
partial class Init
{
protected override void BuildTargetModel(ModelBuilder modelBuilder)
{
#pragma warning disable 612, 618
modelBuilder
.HasAnnotation("_Abp_DatabaseProvider", EfCoreDatabaseProvider.MySql)
.HasAnnotation("ProductVersion", "6.0.2")
.HasAnnotation("Relational:MaxIdentifierLength", 64);
modelBuilder.Entity("Volo.Abp.AuditLogging.AuditLog", b =>
{
b.Property<Guid>("Id")
.HasColumnType("char(36)");
b.Property<string>("ApplicationName")
.HasMaxLength(96)
.HasColumnType("varchar(96)")
.HasColumnName("ApplicationName");
b.Property<string>("BrowserInfo")
.HasMaxLength(512)
.HasColumnType("varchar(512)")
.HasColumnName("BrowserInfo");
b.Property<string>("ClientId")
.HasMaxLength(64)
.HasColumnType("varchar(64)")
.HasColumnName("ClientId");
b.Property<string>("ClientIpAddress")
.HasMaxLength(64)
.HasColumnType("varchar(64)")
.HasColumnName("ClientIpAddress");
b.Property<string>("ClientName")
.HasMaxLength(128)
.HasColumnType("varchar(128)")
.HasColumnName("ClientName");
b.Property<string>("Comments")
.HasMaxLength(256)
.HasColumnType("varchar(256)")
.HasColumnName("Comments");
b.Property<string>("ConcurrencyStamp")
.IsConcurrencyToken()
.HasMaxLength(40)
.HasColumnType("varchar(40)")
.HasColumnName("ConcurrencyStamp");
b.Property<string>("CorrelationId")
.HasMaxLength(64)
.HasColumnType("varchar(64)")
.HasColumnName("CorrelationId");
b.Property<string>("Exceptions")
.HasColumnType("longtext");
b.Property<int>("ExecutionDuration")
.HasColumnType("int")
.HasColumnName("ExecutionDuration");
b.Property<DateTime>("ExecutionTime")
.HasColumnType("datetime(6)");
b.Property<string>("ExtraProperties")
.HasColumnType("longtext")
.HasColumnName("ExtraProperties");
b.Property<string>("HttpMethod")
.HasMaxLength(16)
.HasColumnType("varchar(16)")
.HasColumnName("HttpMethod");
b.Property<int?>("HttpStatusCode")
.HasColumnType("int")
.HasColumnName("HttpStatusCode");
b.Property<Guid?>("ImpersonatorTenantId")
.HasColumnType("char(36)")
.HasColumnName("ImpersonatorTenantId");
b.Property<string>("ImpersonatorTenantName")
.HasMaxLength(64)
.HasColumnType("varchar(64)")
.HasColumnName("ImpersonatorTenantName");
b.Property<Guid?>("ImpersonatorUserId")
.HasColumnType("char(36)")
.HasColumnName("ImpersonatorUserId");
b.Property<string>("ImpersonatorUserName")
.HasMaxLength(256)
.HasColumnType("varchar(256)")
.HasColumnName("ImpersonatorUserName");
b.Property<Guid?>("TenantId")
.HasColumnType("char(36)")
.HasColumnName("TenantId");
b.Property<string>("TenantName")
.HasMaxLength(64)
.HasColumnType("varchar(64)")
.HasColumnName("TenantName");
b.Property<string>("Url")
.HasMaxLength(256)
.HasColumnType("varchar(256)")
.HasColumnName("Url");
b.Property<Guid?>("UserId")
.HasColumnType("char(36)")
.HasColumnName("UserId");
b.Property<string>("UserName")
.HasMaxLength(256)
.HasColumnType("varchar(256)")
.HasColumnName("UserName");
b.HasKey("Id");
b.HasIndex("TenantId", "ExecutionTime");
b.HasIndex("TenantId", "UserId", "ExecutionTime");
b.ToTable("AbpAuditLogs", (string)null);
});
modelBuilder.Entity("Volo.Abp.AuditLogging.AuditLogAction", b =>
{
b.Property<Guid>("Id")
.HasColumnType("char(36)");
b.Property<Guid>("AuditLogId")
.HasColumnType("char(36)")
.HasColumnName("AuditLogId");
b.Property<int>("ExecutionDuration")
.HasColumnType("int")
.HasColumnName("ExecutionDuration");
b.Property<DateTime>("ExecutionTime")
.HasColumnType("datetime(6)")
.HasColumnName("ExecutionTime");
b.Property<string>("ExtraProperties")
.HasColumnType("longtext")
.HasColumnName("ExtraProperties");
b.Property<string>("MethodName")
.HasMaxLength(128)
.HasColumnType("varchar(128)")
.HasColumnName("MethodName");
b.Property<string>("Parameters")
.HasMaxLength(2000)
.HasColumnType("varchar(2000)")
.HasColumnName("Parameters");
b.Property<string>("ServiceName")
.HasMaxLength(256)
.HasColumnType("varchar(256)")
.HasColumnName("ServiceName");
b.Property<Guid?>("TenantId")
.HasColumnType("char(36)")
.HasColumnName("TenantId");
b.HasKey("Id");
b.HasIndex("AuditLogId");
b.HasIndex("TenantId", "ServiceName", "MethodName", "ExecutionTime");
b.ToTable("AbpAuditLogActions", (string)null);
});
modelBuilder.Entity("Volo.Abp.AuditLogging.EntityChange", b =>
{
b.Property<Guid>("Id")
.HasColumnType("char(36)");
b.Property<Guid>("AuditLogId")
.HasColumnType("char(36)")
.HasColumnName("AuditLogId");
b.Property<DateTime>("ChangeTime")
.HasColumnType("datetime(6)")
.HasColumnName("ChangeTime");
b.Property<byte>("ChangeType")
.HasColumnType("tinyint unsigned")
.HasColumnName("ChangeType");
b.Property<string>("EntityId")
.IsRequired()
.HasMaxLength(128)
.HasColumnType("varchar(128)")
.HasColumnName("EntityId");
b.Property<Guid?>("EntityTenantId")
.HasColumnType("char(36)");
b.Property<string>("EntityTypeFullName")
.IsRequired()
.HasMaxLength(128)
.HasColumnType("varchar(128)")
.HasColumnName("EntityTypeFullName");
b.Property<string>("ExtraProperties")
.HasColumnType("longtext")
.HasColumnName("ExtraProperties");
b.Property<Guid?>("TenantId")
.HasColumnType("char(36)")
.HasColumnName("TenantId");
b.HasKey("Id");
b.HasIndex("AuditLogId");
b.HasIndex("TenantId", "EntityTypeFullName", "EntityId");
b.ToTable("AbpEntityChanges", (string)null);
});
modelBuilder.Entity("Volo.Abp.AuditLogging.EntityPropertyChange", b =>
{
b.Property<Guid>("Id")
.HasColumnType("char(36)");
b.Property<Guid>("EntityChangeId")
.HasColumnType("char(36)");
b.Property<string>("NewValue")
.HasMaxLength(512)
.HasColumnType("varchar(512)")
.HasColumnName("NewValue");
b.Property<string>("OriginalValue")
.HasMaxLength(512)
.HasColumnType("varchar(512)")
.HasColumnName("OriginalValue");
b.Property<string>("PropertyName")
.IsRequired()
.HasMaxLength(128)
.HasColumnType("varchar(128)")
.HasColumnName("PropertyName");
b.Property<string>("PropertyTypeFullName")
.IsRequired()
.HasMaxLength(64)
.HasColumnType("varchar(64)")
.HasColumnName("PropertyTypeFullName");
b.Property<Guid?>("TenantId")
.HasColumnType("char(36)")
.HasColumnName("TenantId");
b.HasKey("Id");
b.HasIndex("EntityChangeId");
b.ToTable("AbpEntityPropertyChanges", (string)null);
});
modelBuilder.Entity("Volo.Abp.AuditLogging.AuditLogAction", b =>
{
b.HasOne("Volo.Abp.AuditLogging.AuditLog", null)
.WithMany("Actions")
.HasForeignKey("AuditLogId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
});
modelBuilder.Entity("Volo.Abp.AuditLogging.EntityChange", b =>
{
b.HasOne("Volo.Abp.AuditLogging.AuditLog", null)
.WithMany("EntityChanges")
.HasForeignKey("AuditLogId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
});
modelBuilder.Entity("Volo.Abp.AuditLogging.EntityPropertyChange", b =>
{
b.HasOne("Volo.Abp.AuditLogging.EntityChange", null)
.WithMany("PropertyChanges")
.HasForeignKey("EntityChangeId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
});
modelBuilder.Entity("Volo.Abp.AuditLogging.AuditLog", b =>
{
b.Navigation("Actions");
b.Navigation("EntityChanges");
});
modelBuilder.Entity("Volo.Abp.AuditLogging.EntityChange", b =>
{
b.Navigation("PropertyChanges");
});
#pragma warning restore 612, 618
}
}
}

203
aspnet-core/modules/AuditLoggingManagement/host/Lion.AbpPro.AuditLoggingManagement.HttpApi.Host/Migrations/20220302122446_Init.cs

@ -1,203 +0,0 @@
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace Lion.AbpPro.AuditLoggingManagement.HttpApi.Host.Migrations
{
public partial class Init : Migration
{
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.AlterDatabase()
.Annotation("MySql:CharSet", "utf8mb4");
migrationBuilder.CreateTable(
name: "AbpAuditLogs",
columns: table => new
{
Id = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci"),
ApplicationName = table.Column<string>(type: "varchar(96)", maxLength: 96, nullable: true)
.Annotation("MySql:CharSet", "utf8mb4"),
UserId = table.Column<Guid>(type: "char(36)", nullable: true, collation: "ascii_general_ci"),
UserName = table.Column<string>(type: "varchar(256)", maxLength: 256, nullable: true)
.Annotation("MySql:CharSet", "utf8mb4"),
TenantId = table.Column<Guid>(type: "char(36)", nullable: true, collation: "ascii_general_ci"),
TenantName = table.Column<string>(type: "varchar(64)", maxLength: 64, nullable: true)
.Annotation("MySql:CharSet", "utf8mb4"),
ImpersonatorUserId = table.Column<Guid>(type: "char(36)", nullable: true, collation: "ascii_general_ci"),
ImpersonatorUserName = table.Column<string>(type: "varchar(256)", maxLength: 256, nullable: true)
.Annotation("MySql:CharSet", "utf8mb4"),
ImpersonatorTenantId = table.Column<Guid>(type: "char(36)", nullable: true, collation: "ascii_general_ci"),
ImpersonatorTenantName = table.Column<string>(type: "varchar(64)", maxLength: 64, nullable: true)
.Annotation("MySql:CharSet", "utf8mb4"),
ExecutionTime = table.Column<DateTime>(type: "datetime(6)", nullable: false),
ExecutionDuration = table.Column<int>(type: "int", nullable: false),
ClientIpAddress = table.Column<string>(type: "varchar(64)", maxLength: 64, nullable: true)
.Annotation("MySql:CharSet", "utf8mb4"),
ClientName = table.Column<string>(type: "varchar(128)", maxLength: 128, nullable: true)
.Annotation("MySql:CharSet", "utf8mb4"),
ClientId = table.Column<string>(type: "varchar(64)", maxLength: 64, nullable: true)
.Annotation("MySql:CharSet", "utf8mb4"),
CorrelationId = table.Column<string>(type: "varchar(64)", maxLength: 64, nullable: true)
.Annotation("MySql:CharSet", "utf8mb4"),
BrowserInfo = table.Column<string>(type: "varchar(512)", maxLength: 512, nullable: true)
.Annotation("MySql:CharSet", "utf8mb4"),
HttpMethod = table.Column<string>(type: "varchar(16)", maxLength: 16, nullable: true)
.Annotation("MySql:CharSet", "utf8mb4"),
Url = table.Column<string>(type: "varchar(256)", maxLength: 256, nullable: true)
.Annotation("MySql:CharSet", "utf8mb4"),
Exceptions = table.Column<string>(type: "longtext", nullable: true)
.Annotation("MySql:CharSet", "utf8mb4"),
Comments = table.Column<string>(type: "varchar(256)", maxLength: 256, nullable: true)
.Annotation("MySql:CharSet", "utf8mb4"),
HttpStatusCode = table.Column<int>(type: "int", nullable: true),
ExtraProperties = table.Column<string>(type: "longtext", nullable: true)
.Annotation("MySql:CharSet", "utf8mb4"),
ConcurrencyStamp = table.Column<string>(type: "varchar(40)", maxLength: 40, nullable: true)
.Annotation("MySql:CharSet", "utf8mb4")
},
constraints: table =>
{
table.PrimaryKey("PK_AbpAuditLogs", x => x.Id);
})
.Annotation("MySql:CharSet", "utf8mb4");
migrationBuilder.CreateTable(
name: "AbpAuditLogActions",
columns: table => new
{
Id = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci"),
TenantId = table.Column<Guid>(type: "char(36)", nullable: true, collation: "ascii_general_ci"),
AuditLogId = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci"),
ServiceName = table.Column<string>(type: "varchar(256)", maxLength: 256, nullable: true)
.Annotation("MySql:CharSet", "utf8mb4"),
MethodName = table.Column<string>(type: "varchar(128)", maxLength: 128, nullable: true)
.Annotation("MySql:CharSet", "utf8mb4"),
Parameters = table.Column<string>(type: "varchar(2000)", maxLength: 2000, nullable: true)
.Annotation("MySql:CharSet", "utf8mb4"),
ExecutionTime = table.Column<DateTime>(type: "datetime(6)", nullable: false),
ExecutionDuration = table.Column<int>(type: "int", nullable: false),
ExtraProperties = table.Column<string>(type: "longtext", nullable: true)
.Annotation("MySql:CharSet", "utf8mb4")
},
constraints: table =>
{
table.PrimaryKey("PK_AbpAuditLogActions", x => x.Id);
table.ForeignKey(
name: "FK_AbpAuditLogActions_AbpAuditLogs_AuditLogId",
column: x => x.AuditLogId,
principalTable: "AbpAuditLogs",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
})
.Annotation("MySql:CharSet", "utf8mb4");
migrationBuilder.CreateTable(
name: "AbpEntityChanges",
columns: table => new
{
Id = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci"),
AuditLogId = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci"),
TenantId = table.Column<Guid>(type: "char(36)", nullable: true, collation: "ascii_general_ci"),
ChangeTime = table.Column<DateTime>(type: "datetime(6)", nullable: false),
ChangeType = table.Column<byte>(type: "tinyint unsigned", nullable: false),
EntityTenantId = table.Column<Guid>(type: "char(36)", nullable: true, collation: "ascii_general_ci"),
EntityId = table.Column<string>(type: "varchar(128)", maxLength: 128, nullable: false)
.Annotation("MySql:CharSet", "utf8mb4"),
EntityTypeFullName = table.Column<string>(type: "varchar(128)", maxLength: 128, nullable: false)
.Annotation("MySql:CharSet", "utf8mb4"),
ExtraProperties = table.Column<string>(type: "longtext", nullable: true)
.Annotation("MySql:CharSet", "utf8mb4")
},
constraints: table =>
{
table.PrimaryKey("PK_AbpEntityChanges", x => x.Id);
table.ForeignKey(
name: "FK_AbpEntityChanges_AbpAuditLogs_AuditLogId",
column: x => x.AuditLogId,
principalTable: "AbpAuditLogs",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
})
.Annotation("MySql:CharSet", "utf8mb4");
migrationBuilder.CreateTable(
name: "AbpEntityPropertyChanges",
columns: table => new
{
Id = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci"),
TenantId = table.Column<Guid>(type: "char(36)", nullable: true, collation: "ascii_general_ci"),
EntityChangeId = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci"),
NewValue = table.Column<string>(type: "varchar(512)", maxLength: 512, nullable: true)
.Annotation("MySql:CharSet", "utf8mb4"),
OriginalValue = table.Column<string>(type: "varchar(512)", maxLength: 512, nullable: true)
.Annotation("MySql:CharSet", "utf8mb4"),
PropertyName = table.Column<string>(type: "varchar(128)", maxLength: 128, nullable: false)
.Annotation("MySql:CharSet", "utf8mb4"),
PropertyTypeFullName = table.Column<string>(type: "varchar(64)", maxLength: 64, nullable: false)
.Annotation("MySql:CharSet", "utf8mb4")
},
constraints: table =>
{
table.PrimaryKey("PK_AbpEntityPropertyChanges", x => x.Id);
table.ForeignKey(
name: "FK_AbpEntityPropertyChanges_AbpEntityChanges_EntityChangeId",
column: x => x.EntityChangeId,
principalTable: "AbpEntityChanges",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
})
.Annotation("MySql:CharSet", "utf8mb4");
migrationBuilder.CreateIndex(
name: "IX_AbpAuditLogActions_AuditLogId",
table: "AbpAuditLogActions",
column: "AuditLogId");
migrationBuilder.CreateIndex(
name: "IX_AbpAuditLogActions_TenantId_ServiceName_MethodName_Execution~",
table: "AbpAuditLogActions",
columns: new[] { "TenantId", "ServiceName", "MethodName", "ExecutionTime" });
migrationBuilder.CreateIndex(
name: "IX_AbpAuditLogs_TenantId_ExecutionTime",
table: "AbpAuditLogs",
columns: new[] { "TenantId", "ExecutionTime" });
migrationBuilder.CreateIndex(
name: "IX_AbpAuditLogs_TenantId_UserId_ExecutionTime",
table: "AbpAuditLogs",
columns: new[] { "TenantId", "UserId", "ExecutionTime" });
migrationBuilder.CreateIndex(
name: "IX_AbpEntityChanges_AuditLogId",
table: "AbpEntityChanges",
column: "AuditLogId");
migrationBuilder.CreateIndex(
name: "IX_AbpEntityChanges_TenantId_EntityTypeFullName_EntityId",
table: "AbpEntityChanges",
columns: new[] { "TenantId", "EntityTypeFullName", "EntityId" });
migrationBuilder.CreateIndex(
name: "IX_AbpEntityPropertyChanges_EntityChangeId",
table: "AbpEntityPropertyChanges",
column: "EntityChangeId");
}
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropTable(
name: "AbpAuditLogActions");
migrationBuilder.DropTable(
name: "AbpEntityPropertyChanges");
migrationBuilder.DropTable(
name: "AbpEntityChanges");
migrationBuilder.DropTable(
name: "AbpAuditLogs");
}
}
}

323
aspnet-core/modules/AuditLoggingManagement/host/Lion.AbpPro.AuditLoggingManagement.HttpApi.Host/Migrations/AuditLoggingManagementHttpApiHostMigrationsDbContextModelSnapshot.cs

@ -1,323 +0,0 @@
// <auto-generated />
using System;
using Lion.AbpPro.AuditLoggingManagement.HttpApi.Host.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
using Volo.Abp.EntityFrameworkCore;
#nullable disable
namespace Lion.AbpPro.AuditLoggingManagement.HttpApi.Host.Migrations
{
[DbContext(typeof(AuditLoggingManagementHttpApiHostMigrationsDbContext))]
partial class AuditLoggingManagementHttpApiHostMigrationsDbContextModelSnapshot : ModelSnapshot
{
protected override void BuildModel(ModelBuilder modelBuilder)
{
#pragma warning disable 612, 618
modelBuilder
.HasAnnotation("_Abp_DatabaseProvider", EfCoreDatabaseProvider.MySql)
.HasAnnotation("ProductVersion", "6.0.2")
.HasAnnotation("Relational:MaxIdentifierLength", 64);
modelBuilder.Entity("Volo.Abp.AuditLogging.AuditLog", b =>
{
b.Property<Guid>("Id")
.HasColumnType("char(36)");
b.Property<string>("ApplicationName")
.HasMaxLength(96)
.HasColumnType("varchar(96)")
.HasColumnName("ApplicationName");
b.Property<string>("BrowserInfo")
.HasMaxLength(512)
.HasColumnType("varchar(512)")
.HasColumnName("BrowserInfo");
b.Property<string>("ClientId")
.HasMaxLength(64)
.HasColumnType("varchar(64)")
.HasColumnName("ClientId");
b.Property<string>("ClientIpAddress")
.HasMaxLength(64)
.HasColumnType("varchar(64)")
.HasColumnName("ClientIpAddress");
b.Property<string>("ClientName")
.HasMaxLength(128)
.HasColumnType("varchar(128)")
.HasColumnName("ClientName");
b.Property<string>("Comments")
.HasMaxLength(256)
.HasColumnType("varchar(256)")
.HasColumnName("Comments");
b.Property<string>("ConcurrencyStamp")
.IsConcurrencyToken()
.HasMaxLength(40)
.HasColumnType("varchar(40)")
.HasColumnName("ConcurrencyStamp");
b.Property<string>("CorrelationId")
.HasMaxLength(64)
.HasColumnType("varchar(64)")
.HasColumnName("CorrelationId");
b.Property<string>("Exceptions")
.HasColumnType("longtext");
b.Property<int>("ExecutionDuration")
.HasColumnType("int")
.HasColumnName("ExecutionDuration");
b.Property<DateTime>("ExecutionTime")
.HasColumnType("datetime(6)");
b.Property<string>("ExtraProperties")
.HasColumnType("longtext")
.HasColumnName("ExtraProperties");
b.Property<string>("HttpMethod")
.HasMaxLength(16)
.HasColumnType("varchar(16)")
.HasColumnName("HttpMethod");
b.Property<int?>("HttpStatusCode")
.HasColumnType("int")
.HasColumnName("HttpStatusCode");
b.Property<Guid?>("ImpersonatorTenantId")
.HasColumnType("char(36)")
.HasColumnName("ImpersonatorTenantId");
b.Property<string>("ImpersonatorTenantName")
.HasMaxLength(64)
.HasColumnType("varchar(64)")
.HasColumnName("ImpersonatorTenantName");
b.Property<Guid?>("ImpersonatorUserId")
.HasColumnType("char(36)")
.HasColumnName("ImpersonatorUserId");
b.Property<string>("ImpersonatorUserName")
.HasMaxLength(256)
.HasColumnType("varchar(256)")
.HasColumnName("ImpersonatorUserName");
b.Property<Guid?>("TenantId")
.HasColumnType("char(36)")
.HasColumnName("TenantId");
b.Property<string>("TenantName")
.HasMaxLength(64)
.HasColumnType("varchar(64)")
.HasColumnName("TenantName");
b.Property<string>("Url")
.HasMaxLength(256)
.HasColumnType("varchar(256)")
.HasColumnName("Url");
b.Property<Guid?>("UserId")
.HasColumnType("char(36)")
.HasColumnName("UserId");
b.Property<string>("UserName")
.HasMaxLength(256)
.HasColumnType("varchar(256)")
.HasColumnName("UserName");
b.HasKey("Id");
b.HasIndex("TenantId", "ExecutionTime");
b.HasIndex("TenantId", "UserId", "ExecutionTime");
b.ToTable("AbpAuditLogs", (string)null);
});
modelBuilder.Entity("Volo.Abp.AuditLogging.AuditLogAction", b =>
{
b.Property<Guid>("Id")
.HasColumnType("char(36)");
b.Property<Guid>("AuditLogId")
.HasColumnType("char(36)")
.HasColumnName("AuditLogId");
b.Property<int>("ExecutionDuration")
.HasColumnType("int")
.HasColumnName("ExecutionDuration");
b.Property<DateTime>("ExecutionTime")
.HasColumnType("datetime(6)")
.HasColumnName("ExecutionTime");
b.Property<string>("ExtraProperties")
.HasColumnType("longtext")
.HasColumnName("ExtraProperties");
b.Property<string>("MethodName")
.HasMaxLength(128)
.HasColumnType("varchar(128)")
.HasColumnName("MethodName");
b.Property<string>("Parameters")
.HasMaxLength(2000)
.HasColumnType("varchar(2000)")
.HasColumnName("Parameters");
b.Property<string>("ServiceName")
.HasMaxLength(256)
.HasColumnType("varchar(256)")
.HasColumnName("ServiceName");
b.Property<Guid?>("TenantId")
.HasColumnType("char(36)")
.HasColumnName("TenantId");
b.HasKey("Id");
b.HasIndex("AuditLogId");
b.HasIndex("TenantId", "ServiceName", "MethodName", "ExecutionTime");
b.ToTable("AbpAuditLogActions", (string)null);
});
modelBuilder.Entity("Volo.Abp.AuditLogging.EntityChange", b =>
{
b.Property<Guid>("Id")
.HasColumnType("char(36)");
b.Property<Guid>("AuditLogId")
.HasColumnType("char(36)")
.HasColumnName("AuditLogId");
b.Property<DateTime>("ChangeTime")
.HasColumnType("datetime(6)")
.HasColumnName("ChangeTime");
b.Property<byte>("ChangeType")
.HasColumnType("tinyint unsigned")
.HasColumnName("ChangeType");
b.Property<string>("EntityId")
.IsRequired()
.HasMaxLength(128)
.HasColumnType("varchar(128)")
.HasColumnName("EntityId");
b.Property<Guid?>("EntityTenantId")
.HasColumnType("char(36)");
b.Property<string>("EntityTypeFullName")
.IsRequired()
.HasMaxLength(128)
.HasColumnType("varchar(128)")
.HasColumnName("EntityTypeFullName");
b.Property<string>("ExtraProperties")
.HasColumnType("longtext")
.HasColumnName("ExtraProperties");
b.Property<Guid?>("TenantId")
.HasColumnType("char(36)")
.HasColumnName("TenantId");
b.HasKey("Id");
b.HasIndex("AuditLogId");
b.HasIndex("TenantId", "EntityTypeFullName", "EntityId");
b.ToTable("AbpEntityChanges", (string)null);
});
modelBuilder.Entity("Volo.Abp.AuditLogging.EntityPropertyChange", b =>
{
b.Property<Guid>("Id")
.HasColumnType("char(36)");
b.Property<Guid>("EntityChangeId")
.HasColumnType("char(36)");
b.Property<string>("NewValue")
.HasMaxLength(512)
.HasColumnType("varchar(512)")
.HasColumnName("NewValue");
b.Property<string>("OriginalValue")
.HasMaxLength(512)
.HasColumnType("varchar(512)")
.HasColumnName("OriginalValue");
b.Property<string>("PropertyName")
.IsRequired()
.HasMaxLength(128)
.HasColumnType("varchar(128)")
.HasColumnName("PropertyName");
b.Property<string>("PropertyTypeFullName")
.IsRequired()
.HasMaxLength(64)
.HasColumnType("varchar(64)")
.HasColumnName("PropertyTypeFullName");
b.Property<Guid?>("TenantId")
.HasColumnType("char(36)")
.HasColumnName("TenantId");
b.HasKey("Id");
b.HasIndex("EntityChangeId");
b.ToTable("AbpEntityPropertyChanges", (string)null);
});
modelBuilder.Entity("Volo.Abp.AuditLogging.AuditLogAction", b =>
{
b.HasOne("Volo.Abp.AuditLogging.AuditLog", null)
.WithMany("Actions")
.HasForeignKey("AuditLogId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
});
modelBuilder.Entity("Volo.Abp.AuditLogging.EntityChange", b =>
{
b.HasOne("Volo.Abp.AuditLogging.AuditLog", null)
.WithMany("EntityChanges")
.HasForeignKey("AuditLogId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
});
modelBuilder.Entity("Volo.Abp.AuditLogging.EntityPropertyChange", b =>
{
b.HasOne("Volo.Abp.AuditLogging.EntityChange", null)
.WithMany("PropertyChanges")
.HasForeignKey("EntityChangeId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
});
modelBuilder.Entity("Volo.Abp.AuditLogging.AuditLog", b =>
{
b.Navigation("Actions");
b.Navigation("EntityChanges");
});
modelBuilder.Entity("Volo.Abp.AuditLogging.EntityChange", b =>
{
b.Navigation("PropertyChanges");
});
#pragma warning restore 612, 618
}
}
}

48
aspnet-core/modules/AuditLoggingManagement/host/Lion.AbpPro.AuditLoggingManagement.HttpApi.Host/Program.cs

@ -1,48 +0,0 @@
using Lion.AbpPro.AuditLoggingManagement.HttpApi.Host;
using Serilog;
using Serilog.Events;
public class Program
{
public static int Main(string[] args)
{
Log.Logger = new LoggerConfiguration()
#if DEBUG
.MinimumLevel.Debug()
#else
.MinimumLevel.Information()
#endif
.MinimumLevel.Override("Microsoft", LogEventLevel.Information)
.Enrich.FromLogContext()
.WriteTo.Async(c => c.File("Logs/logs.txt"))
#if DEBUG
.WriteTo.Async(c => c.Console())
#endif
.CreateLogger();
try
{
Log.Information("Starting web host.");
CreateHostBuilder(args).Build().Run();
return 0;
}
catch (Exception ex)
{
Log.Fatal(ex, "Host terminated unexpectedly!");
return 1;
}
finally
{
Log.CloseAndFlush();
}
}
internal static IHostBuilder CreateHostBuilder(string[] args) =>
Host.CreateDefaultBuilder(args)
.ConfigureWebHostDefaults(webBuilder =>
{
webBuilder.UseStartup<Startup>();
})
.UseAutofac()
.UseSerilog();
}

14
aspnet-core/modules/AuditLoggingManagement/host/Lion.AbpPro.AuditLoggingManagement.HttpApi.Host/Properties/launchSettings.json

@ -1,14 +0,0 @@
{
"profiles": {
"Lion.AbpPro.AuditLoggingManagement.HttpApi.Host": {
"commandName": "Project",
"dotnetRunMessages": true,
"launchBrowser": true,
"launchUrl": "swagger",
"applicationUrl": "http://localhost:5105",
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development"
}
}
}
}

15
aspnet-core/modules/AuditLoggingManagement/host/Lion.AbpPro.AuditLoggingManagement.HttpApi.Host/Startup.cs

@ -1,15 +0,0 @@
namespace Lion.AbpPro.AuditLoggingManagement.HttpApi.Host
{
public class Startup
{
public void ConfigureServices(IServiceCollection services)
{
services.AddApplication<AuditLoggingManagementHttpApiHostModule>();
}
public void Configure(IApplicationBuilder app, IWebHostEnvironment env, ILoggerFactory loggerFactory)
{
app.InitializeApplication();
}
}
}

11
aspnet-core/modules/AuditLoggingManagement/host/Lion.AbpPro.AuditLoggingManagement.HttpApi.Host/appsettings.Development.json

@ -1,11 +0,0 @@
{
"Logging": {
"LogLevel": {
"Default": "Information",
"Microsoft.AspNetCore": "Warning"
}
},
"ConnectionStrings": {
"AbpAuditLogging": "Data Source=localhost;Port=3306;Database=AuditLoggingManagement;uid=root;pwd=1234;charset=utf8mb4;Allow User Variables=true;AllowLoadLocalInfile=true"
}
}

12
aspnet-core/modules/AuditLoggingManagement/host/Lion.AbpPro.AuditLoggingManagement.HttpApi.Host/appsettings.json

@ -1,12 +0,0 @@
{
"Logging": {
"LogLevel": {
"Default": "Information",
"Microsoft.AspNetCore": "Warning"
}
},
"ConnectionStrings": {
"AbpAuditLogging": "Data Source=localhost;Port=3306;Database=AuditLoggingManagement;uid=root;pwd=1234;charset=utf8mb4;Allow User Variables=true;AllowLoadLocalInfile=true"
},
"AllowedHosts": "*"
}

18
aspnet-core/modules/AuditLoggingManagement/src/Lion.AbpPro.AuditLoggingManagement.Application.Contracts/AuditLoggingManagementApplicationContractsModule.cs

@ -1,18 +0,0 @@
using Lion.AbpPro.AuditLoggingManagement.Domain.Shared;
using Volo.Abp.Application;
using Volo.Abp.AuditLogging;
using Volo.Abp.Authorization;
using Volo.Abp.Modularity;
namespace Lion.AbpPro.AuditLoggingManagement
{
[DependsOn(
typeof(AuditLoggManagementDomainSharedModule),
typeof(AbpAuditLoggingDomainSharedModule),
typeof(AbpDddApplicationContractsModule),
typeof(AbpAuthorizationAbstractionsModule)
)]
public class AuditLoggingManagementApplicationContractsModule : AbpModule
{
}
}

19
aspnet-core/modules/AuditLoggingManagement/src/Lion.AbpPro.AuditLoggingManagement.Application.Contracts/AuditLogs/Dtos/AuditLogActionOutput.cs

@ -1,19 +0,0 @@
namespace Lion.AbpPro.AuditLoggingManagement.AuditLogs.Dtos
{
public class AuditLogActionOutput
{
public Guid? Id { set; get; }
public Guid? TenantId { set; get; }
public string ServiceName { set; get; }
public string MethodName { set; get; }
public string Parameters { set; get; }
public DateTime ExecutionTime { set; get; }
public int ExecutionDuration { set; get; }
}
}

39
aspnet-core/modules/AuditLoggingManagement/src/Lion.AbpPro.AuditLoggingManagement.Application.Contracts/AuditLogs/Dtos/AuditLogOutput.cs

@ -1,39 +0,0 @@
namespace Lion.AbpPro.AuditLoggingManagement.AuditLogs.Dtos
{
public class AuditLogOutput
{
public Guid Id { set; get; }
public string ApplicationName { get; set; }
public Guid? UserId { get; set; }
public string UserName { get; set; }
public Guid? TenantId { get; set; }
public string TenantName { get; set; }
public DateTime ExecutionTime { get; set; }
public int ExecutionDuration { get; set; }
public string ClientIpAddress { get; set; }
public string ClientName { get; set; }
public string CorrelationId { get; set; }
public string HttpMethod { get; set; }
public string Url { get; set; }
public string Exceptions { get; set; }
public int? HttpStatusCode { get; set; }
//public ICollection<EntityChangeOutput> EntityChanges { get; set; }
public ICollection<AuditLogActionOutput> Actions { get; set; }
}
}

31
aspnet-core/modules/AuditLoggingManagement/src/Lion.AbpPro.AuditLoggingManagement.Application.Contracts/AuditLogs/Dtos/EntityChangeOutput.cs

@ -1,31 +0,0 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Volo.Abp.Auditing;
using Volo.Abp.Data;
namespace Lion.AbpPro.AuditLoggingManagement.AuditLogs.Dtos
{
public class EntityChangeOutput
{
public Guid AuditLogId { get; set; }
public Guid? TenantId { get; set; }
public DateTime ChangeTime { get; set; }
public EntityChangeType ChangeType { get; set; }
public Guid? EntityTenantId { get; set; }
public string EntityId { get; set; }
public string EntityTypeFullName { get; set; }
public ICollection<EntityPropertyChangeOutput> PropertyChanges { get; set; }
public ExtraPropertyDictionary ExtraProperties { get; set; }
}
}

23
aspnet-core/modules/AuditLoggingManagement/src/Lion.AbpPro.AuditLoggingManagement.Application.Contracts/AuditLogs/Dtos/EntityPropertyChangeOutput.cs

@ -1,23 +0,0 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Lion.AbpPro.AuditLoggingManagement.AuditLogs.Dtos
{
public class EntityPropertyChangeOutput
{
public Guid? TenantId { get; set; }
public Guid EntityChangeId { get; set; }
public string NewValue { get; set; }
public string OriginalValue { get; set; }
public string PropertyName { get; set; }
public string PropertyTypeFullName { get; set; }
}
}

41
aspnet-core/modules/AuditLoggingManagement/src/Lion.AbpPro.AuditLoggingManagement.Application.Contracts/AuditLogs/Dtos/GetAuditLogsInput.cs

@ -1,41 +0,0 @@
using System.Net;
namespace Lion.AbpPro.AuditLoggingManagement.AuditLogs.Dtos
{
public class GetAuditLogsInput
{
public string Sorting { get; set; }
public int MaxResultCount { get; set; } = 50;
public int SkipCount { get; set; } = 0;
public DateTime? StartExecutionTime { get; set; }
public DateTime? EndExecutionTime { get; set; }
public string HttpMethod { get; set; }
public string Url { get; set; }
public Guid? UserId { get; set; }
public string UserName { get; set; }
public string ApplicationName { get; set; }
public string ClientIpAddress { get; set; }
public string CorrelationId { get; set; }
public int? MaxExecutionDuration { get; set; }
public int? MinExecutionDuration { get; set; }
public bool? HasException { get; set; }
public HttpStatusCode? HttpStatusCode { get; set;}
public bool IncludeDetails { get; set; } = true;
}
}

32
aspnet-core/modules/AuditLoggingManagement/src/Lion.AbpPro.AuditLoggingManagement.Application.Contracts/AuditLogs/Dtos/GetEntityChangesInput.cs

@ -1,32 +0,0 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Volo.Abp.Auditing;
namespace Lion.AbpPro.AuditLoggingManagement.AuditLogs.Dtos
{
public class GetEntityChangesInput
{
public string Sorting { set; get; }
public int MaxResultCount { set; get; } = 50;
public int SkipCount { set; get; } = 0;
public Guid? AuditLogId { set; get; }
public DateTime? StartTime { set; get; }
public DateTime? SndTime { set; get; }
public EntityChangeType? ChangeType { set; get; }
public string EntityId { set; get; }
public string EntityTypeFullName { set; get; }
public bool IncludeDetails { set; get; } = true;
}
}

17
aspnet-core/modules/AuditLoggingManagement/src/Lion.AbpPro.AuditLoggingManagement.Application.Contracts/AuditLogs/IAuditLogAppService.cs

@ -1,17 +0,0 @@
using Lion.AbpPro.AuditLoggingManagement.AuditLogs.Dtos;
using Volo.Abp.Application.Dtos;
using Volo.Abp.Application.Services;
namespace Lion.AbpPro.AuditLoggingManagement.AuditLogs
{
public interface IAuditLogAppService : IApplicationService
{
Task<ListResultDto<AuditLogOutput>> GetPageListAsync(GetAuditLogsInput input, CancellationToken cancellationToken = default);
Task<ListResultDto<EntityChangeOutput>> GetEntityChangePageListAsync(GetEntityChangesInput input, CancellationToken cancellationToken = default);
Task<AuditLogOutput> GetAsync(Guid id, CancellationToken cancellationToken = default);
Task DeleteAsync(Guid id, CancellationToken cancellationToken = default);
}
}

20
aspnet-core/modules/AuditLoggingManagement/src/Lion.AbpPro.AuditLoggingManagement.Application.Contracts/Lion.AbpPro.AuditLoggingManagement.Application.Contracts.csproj

@ -1,20 +0,0 @@
<Project Sdk="Microsoft.NET.Sdk">
<Import Project="../../../../common.props" />
<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<RootNamespace>Lion.AbpPro.AuditLoggingManagement</RootNamespace>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Volo.Abp.Ddd.Application.Contracts" Version="$(AbpPackageVersion)" />
<PackageReference Include="Volo.Abp.AuditLogging.Domain.Shared" Version="$(AbpPackageVersion)" />
<PackageReference Include="Volo.Abp.Authorization" Version="$(AbpPackageVersion)" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\..\..\frameworks\Extensions\src\Lion.AbpPro.Extension\Lion.AbpPro.Extension.csproj" />
<ProjectReference Include="..\Lion.AbpPro.AuditLoggingManagement.Domain.Shared\Lion.AbpPro.AuditLoggingManagement.Domain.Shared.csproj" />
</ItemGroup>
</Project>

24
aspnet-core/modules/AuditLoggingManagement/src/Lion.AbpPro.AuditLoggingManagement.Application.Contracts/Permissions/AuditLogManagementPermissionDefinitionProvider.cs

@ -1,24 +0,0 @@
using Lion.AbpPro.AuditLoggingManagement.Domain.Shared.Localization;
using Volo.Abp.Authorization.Permissions;
using Volo.Abp.Localization;
namespace Lion.AbpPro.AuditLoggingManagement.Permissions
{
public class AuditLogManagementPermissionDefinitionProvider : PermissionDefinitionProvider
{
public const string GroupName = "AuditLogManagement";
public override void Define(IPermissionDefinitionContext context)
{
var auditLogsGroup = context.AddGroup(GroupName, L("AuditLogManagement"));
var auditLogs = auditLogsGroup.AddPermission(AuditLogManagementPermissions.AuditLogs.Default, L("Permission:AuditLogManagement.AuditLogs"));
auditLogs.AddChild(AuditLogManagementPermissions.AuditLogs.Delete, L("Permission:AuditLogManagement.AuditLogs.Delete"));
}
private static LocalizableString L(string name)
{
return LocalizableString.Create<AuditLogManagementResource>(name);
}
}
}

21
aspnet-core/modules/AuditLoggingManagement/src/Lion.AbpPro.AuditLoggingManagement.Application.Contracts/Permissions/AuditLogManagementPermissions.cs

@ -1,21 +0,0 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Lion.AbpPro.AuditLoggingManagement.Permissions
{
public class AuditLogManagementPermissions
{
public const string GroupName = "AuditLogManagement";
public static class AuditLogs
{
public const string Default = GroupName + ".AuditLogs";
public const string Create = Default + ".Create";
public const string Update = Default + ".Update";
public const string Delete = Default + ".Delete";
}
}
}

14
aspnet-core/modules/AuditLoggingManagement/src/Lion.AbpPro.AuditLoggingManagement.Application/AuditLoggingManagementAppServiceBase.cs

@ -1,14 +0,0 @@
using Lion.AbpPro.AuditLoggingManagement.Domain.Shared.Localization;
using Volo.Abp.Application.Services;
namespace Lion.AbpPro.AuditLoggingManagement
{
public abstract class AuditLoggingManagementAppServiceBase : ApplicationService
{
protected AuditLoggingManagementAppServiceBase()
{
LocalizationResource = typeof(AuditLogManagementResource);
ObjectMapperContext = typeof(AuditLoggingManagementApplicationModule);
}
}
}

28
aspnet-core/modules/AuditLoggingManagement/src/Lion.AbpPro.AuditLoggingManagement.Application/AuditLoggingManagementApplicationModule.cs

@ -1,28 +0,0 @@
using Microsoft.Extensions.DependencyInjection;
using Volo.Abp.Application;
using Volo.Abp.AuditLogging;
using Volo.Abp.Autofac;
using Volo.Abp.AutoMapper;
using Volo.Abp.Modularity;
namespace Lion.AbpPro.AuditLoggingManagement
{
[DependsOn(
typeof(AbpDddApplicationModule),
typeof(AbpAutofacModule),
typeof(AuditLoggingManagementApplicationContractsModule),
typeof(AbpAuditLoggingDomainModule),
typeof(AbpAutoMapperModule)
)]
public class AuditLoggingManagementApplicationModule : AbpModule
{
public override void ConfigureServices(ServiceConfigurationContext context)
{
context.Services.AddAutoMapperObjectMapper<AuditLoggingManagementApplicationModule>();
Configure<AbpAutoMapperOptions>(options =>
{
options.AddMaps<AuditLoggingManagementApplicationModule>();
});
}
}
}

86
aspnet-core/modules/AuditLoggingManagement/src/Lion.AbpPro.AuditLoggingManagement.Application/AuditLogs/AuditLogAppService.cs

@ -1,86 +0,0 @@
using Lion.AbpPro.AuditLoggingManagement.AuditLogs.Dtos;
using Volo.Abp;
using Volo.Abp.Application.Dtos;
using Volo.Abp.AuditLogging;
namespace Lion.AbpPro.AuditLoggingManagement.AuditLogs
{
public class AuditLogAppService : AuditLoggingManagementAppServiceBase, IAuditLogAppService
{
private readonly IAuditLogRepository _auditLogRepository;
public AuditLogAppService(IAuditLogRepository auditLogRepository)
{
_auditLogRepository = auditLogRepository;
}
public async Task<ListResultDto<AuditLogOutput>> GetPageListAsync(GetAuditLogsInput input, CancellationToken cancellationToken = default)
{
var auditLogs = await _auditLogRepository.GetListAsync(
input.Sorting,
input.MaxResultCount,
input.SkipCount,
input.StartExecutionTime,
input.EndExecutionTime,
input.HttpMethod,
input.Url,
input.UserId,
input.UserName,
input.ApplicationName,
input.ClientIpAddress,
input.CorrelationId,
input.MaxExecutionDuration,
input.MinExecutionDuration,
input.HasException,
input.HttpStatusCode,
input.IncludeDetails,
cancellationToken
);
var datas = ObjectMapper.Map<List<AuditLog>, List<AuditLogOutput>>(auditLogs);
return new ListResultDto<AuditLogOutput>(datas);
}
public async Task<AuditLogOutput> GetAsync(Guid id, CancellationToken cancellationToken = default)
{
var auditLog = await _auditLogRepository.FindAsync(model => model.Id == id, cancellationToken: cancellationToken);
if (null == auditLog)
{
throw new UserFriendlyException(L["AuditLogNotFound", id]);
}
return ObjectMapper.Map<AuditLog, AuditLogOutput>(auditLog);
}
public async Task DeleteAsync(Guid id, CancellationToken cancellationToken = default)
{
var auditLog = await _auditLogRepository.FindAsync(model => model.Id == id, cancellationToken: cancellationToken);
if (null == auditLog)
{
throw new UserFriendlyException(L["AuditLogNotFound", id]);
}
await _auditLogRepository.DeleteAsync(auditLog, cancellationToken: cancellationToken);
}
public async Task<ListResultDto<EntityChangeOutput>> GetEntityChangePageListAsync(GetEntityChangesInput input, CancellationToken cancellationToken = default)
{
var entityChange = await _auditLogRepository.GetEntityChangeListAsync(
input.Sorting,
input.MaxResultCount,
input.SkipCount,
input.AuditLogId,
input.StartTime,
input.SndTime,
input.ChangeType,
input.EntityId,
input.EntityTypeFullName,
input.IncludeDetails,
cancellationToken);
var datas = ObjectMapper.Map<List<EntityChange>, List<EntityChangeOutput>>(entityChange);
return new ListResultDto<EntityChangeOutput>(datas);
}
}
}

17
aspnet-core/modules/AuditLoggingManagement/src/Lion.AbpPro.AuditLoggingManagement.Application/AuditLogs/Mappers/AuditLogApplicationAutoMapperProfile.cs

@ -1,17 +0,0 @@
using AutoMapper;
using Lion.AbpPro.AuditLoggingManagement.AuditLogs.Dtos;
using Volo.Abp.AuditLogging;
namespace Lion.AbpPro.AuditLoggingManagement.AuditLogs.Mappers
{
public class AuditLogApplicationAutoMapperProfile : Profile
{
public AuditLogApplicationAutoMapperProfile()
{
CreateMap<AuditLog, AuditLogOutput>();
CreateMap<AuditLogAction, AuditLogActionOutput>();
CreateMap<EntityChange, EntityChangeOutput>();
CreateMap<EntityPropertyChange, EntityPropertyChangeOutput>();
}
}
}

17
aspnet-core/modules/AuditLoggingManagement/src/Lion.AbpPro.AuditLoggingManagement.Application/Lion.AbpPro.AuditLoggingManagement.Application.csproj

@ -1,17 +0,0 @@
<Project Sdk="Microsoft.NET.Sdk">
<Import Project="../../../../common.props" />
<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<RootNamespace>Lion.AbpPro.AuditLoggingManagement</RootNamespace>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Volo.Abp.AuditLogging.Domain" Version="$(AbpPackageVersion)" />
<PackageReference Include="Volo.Abp.AutoMapper" Version="$(AbpPackageVersion)" />
<PackageReference Include="Volo.Abp.Autofac" Version="$(AbpPackageVersion)" />
<PackageReference Include="Volo.Abp.Ddd.Application" Version="$(AbpPackageVersion)" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\Lion.AbpPro.AuditLoggingManagement.Application.Contracts\Lion.AbpPro.AuditLoggingManagement.Application.Contracts.csproj" />
</ItemGroup>
</Project>

19
aspnet-core/modules/AuditLoggingManagement/src/Lion.AbpPro.AuditLoggingManagement.Domain.Shared/AuditLogManagementDomainErrorCodes.cs

@ -1,19 +0,0 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Lion.AbpPro.AuditLoggingManagement.Domain.Shared
{
public class AuditLogManagementDomainErrorCodes
{
public static class AuditLog
{
//public const string IdAlreadyExist = "DataDictionaryManagement:DataDictionary:0001";
//public const string IdNotExist = "DataDictionaryManagement:DataDictionary:0002";
//public const string CodeAlreadyExist = "DataDictionaryManagement:DataDictionary:0003";
//public const string CodeNotExist = "DataDictionaryManagement:DataDictionary:0004";
}
}
}

39
aspnet-core/modules/AuditLoggingManagement/src/Lion.AbpPro.AuditLoggingManagement.Domain.Shared/AuditLoggManagementDomainSharedModule.cs

@ -1,39 +0,0 @@
using Lion.AbpPro.AuditLoggingManagement.Domain.Shared.Localization;
using Volo.Abp.AuditLogging;
using Volo.Abp.Localization;
using Volo.Abp.Localization.ExceptionHandling;
using Volo.Abp.Localization.Resources.AbpLocalization;
using Volo.Abp.Modularity;
using Volo.Abp.Validation;
using Volo.Abp.Validation.Localization;
using Volo.Abp.VirtualFileSystem;
namespace Lion.AbpPro.AuditLoggingManagement.Domain.Shared
{
[DependsOn(
typeof(AbpValidationModule),
typeof(AbpAuditLoggingDomainSharedModule)
)]
public class AuditLoggManagementDomainSharedModule : AbpModule
{
public override void ConfigureServices(ServiceConfigurationContext context)
{
Configure<AbpVirtualFileSystemOptions>(options =>
{
options.FileSets.AddEmbedded<AuditLoggManagementDomainSharedModule>(typeof(AuditLoggManagementDomainSharedModule).Namespace);
});
Configure<AbpLocalizationOptions>(options =>
{
options.Resources
.Add<AuditLogManagementResource>("zh-Hans")
.AddVirtualJson("/Localization/AuditLogManagement");
});
Configure<AbpExceptionLocalizationOptions>(options =>
{
options.MapCodeNamespace("AuditLogManagement", typeof(AuditLogManagementResource));
});
}
}
}

24
aspnet-core/modules/AuditLoggingManagement/src/Lion.AbpPro.AuditLoggingManagement.Domain.Shared/Lion.AbpPro.AuditLoggingManagement.Domain.Shared.csproj

@ -1,24 +0,0 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
</PropertyGroup>
<ItemGroup>
<None Remove="Localization\AuditLogManagement\en.json" />
<None Remove="Localization\AuditLogManagement\zh-Hans.json" />
</ItemGroup>
<ItemGroup>
<EmbeddedResource Include="Localization\AuditLogManagement\en.json" />
<EmbeddedResource Include="Localization\AuditLogManagement\zh-Hans.json" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="Volo.Abp.AuditLogging.Domain.Shared" Version="$(AbpPackageVersion)" />
<PackageReference Include="Volo.Abp.Validation" Version="$(AbpPackageVersion)" />
</ItemGroup>
</Project>

6
aspnet-core/modules/AuditLoggingManagement/src/Lion.AbpPro.AuditLoggingManagement.Domain.Shared/Localization/AuditLogManagement/en.json

@ -1,6 +0,0 @@
{
"culture": "en",
"texts": {
"AuditLogNotFound": "AuditLog Id: {0} does not exist!"
}
}

6
aspnet-core/modules/AuditLoggingManagement/src/Lion.AbpPro.AuditLoggingManagement.Domain.Shared/Localization/AuditLogManagement/zh-Hans.json

@ -1,6 +0,0 @@
{
"culture": "zh-Hans",
"texts": {
"AuditLogNotFound": "审计日志Id:{0}不存在"
}
}

14
aspnet-core/modules/AuditLoggingManagement/src/Lion.AbpPro.AuditLoggingManagement.Domain.Shared/Localization/AuditLogManagementResource.cs

@ -1,14 +0,0 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Volo.Abp.Localization;
namespace Lion.AbpPro.AuditLoggingManagement.Domain.Shared.Localization
{
[LocalizationResourceName("AuditLogManagement")]
public class AuditLogManagementResource
{
}
}

18
aspnet-core/modules/AuditLoggingManagement/src/Lion.AbpPro.AuditLoggingManagement.HttpApi.Client/AuditLoggingManagementHttpApiClientModule.cs

@ -1,18 +0,0 @@
using Microsoft.Extensions.DependencyInjection;
using Volo.Abp.Modularity;
namespace Lion.AbpPro.AuditLoggingManagement
{
public class AuditLoggingManagementHttpApiClientModule : AbpModule
{
public const string RemoteServiceName = "AuditLoggingManagement";
public override void ConfigureServices(ServiceConfigurationContext context)
{
context.Services.AddHttpClientProxies(
typeof(AuditLoggingManagementApplicationContractsModule).Assembly,
RemoteServiceName
);
}
}
}

16
aspnet-core/modules/AuditLoggingManagement/src/Lion.AbpPro.AuditLoggingManagement.HttpApi.Client/Lion.AbpPro.AuditLoggingManagement.HttpApi.Client.csproj

@ -1,16 +0,0 @@
<Project Sdk="Microsoft.NET.Sdk">
<Import Project="../../../../common.props" />
<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<RootNamespace>Lion.AbpPro.AuditLoggingManagement</RootNamespace>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Volo.Abp.Http.Client" Version="5.1.4" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\Lion.AbpPro.AuditLoggingManagement.Application.Contracts\Lion.AbpPro.AuditLoggingManagement.Application.Contracts.csproj" />
</ItemGroup>
</Project>

22
aspnet-core/modules/AuditLoggingManagement/src/Lion.AbpPro.AuditLoggingManagement.HttpApi/AuditLoggingManagementHttpApiModule.cs

@ -1,22 +0,0 @@
using Volo.Abp.AspNetCore.Mvc;
using Volo.Abp.Localization;
using Volo.Abp.Modularity;
namespace Lion.AbpPro.AuditLoggingManagement
{
[DependsOn(
typeof(AuditLoggingManagementApplicationContractsModule),
typeof(AbpAspNetCoreMvcModule))]
public class AuditLoggingManagementHttpApiModule : AbpModule
{
public override void ConfigureServices(ServiceConfigurationContext context)
{
Configure<AbpLocalizationOptions>(options =>
{
//options.Resources
// .Get<AuditlogResource>()
// .AddBaseTypes(typeof(AbpUiResource));
});
}
}
}

51
aspnet-core/modules/AuditLoggingManagement/src/Lion.AbpPro.AuditLoggingManagement.HttpApi/AuditLogs/AuditLogController.cs

@ -1,51 +0,0 @@
using Lion.AbpPro.AuditLoggingManagement.AuditLogs.Dtos;
using Microsoft.AspNetCore.Mvc;
using Swashbuckle.AspNetCore.Annotations;
using Volo.Abp.Application.Dtos;
using Volo.Abp.AspNetCore.Mvc;
namespace Lion.AbpPro.AuditLoggingManagement.AuditLogs
{
[Route("api/auditlog-management/auditlogs")]
public class AuditLogController : AbpController, IAuditLogAppService
{
private IAuditLogAppService _auditLogAppService;
public AuditLogController(IAuditLogAppService auditLogAppService)
{
_auditLogAppService = auditLogAppService;
}
[HttpPost]
[Route("delete/{id}")]
[SwaggerOperation(summary: "通过审计日志Id删除审计日志", Tags = new[] { "Auditlogs" })]
public async Task DeleteAsync(Guid id, CancellationToken cancellationToken = default)
{
await _auditLogAppService.DeleteAsync(id, cancellationToken);
}
[HttpPost]
[Route("page")]
[SwaggerOperation(summary: "分页获取审计日志", Tags = new[] { "Auditlogs" })]
public async Task<ListResultDto<AuditLogOutput>> GetPageListAsync(GetAuditLogsInput input, CancellationToken cancellationToken = default)
{
return await _auditLogAppService.GetPageListAsync(input, cancellationToken);
}
[HttpPost]
[Route("detail/{id}")]
[SwaggerOperation(summary: "通过审计日志Id查找审计日志详情", Tags = new[] { "Auditlogs" })]
public async Task<AuditLogOutput> GetAsync(Guid id, CancellationToken cancellationToken = default)
{
return await _auditLogAppService.GetAsync(id, cancellationToken);
}
[HttpPost]
[Route("page-entity-changes")]
[SwaggerOperation(summary: "查询实体变化", Tags = new[] { "Auditlogs" })]
public async Task<ListResultDto<EntityChangeOutput>> GetEntityChangePageListAsync(GetEntityChangesInput input, CancellationToken cancellationToken = default)
{
return await _auditLogAppService.GetEntityChangePageListAsync(input, cancellationToken);
}
}
}

18
aspnet-core/modules/AuditLoggingManagement/src/Lion.AbpPro.AuditLoggingManagement.HttpApi/Lion.AbpPro.AuditLoggingManagement.HttpApi.csproj

@ -1,18 +0,0 @@
<Project Sdk="Microsoft.NET.Sdk">
<Import Project="../../../../common.props" />
<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<RootNamespace>Lion.AbpPro.AuditLoggingManagement</RootNamespace>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Swashbuckle.AspNetCore.Annotations" Version="6.2.3" />
<PackageReference Include="Volo.Abp.AspNetCore.Mvc" Version="$(AbpPackageVersion)" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\Lion.AbpPro.AuditLoggingManagement.Application.Contracts\Lion.AbpPro.AuditLoggingManagement.Application.Contracts.csproj" />
</ItemGroup>
</Project>

23
aspnet-core/modules/AuditLoggingManagement/test/Lion.AbpPro.AuditLoggingManagement.Application.Tests/Lion.AbpPro.AuditLoggingManagement.Application.Tests.csproj

@ -1,23 +0,0 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<Nullable>enable</Nullable>
<IsPackable>false</IsPackable>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.11.0" />
<PackageReference Include="xunit" Version="2.4.1" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.3">
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
<PrivateAssets>all</PrivateAssets>
</PackageReference>
<PackageReference Include="coverlet.collector" Version="3.1.0">
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
<PrivateAssets>all</PrivateAssets>
</PackageReference>
</ItemGroup>
</Project>

13
aspnet-core/modules/AuditLoggingManagement/test/Lion.AbpPro.AuditLoggingManagement.Application.Tests/UnitTest1.cs

@ -1,13 +0,0 @@
using Xunit;
namespace Lion.AbpPro.AuditLoggingManagement.Application.Tests
{
public class UnitTest1
{
[Fact]
public void Test1()
{
}
}
}

23
aspnet-core/modules/AuditLoggingManagement/test/Lion.AbpPro.AuditLoggingManagement.TestBase/Lion.AbpPro.AuditLoggingManagement.TestBase.csproj

@ -1,23 +0,0 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<Nullable>enable</Nullable>
<IsPackable>false</IsPackable>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.11.0" />
<PackageReference Include="xunit" Version="2.4.1" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.3">
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
<PrivateAssets>all</PrivateAssets>
</PackageReference>
<PackageReference Include="coverlet.collector" Version="3.1.0">
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
<PrivateAssets>all</PrivateAssets>
</PackageReference>
</ItemGroup>
</Project>

2
aspnet-core/services/host/Lion.AbpPro.HttpApi.Host/appsettings.json

@ -45,7 +45,7 @@
"ExpirationTime": 30
},
"Cap": {
"Enabled": "false",
"Enabled": "true",
"RabbitMq": {
"HostName": "localhost",
"UserName": "admin",

3
aspnet-core/services/src/Lion.AbpPro.Application.Contracts/Users/Dtos/LoginInput.cs

@ -15,10 +15,11 @@ namespace Lion.AbpPro.Users.Dtos
/// </summary>
public string Name { get; set; }
[DisableAuditing]
/// <summary>
/// 密码
/// </summary>
[DisableAuditing]
public string Password { get; set; }
public IEnumerable<ValidationResult> Validate(ValidationContext validationContext)

11
aspnet-core/services/src/Lion.AbpPro.Domain/Users/IBulkImportUserRepository.cs

@ -0,0 +1,11 @@
using System.Collections.Generic;
using System.Threading.Tasks;
using Volo.Abp.DependencyInjection;
using Volo.Abp.Identity;
namespace Lion.AbpPro.Users;
public interface IBulkImportUserRepository : ITransientDependency
{
Task BulkInsertAsync(List<IdentityUser> identityUsers);
}

5
aspnet-core/services/src/Lion.AbpPro.EntityFrameworkCore/EntityFrameworkCore/AbpProEntityFrameworkCoreModule.cs

@ -1,6 +1,7 @@
using Lion.AbpPro.DataDictionaryManagement.EntityFrameworkCore;
using Lion.AbpPro.FileManagement.EntityFrameworkCore;
using Lion.AbpPro.NotificationManagement.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore;
using Microsoft.Extensions.DependencyInjection;
using Volo.Abp.AuditLogging.EntityFrameworkCore;
using Volo.Abp.BackgroundJobs.EntityFrameworkCore;
@ -51,6 +52,10 @@ namespace Lion.AbpPro.EntityFrameworkCore
{
/* The main point to change your DBMS.
* See also AbpProMigrationsDbContextFactory for EF Core tooling. */
options.PreConfigure<AbpProDbContext>(options =>
{
options.DbContextOptions.UseBatchEF_MySQLPomelo();
});
options.UseMySQL();
});
}

29
aspnet-core/services/src/Lion.AbpPro.EntityFrameworkCore/EntityFrameworkCore/Users/BulkImportUserRepository.cs

@ -0,0 +1,29 @@
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Lion.AbpPro.Users;
using Microsoft.EntityFrameworkCore.Storage;
using MySqlConnector;
using Volo.Abp.EntityFrameworkCore;
using Volo.Abp.Identity;
namespace Lion.AbpPro.EntityFrameworkCore;
public class BulkImportUserRepository:IBulkImportUserRepository
{
private readonly IDbContextProvider<AbpProDbContext> _contextProvider;
public BulkImportUserRepository(IDbContextProvider<AbpProDbContext> contextProvider)
{
_contextProvider = contextProvider;
}
public async Task BulkInsertAsync(List<IdentityUser> identityUsers)
{
// TODO 这个地方创建人和创建时间需要手动赋值。
// 完美契合abp,并且能够触发领域事件和分布式事件
var context = await _contextProvider.GetDbContextAsync();
await context.BulkInsertAsync(identityUsers, context.Database.CurrentTransaction.GetDbTransaction() as MySqlTransaction);
}
}

1
aspnet-core/services/src/Lion.AbpPro.EntityFrameworkCore/Lion.AbpPro.EntityFrameworkCore.csproj

@ -20,6 +20,7 @@
<PackageReference Include="Volo.Abp.AuditLogging.EntityFrameworkCore" Version="$(AbpPackageVersion)" />
<PackageReference Include="Volo.Abp.TenantManagement.EntityFrameworkCore" Version="$(AbpPackageVersion)" />
<PackageReference Include="Volo.Abp.FeatureManagement.EntityFrameworkCore" Version="$(AbpPackageVersion)" />
<PackageReference Include="Zack.EFCore.Batch.MySQL.Pomelo_NET6" Version="$(ZackEFCoreBatchVersion)" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="Microsoft.EntityFrameworkCore.Tools" Version="$(MicrosoftVersion)">

4
aspnet-core/services/test/Lion.AbpPro.EntityFrameworkCore.Tests/EntityFrameworkCore/AbpProEntityFrameworkCoreTestModule.cs

@ -30,6 +30,10 @@ namespace Lion.AbpPro.EntityFrameworkCore
services.Configure<AbpDbContextOptions>(options =>
{
options.PreConfigure<AbpProDbContext>(options =>
{
options.DbContextOptions.UseBatchEF_Sqlite();
});
options.Configure(context =>
{
context.DbContextOptions.UseSqlite(_sqliteConnection);

1
aspnet-core/services/test/Lion.AbpPro.EntityFrameworkCore.Tests/Lion.AbpPro.EntityFrameworkCore.Tests.csproj

@ -12,6 +12,7 @@
<ProjectReference Include="..\..\src\Lion.AbpPro.EntityFrameworkCore\Lion.AbpPro.EntityFrameworkCore.csproj" />
<ProjectReference Include="..\Lion.AbpPro.TestBase\Lion.AbpPro.TestBase.csproj" />
<PackageReference Include="Volo.Abp.EntityFrameworkCore.Sqlite" Version="$(AbpPackageVersion)" />
<PackageReference Include="Zack.EFCore.Batch.Sqlite_NET6" Version="$(ZackEFCoreBatchVersion)" />
</ItemGroup>
<ItemGroup>

Loading…
Cancel
Save