|
|
@ -1,10 +1,4 @@ |
|
|
using System.Threading.Tasks; |
|
|
namespace LINGYUN.Abp.Identity.Session; |
|
|
using Volo.Abp.DependencyInjection; |
|
|
|
|
|
using Volo.Abp.Domain.Entities.Events.Distributed; |
|
|
|
|
|
using Volo.Abp.EventBus.Distributed; |
|
|
|
|
|
using Volo.Abp.Uow; |
|
|
|
|
|
|
|
|
|
|
|
namespace LINGYUN.Abp.Identity.Session; |
|
|
|
|
|
|
|
|
|
|
|
public class IdentitySessionUserInactiveSynchronizer : |
|
|
public class IdentitySessionUserInactiveSynchronizer : |
|
|
IDistributedEventHandler<EntityCreatedEto<IdentitySessionEto>>, |
|
|
IDistributedEventHandler<EntityCreatedEto<IdentitySessionEto>>, |
|
|
@ -21,7 +15,7 @@ public class IdentitySessionUserInactiveSynchronizer : |
|
|
public async virtual Task HandleEventAsync(EntityCreatedEto<IdentitySessionEto> eventData) |
|
|
public async virtual Task HandleEventAsync(EntityCreatedEto<IdentitySessionEto> eventData) |
|
|
{ |
|
|
{ |
|
|
var userInactive = await _identityUserInactiveRepository.FindByUserIdAsync(eventData.Entity.UserId); |
|
|
var userInactive = await _identityUserInactiveRepository.FindByUserIdAsync(eventData.Entity.UserId); |
|
|
if (userInactive == null) |
|
|
if (userInactive != null) |
|
|
{ |
|
|
{ |
|
|
await _identityUserInactiveRepository.DeleteAsync(userInactive); |
|
|
await _identityUserInactiveRepository.DeleteAsync(userInactive); |
|
|
} |
|
|
} |
|
|
|