Browse Source

Merge pull request #335 from colinin/4.4

fix(tenant): fix the inconsistent tenant service name
pull/364/head
yx lin 4 years ago
committed by GitHub
parent
commit
1cda09a45b
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 427
      aspnet-core/LINGYUN.MicroService.BackendAdmin.sln
  2. 4
      aspnet-core/modules/tenants/LINGYUN.Abp.MultiTenancy.DbFinder/LINGYUN.Abp.MultiTenancy.DbFinder.csproj
  3. 131
      aspnet-core/modules/tenants/LINGYUN.Abp.MultiTenancy.DbFinder/LINGYUN/Abp/MultiTenancy/DbFinder/EventBus/Distributed/TenantCreateEventHandler.cs
  4. 55
      aspnet-core/modules/tenants/LINGYUN.Abp.MultiTenancy.DbFinder/LINGYUN/Abp/MultiTenancy/DbFinder/EventBus/Distributed/TenantDeleteEventHandler.cs
  5. 131
      aspnet-core/modules/tenants/LINGYUN.Abp.MultiTenancy.DbFinder/LINGYUN/Abp/MultiTenancy/DbFinder/EventBus/Distributed/TenantUpdateEventHandler.cs
  6. 76
      aspnet-core/modules/tenants/LINGYUN.Abp.MultiTenancy.DbFinder/README.md
  7. 1
      aspnet-core/modules/tenants/LINGYUN.Abp.MultiTenancy.RemoteService/LINGYUN.Abp.MultiTenancy.RemoteService.csproj
  8. 85
      aspnet-core/modules/tenants/LINGYUN.Abp.MultiTenancy.RemoteService/LINGYUN/Abp/MultiTenancy/RemoteService/EventBus/Distributed/TenantCreateEventHandler.cs
  9. 55
      aspnet-core/modules/tenants/LINGYUN.Abp.MultiTenancy.RemoteService/LINGYUN/Abp/MultiTenancy/RemoteService/EventBus/Distributed/TenantDeleteEventHandler.cs
  10. 85
      aspnet-core/modules/tenants/LINGYUN.Abp.MultiTenancy.RemoteService/LINGYUN/Abp/MultiTenancy/RemoteService/EventBus/Distributed/TenantUpdateEventHandler.cs
  11. 114
      aspnet-core/modules/tenants/LINGYUN.Abp.MultiTenancy.RemoteService/README.md
  12. 13
      aspnet-core/modules/tenants/LINGYUN.Abp.MultiTenancy/LINGYUN/Abp/MultiTenancy/CreateConnectionStringEventData.cs
  13. 11
      aspnet-core/modules/tenants/LINGYUN.Abp.MultiTenancy/LINGYUN/Abp/MultiTenancy/DeleteConnectionStringEventData.cs
  14. 9
      aspnet-core/modules/tenants/LINGYUN.Abp.MultiTenancy/LINGYUN/Abp/MultiTenancy/DeleteEventData.cs
  15. 17
      aspnet-core/modules/tenants/LINGYUN.Abp.MultiTenancy/LINGYUN/Abp/MultiTenancy/UpdateConnectionStringEventData.cs
  16. 13
      aspnet-core/modules/tenants/LINGYUN.Abp.MultiTenancy/LINGYUN/Abp/MultiTenancy/UpdateEventData.cs
  17. 361
      aspnet-core/modules/tenants/LINGYUN.Abp.TenantManagement.Application/LINGYUN/Abp/TenantManagement/TenantAppService.cs
  18. 42
      aspnet-core/modules/tenants/LINGYUN.Abp.TenantManagement.HttpApi.Client/LINGYUN/Abp/TenantManagement/AbpTenantManagementHttpApiClientModule.cs

427
aspnet-core/LINGYUN.MicroService.BackendAdmin.sln

@ -1,210 +1,217 @@
 
