Browse Source

Merge pull request #171 from colinin/4.0

Added an optional configuration item for event name resolution
pull/177/head
cKey 5 years ago
committed by GitHub
parent
commit
150ca29346
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 10
      aspnet-core/LINGYUN.MicroService.Platform.sln
  2. 16
      aspnet-core/modules/common/LINGYUN.Abp.EventBus.CAP/DotNetCore/CAP/ConsumerServiceSelector.cs
  3. 14
      aspnet-core/modules/common/LINGYUN.Abp.EventBus.CAP/LINGYUN.Abp.EventBus.CAP.xml
  4. 8
      aspnet-core/modules/common/LINGYUN.Abp.EventBus.CAP/LINGYUN/Abp/EventBus/CAP/AbpCAPEventBusOptions.cs
  5. 22
      aspnet-core/modules/common/LINGYUN.Abp.EventBus.CAP/LINGYUN/Abp/EventBus/CAP/CustomDistributedEventSubscriber.cs
  6. 11
      aspnet-core/modules/common/LINGYUN.Abp.EventBus.CAP/README.md
  7. 14
      aspnet-core/modules/common/LINGYUN.Abp.EventBus.CAP/modules/common/LINGYUN.Abp.EventBus.CAP/LINGYUN.Abp.EventBus.CAP.xml
  8. 2
      aspnet-core/modules/tenants/LINGYUN.Abp.MultiTenancy.DbFinder/LINGYUN/Abp/MultiTenancy/DbFinder/EventBus/Distributed/TenantCreateEventHandler.cs
  9. 2
      aspnet-core/modules/tenants/LINGYUN.Abp.MultiTenancy.DbFinder/LINGYUN/Abp/MultiTenancy/DbFinder/EventBus/Distributed/TenantDeleteEventHandler.cs
  10. 2
      aspnet-core/modules/tenants/LINGYUN.Abp.MultiTenancy.DbFinder/LINGYUN/Abp/MultiTenancy/DbFinder/EventBus/Distributed/TenantUpdateEventHandler.cs
  11. 2
      aspnet-core/modules/tenants/LINGYUN.Abp.MultiTenancy.RemoteService/LINGYUN/Abp/MultiTenancy/RemoteService/EventBus/Distributed/TenantCreateEventHandler.cs
  12. 2
      aspnet-core/modules/tenants/LINGYUN.Abp.MultiTenancy.RemoteService/LINGYUN/Abp/MultiTenancy/RemoteService/EventBus/Distributed/TenantDeleteEventHandler.cs
  13. 2
      aspnet-core/modules/tenants/LINGYUN.Abp.MultiTenancy.RemoteService/LINGYUN/Abp/MultiTenancy/RemoteService/EventBus/Distributed/TenantUpdateEventHandler.cs
  14. 2
      aspnet-core/services/account/AuthServer.Host/EventBus/Handlers/TenantCreateEventHandler.cs
  15. 2
      aspnet-core/services/admin/LINGYUN.Abp.BackendAdmin.HttpApi.Host/EventBus/Handlers/TenantCreateEventHandler.cs
  16. 2
      aspnet-core/services/admin/LINGYUN.Abp.BackendAdmin.HttpApi.Host/EventBus/Handlers/TenantDeleteEventHandler.cs
  17. 2
      aspnet-core/services/apigateway/LINGYUN.ApiGateway.Host/EventBus/ApigatewayConfigChangeEventHandler.cs
  18. 2
      aspnet-core/services/messages/LINGYUN.Abp.MessageService.HttpApi.Host/EventBus/Distributed/ChatMessageEventHandler.cs
  19. 2
      aspnet-core/services/messages/LINGYUN.Abp.MessageService.HttpApi.Host/EventBus/Distributed/NotificationEventHandler.cs
  20. 2
      aspnet-core/services/messages/LINGYUN.Abp.MessageService.HttpApi.Host/EventBus/Distributed/TenantCreateEventHandler.cs
  21. 2
      aspnet-core/services/messages/LINGYUN.Abp.MessageService.HttpApi.Host/EventBus/Distributed/UserCreateEventHandler.cs
  22. 2
      aspnet-core/services/platform/LINGYUN.Platform.HttpApi.Host/EventBus/Handlers/TenantSynchronizer.cs
  23. 1
      aspnet-core/services/platform/LINGYUN.Platform.HttpApi.Host/LINGYUN.Platform.HttpApi.Host.csproj
  24. 1
      vueJs/.gitignore
  25. 9
      vueJs/debug.log

