feat:让程序能够跑起来

This commit is contained in:
橙子
2023-04-15 12:19:02 +08:00
parent b9dad93c9d
commit 543c13d94b
15 changed files with 500 additions and 40 deletions

View File

@@ -9,16 +9,17 @@ using Yi.Furion.Rbac.Core.Etos;
namespace Yi.Furion.Rbac.Application.System.Event
{
public class LoginEventHandler : IEventSubscriber, ISingleton
public class LoginEventHandler : IEventSubscriber,ISingleton
{
private readonly IRepository<LoginLogEntity> _loginLogRepository;
private readonly HttpContext _httpContext;
private readonly IHttpContextAccessor _httpContextAccessor;
private HttpContext _httpContext=> _httpContextAccessor.HttpContext;
public LoginEventHandler(IRepository<LoginLogEntity> loginLogRepository, IHttpContextAccessor httpContextAccessor)
{
_loginLogRepository = loginLogRepository;
_httpContext = httpContextAccessor.HttpContext;
_httpContextAccessor = httpContextAccessor;
}
[EventSubscribe(nameof(LoginEventSource))]
//[EventSubscribe(nameof(LoginEventSource))]
public Task HandlerAsync(EventHandlerExecutingContext context)
{
var eventData=(LoginEventArgs)context.Source.Payload;