Microsoft Visual Studio Solution File, Format Version 12.00 Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 16 # Visual Studio Version 16
VisualStudioVersion = 16.0.30011.22 VisualStudioVersion = 16.0.30011.22
MinimumVisualStudioVersion = 10.0.40219.1 MinimumVisualStudioVersion = 10.0.40219.1
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "modules", "modules", "{ED23B2F3-87C1-44B6-8906-9DE739422C2C}" Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "modules", "modules", "{ED23B2F3-87C1-44B6-8906-9DE739422C2C}"
EndProject EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "services", "services", "{1E8D56FE-2FA1-4041-AB69-00952BF42EC9}" Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "services", "services", "{1E8D56FE-2FA1-4041-AB69-00952BF42EC9}"
EndProject EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "LINGYUN.Abp.BackendAdmin.HttpApi.Host", "services\admin\LINGYUN.Abp.BackendAdmin.HttpApi.Host\LINGYUN.Abp.BackendAdmin.HttpApi.Host.csproj", "{A12DB303-F90B-4E56-B99F-A40816FCB04A}" Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "LINGYUN.Abp.BackendAdmin.HttpApi.Host", "services\admin\LINGYUN.Abp.BackendAdmin.HttpApi.Host\LINGYUN.Abp.BackendAdmin.HttpApi.Host.csproj", "{A12DB303-F90B-4E56-B99F-A40816FCB04A}"
EndProject EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tenant-management", "tenant-management", "{CB1A2EB0-34D4-41C4-BF01-C99EFBBF09EE}" Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tenant-management", "tenant-management", "{CB1A2EB0-34D4-41C4-BF01-C99EFBBF09EE}"
EndProject EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "LINGYUN.Abp.TenantManagement.Application.Contracts", "modules\tenants\LINGYUN.Abp.TenantManagement.Application.Contracts\LINGYUN.Abp.TenantManagement.Application.Contracts.csproj", "{926E8543-6A0E-4B36-8F3C-9278281E3420}" Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "LINGYUN.Abp.TenantManagement.Application.Contracts", "modules\tenants\LINGYUN.Abp.TenantManagement.Application.Contracts\LINGYUN.Abp.TenantManagement.Application.Contracts.csproj", "{926E8543-6A0E-4B36-8F3C-9278281E3420}"
EndProject EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "LINGYUN.Abp.TenantManagement.Application", "modules\tenants\LINGYUN.Abp.TenantManagement.Application\LINGYUN.Abp.TenantManagement.Application.csproj", "{0DDA914E-CE2A-446F-A43D-09C52704D39C}" Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "LINGYUN.Abp.TenantManagement.Application", "modules\tenants\LINGYUN.Abp.TenantManagement.Application\LINGYUN.Abp.TenantManagement.Application.csproj", "{0DDA914E-CE2A-446F-A43D-09C52704D39C}"
EndProject EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "LINGYUN.Abp.TenantManagement.HttpApi", "modules\tenants\LINGYUN.Abp.TenantManagement.HttpApi\LINGYUN.Abp.TenantManagement.HttpApi.csproj", "{E7185ACE-4D40-4215-BBD7-73D2DB69F482}" Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "LINGYUN.Abp.TenantManagement.HttpApi", "modules\tenants\LINGYUN.Abp.TenantManagement.HttpApi\LINGYUN.Abp.TenantManagement.HttpApi.csproj", "{E7185ACE-4D40-4215-BBD7-73D2DB69F482}"
EndProject EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "LINGYUN.Abp.TenantManagement.HttpApi.Client", "modules\tenants\LINGYUN.Abp.TenantManagement.HttpApi.Client\LINGYUN.Abp.TenantManagement.HttpApi.Client.csproj", "{011F5FF0-468F-4423-8DC3-C3ECC3F63829}" Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "LINGYUN.Abp.TenantManagement.HttpApi.Client", "modules\tenants\LINGYUN.Abp.TenantManagement.HttpApi.Client\LINGYUN.Abp.TenantManagement.HttpApi.Client.csproj", "{011F5FF0-468F-4423-8DC3-C3ECC3F63829}"
EndProject EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "setting-management", "setting-management", "{202AC90B-0E4A-44B4-9A9D-3C869D0D4B8E}" Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "setting-management", "setting-management", "{202AC90B-0E4A-44B4-9A9D-3C869D0D4B8E}"
EndProject EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "LINGYUN.Abp.SettingManagement.Application.Contracts", "modules\settings\LINGYUN.Abp.SettingManagement.Application.Contracts\LINGYUN.Abp.SettingManagement.Application.Contracts.csproj", "{35A4661D-12A0-47A9-ACC6-111D1474A88B}" Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "LINGYUN.Abp.SettingManagement.Application.Contracts", "modules\settings\LINGYUN.Abp.SettingManagement.Application.Contracts\LINGYUN.Abp.SettingManagement.Application.Contracts.csproj", "{35A4661D-12A0-47A9-ACC6-111D1474A88B}"
EndProject EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "LINGYUN.Abp.SettingManagement.Application", "modules\settings\LINGYUN.Abp.SettingManagement.Application\LINGYUN.Abp.SettingManagement.Application.csproj", "{9EAAB564-5971-4AE3-9228-3953C228A890}" Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "LINGYUN.Abp.SettingManagement.Application", "modules\settings\LINGYUN.Abp.SettingManagement.Application\LINGYUN.Abp.SettingManagement.Application.csproj", "{9EAAB564-5971-4AE3-9228-3953C228A890}"
EndProject EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "LINGYUN.Abp.SettingManagement.HttpApi", "modules\settings\LINGYUN.Abp.SettingManagement.HttpApi\LINGYUN.Abp.SettingManagement.HttpApi.csproj", "{5BAC138C-2AD5-426E-9D85-BDC6A0B38787}" Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "LINGYUN.Abp.SettingManagement.HttpApi", "modules\settings\LINGYUN.Abp.SettingManagement.HttpApi\LINGYUN.Abp.SettingManagement.HttpApi.csproj", "{5BAC138C-2AD5-426E-9D85-BDC6A0B38787}"
EndProject EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "auditing", "auditing", "{709E77F9-DABF-47D3-A86E-40CD5448B1E5}" Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "auditing", "auditing", "{709E77F9-DABF-47D3-A86E-40CD5448B1E5}"
EndProject EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "LINGYUN.Abp.Auditing.Application.Contracts", "modules\auditing\LINGYUN.Abp.Auditing.Application.Contracts\LINGYUN.Abp.Auditing.Application.Contracts.csproj", "{BE063443-09F6-4611-AE17-811AD00D51E9}" Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "LINGYUN.Abp.Auditing.Application.Contracts", "modules\auditing\LINGYUN.Abp.Auditing.Application.Contracts\LINGYUN.Abp.Auditing.Application.Contracts.csproj", "{BE063443-09F6-4611-AE17-811AD00D51E9}"
EndProject EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "LINGYUN.Abp.Auditing.Application", "modules\auditing\LINGYUN.Abp.Auditing.Application\LINGYUN.Abp.Auditing.Application.csproj", "{69CBAE90-D5BE-4362-98DE-1505A59DD0A6}" Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "LINGYUN.Abp.Auditing.Application", "modules\auditing\LINGYUN.Abp.Auditing.Application\LINGYUN.Abp.Auditing.Application.csproj", "{69CBAE90-D5BE-4362-98DE-1505A59DD0A6}"
EndProject EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "LINGYUN.Abp.Auditing.HttpApi", "modules\auditing\LINGYUN.Abp.Auditing.HttpApi\LINGYUN.Abp.Auditing.HttpApi.csproj", "{DAD70E78-D4A1-4B19-AF11-9236825FF013}" Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "LINGYUN.Abp.Auditing.HttpApi", "modules\auditing\LINGYUN.Abp.Auditing.HttpApi\LINGYUN.Abp.Auditing.HttpApi.csproj", "{DAD70E78-D4A1-4B19-AF11-9236825FF013}"
EndProject EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "identity", "identity", "{2F56344F-6E06-4F9B-A0F2-8A6F0AEB096A}" Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "identity", "identity", "{2F56344F-6E06-4F9B-A0F2-8A6F0AEB096A}"
EndProject EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "LINGYUN.Abp.PermissionManagement.Domain.Identity", "modules\identity\LINGYUN.Abp.PermissionManagement.Domain.Identity\LINGYUN.Abp.PermissionManagement.Domain.Identity.csproj", "{376B2235-ADA7-4EC7-A27D-8F97EC6A57CD}" Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "LINGYUN.Abp.PermissionManagement.Domain.Identity", "modules\identity\LINGYUN.Abp.PermissionManagement.Domain.Identity\LINGYUN.Abp.PermissionManagement.Domain.Identity.csproj", "{376B2235-ADA7-4EC7-A27D-8F97EC6A57CD}"
EndProject EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "permissions-management", "permissions-management", "{D25C4814-71AB-4A9D-8C76-298A7DE1A747}" Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "permissions-management", "permissions-management", "{D25C4814-71AB-4A9D-8C76-298A7DE1A747}"
EndProject EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "LINGYUN.Abp.PermissionManagement.Domain", "modules\permissions-management\LINGYUN.Abp.PermissionManagement.Domain\LINGYUN.Abp.PermissionManagement.Domain.csproj", "{7521486D-2144-4AFA-86AD-8E8021479DE6}" Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "LINGYUN.Abp.PermissionManagement.Domain", "modules\permissions-management\LINGYUN.Abp.PermissionManagement.Domain\LINGYUN.Abp.PermissionManagement.Domain.csproj", "{7521486D-2144-4AFA-86AD-8E8021479DE6}"
EndProject EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "oss-management", "oss-management", "{8F972C8E-F047-4883-A4BF-3423A2BAED36}" Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "oss-management", "oss-management", "{8F972C8E-F047-4883-A4BF-3423A2BAED36}"
EndProject EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "account", "account", "{9DAD2CA8-16B6-4006-BD8E-EE3E9BAA3770}" Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "account", "account", "{9DAD2CA8-16B6-4006-BD8E-EE3E9BAA3770}"
EndProject EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "LINGYUN.Abp.Account.Application.Contracts", "modules\account\LINGYUN.Abp.Account.Application.Contracts\LINGYUN.Abp.Account.Application.Contracts.csproj", "{AA2F7243-976C-47F3-9B4E-20CC22F8FCF4}" Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "LINGYUN.Abp.Account.Application.Contracts", "modules\account\LINGYUN.Abp.Account.Application.Contracts\LINGYUN.Abp.Account.Application.Contracts.csproj", "{AA2F7243-976C-47F3-9B4E-20CC22F8FCF4}"
EndProject EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "LINGYUN.Abp.Identity.Domain.Shared", "modules\identity\LINGYUN.Abp.Identity.Domain.Shared\LINGYUN.Abp.Identity.Domain.Shared.csproj", "{E758D3A7-DB93-4EAC-A2ED-C2322D4F7D67}" Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "LINGYUN.Abp.Identity.Domain.Shared", "modules\identity\LINGYUN.Abp.Identity.Domain.Shared\LINGYUN.Abp.Identity.Domain.Shared.csproj", "{E758D3A7-DB93-4EAC-A2ED-C2322D4F7D67}"
EndProject EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "LINGYUN.Abp.Identity.Application.Contracts", "modules\identity\LINGYUN.Abp.Identity.Application.Contracts\LINGYUN.Abp.Identity.Application.Contracts.csproj", "{D4AB1BF0-95EC-4E34-9C39-E888ED30C535}" Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "LINGYUN.Abp.Identity.Application.Contracts", "modules\identity\LINGYUN.Abp.Identity.Application.Contracts\LINGYUN.Abp.Identity.Application.Contracts.csproj", "{D4AB1BF0-95EC-4E34-9C39-E888ED30C535}"
EndProject EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "LINGYUN.Abp.Account.HttpApi", "modules\account\LINGYUN.Abp.Account.HttpApi\LINGYUN.Abp.Account.HttpApi.csproj", "{A387EF32-1FAD-412F-893D-43485CE59DB4}" Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "LINGYUN.Abp.Account.HttpApi", "modules\account\LINGYUN.Abp.Account.HttpApi\LINGYUN.Abp.Account.HttpApi.csproj", "{A387EF32-1FAD-412F-893D-43485CE59DB4}"
EndProject EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "LINGYUN.Abp.Identity.Application", "modules\identity\LINGYUN.Abp.Identity.Application\LINGYUN.Abp.Identity.Application.csproj", "{9BABF219-AAAA-4611-8B49-BFCCBD046934}" Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "LINGYUN.Abp.Identity.Application", "modules\identity\LINGYUN.Abp.Identity.Application\LINGYUN.Abp.Identity.Application.csproj", "{9BABF219-AAAA-4611-8B49-BFCCBD046934}"
EndProject EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "wechat", "wechat", "{B36F627B-FD7D-4357-A623-F01AFF78B80D}" Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "wechat", "wechat", "{B36F627B-FD7D-4357-A623-F01AFF78B80D}"
EndProject EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "LINGYUN.Abp.WeChat", "modules\wechat\LINGYUN.Abp.WeChat\LINGYUN.Abp.WeChat.csproj", "{C1514C9C-7FB2-412E-A931-7F2F0C9A65DC}" Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "LINGYUN.Abp.WeChat", "modules\wechat\LINGYUN.Abp.WeChat\LINGYUN.Abp.WeChat.csproj", "{C1514C9C-7FB2-412E-A931-7F2F0C9A65DC}"
EndProject EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "LINGYUN.Abp.WeChat.MiniProgram", "modules\wechat\LINGYUN.Abp.WeChat.MiniProgram\LINGYUN.Abp.WeChat.MiniProgram.csproj", "{D42CE0F0-331F-4E5C-92CD-6B4DD6854E69}" Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "LINGYUN.Abp.WeChat.MiniProgram", "modules\wechat\LINGYUN.Abp.WeChat.MiniProgram\LINGYUN.Abp.WeChat.MiniProgram.csproj", "{D42CE0F0-331F-4E5C-92CD-6B4DD6854E69}"
EndProject EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "LINGYUN.Abp.WeChat.Official", "modules\wechat\LINGYUN.Abp.WeChat.Official\LINGYUN.Abp.WeChat.Official.csproj", "{EAD2F955-88CA-4570-AB81-31FB2FF02605}" Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "LINGYUN.Abp.WeChat.Official", "modules\wechat\LINGYUN.Abp.WeChat.Official\LINGYUN.Abp.WeChat.Official.csproj", "{EAD2F955-88CA-4570-AB81-31FB2FF02605}"
EndProject EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "LINGYUN.Abp.WeChat.SettingManagement", "modules\wechat\LINGYUN.Abp.WeChat.SettingManagement\LINGYUN.Abp.WeChat.SettingManagement.csproj", "{3FD9C35C-3A8D-49F5-B7C5-4828AA3407AB}" Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "LINGYUN.Abp.WeChat.SettingManagement", "modules\wechat\LINGYUN.Abp.WeChat.SettingManagement\LINGYUN.Abp.WeChat.SettingManagement.csproj", "{3FD9C35C-3A8D-49F5-B7C5-4828AA3407AB}"
EndProject EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "LINGYUN.Abp.OssManagement.Application.Contracts", "modules\oss-management\LINGYUN.Abp.OssManagement.Application.Contracts\LINGYUN.Abp.OssManagement.Application.Contracts.csproj", "{5C3D0A48-4EE3-4968-9826-5F52ADDC22C4}" Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "LINGYUN.Abp.OssManagement.Application.Contracts", "modules\oss-management\LINGYUN.Abp.OssManagement.Application.Contracts\LINGYUN.Abp.OssManagement.Application.Contracts.csproj", "{5C3D0A48-4EE3-4968-9826-5F52ADDC22C4}"
EndProject EndProject
Global Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "LINGYUN.Abp.MultiTenancy", "modules\tenants\LINGYUN.Abp.MultiTenancy\LINGYUN.Abp.MultiTenancy.csproj", "{360B5928-DD64-42AA-8C99-07EFC5224C24}"
GlobalSection(SolutionConfigurationPlatforms) = preSolution EndProject
Debug|Any CPU = Debug|Any CPU Global
Release|Any CPU = Release|Any CPU GlobalSection(SolutionConfigurationPlatforms) = preSolution
EndGlobalSection Debug|Any CPU = Debug|Any CPU
GlobalSection(ProjectConfigurationPlatforms) = postSolution Release|Any CPU = Release|Any CPU
{A12DB303-F90B-4E56-B99F-A40816FCB04A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU EndGlobalSection
{A12DB303-F90B-4E56-B99F-A40816FCB04A}.Debug|Any CPU.Build.0 = Debug|Any CPU GlobalSection(ProjectConfigurationPlatforms) = postSolution
{A12DB303-F90B-4E56-B99F-A40816FCB04A}.Release|Any CPU.ActiveCfg = Release|Any CPU {A12DB303-F90B-4E56-B99F-A40816FCB04A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{A12DB303-F90B-4E56-B99F-A40816FCB04A}.Release|Any CPU.Build.0 = Release|Any CPU {A12DB303-F90B-4E56-B99F-A40816FCB04A}.Debug|Any CPU.Build.0 = Debug|Any CPU
{926E8543-6A0E-4B36-8F3C-9278281E3420}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {A12DB303-F90B-4E56-B99F-A40816FCB04A}.Release|Any CPU.ActiveCfg = Release|Any CPU
{926E8543-6A0E-4B36-8F3C-9278281E3420}.Debug|Any CPU.Build.0 = Debug|Any CPU {A12DB303-F90B-4E56-B99F-A40816FCB04A}.Release|Any CPU.Build.0 = Release|Any CPU
{926E8543-6A0E-4B36-8F3C-9278281E3420}.Release|Any CPU.ActiveCfg = Release|Any CPU {926E8543-6A0E-4B36-8F3C-9278281E3420}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{926E8543-6A0E-4B36-8F3C-9278281E3420}.Release|Any CPU.Build.0 = Release|Any CPU {926E8543-6A0E-4B36-8F3C-9278281E3420}.Debug|Any CPU.Build.0 = Debug|Any CPU
{0DDA914E-CE2A-446F-A43D-09C52704D39C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {926E8543-6A0E-4B36-8F3C-9278281E3420}.Release|Any CPU.ActiveCfg = Release|Any CPU
{0DDA914E-CE2A-446F-A43D-09C52704D39C}.Debug|Any CPU.Build.0 = Debug|Any CPU {926E8543-6A0E-4B36-8F3C-9278281E3420}.Release|Any CPU.Build.0 = Release|Any CPU
{0DDA914E-CE2A-446F-A43D-09C52704D39C}.Release|Any CPU.ActiveCfg = Release|Any CPU {0DDA914E-CE2A-446F-A43D-09C52704D39C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{0DDA914E-CE2A-446F-A43D-09C52704D39C}.Release|Any CPU.Build.0 = Release|Any CPU {0DDA914E-CE2A-446F-A43D-09C52704D39C}.Debug|Any CPU.Build.0 = Debug|Any CPU
{E7185ACE-4D40-4215-BBD7-73D2DB69F482}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {0DDA914E-CE2A-446F-A43D-09C52704D39C}.Release|Any CPU.ActiveCfg = Release|Any CPU
{E7185ACE-4D40-4215-BBD7-73D2DB69F482}.Debug|Any CPU.Build.0 = Debug|Any CPU {0DDA914E-CE2A-446F-A43D-09C52704D39C}.Release|Any CPU.Build.0 = Release|Any CPU
{E7185ACE-4D40-4215-BBD7-73D2DB69F482}.Release|Any CPU.ActiveCfg = Release|Any CPU {E7185ACE-4D40-4215-BBD7-73D2DB69F482}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{E7185ACE-4D40-4215-BBD7-73D2DB69F482}.Release|Any CPU.Build.0 = Release|Any CPU {E7185ACE-4D40-4215-BBD7-73D2DB69F482}.Debug|Any CPU.Build.0 = Debug|Any CPU
{011F5FF0-468F-4423-8DC3-C3ECC3F63829}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {E7185ACE-4D40-4215-BBD7-73D2DB69F482}.Release|Any CPU.ActiveCfg = Release|Any CPU
{011F5FF0-468F-4423-8DC3-C3ECC3F63829}.Debug|Any CPU.Build.0 = Debug|Any CPU {E7185ACE-4D40-4215-BBD7-73D2DB69F482}.Release|Any CPU.Build.0 = Release|Any CPU
{011F5FF0-468F-4423-8DC3-C3ECC3F63829}.Release|Any CPU.ActiveCfg = Release|Any CPU {011F5FF0-468F-4423-8DC3-C3ECC3F63829}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{011F5FF0-468F-4423-8DC3-C3ECC3F63829}.Release|Any CPU.Build.0 = Release|Any CPU {011F5FF0-468F-4423-8DC3-C3ECC3F63829}.Debug|Any CPU.Build.0 = Debug|Any CPU
{35A4661D-12A0-47A9-ACC6-111D1474A88B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {011F5FF0-468F-4423-8DC3-C3ECC3F63829}.Release|Any CPU.ActiveCfg = Release|Any CPU
{35A4661D-12A0-47A9-ACC6-111D1474A88B}.Debug|Any CPU.Build.0 = Debug|Any CPU {011F5FF0-468F-4423-8DC3-C3ECC3F63829}.Release|Any CPU.Build.0 = Release|Any CPU
{35A4661D-12A0-47A9-ACC6-111D1474A88B}.Release|Any CPU.ActiveCfg = Release|Any CPU {35A4661D-12A0-47A9-ACC6-111D1474A88B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{35A4661D-12A0-47A9-ACC6-111D1474A88B}.Release|Any CPU.Build.0 = Release|Any CPU {35A4661D-12A0-47A9-ACC6-111D1474A88B}.Debug|Any CPU.Build.0 = Debug|Any CPU
{9EAAB564-5971-4AE3-9228-3953C228A890}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {35A4661D-12A0-47A9-ACC6-111D1474A88B}.Release|Any CPU.ActiveCfg = Release|Any CPU
{9EAAB564-5971-4AE3-9228-3953C228A890}.Debug|Any CPU.Build.0 = Debug|Any CPU {35A4661D-12A0-47A9-ACC6-111D1474A88B}.Release|Any CPU.Build.0 = Release|Any CPU
{9EAAB564-5971-4AE3-9228-3953C228A890}.Release|Any CPU.ActiveCfg = Release|Any CPU {9EAAB564-5971-4AE3-9228-3953C228A890}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{9EAAB564-5971-4AE3-9228-3953C228A890}.Release|Any CPU.Build.0 = Release|Any CPU {9EAAB564-5971-4AE3-9228-3953C228A890}.Debug|Any CPU.Build.0 = Debug|Any CPU
{5BAC138C-2AD5-426E-9D85-BDC6A0B38787}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {9EAAB564-5971-4AE3-9228-3953C228A890}.Release|Any CPU.ActiveCfg = Release|Any CPU
{5BAC138C-2AD5-426E-9D85-BDC6A0B38787}.Debug|Any CPU.Build.0 = Debug|Any CPU {9EAAB564-5971-4AE3-9228-3953C228A890}.Release|Any CPU.Build.0 = Release|Any CPU
{5BAC138C-2AD5-426E-9D85-BDC6A0B38787}.Release|Any CPU.ActiveCfg = Release|Any CPU {5BAC138C-2AD5-426E-9D85-BDC6A0B38787}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{5BAC138C-2AD5-426E-9D85-BDC6A0B38787}.Release|Any CPU.Build.0 = Release|Any CPU {5BAC138C-2AD5-426E-9D85-BDC6A0B38787}.Debug|Any CPU.Build.0 = Debug|Any CPU
{BE063443-09F6-4611-AE17-811AD00D51E9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {5BAC138C-2AD5-426E-9D85-BDC6A0B38787}.Release|Any CPU.ActiveCfg = Release|Any CPU
{BE063443-09F6-4611-AE17-811AD00D51E9}.Debug|Any CPU.Build.0 = Debug|Any CPU {5BAC138C-2AD5-426E-9D85-BDC6A0B38787}.Release|Any CPU.Build.0 = Release|Any CPU
{BE063443-09F6-4611-AE17-811AD00D51E9}.Release|Any CPU.ActiveCfg = Release|Any CPU {BE063443-09F6-4611-AE17-811AD00D51E9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{BE063443-09F6-4611-AE17-811AD00D51E9}.Release|Any CPU.Build.0 = Release|Any CPU {BE063443-09F6-4611-AE17-811AD00D51E9}.Debug|Any CPU.Build.0 = Debug|Any CPU
{69CBAE90-D5BE-4362-98DE-1505A59DD0A6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {BE063443-09F6-4611-AE17-811AD00D51E9}.Release|Any CPU.ActiveCfg = Release|Any CPU
{69CBAE90-D5BE-4362-98DE-1505A59DD0A6}.Debug|Any CPU.Build.0 = Debug|Any CPU {BE063443-09F6-4611-AE17-811AD00D51E9}.Release|Any CPU.Build.0 = Release|Any CPU
{69CBAE90-D5BE-4362-98DE-1505A59DD0A6}.Release|Any CPU.ActiveCfg = Release|Any CPU {69CBAE90-D5BE-4362-98DE-1505A59DD0A6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{69CBAE90-D5BE-4362-98DE-1505A59DD0A6}.Release|Any CPU.Build.0 = Release|Any CPU {69CBAE90-D5BE-4362-98DE-1505A59DD0A6}.Debug|Any CPU.Build.0 = Debug|Any CPU
{DAD70E78-D4A1-4B19-AF11-9236825FF013}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {69CBAE90-D5BE-4362-98DE-1505A59DD0A6}.Release|Any CPU.ActiveCfg = Release|Any CPU
{DAD70E78-D4A1-4B19-AF11-9236825FF013}.Debug|Any CPU.Build.0 = Debug|Any CPU {69CBAE90-D5BE-4362-98DE-1505A59DD0A6}.Release|Any CPU.Build.0 = Release|Any CPU
{DAD70E78-D4A1-4B19-AF11-9236825FF013}.Release|Any CPU.ActiveCfg = Release|Any CPU {DAD70E78-D4A1-4B19-AF11-9236825FF013}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{DAD70E78-D4A1-4B19-AF11-9236825FF013}.Release|Any CPU.Build.0 = Release|Any CPU {DAD70E78-D4A1-4B19-AF11-9236825FF013}.Debug|Any CPU.Build.0 = Debug|Any CPU
{376B2235-ADA7-4EC7-A27D-8F97EC6A57CD}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {DAD70E78-D4A1-4B19-AF11-9236825FF013}.Release|Any CPU.ActiveCfg = Release|Any CPU
{376B2235-ADA7-4EC7-A27D-8F97EC6A57CD}.Debug|Any CPU.Build.0 = Debug|Any CPU {DAD70E78-D4A1-4B19-AF11-9236825FF013}.Release|Any CPU.Build.0 = Release|Any CPU
{376B2235-ADA7-4EC7-A27D-8F97EC6A57CD}.Release|Any CPU.ActiveCfg = Release|Any CPU {376B2235-ADA7-4EC7-A27D-8F97EC6A57CD}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{376B2235-ADA7-4EC7-A27D-8F97EC6A57CD}.Release|Any CPU.Build.0 = Release|Any CPU {376B2235-ADA7-4EC7-A27D-8F97EC6A57CD}.Debug|Any CPU.Build.0 = Debug|Any CPU
{7521486D-2144-4AFA-86AD-8E8021479DE6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {376B2235-ADA7-4EC7-A27D-8F97EC6A57CD}.Release|Any CPU.ActiveCfg = Release|Any CPU
{7521486D-2144-4AFA-86AD-8E8021479DE6}.Debug|Any CPU.Build.0 = Debug|Any CPU {376B2235-ADA7-4EC7-A27D-8F97EC6A57CD}.Release|Any CPU.Build.0 = Release|Any CPU
{7521486D-2144-4AFA-86AD-8E8021479DE6}.Release|Any CPU.ActiveCfg = Release|Any CPU {7521486D-2144-4AFA-86AD-8E8021479DE6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{7521486D-2144-4AFA-86AD-8E8021479DE6}.Release|Any CPU.Build.0 = Release|Any CPU {7521486D-2144-4AFA-86AD-8E8021479DE6}.Debug|Any CPU.Build.0 = Debug|Any CPU
{AA2F7243-976C-47F3-9B4E-20CC22F8FCF4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {7521486D-2144-4AFA-86AD-8E8021479DE6}.Release|Any CPU.ActiveCfg = Release|Any CPU
{AA2F7243-976C-47F3-9B4E-20CC22F8FCF4}.Debug|Any CPU.Build.0 = Debug|Any CPU {7521486D-2144-4AFA-86AD-8E8021479DE6}.Release|Any CPU.Build.0 = Release|Any CPU
{AA2F7243-976C-47F3-9B4E-20CC22F8FCF4}.Release|Any CPU.ActiveCfg = Release|Any CPU {AA2F7243-976C-47F3-9B4E-20CC22F8FCF4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{AA2F7243-976C-47F3-9B4E-20CC22F8FCF4}.Release|Any CPU.Build.0 = Release|Any CPU {AA2F7243-976C-47F3-9B4E-20CC22F8FCF4}.Debug|Any CPU.Build.0 = Debug|Any CPU
{E758D3A7-DB93-4EAC-A2ED-C2322D4F7D67}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {AA2F7243-976C-47F3-9B4E-20CC22F8FCF4}.Release|Any CPU.ActiveCfg = Release|Any CPU
{E758D3A7-DB93-4EAC-A2ED-C2322D4F7D67}.Debug|Any CPU.Build.0 = Debug|Any CPU {AA2F7243-976C-47F3-9B4E-20CC22F8FCF4}.Release|Any CPU.Build.0 = Release|Any CPU
{E758D3A7-DB93-4EAC-A2ED-C2322D4F7D67}.Release|Any CPU.ActiveCfg = Release|Any CPU {E758D3A7-DB93-4EAC-A2ED-C2322D4F7D67}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{E758D3A7-DB93-4EAC-A2ED-C2322D4F7D67}.Release|Any CPU.Build.0 = Release|Any CPU {E758D3A7-DB93-4EAC-A2ED-C2322D4F7D67}.Debug|Any CPU.Build.0 = Debug|Any CPU
{D4AB1BF0-95EC-4E34-9C39-E888ED30C535}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {E758D3A7-DB93-4EAC-A2ED-C2322D4F7D67}.Release|Any CPU.ActiveCfg = Release|Any CPU
{D4AB1BF0-95EC-4E34-9C39-E888ED30C535}.Debug|Any CPU.Build.0 = Debug|Any CPU {E758D3A7-DB93-4EAC-A2ED-C2322D4F7D67}.Release|Any CPU.Build.0 = Release|Any CPU
{D4AB1BF0-95EC-4E34-9C39-E888ED30C535}.Release|Any CPU.ActiveCfg = Release|Any CPU {D4AB1BF0-95EC-4E34-9C39-E888ED30C535}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{D4AB1BF0-95EC-4E34-9C39-E888ED30C535}.Release|Any CPU.Build.0 = Release|Any CPU {D4AB1BF0-95EC-4E34-9C39-E888ED30C535}.Debug|Any CPU.Build.0 = Debug|Any CPU
{A387EF32-1FAD-412F-893D-43485CE59DB4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {D4AB1BF0-95EC-4E34-9C39-E888ED30C535}.Release|Any CPU.ActiveCfg = Release|Any CPU
{A387EF32-1FAD-412F-893D-43485CE59DB4}.Debug|Any CPU.Build.0 = Debug|Any CPU {D4AB1BF0-95EC-4E34-9C39-E888ED30C535}.Release|Any CPU.Build.0 = Release|Any CPU
{A387EF32-1FAD-412F-893D-43485CE59DB4}.Release|Any CPU.ActiveCfg = Release|Any CPU {A387EF32-1FAD-412F-893D-43485CE59DB4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{A387EF32-1FAD-412F-893D-43485CE59DB4}.Release|Any CPU.Build.0 = Release|Any CPU {A387EF32-1FAD-412F-893D-43485CE59DB4}.Debug|Any CPU.Build.0 = Debug|Any CPU
{9BABF219-AAAA-4611-8B49-BFCCBD046934}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {A387EF32-1FAD-412F-893D-43485CE59DB4}.Release|Any CPU.ActiveCfg = Release|Any CPU
{9BABF219-AAAA-4611-8B49-BFCCBD046934}.Debug|Any CPU.Build.0 = Debug|Any CPU {A387EF32-1FAD-412F-893D-43485CE59DB4}.Release|Any CPU.Build.0 = Release|Any CPU
{9BABF219-AAAA-4611-8B49-BFCCBD046934}.Release|Any CPU.ActiveCfg = Release|Any CPU {9BABF219-AAAA-4611-8B49-BFCCBD046934}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{9BABF219-AAAA-4611-8B49-BFCCBD046934}.Release|Any CPU.Build.0 = Release|Any CPU {9BABF219-AAAA-4611-8B49-BFCCBD046934}.Debug|Any CPU.Build.0 = Debug|Any CPU
{C1514C9C-7FB2-412E-A931-7F2F0C9A65DC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {9BABF219-AAAA-4611-8B49-BFCCBD046934}.Release|Any CPU.ActiveCfg = Release|Any CPU
{C1514C9C-7FB2-412E-A931-7F2F0C9A65DC}.Debug|Any CPU.Build.0 = Debug|Any CPU {9BABF219-AAAA-4611-8B49-BFCCBD046934}.Release|Any CPU.Build.0 = Release|Any CPU
{C1514C9C-7FB2-412E-A931-7F2F0C9A65DC}.Release|Any CPU.ActiveCfg = Release|Any CPU {C1514C9C-7FB2-412E-A931-7F2F0C9A65DC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{C1514C9C-7FB2-412E-A931-7F2F0C9A65DC}.Release|Any CPU.Build.0 = Release|Any CPU {C1514C9C-7FB2-412E-A931-7F2F0C9A65DC}.Debug|Any CPU.Build.0 = Debug|Any CPU
{D42CE0F0-331F-4E5C-92CD-6B4DD6854E69}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {C1514C9C-7FB2-412E-A931-7F2F0C9A65DC}.Release|Any CPU.ActiveCfg = Release|Any CPU
{D42CE0F0-331F-4E5C-92CD-6B4DD6854E69}.Debug|Any CPU.Build.0 = Debug|Any CPU {C1514C9C-7FB2-412E-A931-7F2F0C9A65DC}.Release|Any CPU.Build.0 = Release|Any CPU
{D42CE0F0-331F-4E5C-92CD-6B4DD6854E69}.Release|Any CPU.ActiveCfg = Release|Any CPU {D42CE0F0-331F-4E5C-92CD-6B4DD6854E69}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{D42CE0F0-331F-4E5C-92CD-6B4DD6854E69}.Release|Any CPU.Build.0 = Release|Any CPU {D42CE0F0-331F-4E5C-92CD-6B4DD6854E69}.Debug|Any CPU.Build.0 = Debug|Any CPU
{EAD2F955-88CA-4570-AB81-31FB2FF02605}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {D42CE0F0-331F-4E5C-92CD-6B4DD6854E69}.Release|Any CPU.ActiveCfg = Release|Any CPU
{EAD2F955-88CA-4570-AB81-31FB2FF02605}.Debug|Any CPU.Build.0 = Debug|Any CPU {D42CE0F0-331F-4E5C-92CD-6B4DD6854E69}.Release|Any CPU.Build.0 = Release|Any CPU
{EAD2F955-88CA-4570-AB81-31FB2FF02605}.Release|Any CPU.ActiveCfg = Release|Any CPU {EAD2F955-88CA-4570-AB81-31FB2FF02605}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{EAD2F955-88CA-4570-AB81-31FB2FF02605}.Release|Any CPU.Build.0 = Release|Any CPU {EAD2F955-88CA-4570-AB81-31FB2FF02605}.Debug|Any CPU.Build.0 = Debug|Any CPU
{3FD9C35C-3A8D-49F5-B7C5-4828AA3407AB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {EAD2F955-88CA-4570-AB81-31FB2FF02605}.Release|Any CPU.ActiveCfg = Release|Any CPU
{3FD9C35C-3A8D-49F5-B7C5-4828AA3407AB}.Debug|Any CPU.Build.0 = Debug|Any CPU {EAD2F955-88CA-4570-AB81-31FB2FF02605}.Release|Any CPU.Build.0 = Release|Any CPU
{3FD9C35C-3A8D-49F5-B7C5-4828AA3407AB}.Release|Any CPU.ActiveCfg = Release|Any CPU {3FD9C35C-3A8D-49F5-B7C5-4828AA3407AB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{3FD9C35C-3A8D-49F5-B7C5-4828AA3407AB}.Release|Any CPU.Build.0 = Release|Any CPU {3FD9C35C-3A8D-49F5-B7C5-4828AA3407AB}.Debug|Any CPU.Build.0 = Debug|Any CPU
{5C3D0A48-4EE3-4968-9826-5F52ADDC22C4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {3FD9C35C-3A8D-49F5-B7C5-4828AA3407AB}.Release|Any CPU.ActiveCfg = Release|Any CPU
{5C3D0A48-4EE3-4968-9826-5F52ADDC22C4}.Debug|Any CPU.Build.0 = Debug|Any CPU {3FD9C35C-3A8D-49F5-B7C5-4828AA3407AB}.Release|Any CPU.Build.0 = Release|Any CPU
{5C3D0A48-4EE3-4968-9826-5F52ADDC22C4}.Release|Any CPU.ActiveCfg = Release|Any CPU {5C3D0A48-4EE3-4968-9826-5F52ADDC22C4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{5C3D0A48-4EE3-4968-9826-5F52ADDC22C4}.Release|Any CPU.Build.0 = Release|Any CPU {5C3D0A48-4EE3-4968-9826-5F52ADDC22C4}.Debug|Any CPU.Build.0 = Debug|Any CPU
EndGlobalSection {5C3D0A48-4EE3-4968-9826-5F52ADDC22C4}.Release|Any CPU.ActiveCfg = Release|Any CPU
GlobalSection(SolutionProperties) = preSolution {5C3D0A48-4EE3-4968-9826-5F52ADDC22C4}.Release|Any CPU.Build.0 = Release|Any CPU
HideSolutionNode = FALSE {360B5928-DD64-42AA-8C99-07EFC5224C24}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
EndGlobalSection {360B5928-DD64-42AA-8C99-07EFC5224C24}.Debug|Any CPU.Build.0 = Debug|Any CPU
GlobalSection(NestedProjects) = preSolution {360B5928-DD64-42AA-8C99-07EFC5224C24}.Release|Any CPU.ActiveCfg = Release|Any CPU
{A12DB303-F90B-4E56-B99F-A40816FCB04A} = {1E8D56FE-2FA1-4041-AB69-00952BF42EC9} {360B5928-DD64-42AA-8C99-07EFC5224C24}.Release|Any CPU.Build.0 = Release|Any CPU
{CB1A2EB0-34D4-41C4-BF01-C99EFBBF09EE} = {ED23B2F3-87C1-44B6-8906-9DE739422C2C} EndGlobalSection
{926E8543-6A0E-4B36-8F3C-9278281E3420} = {CB1A2EB0-34D4-41C4-BF01-C99EFBBF09EE} GlobalSection(SolutionProperties) = preSolution
{0DDA914E-CE2A-446F-A43D-09C52704D39C} = {CB1A2EB0-34D4-41C4-BF01-C99EFBBF09EE} HideSolutionNode = FALSE
{E7185ACE-4D40-4215-BBD7-73D2DB69F482} = {CB1A2EB0-34D4-41C4-BF01-C99EFBBF09EE} EndGlobalSection
{011F5FF0-468F-4423-8DC3-C3ECC3F63829} = {CB1A2EB0-34D4-41C4-BF01-C99EFBBF09EE} GlobalSection(NestedProjects) = preSolution
{202AC90B-0E4A-44B4-9A9D-3C869D0D4B8E} = {ED23B2F3-87C1-44B6-8906-9DE739422C2C} {A12DB303-F90B-4E56-B99F-A40816FCB04A} = {1E8D56FE-2FA1-4041-AB69-00952BF42EC9}
{35A4661D-12A0-47A9-ACC6-111D1474A88B} = {202AC90B-0E4A-44B4-9A9D-3C869D0D4B8E} {CB1A2EB0-34D4-41C4-BF01-C99EFBBF09EE} = {ED23B2F3-87C1-44B6-8906-9DE739422C2C}
{9EAAB564-5971-4AE3-9228-3953C228A890} = {202AC90B-0E4A-44B4-9A9D-3C869D0D4B8E} {926E8543-6A0E-4B36-8F3C-9278281E3420} = {CB1A2EB0-34D4-41C4-BF01-C99EFBBF09EE}
{5BAC138C-2AD5-426E-9D85-BDC6A0B38787} = {202AC90B-0E4A-44B4-9A9D-3C869D0D4B8E} {0DDA914E-CE2A-446F-A43D-09C52704D39C} = {CB1A2EB0-34D4-41C4-BF01-C99EFBBF09EE}
{709E77F9-DABF-47D3-A86E-40CD5448B1E5} = {ED23B2F3-87C1-44B6-8906-9DE739422C2C} {E7185ACE-4D40-4215-BBD7-73D2DB69F482} = {CB1A2EB0-34D4-41C4-BF01-C99EFBBF09EE}
{BE063443-09F6-4611-AE17-811AD00D51E9} = {709E77F9-DABF-47D3-A86E-40CD5448B1E5} {011F5FF0-468F-4423-8DC3-C3ECC3F63829} = {CB1A2EB0-34D4-41C4-BF01-C99EFBBF09EE}
{69CBAE90-D5BE-4362-98DE-1505A59DD0A6} = {709E77F9-DABF-47D3-A86E-40CD5448B1E5} {202AC90B-0E4A-44B4-9A9D-3C869D0D4B8E} = {ED23B2F3-87C1-44B6-8906-9DE739422C2C}
{DAD70E78-D4A1-4B19-AF11-9236825FF013} = {709E77F9-DABF-47D3-A86E-40CD5448B1E5} {35A4661D-12A0-47A9-ACC6-111D1474A88B} = {202AC90B-0E4A-44B4-9A9D-3C869D0D4B8E}
{2F56344F-6E06-4F9B-A0F2-8A6F0AEB096A} = {ED23B2F3-87C1-44B6-8906-9DE739422C2C} {9EAAB564-5971-4AE3-9228-3953C228A890} = {202AC90B-0E4A-44B4-9A9D-3C869D0D4B8E}
{376B2235-ADA7-4EC7-A27D-8F97EC6A57CD} = {2F56344F-6E06-4F9B-A0F2-8A6F0AEB096A} {5BAC138C-2AD5-426E-9D85-BDC6A0B38787} = {202AC90B-0E4A-44B4-9A9D-3C869D0D4B8E}
{D25C4814-71AB-4A9D-8C76-298A7DE1A747} = {ED23B2F3-87C1-44B6-8906-9DE739422C2C} {709E77F9-DABF-47D3-A86E-40CD5448B1E5} = {ED23B2F3-87C1-44B6-8906-9DE739422C2C}
{7521486D-2144-4AFA-86AD-8E8021479DE6} = {D25C4814-71AB-4A9D-8C76-298A7DE1A747} {BE063443-09F6-4611-AE17-811AD00D51E9} = {709E77F9-DABF-47D3-A86E-40CD5448B1E5}
{8F972C8E-F047-4883-A4BF-3423A2BAED36} = {ED23B2F3-87C1-44B6-8906-9DE739422C2C} {69CBAE90-D5BE-4362-98DE-1505A59DD0A6} = {709E77F9-DABF-47D3-A86E-40CD5448B1E5}
{9DAD2CA8-16B6-4006-BD8E-EE3E9BAA3770} = {ED23B2F3-87C1-44B6-8906-9DE739422C2C} {DAD70E78-D4A1-4B19-AF11-9236825FF013} = {709E77F9-DABF-47D3-A86E-40CD5448B1E5}
{AA2F7243-976C-47F3-9B4E-20CC22F8FCF4} = {9DAD2CA8-16B6-4006-BD8E-EE3E9BAA3770} {2F56344F-6E06-4F9B-A0F2-8A6F0AEB096A} = {ED23B2F3-87C1-44B6-8906-9DE739422C2C}
{E758D3A7-DB93-4EAC-A2ED-C2322D4F7D67} = {2F56344F-6E06-4F9B-A0F2-8A6F0AEB096A} {376B2235-ADA7-4EC7-A27D-8F97EC6A57CD} = {2F56344F-6E06-4F9B-A0F2-8A6F0AEB096A}
{D4AB1BF0-95EC-4E34-9C39-E888ED30C535} = {2F56344F-6E06-4F9B-A0F2-8A6F0AEB096A} {D25C4814-71AB-4A9D-8C76-298A7DE1A747} = {ED23B2F3-87C1-44B6-8906-9DE739422C2C}
{A387EF32-1FAD-412F-893D-43485CE59DB4} = {9DAD2CA8-16B6-4006-BD8E-EE3E9BAA3770} {7521486D-2144-4AFA-86AD-8E8021479DE6} = {D25C4814-71AB-4A9D-8C76-298A7DE1A747}
{9BABF219-AAAA-4611-8B49-BFCCBD046934} = {2F56344F-6E06-4F9B-A0F2-8A6F0AEB096A} {8F972C8E-F047-4883-A4BF-3423A2BAED36} = {ED23B2F3-87C1-44B6-8906-9DE739422C2C}
{B36F627B-FD7D-4357-A623-F01AFF78B80D} = {ED23B2F3-87C1-44B6-8906-9DE739422C2C} {9DAD2CA8-16B6-4006-BD8E-EE3E9BAA3770} = {ED23B2F3-87C1-44B6-8906-9DE739422C2C}
{C1514C9C-7FB2-412E-A931-7F2F0C9A65DC} = {B36F627B-FD7D-4357-A623-F01AFF78B80D} {AA2F7243-976C-47F3-9B4E-20CC22F8FCF4} = {9DAD2CA8-16B6-4006-BD8E-EE3E9BAA3770}
{D42CE0F0-331F-4E5C-92CD-6B4DD6854E69} = {B36F627B-FD7D-4357-A623-F01AFF78B80D} {E758D3A7-DB93-4EAC-A2ED-C2322D4F7D67} = {2F56344F-6E06-4F9B-A0F2-8A6F0AEB096A}
{EAD2F955-88CA-4570-AB81-31FB2FF02605} = {B36F627B-FD7D-4357-A623-F01AFF78B80D} {D4AB1BF0-95EC-4E34-9C39-E888ED30C535} = {2F56344F-6E06-4F9B-A0F2-8A6F0AEB096A}
{3FD9C35C-3A8D-49F5-B7C5-4828AA3407AB} = {B36F627B-FD7D-4357-A623-F01AFF78B80D} {A387EF32-1FAD-412F-893D-43485CE59DB4} = {9DAD2CA8-16B6-4006-BD8E-EE3E9BAA3770}
{5C3D0A48-4EE3-4968-9826-5F52ADDC22C4} = {8F972C8E-F047-4883-A4BF-3423A2BAED36} {9BABF219-AAAA-4611-8B49-BFCCBD046934} = {2F56344F-6E06-4F9B-A0F2-8A6F0AEB096A}
EndGlobalSection {B36F627B-FD7D-4357-A623-F01AFF78B80D} = {ED23B2F3-87C1-44B6-8906-9DE739422C2C}
GlobalSection(ExtensibilityGlobals) = postSolution {C1514C9C-7FB2-412E-A931-7F2F0C9A65DC} = {B36F627B-FD7D-4357-A623-F01AFF78B80D}
SolutionGuid = {1573B900-87BA-4AD3-B785-6DD78127ADEF} {D42CE0F0-331F-4E5C-92CD-6B4DD6854E69} = {B36F627B-FD7D-4357-A623-F01AFF78B80D}
EndGlobalSection {EAD2F955-88CA-4570-AB81-31FB2FF02605} = {B36F627B-FD7D-4357-A623-F01AFF78B80D}
EndGlobal {3FD9C35C-3A8D-49F5-B7C5-4828AA3407AB} = {B36F627B-FD7D-4357-A623-F01AFF78B80D}
{5C3D0A48-4EE3-4968-9826-5F52ADDC22C4} = {8F972C8E-F047-4883-A4BF-3423A2BAED36}
{360B5928-DD64-42AA-8C99-07EFC5224C24} = {CB1A2EB0-34D4-41C4-BF01-C99EFBBF09EE}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {1573B900-87BA-4AD3-B785-6DD78127ADEF}
EndGlobalSection
EndGlobal

4
aspnet-core/modules/tenants/LINGYUN.Abp.MultiTenancy.DbFinder/LINGYUN.Abp.MultiTenancy.DbFinder.csproj

@ -12,4 +12,8 @@
<PackageReference Include="Volo.Abp.TenantManagement.Domain" Version="4.4.0" /> <PackageReference Include="Volo.Abp.TenantManagement.Domain" Version="4.4.0" />
</ItemGroup> </ItemGroup>
<ItemGroup>
<ProjectReference Include="..\LINGYUN.Abp.MultiTenancy\LINGYUN.Abp.MultiTenancy.csproj" />
</ItemGroup>
</Project> </Project>

131
aspnet-core/modules/tenants/LINGYUN.Abp.MultiTenancy.DbFinder/LINGYUN/Abp/MultiTenancy/DbFinder/EventBus/Distributed/TenantCreateEventHandler.cs

@ -1,63 +1,68 @@
using Microsoft.Extensions.Logging; using Microsoft.Extensions.Logging;
using System; using System;
using System.Threading.Tasks; using System.Threading.Tasks;
using Volo.Abp.Caching; using Volo.Abp.Caching;
using Volo.Abp.Data; using Volo.Abp.Data;
using Volo.Abp.DependencyInjection; using Volo.Abp.DependencyInjection;
using Volo.Abp.Domain.Entities.Events.Distributed; using Volo.Abp.Domain.Entities.Events.Distributed;
using Volo.Abp.EventBus.Distributed; using Volo.Abp.EventBus.Distributed;
using Volo.Abp.MultiTenancy; using Volo.Abp.MultiTenancy;
using Volo.Abp.TenantManagement; using Volo.Abp.TenantManagement;
using Volo.Abp.Uow; using Volo.Abp.Uow;
namespace LINGYUN.Abp.MultiTenancy.DbFinder.EventBus.Distributed namespace LINGYUN.Abp.MultiTenancy.DbFinder.EventBus.Distributed
{ {
public class TenantCreateEventHandler : IDistributedEventHandler<EntityCreatedEto<TenantEto>>, ITransientDependency public class TenantCreateEventHandler : IDistributedEventHandler<EntityCreatedEto<TenantEto>>, ITransientDependency
{ {
private readonly ILogger<TenantCreateEventHandler> _logger; private readonly ILogger<TenantCreateEventHandler> _logger;
private readonly ICurrentTenant _currentTenant; private readonly ICurrentTenant _currentTenant;
private readonly ITenantRepository _tenantRepository; private readonly ITenantRepository _tenantRepository;
private readonly IDistributedCache<TenantConfigurationCacheItem> _cache; private readonly IDistributedCache<TenantConfigurationCacheItem> _cache;
public TenantCreateEventHandler( public TenantCreateEventHandler(
ICurrentTenant currentTenant, ICurrentTenant currentTenant,
ITenantRepository tenantRepository, ITenantRepository tenantRepository,
ILogger<TenantCreateEventHandler> logger, ILogger<TenantCreateEventHandler> logger,
IDistributedCache<TenantConfigurationCacheItem> cache) IDistributedCache<TenantConfigurationCacheItem> cache)
{ {
_cache = cache; _cache = cache;
_logger = logger; _logger = logger;
_currentTenant = currentTenant; _currentTenant = currentTenant;
_tenantRepository = tenantRepository; _tenantRepository = tenantRepository;
} }
[UnitOfWork] [UnitOfWork]
public virtual async Task HandleEventAsync(EntityCreatedEto<TenantEto> eventData) public virtual async Task HandleEventAsync(EntityCreatedEto<TenantEto> eventData)
{ {
try try
{ {
using (_currentTenant.Change(null)) using (_currentTenant.Change(null))
{ {
var tenant = await _tenantRepository.FindAsync(eventData.Entity.Id, true); var tenant = await _tenantRepository.FindAsync(eventData.Entity.Id, true);
if (tenant == null) if (tenant == null)
{ {
return; return;
} }
var connectionStrings = new ConnectionStrings(); var connectionStrings = new ConnectionStrings();
foreach (var tenantConnectionString in tenant.ConnectionStrings) foreach (var tenantConnectionString in tenant.ConnectionStrings)
{ {
connectionStrings[tenantConnectionString.Name] = tenantConnectionString.Value; connectionStrings[tenantConnectionString.Name] = tenantConnectionString.Value;
} }
var cacheItem = new TenantConfigurationCacheItem(tenant.Id, tenant.Name, connectionStrings); var cacheItem = new TenantConfigurationCacheItem(tenant.Id, tenant.Name, connectionStrings);
var cacheKey = TenantConfigurationCacheItem.CalculateCacheKey(eventData.Entity.Id.ToString()); await _cache.SetAsync(
await _cache.SetAsync(cacheKey, cacheItem); TenantConfigurationCacheItem.CalculateCacheKey(eventData.Entity.Id.ToString()),
} cacheItem);
}
catch (Exception ex) await _cache.SetAsync(
{ TenantConfigurationCacheItem.CalculateCacheKey(eventData.Entity.Name),
_logger.LogException(ex); cacheItem);
} }
} }
} catch (Exception ex)
} {
_logger.LogException(ex);
}
}
}
}

55
aspnet-core/modules/tenants/LINGYUN.Abp.MultiTenancy.DbFinder/LINGYUN/Abp/MultiTenancy/DbFinder/EventBus/Distributed/TenantDeleteEventHandler.cs

@ -1,26 +1,29 @@
using System.Threading.Tasks; using System.Threading.Tasks;
using Volo.Abp.Caching; using Volo.Abp.Caching;
using Volo.Abp.DependencyInjection; using Volo.Abp.DependencyInjection;
using Volo.Abp.Domain.Entities.Events.Distributed; using Volo.Abp.Domain.Entities.Events.Distributed;
using Volo.Abp.EventBus.Distributed; using Volo.Abp.EventBus.Distributed;
using Volo.Abp.TenantManagement; using Volo.Abp.TenantManagement;
namespace LINGYUN.Abp.MultiTenancy.DbFinder.EventBus.Distributed namespace LINGYUN.Abp.MultiTenancy.DbFinder.EventBus.Distributed
{ {
public class TenantDeleteEventHandler : IDistributedEventHandler<EntityDeletedEto<TenantEto>>, ITransientDependency public class TenantDeleteEventHandler : IDistributedEventHandler<EntityDeletedEto<TenantEto>>, ITransientDependency
{ {
private readonly IDistributedCache<TenantConfigurationCacheItem> _cache; private readonly IDistributedCache<TenantConfigurationCacheItem> _cache;
public TenantDeleteEventHandler( public TenantDeleteEventHandler(
IDistributedCache<TenantConfigurationCacheItem> cache) IDistributedCache<TenantConfigurationCacheItem> cache)
{ {
_cache = cache; _cache = cache;
} }
public virtual async Task HandleEventAsync(EntityDeletedEto<TenantEto> eventData) public virtual async Task HandleEventAsync(EntityDeletedEto<TenantEto> eventData)
{ {
var cacheKey = TenantConfigurationCacheItem.CalculateCacheKey(eventData.Entity.Id.ToString()); await _cache.RemoveAsync(
await _cache.RemoveAsync(cacheKey); TenantConfigurationCacheItem.CalculateCacheKey(eventData.Entity.Id.ToString()));
}
} await _cache.RemoveAsync(
} TenantConfigurationCacheItem.CalculateCacheKey(eventData.Entity.Name));
}
}
}

131
aspnet-core/modules/tenants/LINGYUN.Abp.MultiTenancy.DbFinder/LINGYUN/Abp/MultiTenancy/DbFinder/EventBus/Distributed/TenantUpdateEventHandler.cs

@ -1,63 +1,68 @@
using Microsoft.Extensions.Logging; using Microsoft.Extensions.Logging;
using System; using System;
using System.Threading.Tasks; using System.Threading.Tasks;
using Volo.Abp.Caching; using Volo.Abp.Caching;
using Volo.Abp.Data; using Volo.Abp.Data;
using Volo.Abp.DependencyInjection; using Volo.Abp.DependencyInjection;
using Volo.Abp.Domain.Entities.Events.Distributed; using Volo.Abp.Domain.Entities.Events.Distributed;
using Volo.Abp.EventBus.Distributed; using Volo.Abp.EventBus.Distributed;
using Volo.Abp.MultiTenancy; using Volo.Abp.MultiTenancy;
using Volo.Abp.TenantManagement; using Volo.Abp.TenantManagement;
using Volo.Abp.Uow; using Volo.Abp.Uow;
namespace LINGYUN.Abp.MultiTenancy.DbFinder.EventBus.Distributed namespace LINGYUN.Abp.MultiTenancy.DbFinder.EventBus.Distributed
{ {
public class TenantUpdateEventHandler : IDistributedEventHandler<EntityUpdatedEto<TenantEto>>, ITransientDependency public class TenantUpdateEventHandler : IDistributedEventHandler<EntityUpdatedEto<TenantEto>>, ITransientDependency
{ {
private readonly ILogger<TenantUpdateEventHandler> _logger; private readonly ILogger<TenantUpdateEventHandler> _logger;
private readonly ICurrentTenant _currentTenant; private readonly ICurrentTenant _currentTenant;
private readonly ITenantRepository _tenantRepository; private readonly ITenantRepository _tenantRepository;
private readonly IDistributedCache<TenantConfigurationCacheItem> _cache; private readonly IDistributedCache<TenantConfigurationCacheItem> _cache;
public TenantUpdateEventHandler( public TenantUpdateEventHandler(
ICurrentTenant currentTenant, ICurrentTenant currentTenant,
ITenantRepository tenantRepository, ITenantRepository tenantRepository,
ILogger<TenantUpdateEventHandler> logger, ILogger<TenantUpdateEventHandler> logger,
IDistributedCache<TenantConfigurationCacheItem> cache) IDistributedCache<TenantConfigurationCacheItem> cache)
{ {
_cache = cache; _cache = cache;
_logger = logger; _logger = logger;
_currentTenant = currentTenant; _currentTenant = currentTenant;
_tenantRepository = tenantRepository; _tenantRepository = tenantRepository;
} }
[UnitOfWork] [UnitOfWork]
public virtual async Task HandleEventAsync(EntityUpdatedEto<TenantEto> eventData) public virtual async Task HandleEventAsync(EntityUpdatedEto<TenantEto> eventData)
{ {
try try
{ {
using (_currentTenant.Change(null)) using (_currentTenant.Change(null))
{ {
var tenant = await _tenantRepository.FindAsync(eventData.Entity.Id, true); var tenant = await _tenantRepository.FindAsync(eventData.Entity.Id, true);
if (tenant == null) if (tenant == null)
{ {
return; return;
} }
var connectionStrings = new ConnectionStrings(); var connectionStrings = new ConnectionStrings();
foreach (var tenantConnectionString in tenant.ConnectionStrings) foreach (var tenantConnectionString in tenant.ConnectionStrings)
{ {
connectionStrings[tenantConnectionString.Name] = tenantConnectionString.Value; connectionStrings[tenantConnectionString.Name] = tenantConnectionString.Value;
} }
var cacheItem = new TenantConfigurationCacheItem(tenant.Id, tenant.Name, connectionStrings); var cacheItem = new TenantConfigurationCacheItem(tenant.Id, tenant.Name, connectionStrings);
var cacheKey = TenantConfigurationCacheItem.CalculateCacheKey(eventData.Entity.Id.ToString()); await _cache.SetAsync(
await _cache.SetAsync(cacheKey, cacheItem); TenantConfigurationCacheItem.CalculateCacheKey(eventData.Entity.Id.ToString()),
} cacheItem);
}
catch(Exception ex) await _cache.SetAsync(
{ TenantConfigurationCacheItem.CalculateCacheKey(eventData.Entity.Name),
_logger.LogException(ex); cacheItem);
} }
} }
} catch(Exception ex)
} {
_logger.LogException(ex);
}
}
}
}

76
aspnet-core/modules/tenants/LINGYUN.Abp.MultiTenancy.DbFinder/README.md

@ -1,39 +1,39 @@
# LINGYUN.Abp.MultiTenancy.DbFinder # LINGYUN.Abp.MultiTenancy.DbFinder
abp 多租户数据库查询组件,引用此模块将首先从分布式缓存查询当前租户配置 abp 多租户数据库查询组件,引用此模块将首先从分布式缓存查询当前租户配置
如果缓存不存在,则调用租户仓储接口获取租户数据,并存储到分布式缓存中 如果缓存不存在,则调用租户仓储接口获取租户数据,并存储到分布式缓存中
## 配置使用 ## 配置使用
模块按需引用 模块按需引用
启动项目需要引用**Volo.Abp.TenantManagement.EntityFrameworkCore** 启动项目需要引用**Volo.Abp.TenantManagement.EntityFrameworkCore**
``` shell ``` shell
// .NET CLI // .NET CLI
dotnet add package Volo.Abp.TenantManagement.EntityFrameworkCore --version 3.0.0 dotnet add package Volo.Abp.TenantManagement.EntityFrameworkCore
// Package Manager // Package Manager
Install-Package Volo.Abp.TenantManagement.EntityFrameworkCore -Version 3.0.0 Install-Package Volo.Abp.TenantManagement.EntityFrameworkCore
``` ```
事先定义**appsettings.json**文件 事先定义**appsettings.json**文件
```json ```json
{ {
"ConnectionStrings": { "ConnectionStrings": {
"AbpTenantManagement": "Server=127.0.0.1;Database=TenantDb;User Id=root;Password=yourPassword" "AbpTenantManagement": "Server=127.0.0.1;Database=TenantDb;User Id=root;Password=yourPassword"
} }
} }
``` ```
```csharp ```csharp
[DependsOn(typeof(AbpDbFinderMultiTenancyModule))] [DependsOn(typeof(AbpDbFinderMultiTenancyModule))]
public class YouProjectModule : AbpModule public class YouProjectModule : AbpModule
{ {
// other // other
} }
``` ```

1
aspnet-core/modules/tenants/LINGYUN.Abp.MultiTenancy.RemoteService/LINGYUN.Abp.MultiTenancy.RemoteService.csproj

@ -12,6 +12,7 @@
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<ProjectReference Include="..\LINGYUN.Abp.MultiTenancy\LINGYUN.Abp.MultiTenancy.csproj" />
<ProjectReference Include="..\LINGYUN.Abp.TenantManagement.HttpApi.Client\LINGYUN.Abp.TenantManagement.HttpApi.Client.csproj" /> <ProjectReference Include="..\LINGYUN.Abp.TenantManagement.HttpApi.Client\LINGYUN.Abp.TenantManagement.HttpApi.Client.csproj" />
</ItemGroup> </ItemGroup>

85
aspnet-core/modules/tenants/LINGYUN.Abp.MultiTenancy.RemoteService/LINGYUN/Abp/MultiTenancy/RemoteService/EventBus/Distributed/TenantCreateEventHandler.cs

@ -1,40 +1,45 @@
using LINGYUN.Abp.TenantManagement; using LINGYUN.Abp.TenantManagement;
using System.Threading.Tasks; using System.Threading.Tasks;
using Volo.Abp.Caching; using Volo.Abp.Caching;
using Volo.Abp.Data; using Volo.Abp.Data;
using Volo.Abp.DependencyInjection; using Volo.Abp.DependencyInjection;
using Volo.Abp.Domain.Entities.Events.Distributed; using Volo.Abp.Domain.Entities.Events.Distributed;
using Volo.Abp.EventBus.Distributed; using Volo.Abp.EventBus.Distributed;
using Volo.Abp.TenantManagement; using Volo.Abp.TenantManagement;
namespace LINGYUN.Abp.MultiTenancy.RemoteService.EventBus.Distributed namespace LINGYUN.Abp.MultiTenancy.RemoteService.EventBus.Distributed
{ {
public class TenantCreateEventHandler : IDistributedEventHandler<EntityCreatedEto<TenantEto>>, ITransientDependency public class TenantCreateEventHandler : IDistributedEventHandler<EntityCreatedEto<TenantEto>>, ITransientDependency
{ {
private readonly ITenantAppService _tenantAppService; private readonly ITenantAppService _tenantAppService;
private readonly IDistributedCache<TenantConfigurationCacheItem> _cache; private readonly IDistributedCache<TenantConfigurationCacheItem> _cache;
public TenantCreateEventHandler( public TenantCreateEventHandler(
ITenantAppService tenantAppService, ITenantAppService tenantAppService,
IDistributedCache<TenantConfigurationCacheItem> cache) IDistributedCache<TenantConfigurationCacheItem> cache)
{ {
_cache = cache; _cache = cache;
_tenantAppService = tenantAppService; _tenantAppService = tenantAppService;
} }
public virtual async Task HandleEventAsync(EntityCreatedEto<TenantEto> eventData) public virtual async Task HandleEventAsync(EntityCreatedEto<TenantEto> eventData)
{ {
var tenantDto = await _tenantAppService.GetAsync(eventData.Entity.Id); var tenantDto = await _tenantAppService.GetAsync(eventData.Entity.Id);
var tenantConnectionStringsDto = await _tenantAppService.GetConnectionStringAsync(eventData.Entity.Id); var tenantConnectionStringsDto = await _tenantAppService.GetConnectionStringAsync(eventData.Entity.Id);
var connectionStrings = new ConnectionStrings(); var connectionStrings = new ConnectionStrings();
foreach (var tenantConnectionString in tenantConnectionStringsDto.Items) foreach (var tenantConnectionString in tenantConnectionStringsDto.Items)
{ {
connectionStrings[tenantConnectionString.Name] = tenantConnectionString.Value; connectionStrings[tenantConnectionString.Name] = tenantConnectionString.Value;
} }
var cacheItem = new TenantConfigurationCacheItem(tenantDto.Id, tenantDto.Name, connectionStrings); var cacheItem = new TenantConfigurationCacheItem(tenantDto.Id, tenantDto.Name, connectionStrings);
var cacheKey = TenantConfigurationCacheItem.CalculateCacheKey(eventData.Entity.Id.ToString()); await _cache.SetAsync(
await _cache.SetAsync(cacheKey, cacheItem); TenantConfigurationCacheItem.CalculateCacheKey(eventData.Entity.Id.ToString()),
} cacheItem);
}
} await _cache.SetAsync(
TenantConfigurationCacheItem.CalculateCacheKey(eventData.Entity.Name),
cacheItem);
}
}
}

55
aspnet-core/modules/tenants/LINGYUN.Abp.MultiTenancy.RemoteService/LINGYUN/Abp/MultiTenancy/RemoteService/EventBus/Distributed/TenantDeleteEventHandler.cs

@ -1,26 +1,29 @@
using System.Threading.Tasks; using System.Threading.Tasks;
using Volo.Abp.Caching; using Volo.Abp.Caching;
using Volo.Abp.DependencyInjection; using Volo.Abp.DependencyInjection;
using Volo.Abp.Domain.Entities.Events.Distributed; using Volo.Abp.Domain.Entities.Events.Distributed;
using Volo.Abp.EventBus.Distributed; using Volo.Abp.EventBus.Distributed;
using Volo.Abp.TenantManagement; using Volo.Abp.TenantManagement;
namespace LINGYUN.Abp.MultiTenancy.RemoteService.EventBus.Distributed namespace LINGYUN.Abp.MultiTenancy.RemoteService.EventBus.Distributed
{ {
public class TenantDeleteEventHandler : IDistributedEventHandler<EntityDeletedEto<TenantEto>>, ITransientDependency public class TenantDeleteEventHandler : IDistributedEventHandler<EntityDeletedEto<TenantEto>>, ITransientDependency
{ {
private readonly IDistributedCache<TenantConfigurationCacheItem> _cache; private readonly IDistributedCache<TenantConfigurationCacheItem> _cache;
public TenantDeleteEventHandler( public TenantDeleteEventHandler(
IDistributedCache<TenantConfigurationCacheItem> cache) IDistributedCache<TenantConfigurationCacheItem> cache)
{ {
_cache = cache; _cache = cache;
} }
public virtual async Task HandleEventAsync(EntityDeletedEto<TenantEto> eventData) public virtual async Task HandleEventAsync(EntityDeletedEto<TenantEto> eventData)
{ {
var cacheKey = TenantConfigurationCacheItem.CalculateCacheKey(eventData.Entity.Id.ToString()); await _cache.RemoveAsync(
await _cache.RemoveAsync(cacheKey); TenantConfigurationCacheItem.CalculateCacheKey(eventData.Entity.Id.ToString()));
}
} await _cache.RemoveAsync(
} TenantConfigurationCacheItem.CalculateCacheKey(eventData.Entity.Name));
}
}
}

85
aspnet-core/modules/tenants/LINGYUN.Abp.MultiTenancy.RemoteService/LINGYUN/Abp/MultiTenancy/RemoteService/EventBus/Distributed/TenantUpdateEventHandler.cs

@ -1,40 +1,45 @@
using LINGYUN.Abp.TenantManagement; using LINGYUN.Abp.TenantManagement;
using System.Threading.Tasks; using System.Threading.Tasks;
using Volo.Abp.Caching; using Volo.Abp.Caching;
using Volo.Abp.Data; using Volo.Abp.Data;
using Volo.Abp.DependencyInjection; using Volo.Abp.DependencyInjection;
using Volo.Abp.Domain.Entities.Events.Distributed; using Volo.Abp.Domain.Entities.Events.Distributed;
using Volo.Abp.EventBus.Distributed; using Volo.Abp.EventBus.Distributed;
using Volo.Abp.TenantManagement; using Volo.Abp.TenantManagement;
namespace LINGYUN.Abp.MultiTenancy.RemoteService.EventBus.Distributed namespace LINGYUN.Abp.MultiTenancy.RemoteService.EventBus.Distributed
{ {
public class TenantUpdateEventHandler : IDistributedEventHandler<EntityUpdatedEto<TenantEto>>, ITransientDependency public class TenantUpdateEventHandler : IDistributedEventHandler<EntityUpdatedEto<TenantEto>>, ITransientDependency
{ {
private readonly ITenantAppService _tenantAppService; private readonly ITenantAppService _tenantAppService;
private readonly IDistributedCache<TenantConfigurationCacheItem> _cache; private readonly IDistributedCache<TenantConfigurationCacheItem> _cache;
public TenantUpdateEventHandler( public TenantUpdateEventHandler(
ITenantAppService tenantAppService, ITenantAppService tenantAppService,
IDistributedCache<TenantConfigurationCacheItem> cache) IDistributedCache<TenantConfigurationCacheItem> cache)
{ {
_cache = cache; _cache = cache;
_tenantAppService = tenantAppService; _tenantAppService = tenantAppService;
} }
public virtual async Task HandleEventAsync(EntityUpdatedEto<TenantEto> eventData) public virtual async Task HandleEventAsync(EntityUpdatedEto<TenantEto> eventData)
{ {
var tenantDto = await _tenantAppService.GetAsync(eventData.Entity.Id); var tenantDto = await _tenantAppService.GetAsync(eventData.Entity.Id);
var tenantConnectionStringsDto = await _tenantAppService.GetConnectionStringAsync(eventData.Entity.Id); var tenantConnectionStringsDto = await _tenantAppService.GetConnectionStringAsync(eventData.Entity.Id);
var connectionStrings = new ConnectionStrings(); var connectionStrings = new ConnectionStrings();
foreach (var tenantConnectionString in tenantConnectionStringsDto.Items) foreach (var tenantConnectionString in tenantConnectionStringsDto.Items)
{ {
connectionStrings[tenantConnectionString.Name] = tenantConnectionString.Value; connectionStrings[tenantConnectionString.Name] = tenantConnectionString.Value;
} }
var cacheItem = new TenantConfigurationCacheItem(tenantDto.Id, tenantDto.Name, connectionStrings); var cacheItem = new TenantConfigurationCacheItem(tenantDto.Id, tenantDto.Name, connectionStrings);
var cacheKey = TenantConfigurationCacheItem.CalculateCacheKey(eventData.Entity.Id.ToString()); await _cache.SetAsync(
await _cache.SetAsync(cacheKey, cacheItem); TenantConfigurationCacheItem.CalculateCacheKey(eventData.Entity.Id.ToString()),
} cacheItem);
}
} await _cache.SetAsync(
TenantConfigurationCacheItem.CalculateCacheKey(eventData.Entity.Name),
cacheItem);
}
}
}

114
aspnet-core/modules/tenants/LINGYUN.Abp.MultiTenancy.RemoteService/README.md

@ -1,58 +1,58 @@
# LINGYUN.Abp.MultiTenancy.RemoteService # LINGYUN.Abp.MultiTenancy.RemoteService
abp 多租户远程服务组件,引用此模块将首先从分布式缓存查询当前租户配置 abp 多租户远程服务组件,引用此模块将首先从分布式缓存查询当前租户配置
如果缓存不存在,则调用远程租户服务接口获取租户数据,并存储到分布式缓存中 如果缓存不存在,则调用远程租户服务接口获取租户数据,并存储到分布式缓存中
## 配置使用 ## 配置使用
模块按需引用 模块按需引用
如果远程服务接口定义了授权策略,需要配置接口客户端授权,并且启动项目需要引用**Volo.Abp.Http.Client.IdentityModel**模块 如果远程服务接口定义了授权策略,需要配置接口客户端授权,并且启动项目需要引用**Volo.Abp.Http.Client.IdentityModel**模块
``` shell ``` shell
// .NET CLI // .NET CLI
dotnet add package Volo.Abp.Http.Client.IdentityModel --version 3.0.0 dotnet add package Volo.Abp.Http.Client.IdentityModel
// Package Manager // Package Manager
Install-Package Volo.Abp.Http.Client.IdentityModel -Version 3.0.0 Install-Package Volo.Abp.Http.Client.IdentityModel
``` ```
具体**RemoteServices**与**IdentityClients**配置请阅读abp文档 具体**RemoteServices**与**IdentityClients**配置请阅读abp文档
[RemoteServices配置参阅](https://docs.abp.io/en/abp/latest/API/Dynamic-CSharp-API-Clients) [RemoteServices配置参阅](https://docs.abp.io/en/abp/latest/API/Dynamic-CSharp-API-Clients)
[IdentityClients配置参阅](https://github.com/abpframework/abp/blob/dev/framework/src/Volo.Abp.IdentityModel/Volo/Abp/IdentityModel/IdentityClientConfiguration.cs) [IdentityClients配置参阅](https://github.com/abpframework/abp/blob/dev/framework/src/Volo.Abp.IdentityModel/Volo/Abp/IdentityModel/IdentityClientConfiguration.cs)
事先定义**appsettings.json**文件 事先定义**appsettings.json**文件
```json ```json
{ {
"RemoteServices": { "RemoteServices": {
"TenantManagement": { "AbpTenantManagement": {
"BaseUrl": "http://localhost:30000/", "BaseUrl": "http://localhost:30000/",
"IdentityClient": "tenant-finder-client" "IdentityClient": "InternalServiceClient"
} }
}, },
"IdentityClients": { "IdentityClients": {
"tenant-finder-client": { "InternalServiceClient": {
"Authority": "http://localhost:44385", "Authority": "http://localhost:44385",
"RequireHttps": false, "RequireHttps": false,
"GrantType": "client_credentials", "GrantType": "client_credentials",
"ClientId": "tenant-finder-client", "ClientId": "tenant-finder-client",
"Scope": "tenant-service", "Scope": "tenant-service",
"ClientSecret": "1q2w3e*" "ClientSecret": "1q2w3e*"
} }
} }
} }
``` ```
```csharp ```csharp
[DependsOn(typeof(AbpRemoteServiceMultiTenancyModule))] [DependsOn(typeof(AbpRemoteServiceMultiTenancyModule))]
public class YouProjectModule : AbpModule public class YouProjectModule : AbpModule
{ {
// other // other
} }
``` ```

13
aspnet-core/modules/tenants/LINGYUN.Abp.MultiTenancy/LINGYUN/Abp/MultiTenancy/CreateConnectionStringEventData.cs

@ -1,13 +0,0 @@
using System;
namespace LINGYUN.Abp.MultiTenancy
{
public class CreateConnectionStringEventData
{
public Guid Id { get; set; }
public string Name { get; set; }
public string Value { get; set; }
}
}

11
aspnet-core/modules/tenants/LINGYUN.Abp.MultiTenancy/LINGYUN/Abp/MultiTenancy/DeleteConnectionStringEventData.cs

@ -1,11 +0,0 @@
using System;
namespace LINGYUN.Abp.MultiTenancy
{
public class DeleteConnectionStringEventData
{
public Guid Id { get; set; }
public string Name { get; set; }
}
}

9
aspnet-core/modules/tenants/LINGYUN.Abp.MultiTenancy/LINGYUN/Abp/MultiTenancy/DeleteEventData.cs

@ -1,9 +0,0 @@
using System;
namespace LINGYUN.Abp.MultiTenancy
{
public class DeleteEventData
{
public Guid Id { get; set; }
}
}

17
aspnet-core/modules/tenants/LINGYUN.Abp.MultiTenancy/LINGYUN/Abp/MultiTenancy/UpdateConnectionStringEventData.cs

@ -1,17 +0,0 @@
using System;
namespace LINGYUN.Abp.MultiTenancy
{
public class UpdateConnectionStringEventData
{
public Guid Id { get; set; }
public string OriginName { get; set; }
public string Name { get; set; }
public string OriginValue { get; set; }
public string Value { get; set; }
}
}

13
aspnet-core/modules/tenants/LINGYUN.Abp.MultiTenancy/LINGYUN/Abp/MultiTenancy/UpdateEventData.cs

@ -1,13 +0,0 @@
using System;
namespace LINGYUN.Abp.MultiTenancy
{
public class UpdateEventData
{
public Guid Id { get; set; }
public string OriginName { get; set; }
public string Name { get; set; }
}
}

361
aspnet-core/modules/tenants/LINGYUN.Abp.TenantManagement.Application/LINGYUN/Abp/TenantManagement/TenantAppService.cs

@ -1,184 +1,177 @@
using LINGYUN.Abp.MultiTenancy; using LINGYUN.Abp.MultiTenancy;
using Microsoft.AspNetCore.Authorization; using Microsoft.AspNetCore.Authorization;
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Threading.Tasks; using System.Threading.Tasks;
using Volo.Abp; using Volo.Abp;
using Volo.Abp.Application.Dtos; using Volo.Abp.Application.Dtos;
using Volo.Abp.EventBus.Distributed; using Volo.Abp.EventBus.Distributed;
using Volo.Abp.ObjectExtending; using Volo.Abp.ObjectExtending;
using Volo.Abp.TenantManagement; using Volo.Abp.TenantManagement;
namespace LINGYUN.Abp.TenantManagement namespace LINGYUN.Abp.TenantManagement
{ {
[Authorize(TenantManagementPermissions.Tenants.Default)] [Authorize(TenantManagementPermissions.Tenants.Default)]
public class TenantAppService : TenantManagementAppServiceBase, ITenantAppService public class TenantAppService : TenantManagementAppServiceBase, ITenantAppService
{ {
protected IDistributedEventBus EventBus { get; } protected IDistributedEventBus EventBus { get; }
protected ITenantRepository TenantRepository { get; } protected ITenantRepository TenantRepository { get; }
protected ITenantManager TenantManager { get; } protected ITenantManager TenantManager { get; }
public TenantAppService( public TenantAppService(
ITenantRepository tenantRepository, ITenantRepository tenantRepository,
ITenantManager tenantManager, ITenantManager tenantManager,
IDistributedEventBus eventBus) IDistributedEventBus eventBus)
{ {
EventBus = eventBus; EventBus = eventBus;
TenantRepository = tenantRepository; TenantRepository = tenantRepository;
TenantManager = tenantManager; TenantManager = tenantManager;
} }
public virtual async Task<TenantDto> GetAsync(Guid id) public virtual async Task<TenantDto> GetAsync(Guid id)
{ {
var tenant = await TenantRepository.FindAsync(id, false); var tenant = await TenantRepository.FindAsync(id, false);
if(tenant == null) if(tenant == null)
{ {
throw new UserFriendlyException(L["TenantNotFoundById", id]); throw new UserFriendlyException(L["TenantNotFoundById", id]);
} }
return ObjectMapper.Map<Tenant, TenantDto>(tenant); return ObjectMapper.Map<Tenant, TenantDto>(tenant);
} }
public virtual async Task<TenantDto> GetAsync(string name) public virtual async Task<TenantDto> GetAsync(string name)
{ {
var tenant = await TenantRepository.FindByNameAsync(name, false); var tenant = await TenantRepository.FindByNameAsync(name, false);
if (tenant == null) if (tenant == null)
{ {
throw new UserFriendlyException(L["TenantNotFoundByName", name]); throw new UserFriendlyException(L["TenantNotFoundByName", name]);
} }
return ObjectMapper.Map<Tenant, TenantDto>(tenant); return ObjectMapper.Map<Tenant, TenantDto>(tenant);
} }
public virtual async Task<PagedResultDto<TenantDto>> GetListAsync(TenantGetByPagedInputDto input) public virtual async Task<PagedResultDto<TenantDto>> GetListAsync(TenantGetByPagedInputDto input)
{ {
var count = await TenantRepository.GetCountAsync(input.Filter); var count = await TenantRepository.GetCountAsync(input.Filter);
var list = await TenantRepository.GetListAsync( var list = await TenantRepository.GetListAsync(
input.Sorting, input.Sorting,
input.MaxResultCount, input.MaxResultCount,
input.SkipCount, input.SkipCount,
input.Filter input.Filter
); );
return new PagedResultDto<TenantDto>( return new PagedResultDto<TenantDto>(
count, count,
ObjectMapper.Map<List<Tenant>, List<TenantDto>>(list) ObjectMapper.Map<List<Tenant>, List<TenantDto>>(list)
); );
} }
[Authorize(TenantManagementPermissions.Tenants.Create)] [Authorize(TenantManagementPermissions.Tenants.Create)]
public virtual async Task<TenantDto> CreateAsync(TenantCreateDto input) public virtual async Task<TenantDto> CreateAsync(TenantCreateDto input)
{ {
var tenant = await TenantManager.CreateAsync(input.Name); var tenant = await TenantManager.CreateAsync(input.Name);
input.MapExtraPropertiesTo(tenant); input.MapExtraPropertiesTo(tenant);
await TenantRepository.InsertAsync(tenant); await TenantRepository.InsertAsync(tenant);
await CurrentUnitOfWork.SaveChangesAsync(); await CurrentUnitOfWork.SaveChangesAsync();
var createEventData = new CreateEventData var createEventData = new CreateEventData
{ {
Id = tenant.Id, Id = tenant.Id,
Name = tenant.Name, Name = tenant.Name,
AdminUserId = GuidGenerator.Create(), AdminUserId = GuidGenerator.Create(),
AdminEmailAddress = input.AdminEmailAddress, AdminEmailAddress = input.AdminEmailAddress,
AdminPassword = input.AdminPassword AdminPassword = input.AdminPassword
}; };
// 因为项目各自独立,租户增加时添加管理用户必须通过事件总线 // 因为项目各自独立,租户增加时添加管理用户必须通过事件总线
// 而 TenantEto 对象没有包含所需的用户名密码,需要独立发布事件 // 而 TenantEto 对象没有包含所需的用户名密码,需要独立发布事件
await EventBus.PublishAsync(createEventData); await EventBus.PublishAsync(createEventData);
return ObjectMapper.Map<Tenant, TenantDto>(tenant); return ObjectMapper.Map<Tenant, TenantDto>(tenant);
} }
[Authorize(TenantManagementPermissions.Tenants.Update)] [Authorize(TenantManagementPermissions.Tenants.Update)]
public virtual async Task<TenantDto> UpdateAsync(Guid id, TenantUpdateDto input) public virtual async Task<TenantDto> UpdateAsync(Guid id, TenantUpdateDto input)
{ {
var tenant = await TenantRepository.GetAsync(id, false); var tenant = await TenantRepository.GetAsync(id, false);
var updateEventData = new UpdateEventData
{ await TenantManager.ChangeNameAsync(tenant, input.Name);
Id = tenant.Id, input.MapExtraPropertiesTo(tenant);
OriginName = tenant.Name, await TenantRepository.UpdateAsync(tenant);
Name = input.Name
}; return ObjectMapper.Map<Tenant, TenantDto>(tenant);
await TenantManager.ChangeNameAsync(tenant, input.Name); }
input.MapExtraPropertiesTo(tenant);
await TenantRepository.UpdateAsync(tenant); [Authorize(TenantManagementPermissions.Tenants.Delete)]
public virtual async Task DeleteAsync(Guid id)
await EventBus.PublishAsync(updateEventData); {
return ObjectMapper.Map<Tenant, TenantDto>(tenant); var tenant = await TenantRepository.FindAsync(id);
} if (tenant == null)
{
[Authorize(TenantManagementPermissions.Tenants.Delete)] return;
public virtual async Task DeleteAsync(Guid id) }
{ await TenantRepository.DeleteAsync(tenant);
var tenant = await TenantRepository.FindAsync(id); }
if (tenant == null)
{ [Authorize(TenantManagementPermissions.Tenants.ManageConnectionStrings)]
return; public virtual async Task<TenantConnectionStringDto> GetConnectionStringAsync(Guid id, string name)
} {
await TenantRepository.DeleteAsync(tenant); var tenant = await TenantRepository.GetAsync(id);
}
var tenantConnectionString = tenant.FindConnectionString(name);
[Authorize(TenantManagementPermissions.Tenants.ManageConnectionStrings)]
public virtual async Task<TenantConnectionStringDto> GetConnectionStringAsync(Guid id, string name) return new TenantConnectionStringDto
{ {
var tenant = await TenantRepository.GetAsync(id); Name = name,
Value = tenantConnectionString
var tenantConnectionString = tenant.FindConnectionString(name); };
}
return new TenantConnectionStringDto
{ [Authorize(TenantManagementPermissions.Tenants.ManageConnectionStrings)]
Name = name, public virtual async Task<ListResultDto<TenantConnectionStringDto>> GetConnectionStringAsync(Guid id)
Value = tenantConnectionString {
}; var tenant = await TenantRepository.GetAsync(id);
}
return new ListResultDto<TenantConnectionStringDto>(
[Authorize(TenantManagementPermissions.Tenants.ManageConnectionStrings)] ObjectMapper.Map<List<TenantConnectionString>, List<TenantConnectionStringDto>>(tenant.ConnectionStrings));
public virtual async Task<ListResultDto<TenantConnectionStringDto>> GetConnectionStringAsync(Guid id) }
{
var tenant = await TenantRepository.GetAsync(id); [Authorize(TenantManagementPermissions.Tenants.ManageConnectionStrings)]
public virtual async Task<TenantConnectionStringDto> SetConnectionStringAsync(Guid id, TenantConnectionStringCreateOrUpdateDto tenantConnectionStringCreateOrUpdate)
return new ListResultDto<TenantConnectionStringDto>( {
ObjectMapper.Map<List<TenantConnectionString>, List<TenantConnectionStringDto>>(tenant.ConnectionStrings)); var tenant = await TenantRepository.GetAsync(id);
} tenant.SetConnectionString(tenantConnectionStringCreateOrUpdate.Name, tenantConnectionStringCreateOrUpdate.Value);
[Authorize(TenantManagementPermissions.Tenants.ManageConnectionStrings)] var eventData = new ConnectionStringChangedEventData
public virtual async Task<TenantConnectionStringDto> SetConnectionStringAsync(Guid id, TenantConnectionStringCreateOrUpdateDto tenantConnectionStringCreateOrUpdate) {
{ Id = tenant.Id,
var tenant = await TenantRepository.GetAsync(id); OriginName = tenantConnectionStringCreateOrUpdate.Name,
tenant.SetConnectionString(tenantConnectionStringCreateOrUpdate.Name, tenantConnectionStringCreateOrUpdate.Value); Name = tenantConnectionStringCreateOrUpdate.Name
var updateEventData = new UpdateEventData };
{ await EventBus.PublishAsync(eventData);
Id = tenant.Id,
OriginName = tenant.Name, return new TenantConnectionStringDto
Name = tenant.Name {
}; Name = tenantConnectionStringCreateOrUpdate.Name,
// abp当前版本(3.0.0)在EntityChangeEventHelper中存在一个问题,无法发送框架默认的Eto,预计3.1.0修复 Value = tenantConnectionStringCreateOrUpdate.Value
// 发送自定义的事件数据来确保缓存被更新 };
await EventBus.PublishAsync(updateEventData); }
return new TenantConnectionStringDto [Authorize(TenantManagementPermissions.Tenants.ManageConnectionStrings)]
{ public virtual async Task DeleteConnectionStringAsync(Guid id, string name)
Name = tenantConnectionStringCreateOrUpdate.Name, {
Value = tenantConnectionStringCreateOrUpdate.Value var tenant = await TenantRepository.GetAsync(id);
};
} tenant.RemoveConnectionString(name);
[Authorize(TenantManagementPermissions.Tenants.ManageConnectionStrings)] var eventData = new ConnectionStringChangedEventData
public virtual async Task DeleteConnectionStringAsync(Guid id, string name) {
{ Id = tenant.Id,
var tenant = await TenantRepository.GetAsync(id); OriginName = name,
Name = name
tenant.RemoveConnectionString(name); };
await EventBus.PublishAsync(eventData);
var updateEventData = new UpdateEventData
{ await TenantRepository.UpdateAsync(tenant);
Id = tenant.Id, }
OriginName = tenant.Name, }
Name = tenant.Name }
};
await EventBus.PublishAsync(updateEventData);
await TenantRepository.UpdateAsync(tenant);
}
}
}

42
aspnet-core/modules/tenants/LINGYUN.Abp.TenantManagement.HttpApi.Client/LINGYUN/Abp/TenantManagement/AbpTenantManagementHttpApiClientModule.cs

@ -1,22 +1,20 @@
using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.DependencyInjection;
using Volo.Abp.Http.Client; using Volo.Abp.Http.Client;
using Volo.Abp.Modularity; using Volo.Abp.Modularity;
namespace LINGYUN.Abp.TenantManagement namespace LINGYUN.Abp.TenantManagement
{ {
[DependsOn( [DependsOn(
typeof(AbpTenantManagementApplicationContractsModule), typeof(AbpTenantManagementApplicationContractsModule),
typeof(AbpHttpClientModule))] typeof(AbpHttpClientModule))]
public class AbpTenantManagementHttpApiClientModule : AbpModule public class AbpTenantManagementHttpApiClientModule : AbpModule
{ {
public const string RemoteServiceName = "TenantManagement"; public override void ConfigureServices(ServiceConfigurationContext context)
{
public override void ConfigureServices(ServiceConfigurationContext context) context.Services.AddHttpClientProxies(
{ typeof(AbpTenantManagementApplicationContractsModule).Assembly,
context.Services.AddHttpClientProxies( TenantManagementRemoteServiceConsts.RemoteServiceName
typeof(AbpTenantManagementApplicationContractsModule).Assembly, );
RemoteServiceName }
); }
} }
}
}

Loading…
Cancel
Save