10
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}

16
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
{
/// <summary>
/// Abp Cap事件配置
/// </summary>
protected AbpCAPEventBusOptions AbpCAPEventBusOptions { get; }
/// <summary>
/// Abp分布式事件配置
/// </summary>
@ -31,9 +36,13 @@ namespace DotNetCore.CAP
/// <summary>
/// Creates a new <see cref="T:DotNetCore.CAP.Internal.ConsumerServiceSelector" />.
/// </summary>
public ConsumerServiceSelector(IServiceProvider serviceProvider, IOptions<AbpDistributedEventBusOptions> distributedEventBusOptions) : base(serviceProvider)
public ConsumerServiceSelector(
IServiceProvider serviceProvider,
IOptions<AbpCAPEventBusOptions> capEventBusOptions,
IOptions<AbpDistributedEventBusOptions> distributedEventBusOptions) : base(serviceProvider)
{
ServiceProvider = serviceProvider;
AbpCAPEventBusOptions = capEventBusOptions.Value;
AbpDistributedEventBusOptions = distributedEventBusOptions.Value;
}
/// <summary>
@ -83,7 +92,10 @@ namespace DotNetCore.CAP
nameof(IDistributedEventHandler<object>.HandleEventAsync),
new[] { eventType }
);
var eventName = EventNameAttribute.GetNameOrDefault(eventType);
// TODO: 事件名称定义在事件参数类型,就无法创建多个订阅者类了,增加可选配置,让用户决定事件名称定义在哪里
var eventName = AbpCAPEventBusOptions.NameInEventDataType
? EventNameAttribute.GetNameOrDefault(eventType)
: EventNameAttribute.GetNameOrDefault(typeInfo);
var topicAttr = method.GetCustomAttributes<TopicAttribute>(true);
var topicAttributes = topicAttr.ToList();

14
aspnet-core/modules/common/LINGYUN.Abp.EventBus.CAP/LINGYUN.Abp.EventBus.CAP.xml

@ -9,6 +9,11 @@
消费者查找器
</summary>
</member>
<member name="P:DotNetCore.CAP.ConsumerServiceSelector.AbpCAPEventBusOptions">
<summary>
Abp Cap事件配置
</summary>
</member>
<member name="P:DotNetCore.CAP.ConsumerServiceSelector.AbpDistributedEventBusOptions">
<summary>
Abp分布式事件配置
@ -19,7 +24,7 @@
服务提供者
</summary>
</member>
<member name="M:DotNetCore.CAP.ConsumerServiceSelector.#ctor(System.IServiceProvider,Microsoft.Extensions.Options.IOptions{Volo.Abp.EventBus.Distributed.AbpDistributedEventBusOptions})">
<member name="M:DotNetCore.CAP.ConsumerServiceSelector.#ctor(System.IServiceProvider,Microsoft.Extensions.Options.IOptions{LINGYUN.Abp.EventBus.CAP.AbpCAPEventBusOptions},Microsoft.Extensions.Options.IOptions{Volo.Abp.EventBus.Distributed.AbpDistributedEventBusOptions})">
<summary>
Creates a new <see cref="T:DotNetCore.CAP.Internal.ConsumerServiceSelector" />.
</summary>
@ -129,6 +134,13 @@
<member name="P:LINGYUN.Abp.EventBus.CAP.AbpCAPEventBusOptions.NotifyFailedCallback">
<summary>
发布消息处理失败通知
default: false
</summary>
</member>
<member name="P:LINGYUN.Abp.EventBus.CAP.AbpCAPEventBusOptions.NameInEventDataType">
<summary>
事件名称定义在事件参数类型
default: true
</summary>
</member>
<member name="P:LINGYUN.Abp.EventBus.CAP.AbpCAPEventBusOptions.CleanUpExpiresMessageBatch">

