修改 自动退出用户

This commit is contained in:
2024-04-17 12:20:01 +08:00
parent fc579d9cf4
commit 7bf097c127
2 changed files with 19 additions and 8 deletions
@@ -15,6 +15,7 @@ using Medallion.Threading;
using EasyCaching.Core;
using IRaCIS.Core.Application.Contracts;
using LoginReturnDTO = IRaCIS.Application.Contracts.LoginReturnDTO;
using OfficeOpenXml.FormulaParsing.Utilities;
namespace IRaCIS.Application.Services
{
@@ -691,10 +692,14 @@ namespace IRaCIS.Application.Services
userLoginReturnModel.BasicInfo = loginUser;
// 登录 清除缓存
_cache.Remove(userLoginReturnModel.BasicInfo.Id.ToString());
// 登录 清除缓存
//_cache.Remove(userLoginReturnModel.BasicInfo.Id.ToString());
var userId = loginUser.Id;
await _cache.SetAsync($"{userId.ToString()}_Online", DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"), TimeSpan.FromMinutes(_verifyConfig.CurrentValue.AutoLoginOutMinutes));
return ResponseOutput.Ok(userLoginReturnModel);
}