diff --git a/aspnet-core/LINGYUN.MicroService.Platform.sln b/aspnet-core/LINGYUN.MicroService.Platform.sln index b3db1e7a3..cfcf24033 100644 --- a/aspnet-core/LINGYUN.MicroService.Platform.sln +++ b/aspnet-core/LINGYUN.MicroService.Platform.sln @@ -35,6 +35,10 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "LINGYUN.Abp.FileManagement. EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "LINGYUN.Abp.FileManagement.HttpApi", "modules\file-management\LINGYUN.Abp.FileManagement.HttpApi\LINGYUN.Abp.FileManagement.HttpApi.csproj", "{C616C167-E5DF-4141-98BE-F98C58890122}" EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tenants", "tenants", "{8CDB2F58-9541-4FB2-8A37-079C5E6A1689}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "LINGYUN.Abp.MultiTenancy", "modules\tenants\LINGYUN.Abp.MultiTenancy\LINGYUN.Abp.MultiTenancy.csproj", "{CF0EBF60-EDC7-47FF-BCD7-C2B16407B590}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -89,6 +93,10 @@ Global {C616C167-E5DF-4141-98BE-F98C58890122}.Debug|Any CPU.Build.0 = Debug|Any CPU {C616C167-E5DF-4141-98BE-F98C58890122}.Release|Any CPU.ActiveCfg = Release|Any CPU {C616C167-E5DF-4141-98BE-F98C58890122}.Release|Any CPU.Build.0 = Release|Any CPU + {CF0EBF60-EDC7-47FF-BCD7-C2B16407B590}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {CF0EBF60-EDC7-47FF-BCD7-C2B16407B590}.Debug|Any CPU.Build.0 = Debug|Any CPU + {CF0EBF60-EDC7-47FF-BCD7-C2B16407B590}.Release|Any CPU.ActiveCfg = Release|Any CPU + {CF0EBF60-EDC7-47FF-BCD7-C2B16407B590}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE @@ -108,6 +116,8 @@ Global {A1561B9D-2EAB-4C6A-AE62-9D517A450D4D} = {C7D0EB39-3418-4A7C-AD94-FAB76F023E88} {1C3A25AF-9A59-4532-88A4-E57BECFA7E96} = {C7D0EB39-3418-4A7C-AD94-FAB76F023E88} {C616C167-E5DF-4141-98BE-F98C58890122} = {C7D0EB39-3418-4A7C-AD94-FAB76F023E88} + {8CDB2F58-9541-4FB2-8A37-079C5E6A1689} = {15BDA03E-DE8E-46E4-96A8-CA3F2872E812} + {CF0EBF60-EDC7-47FF-BCD7-C2B16407B590} = {8CDB2F58-9541-4FB2-8A37-079C5E6A1689} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {03D3B66F-8926-4C00-B7AB-A21761EC859E} diff --git a/aspnet-core/modules/common/LINGYUN.Abp.EventBus.CAP/DotNetCore/CAP/ConsumerServiceSelector.cs b/aspnet-core/modules/common/LINGYUN.Abp.EventBus.CAP/DotNetCore/CAP/ConsumerServiceSelector.cs index 17a965873..9e8b539f7 100644 --- a/aspnet-core/modules/common/LINGYUN.Abp.EventBus.CAP/DotNetCore/CAP/ConsumerServiceSelector.cs +++ b/aspnet-core/modules/common/LINGYUN.Abp.EventBus.CAP/DotNetCore/CAP/ConsumerServiceSelector.cs @@ -1,4 +1,5 @@ using DotNetCore.CAP.Internal; +using LINGYUN.Abp.EventBus.CAP; using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.Options; using System; @@ -19,6 +20,10 @@ namespace DotNetCore.CAP public class ConsumerServiceSelector : Internal.ConsumerServiceSelector { + /// + /// Abp Cap事件配置 + /// + protected AbpCAPEventBusOptions AbpCAPEventBusOptions { get; } /// /// Abp分布式事件配置 /// @@ -31,9 +36,13 @@ namespace DotNetCore.CAP /// /// Creates a new . /// - public ConsumerServiceSelector(IServiceProvider serviceProvider, IOptions distributedEventBusOptions) : base(serviceProvider) + public ConsumerServiceSelector( + IServiceProvider serviceProvider, + IOptions capEventBusOptions, + IOptions distributedEventBusOptions) : base(serviceProvider) { ServiceProvider = serviceProvider; + AbpCAPEventBusOptions = capEventBusOptions.Value; AbpDistributedEventBusOptions = distributedEventBusOptions.Value; } /// @@ -83,7 +92,10 @@ namespace DotNetCore.CAP nameof(IDistributedEventHandler.HandleEventAsync), new[] { eventType } ); - var eventName = EventNameAttribute.GetNameOrDefault(eventType); + // TODO: 事件名称定义在事件参数类型,就无法创建多个订阅者类了,增加可选配置,让用户决定事件名称定义在哪里 + var eventName = AbpCAPEventBusOptions.NameInEventDataType + ? EventNameAttribute.GetNameOrDefault(eventType) + : EventNameAttribute.GetNameOrDefault(typeInfo); var topicAttr = method.GetCustomAttributes(true); var topicAttributes = topicAttr.ToList(); diff --git a/aspnet-core/modules/common/LINGYUN.Abp.EventBus.CAP/LINGYUN.Abp.EventBus.CAP.xml b/aspnet-core/modules/common/LINGYUN.Abp.EventBus.CAP/LINGYUN.Abp.EventBus.CAP.xml index c27f8e704..ef9cf30d9 100644 --- a/aspnet-core/modules/common/LINGYUN.Abp.EventBus.CAP/LINGYUN.Abp.EventBus.CAP.xml +++ b/aspnet-core/modules/common/LINGYUN.Abp.EventBus.CAP/LINGYUN.Abp.EventBus.CAP.xml @@ -9,6 +9,11 @@ 消费者查找器 + + + Abp Cap事件配置 + + Abp分布式事件配置 @@ -19,7 +24,7 @@ 服务提供者 - + Creates a new . @@ -129,6 +134,13 @@ 发布消息处理失败通知 + default: false + + + + + 事件名称定义在事件参数类型 + default: true diff --git a/aspnet-core/modules/common/LINGYUN.Abp.EventBus.CAP/LINGYUN/Abp/EventBus/CAP/AbpCAPEventBusOptions.cs b/aspnet-core/modules/common/LINGYUN.Abp.EventBus.CAP/LINGYUN/Abp/EventBus/CAP/AbpCAPEventBusOptions.cs index 5139b328c..36881501f 100644 --- a/aspnet-core/modules/common/LINGYUN.Abp.EventBus.CAP/LINGYUN/Abp/EventBus/CAP/AbpCAPEventBusOptions.cs +++ b/aspnet-core/modules/common/LINGYUN.Abp.EventBus.CAP/LINGYUN/Abp/EventBus/CAP/AbpCAPEventBusOptions.cs @@ -7,9 +7,15 @@ { /// /// 发布消息处理失败通知 + /// default: false /// public bool NotifyFailedCallback { get; set; } = false; /// + /// 事件名称定义在事件参数类型 + /// default: true + /// + public bool NameInEventDataType { get; set; } = true; + /// /// 批量清理数量 /// default: 1000 /// @@ -18,6 +24,6 @@ /// 执行间隔(ms) /// default: 3600000 (1 hours) /// - public int CleanUpExpiresMessageInterval { get; set; } = 3600000; + public int CleanUpExpiresMessageInterval { get; set; } = 360_0000; } } diff --git a/aspnet-core/modules/common/LINGYUN.Abp.EventBus.CAP/LINGYUN/Abp/EventBus/CAP/CustomDistributedEventSubscriber.cs b/aspnet-core/modules/common/LINGYUN.Abp.EventBus.CAP/LINGYUN/Abp/EventBus/CAP/CustomDistributedEventSubscriber.cs index f7aeabeb7..5684e9d68 100644 --- a/aspnet-core/modules/common/LINGYUN.Abp.EventBus.CAP/LINGYUN/Abp/EventBus/CAP/CustomDistributedEventSubscriber.cs +++ b/aspnet-core/modules/common/LINGYUN.Abp.EventBus.CAP/LINGYUN/Abp/EventBus/CAP/CustomDistributedEventSubscriber.cs @@ -1,33 +1,35 @@ -using DotNetCore.CAP.Internal; +using DotNetCore.CAP; +using DotNetCore.CAP.Internal; using DotNetCore.CAP.Transport; +using Microsoft.Extensions.Options; using System; using System.Collections.Concurrent; using System.Collections.Generic; -using System.Text; -using System.Threading; +using System.Linq; using System.Reflection; +using System.Threading; using Volo.Abp.DependencyInjection; using Volo.Abp.EventBus; using Volo.Abp.EventBus.Distributed; using Volo.Abp.Threading; -using System.Linq; -using DotNetCore.CAP; -using Microsoft.Extensions.Options; namespace LINGYUN.Abp.EventBus.CAP { internal class CustomDistributedEventSubscriber : ICustomDistributedEventSubscriber, ISingletonDependency { + protected AbpCAPEventBusOptions CAPEventBusOptions { get; } protected CapOptions CapOptions { get; } protected IConsumerClientFactory ConsumerClientFactory { get; } protected ConcurrentDictionary> HandlerFactories { get; } protected ConcurrentDictionary EventStopingTokens { get; } public CustomDistributedEventSubscriber( - IOptions options, + IOptions capOptions, + IOptions capEventBusOptions, IConsumerClientFactory consumerClientFactory) { - CapOptions = options.Value; + CapOptions = capOptions.Value; + CAPEventBusOptions = capEventBusOptions.Value; ConsumerClientFactory = consumerClientFactory; HandlerFactories = new ConcurrentDictionary>(); @@ -82,7 +84,9 @@ namespace LINGYUN.Abp.EventBus.CAP nameof(IDistributedEventHandler.HandleEventAsync), new[] { eventType } ); - var eventName = EventNameAttribute.GetNameOrDefault(eventType); + var eventName = CAPEventBusOptions.NameInEventDataType + ? EventNameAttribute.GetNameOrDefault(eventType) + : EventNameAttribute.GetNameOrDefault(typeInfo); var topicAttr = method.GetCustomAttributes(true); var topicAttributes = topicAttr.ToList(); diff --git a/aspnet-core/modules/common/LINGYUN.Abp.EventBus.CAP/README.md b/aspnet-core/modules/common/LINGYUN.Abp.EventBus.CAP/README.md index f6f444444..60f9bb2d7 100644 --- a/aspnet-core/modules/common/LINGYUN.Abp.EventBus.CAP/README.md +++ b/aspnet-core/modules/common/LINGYUN.Abp.EventBus.CAP/README.md @@ -4,8 +4,15 @@ #### 注意 -* 由于 CAP 官方模块中, MySqlConnector 为高版本,与 Volo.Abp.EntityFrameworkCore.MySQL 依赖版本不兼容 -当 Abp 框架升级到 4.0 版本之后,此模块升级为 CAP 最新版本 +* 自定义事件处理器接口 ICustomDistributedEventSubscriber 未实现,当前的分布式事件只能由 CustomDistributedEventSubscriber 在启动中发现 + +* 由于Abp建议将 EventNameAttribute 标注在事件对象类,但是CAP的建议是标注在事件订阅者 EventHandler之上 + 后者有一个好处就是可以在一个启动项目中有多个订阅者消费同一个事件对象 + + 模块提供一个可选配置项,它指定了事件名称将从哪里解析 AbpCAPEventBusOptions.NameInEventDataType + 如果为 true: 事件名称将从事件对象类型中获取,比如 Volo.Abp.Users.UserEto + 如果为 false: 事件名称将从事件消费者类型中获取,比如 Volo.Abp.Users.EventBus.Handlers.UsersSynchronizer + 默认为 true,遵循Abp的文档,如果需要请自行配置为 false 来保持和 CAP 相同的习性 ## 配置使用 diff --git a/aspnet-core/modules/common/LINGYUN.Abp.EventBus.CAP/modules/common/LINGYUN.Abp.EventBus.CAP/LINGYUN.Abp.EventBus.CAP.xml b/aspnet-core/modules/common/LINGYUN.Abp.EventBus.CAP/modules/common/LINGYUN.Abp.EventBus.CAP/LINGYUN.Abp.EventBus.CAP.xml index c27f8e704..ef9cf30d9 100644 --- a/aspnet-core/modules/common/LINGYUN.Abp.EventBus.CAP/modules/common/LINGYUN.Abp.EventBus.CAP/LINGYUN.Abp.EventBus.CAP.xml +++ b/aspnet-core/modules/common/LINGYUN.Abp.EventBus.CAP/modules/common/LINGYUN.Abp.EventBus.CAP/LINGYUN.Abp.EventBus.CAP.xml @@ -9,6 +9,11 @@ 消费者查找器 + + + Abp Cap事件配置 + + Abp分布式事件配置 @@ -19,7 +24,7 @@ 服务提供者 - + Creates a new . @@ -129,6 +134,13 @@ 发布消息处理失败通知 + default: false + + + + + 事件名称定义在事件参数类型 + default: true diff --git a/aspnet-core/modules/tenants/LINGYUN.Abp.MultiTenancy.DbFinder/LINGYUN/Abp/MultiTenancy/DbFinder/EventBus/Distributed/TenantCreateEventHandler.cs b/aspnet-core/modules/tenants/LINGYUN.Abp.MultiTenancy.DbFinder/LINGYUN/Abp/MultiTenancy/DbFinder/EventBus/Distributed/TenantCreateEventHandler.cs index bb832aa11..70d01b380 100644 --- a/aspnet-core/modules/tenants/LINGYUN.Abp.MultiTenancy.DbFinder/LINGYUN/Abp/MultiTenancy/DbFinder/EventBus/Distributed/TenantCreateEventHandler.cs +++ b/aspnet-core/modules/tenants/LINGYUN.Abp.MultiTenancy.DbFinder/LINGYUN/Abp/MultiTenancy/DbFinder/EventBus/Distributed/TenantCreateEventHandler.cs @@ -5,6 +5,7 @@ using Volo.Abp.Caching; using Volo.Abp.Data; using Volo.Abp.DependencyInjection; using Volo.Abp.Domain.Entities.Events.Distributed; +using Volo.Abp.EventBus; using Volo.Abp.EventBus.Distributed; using Volo.Abp.MultiTenancy; using Volo.Abp.TenantManagement; @@ -12,6 +13,7 @@ using Volo.Abp.Uow; namespace LINGYUN.Abp.MultiTenancy.DbFinder.EventBus.Distributed { + [EventName("LINGYUN.Abp.MultiTenancy.DbFinder.Creator")] public class TenantCreateEventHandler : IDistributedEventHandler>, ITransientDependency { private readonly ILogger _logger; diff --git a/aspnet-core/modules/tenants/LINGYUN.Abp.MultiTenancy.DbFinder/LINGYUN/Abp/MultiTenancy/DbFinder/EventBus/Distributed/TenantDeleteEventHandler.cs b/aspnet-core/modules/tenants/LINGYUN.Abp.MultiTenancy.DbFinder/LINGYUN/Abp/MultiTenancy/DbFinder/EventBus/Distributed/TenantDeleteEventHandler.cs index 3d77fdad3..b41a9a884 100644 --- a/aspnet-core/modules/tenants/LINGYUN.Abp.MultiTenancy.DbFinder/LINGYUN/Abp/MultiTenancy/DbFinder/EventBus/Distributed/TenantDeleteEventHandler.cs +++ b/aspnet-core/modules/tenants/LINGYUN.Abp.MultiTenancy.DbFinder/LINGYUN/Abp/MultiTenancy/DbFinder/EventBus/Distributed/TenantDeleteEventHandler.cs @@ -2,11 +2,13 @@ using Volo.Abp.Caching; using Volo.Abp.DependencyInjection; using Volo.Abp.Domain.Entities.Events.Distributed; +using Volo.Abp.EventBus; using Volo.Abp.EventBus.Distributed; using Volo.Abp.TenantManagement; namespace LINGYUN.Abp.MultiTenancy.DbFinder.EventBus.Distributed { + [EventName("LINGYUN.Abp.MultiTenancy.DbFinder.Deletor")] public class TenantDeleteEventHandler : IDistributedEventHandler>, ITransientDependency { private readonly IDistributedCache _cache; diff --git a/aspnet-core/modules/tenants/LINGYUN.Abp.MultiTenancy.DbFinder/LINGYUN/Abp/MultiTenancy/DbFinder/EventBus/Distributed/TenantUpdateEventHandler.cs b/aspnet-core/modules/tenants/LINGYUN.Abp.MultiTenancy.DbFinder/LINGYUN/Abp/MultiTenancy/DbFinder/EventBus/Distributed/TenantUpdateEventHandler.cs index 86f0e7ddc..520432a6f 100644 --- a/aspnet-core/modules/tenants/LINGYUN.Abp.MultiTenancy.DbFinder/LINGYUN/Abp/MultiTenancy/DbFinder/EventBus/Distributed/TenantUpdateEventHandler.cs +++ b/aspnet-core/modules/tenants/LINGYUN.Abp.MultiTenancy.DbFinder/LINGYUN/Abp/MultiTenancy/DbFinder/EventBus/Distributed/TenantUpdateEventHandler.cs @@ -5,6 +5,7 @@ using Volo.Abp.Caching; using Volo.Abp.Data; using Volo.Abp.DependencyInjection; using Volo.Abp.Domain.Entities.Events.Distributed; +using Volo.Abp.EventBus; using Volo.Abp.EventBus.Distributed; using Volo.Abp.MultiTenancy; using Volo.Abp.TenantManagement; @@ -12,6 +13,7 @@ using Volo.Abp.Uow; namespace LINGYUN.Abp.MultiTenancy.DbFinder.EventBus.Distributed { + [EventName("LINGYUN.Abp.MultiTenancy.DbFinder.Updator")] public class TenantUpdateEventHandler : IDistributedEventHandler>, ITransientDependency { private readonly ILogger _logger; diff --git a/aspnet-core/modules/tenants/LINGYUN.Abp.MultiTenancy.RemoteService/LINGYUN/Abp/MultiTenancy/RemoteService/EventBus/Distributed/TenantCreateEventHandler.cs b/aspnet-core/modules/tenants/LINGYUN.Abp.MultiTenancy.RemoteService/LINGYUN/Abp/MultiTenancy/RemoteService/EventBus/Distributed/TenantCreateEventHandler.cs index 8b29c7971..701cc7214 100644 --- a/aspnet-core/modules/tenants/LINGYUN.Abp.MultiTenancy.RemoteService/LINGYUN/Abp/MultiTenancy/RemoteService/EventBus/Distributed/TenantCreateEventHandler.cs +++ b/aspnet-core/modules/tenants/LINGYUN.Abp.MultiTenancy.RemoteService/LINGYUN/Abp/MultiTenancy/RemoteService/EventBus/Distributed/TenantCreateEventHandler.cs @@ -4,11 +4,13 @@ using Volo.Abp.Caching; using Volo.Abp.Data; using Volo.Abp.DependencyInjection; using Volo.Abp.Domain.Entities.Events.Distributed; +using Volo.Abp.EventBus; using Volo.Abp.EventBus.Distributed; using Volo.Abp.TenantManagement; namespace LINGYUN.Abp.MultiTenancy.RemoteService.EventBus.Distributed { + [EventName("LINGYUN.Abp.MultiTenancy.RemoteService.Creator")] public class TenantCreateEventHandler : IDistributedEventHandler>, ITransientDependency { private readonly ITenantAppService _tenantAppService; diff --git a/aspnet-core/modules/tenants/LINGYUN.Abp.MultiTenancy.RemoteService/LINGYUN/Abp/MultiTenancy/RemoteService/EventBus/Distributed/TenantDeleteEventHandler.cs b/aspnet-core/modules/tenants/LINGYUN.Abp.MultiTenancy.RemoteService/LINGYUN/Abp/MultiTenancy/RemoteService/EventBus/Distributed/TenantDeleteEventHandler.cs index 0edee7cfc..304cfb771 100644 --- a/aspnet-core/modules/tenants/LINGYUN.Abp.MultiTenancy.RemoteService/LINGYUN/Abp/MultiTenancy/RemoteService/EventBus/Distributed/TenantDeleteEventHandler.cs +++ b/aspnet-core/modules/tenants/LINGYUN.Abp.MultiTenancy.RemoteService/LINGYUN/Abp/MultiTenancy/RemoteService/EventBus/Distributed/TenantDeleteEventHandler.cs @@ -2,11 +2,13 @@ using Volo.Abp.Caching; using Volo.Abp.DependencyInjection; using Volo.Abp.Domain.Entities.Events.Distributed; +using Volo.Abp.EventBus; using Volo.Abp.EventBus.Distributed; using Volo.Abp.TenantManagement; namespace LINGYUN.Abp.MultiTenancy.RemoteService.EventBus.Distributed { + [EventName("LINGYUN.Abp.MultiTenancy.RemoteService.Deletor")] public class TenantDeleteEventHandler : IDistributedEventHandler>, ITransientDependency { private readonly IDistributedCache _cache; diff --git a/aspnet-core/modules/tenants/LINGYUN.Abp.MultiTenancy.RemoteService/LINGYUN/Abp/MultiTenancy/RemoteService/EventBus/Distributed/TenantUpdateEventHandler.cs b/aspnet-core/modules/tenants/LINGYUN.Abp.MultiTenancy.RemoteService/LINGYUN/Abp/MultiTenancy/RemoteService/EventBus/Distributed/TenantUpdateEventHandler.cs index 2a052b0f0..93023b904 100644 --- a/aspnet-core/modules/tenants/LINGYUN.Abp.MultiTenancy.RemoteService/LINGYUN/Abp/MultiTenancy/RemoteService/EventBus/Distributed/TenantUpdateEventHandler.cs +++ b/aspnet-core/modules/tenants/LINGYUN.Abp.MultiTenancy.RemoteService/LINGYUN/Abp/MultiTenancy/RemoteService/EventBus/Distributed/TenantUpdateEventHandler.cs @@ -4,11 +4,13 @@ using Volo.Abp.Caching; using Volo.Abp.Data; using Volo.Abp.DependencyInjection; using Volo.Abp.Domain.Entities.Events.Distributed; +using Volo.Abp.EventBus; using Volo.Abp.EventBus.Distributed; using Volo.Abp.TenantManagement; namespace LINGYUN.Abp.MultiTenancy.RemoteService.EventBus.Distributed { + [EventName("LINGYUN.Abp.MultiTenancy.RemoteService.Updator")] public class TenantUpdateEventHandler : IDistributedEventHandler>, ITransientDependency { private readonly ITenantAppService _tenantAppService; diff --git a/aspnet-core/services/account/AuthServer.Host/EventBus/Handlers/TenantCreateEventHandler.cs b/aspnet-core/services/account/AuthServer.Host/EventBus/Handlers/TenantCreateEventHandler.cs index f1ef512c2..f66107ce8 100644 --- a/aspnet-core/services/account/AuthServer.Host/EventBus/Handlers/TenantCreateEventHandler.cs +++ b/aspnet-core/services/account/AuthServer.Host/EventBus/Handlers/TenantCreateEventHandler.cs @@ -4,6 +4,7 @@ using Microsoft.Extensions.Logging; using System; using System.Threading.Tasks; using Volo.Abp.DependencyInjection; +using Volo.Abp.EventBus; using Volo.Abp.EventBus.Distributed; using Volo.Abp.Guids; using Volo.Abp.Identity; @@ -14,6 +15,7 @@ using IdentityUser = Volo.Abp.Identity.IdentityUser; namespace AuthServer.Host.EventBus.Handlers { + [EventName("LINGYUN.Abp.Tenants.Admin.UserRoles.Creator")] public class TenantCreateEventHandler : IDistributedEventHandler, ITransientDependency { protected ILogger Logger { get; } diff --git a/aspnet-core/services/admin/LINGYUN.Abp.BackendAdmin.HttpApi.Host/EventBus/Handlers/TenantCreateEventHandler.cs b/aspnet-core/services/admin/LINGYUN.Abp.BackendAdmin.HttpApi.Host/EventBus/Handlers/TenantCreateEventHandler.cs index 4114471d0..cb4a3dfab 100644 --- a/aspnet-core/services/admin/LINGYUN.Abp.BackendAdmin.HttpApi.Host/EventBus/Handlers/TenantCreateEventHandler.cs +++ b/aspnet-core/services/admin/LINGYUN.Abp.BackendAdmin.HttpApi.Host/EventBus/Handlers/TenantCreateEventHandler.cs @@ -7,6 +7,7 @@ using System.Threading.Tasks; using Volo.Abp.Authorization.Permissions; using Volo.Abp.DependencyInjection; using Volo.Abp.Domain.Repositories; +using Volo.Abp.EventBus; using Volo.Abp.EventBus.Distributed; using Volo.Abp.Guids; using Volo.Abp.MultiTenancy; @@ -15,6 +16,7 @@ using Volo.Abp.Uow; namespace LINGYUN.Abp.BackendAdmin.EventBus.Handlers { + [EventName("LINGYUN.Abp.Tenants.Admin.Permissions.Creator")] public class TenantCreateEventHandler : IDistributedEventHandler, ITransientDependency { protected ICurrentTenant CurrentTenant { get; } diff --git a/aspnet-core/services/admin/LINGYUN.Abp.BackendAdmin.HttpApi.Host/EventBus/Handlers/TenantDeleteEventHandler.cs b/aspnet-core/services/admin/LINGYUN.Abp.BackendAdmin.HttpApi.Host/EventBus/Handlers/TenantDeleteEventHandler.cs index 3a120c7f1..35660b2dc 100644 --- a/aspnet-core/services/admin/LINGYUN.Abp.BackendAdmin.HttpApi.Host/EventBus/Handlers/TenantDeleteEventHandler.cs +++ b/aspnet-core/services/admin/LINGYUN.Abp.BackendAdmin.HttpApi.Host/EventBus/Handlers/TenantDeleteEventHandler.cs @@ -5,6 +5,7 @@ using System.Threading.Tasks; using Volo.Abp.DependencyInjection; using Volo.Abp.Domain.Entities.Events.Distributed; using Volo.Abp.Domain.Repositories; +using Volo.Abp.EventBus; using Volo.Abp.EventBus.Distributed; using Volo.Abp.Guids; using Volo.Abp.MultiTenancy; @@ -14,6 +15,7 @@ using Volo.Abp.Uow; namespace LINGYUN.Abp.BackendAdmin.EventBus.Handlers { + [EventName("LINGYUN.Abp.Tenants.Admin.Permissions.Deletor")] public class TenantDeleteEventHandler : IDistributedEventHandler>, ITransientDependency { protected ICurrentTenant CurrentTenant { get; } diff --git a/aspnet-core/services/apigateway/LINGYUN.ApiGateway.Host/EventBus/ApigatewayConfigChangeEventHandler.cs b/aspnet-core/services/apigateway/LINGYUN.ApiGateway.Host/EventBus/ApigatewayConfigChangeEventHandler.cs index 63b3513b6..9892e9489 100644 --- a/aspnet-core/services/apigateway/LINGYUN.ApiGateway.Host/EventBus/ApigatewayConfigChangeEventHandler.cs +++ b/aspnet-core/services/apigateway/LINGYUN.ApiGateway.Host/EventBus/ApigatewayConfigChangeEventHandler.cs @@ -5,10 +5,12 @@ using Ocelot.Configuration.Repository; using System.Linq; using System.Threading.Tasks; using Volo.Abp.DependencyInjection; +using Volo.Abp.EventBus; using Volo.Abp.EventBus.Distributed; namespace LINGYUN.ApiGateway.EventBus { + [EventName("LINGYUN.ApiGateway.ConfigChanged")] public class ApigatewayConfigChangeEventHandler : IDistributedEventHandler, ITransientDependency { protected ApiGatewayOptions Options { get; } diff --git a/aspnet-core/services/messages/LINGYUN.Abp.MessageService.HttpApi.Host/EventBus/Distributed/ChatMessageEventHandler.cs b/aspnet-core/services/messages/LINGYUN.Abp.MessageService.HttpApi.Host/EventBus/Distributed/ChatMessageEventHandler.cs index eeafa90a0..7178bd379 100644 --- a/aspnet-core/services/messages/LINGYUN.Abp.MessageService.HttpApi.Host/EventBus/Distributed/ChatMessageEventHandler.cs +++ b/aspnet-core/services/messages/LINGYUN.Abp.MessageService.HttpApi.Host/EventBus/Distributed/ChatMessageEventHandler.cs @@ -5,10 +5,12 @@ using Microsoft.Extensions.Logging.Abstractions; using Microsoft.Extensions.Options; using System.Threading.Tasks; using Volo.Abp.DependencyInjection; +using Volo.Abp.EventBus; using Volo.Abp.EventBus.Distributed; namespace LINGYUN.Abp.MessageService.EventBus.Distributed { + [EventName("LINGYUN.Abp.MessageService.ChatMessage.Sender")] public class ChatMessageEventHandler : IDistributedEventHandler, ITransientDependency { /// diff --git a/aspnet-core/services/messages/LINGYUN.Abp.MessageService.HttpApi.Host/EventBus/Distributed/NotificationEventHandler.cs b/aspnet-core/services/messages/LINGYUN.Abp.MessageService.HttpApi.Host/EventBus/Distributed/NotificationEventHandler.cs index 42c217b7e..d5315d6c5 100644 --- a/aspnet-core/services/messages/LINGYUN.Abp.MessageService.HttpApi.Host/EventBus/Distributed/NotificationEventHandler.cs +++ b/aspnet-core/services/messages/LINGYUN.Abp.MessageService.HttpApi.Host/EventBus/Distributed/NotificationEventHandler.cs @@ -9,6 +9,7 @@ using System.Linq; using System.Threading.Tasks; using Volo.Abp.BackgroundJobs; using Volo.Abp.DependencyInjection; +using Volo.Abp.EventBus; using Volo.Abp.EventBus.Distributed; using Volo.Abp.Json; using Volo.Abp.Uow; @@ -22,6 +23,7 @@ namespace LINGYUN.Abp.MessageService.EventBus.Distributed /// 作用在于SignalR客户端只会与一台服务器建立连接, /// 只有启用了SignlR服务端的才能真正将消息发布到客户端 /// + [EventName("LINGYUN.Abp.MessageService.Notifications.Sender")] public class NotificationEventHandler : IDistributedEventHandler, ITransientDependency { /// diff --git a/aspnet-core/services/messages/LINGYUN.Abp.MessageService.HttpApi.Host/EventBus/Distributed/TenantCreateEventHandler.cs b/aspnet-core/services/messages/LINGYUN.Abp.MessageService.HttpApi.Host/EventBus/Distributed/TenantCreateEventHandler.cs index ec1fa8927..7cf64e91c 100644 --- a/aspnet-core/services/messages/LINGYUN.Abp.MessageService.HttpApi.Host/EventBus/Distributed/TenantCreateEventHandler.cs +++ b/aspnet-core/services/messages/LINGYUN.Abp.MessageService.HttpApi.Host/EventBus/Distributed/TenantCreateEventHandler.cs @@ -7,6 +7,7 @@ using System; using System.Globalization; using System.Threading.Tasks; using Volo.Abp.DependencyInjection; +using Volo.Abp.EventBus; using Volo.Abp.EventBus.Distributed; using Volo.Abp.Localization; using Volo.Abp.MultiTenancy; @@ -14,6 +15,7 @@ using Volo.Abp.Settings; namespace LINGYUN.Abp.MessageService.EventBus.Distributed { + [EventName("LINGYUN.Abp.Tenants.MessageService.Creator")] public class TenantCreateEventHandler : IDistributedEventHandler, ITransientDependency { protected ILogger Logger { get; } diff --git a/aspnet-core/services/messages/LINGYUN.Abp.MessageService.HttpApi.Host/EventBus/Distributed/UserCreateEventHandler.cs b/aspnet-core/services/messages/LINGYUN.Abp.MessageService.HttpApi.Host/EventBus/Distributed/UserCreateEventHandler.cs index 2b7bbcdf4..d541811fc 100644 --- a/aspnet-core/services/messages/LINGYUN.Abp.MessageService.HttpApi.Host/EventBus/Distributed/UserCreateEventHandler.cs +++ b/aspnet-core/services/messages/LINGYUN.Abp.MessageService.HttpApi.Host/EventBus/Distributed/UserCreateEventHandler.cs @@ -2,12 +2,14 @@ using Volo.Abp.DependencyInjection; using Volo.Abp.Domain.Entities.Events; using Volo.Abp.Domain.Entities.Events.Distributed; +using Volo.Abp.EventBus; using Volo.Abp.EventBus.Distributed; using Volo.Abp.EventBus.Local; using Volo.Abp.Users; namespace LINGYUN.Abp.MessageService.EventBus.Distributed { + [EventName("LINGYUN.Abp.Users.MessageService.Creator")] public class UserCreateEventHandler : IDistributedEventHandler>, ITransientDependency { private readonly ILocalEventBus _localEventBus; diff --git a/aspnet-core/services/platform/LINGYUN.Platform.HttpApi.Host/EventBus/Handlers/TenantSynchronizer.cs b/aspnet-core/services/platform/LINGYUN.Platform.HttpApi.Host/EventBus/Handlers/TenantSynchronizer.cs index 32d60ac56..74401acaa 100644 --- a/aspnet-core/services/platform/LINGYUN.Platform.HttpApi.Host/EventBus/Handlers/TenantSynchronizer.cs +++ b/aspnet-core/services/platform/LINGYUN.Platform.HttpApi.Host/EventBus/Handlers/TenantSynchronizer.cs @@ -9,12 +9,14 @@ using System.Collections.Generic; using System.Threading.Tasks; using Volo.Abp.Data; using Volo.Abp.DependencyInjection; +using Volo.Abp.EventBus; using Volo.Abp.EventBus.Distributed; using Volo.Abp.Guids; using Volo.Abp.MultiTenancy; namespace LINGYUN.Platform.EventBus.Handlers { + [EventName("LINGYUN.Abp.Tenants.Platform.Creator")] public class TenantSynchronizer : IDistributedEventHandler, ITransientDependency diff --git a/aspnet-core/services/platform/LINGYUN.Platform.HttpApi.Host/LINGYUN.Platform.HttpApi.Host.csproj b/aspnet-core/services/platform/LINGYUN.Platform.HttpApi.Host/LINGYUN.Platform.HttpApi.Host.csproj index 9063ae65e..1ce680e67 100644 --- a/aspnet-core/services/platform/LINGYUN.Platform.HttpApi.Host/LINGYUN.Platform.HttpApi.Host.csproj +++ b/aspnet-core/services/platform/LINGYUN.Platform.HttpApi.Host/LINGYUN.Platform.HttpApi.Host.csproj @@ -60,6 +60,7 @@ + diff --git a/vueJs/.gitignore b/vueJs/.gitignore index 61d08b894..8f49ebdb8 100644 --- a/vueJs/.gitignore +++ b/vueJs/.gitignore @@ -15,6 +15,7 @@ yarn.lock .env.*.local # Log files +debug.log npm-debug.log* yarn-debug.log* yarn-error.log* diff --git a/vueJs/debug.log b/vueJs/debug.log deleted file mode 100644 index b0c773f37..000000000 --- a/vueJs/debug.log +++ /dev/null @@ -1,9 +0,0 @@ -[1209/172403.293:ERROR:directory_reader_win.cc(43)] FindFirstFile: ϵͳҲָ· (0x3) -[1210/084724.360:ERROR:directory_reader_win.cc(43)] FindFirstFile: ϵͳҲָ· (0x3) -[1211/094715.020:ERROR:directory_reader_win.cc(43)] FindFirstFile: ϵͳҲָ· (0x3) -[1219/155359.779:ERROR:directory_reader_win.cc(43)] FindFirstFile: ϵͳҲָ· (0x3) -[1220/155401.094:ERROR:directory_reader_win.cc(43)] FindFirstFile: ϵͳҲָ· (0x3) -[1221/155401.113:ERROR:directory_reader_win.cc(43)] FindFirstFile: ϵͳҲָ· (0x3) -[1222/155401.133:ERROR:directory_reader_win.cc(43)] FindFirstFile: ϵͳҲָ· (0x3) -[1223/145638.708:ERROR:filesystem_win.cc(148)] DeleteFile C:\Users\iVarKey\AppData\Local\Google\Chrome\User Data\Crashpad\reports\0106539b-a680-4c00-8e38-5a7a621345b9.dmp: һʹôļ޷ʡ (0x20) -[1225/102752.308:ERROR:directory_reader_win.cc(43)] FindFirstFile: ϵͳҲָ· (0x3)