8
aspnet-core/modules/common/LINGYUN.Abp.EventBus.CAP/LINGYUN/Abp/EventBus/CAP/AbpCAPEventBusOptions.cs

@ -7,9 +7,15 @@
{
/// <summary>
/// 发布消息处理失败通知
/// default: false
/// </summary>
public bool NotifyFailedCallback { get; set; } = false;
/// <summary>
/// 事件名称定义在事件参数类型
/// default: true
/// </summary>
public bool NameInEventDataType { get; set; } = true;
/// <summary>
/// 批量清理数量
/// default: 1000
/// </summary>
@ -18,6 +24,6 @@
/// 执行间隔(ms)
/// default: 3600000 (1 hours)
/// </summary>
public int CleanUpExpiresMessageInterval { get; set; } = 3600000;
public int CleanUpExpiresMessageInterval { get; set; } = 360_0000;
}
}

22
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<Type, List<IEventHandlerFactory>> HandlerFactories { get; }
protected ConcurrentDictionary<string, CancellationTokenSource> EventStopingTokens { get; }
public CustomDistributedEventSubscriber(
IOptions<CapOptions> options,
IOptions<CapOptions> capOptions,
IOptions<AbpCAPEventBusOptions> capEventBusOptions,
IConsumerClientFactory consumerClientFactory)
{
CapOptions = options.Value;
CapOptions = capOptions.Value;
CAPEventBusOptions = capEventBusOptions.Value;
ConsumerClientFactory = consumerClientFactory;
HandlerFactories = new ConcurrentDictionary<Type, List<IEventHandlerFactory>>();
@ -82,7 +84,9 @@ namespace LINGYUN.Abp.EventBus.CAP
nameof(IDistributedEventHandler<object>.HandleEventAsync),
new[] { eventType }
);
var eventName = EventNameAttribute.GetNameOrDefault(eventType);
var eventName = CAPEventBusOptions.NameInEventDataType
? EventNameAttribute.GetNameOrDefault(eventType)
: EventNameAttribute.GetNameOrDefault(typeInfo);
var topicAttr = method.GetCustomAttributes<TopicAttribute>(true);
var topicAttributes = topicAttr.ToList();

11
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 相同的习性
## 配置使用

14
aspnet-core/modules/common/LINGYUN.Abp.EventBus.CAP/modules/common/LINGYUN.Abp.EventBus.CAP/LINGYUN.Abp.EventBus.CAP.xml

@ -9,6 +9,11 @@
消费者查找器
</summary>
</member>
<member name="P:DotNetCore.CAP.ConsumerServiceSelector.AbpCAPEventBusOptions">
<summary>
Abp Cap事件配置
</summary>
</member>
<member name="P:DotNetCore.CAP.ConsumerServiceSelector.AbpDistributedEventBusOptions">
<summary>
Abp分布式事件配置
@ -19,7 +24,7 @@
服务提供者
</summary>
</member>
<member name="M:DotNetCore.CAP.ConsumerServiceSelector.#ctor(System.IServiceProvider,Microsoft.Extensions.Options.IOptions{Volo.Abp.EventBus.Distributed.AbpDistributedEventBusOptions})">
<member name="M:DotNetCore.CAP.ConsumerServiceSelector.#ctor(System.IServiceProvider,Microsoft.Extensions.Options.IOptions{LINGYUN.Abp.EventBus.CAP.AbpCAPEventBusOptions},Microsoft.Extensions.Options.IOptions{Volo.Abp.EventBus.Distributed.AbpDistributedEventBusOptions})">
<summary>
Creates a new <see cref="T:DotNetCore.CAP.Internal.ConsumerServiceSelector" />.
</summary>
@ -129,6 +134,13 @@
<member name="P:LINGYUN.Abp.EventBus.CAP.AbpCAPEventBusOptions.NotifyFailedCallback">
<summary>
发布消息处理失败通知
default: false
</summary>
</member>
<member name="P:LINGYUN.Abp.EventBus.CAP.AbpCAPEventBusOptions.NameInEventDataType">
<summary>
事件名称定义在事件参数类型
default: true
</summary>
</member>
<member name="P:LINGYUN.Abp.EventBus.CAP.AbpCAPEventBusOptions.CleanUpExpiresMessageBatch">

2
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<EntityCreatedEto<TenantEto>>, ITransientDependency
{
private readonly ILogger<TenantCreateEventHandler> _logger;

2
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<EntityDeletedEto<TenantEto>>, ITransientDependency
{
private readonly IDistributedCache<TenantConfigurationCacheItem> _cache;

2
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<EntityUpdatedEto<TenantEto>>, ITransientDependency
{
private readonly ILogger<TenantUpdateEventHandler> _logger;

2
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<EntityCreatedEto<TenantEto>>, ITransientDependency
{
private readonly ITenantAppService _tenantAppService;

2
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<EntityDeletedEto<TenantEto>>, ITransientDependency
{
private readonly IDistributedCache<TenantConfigurationCacheItem> _cache;

2
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<EntityUpdatedEto<TenantEto>>, ITransientDependency
{
private readonly ITenantAppService _tenantAppService;

2
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<CreateEventData>, ITransientDependency
{
protected ILogger<TenantCreateEventHandler> Logger { get; }

2
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<CreateEventData>, ITransientDependency
{
protected ICurrentTenant CurrentTenant { get; }

2
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<EntityDeletedEto<TenantEto>>, ITransientDependency
{
protected ICurrentTenant CurrentTenant { get; }

2
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<ApigatewayConfigChangeEventData>, ITransientDependency
{
protected ApiGatewayOptions Options { get; }

2
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<ChatMessage>, ITransientDependency
{
/// <summary>

2
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服务端的才能真正将消息发布到客户端
/// </remarks>
[EventName("LINGYUN.Abp.MessageService.Notifications.Sender")]
public class NotificationEventHandler : IDistributedEventHandler<NotificationEventData>, ITransientDependency
{
/// <summary>

2
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<CreateEventData>, ITransientDependency
{
protected ILogger<TenantCreateEventHandler> Logger { get; }

2
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<EntityCreatedEto<UserEto>>, ITransientDependency
{
private readonly ILocalEventBus _localEventBus;

2
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<CreateEventData>,
ITransientDependency

1
aspnet-core/services/platform/LINGYUN.Platform.HttpApi.Host/LINGYUN.Platform.HttpApi.Host.csproj

@ -60,6 +60,7 @@
<ProjectReference Include="..\..\..\modules\platform\LINGYUN.Platform.EntityFrameworkCore\LINGYUN.Platform.EntityFrameworkCore.csproj" />
<ProjectReference Include="..\..\..\modules\platform\LINGYUN.Platform.HttpApi\LINGYUN.Platform.HttpApi.csproj" />
<ProjectReference Include="..\..\..\modules\tenants\LINGYUN.Abp.MultiTenancy.DbFinder\LINGYUN.Abp.MultiTenancy.DbFinder.csproj" />
<ProjectReference Include="..\..\..\modules\tenants\LINGYUN.Abp.MultiTenancy\LINGYUN.Abp.MultiTenancy.csproj" />
</ItemGroup>
</Project>

1
vueJs/.gitignore

@ -15,6 +15,7 @@ yarn.lock
.env.*.local
# Log files
debug.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*

9
vueJs/debug.log

@ -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)
Loading…
Cancel
Save