修改登出bug
continuous-integration/drone/push Build is passing Details

Test_HIR_Net8
hang 2025-09-11 17:46:03 +08:00
parent 32ca60156e
commit 9386b89110
1 changed files with 8 additions and 3 deletions

View File

@ -491,7 +491,7 @@ namespace IRaCIS.Core.Application.Service
.WhereIf(_userInfo.UserTypeEnumInt == (int)UserTypeEnum.OA, t => !t.UserRoleList.Any(t => t.UserTypeEnum == UserTypeEnum.Admin || t.UserTypeEnum == UserTypeEnum.SuperAdmin))
//GA 只能看有该课题组的用户并且不是admin oa
.WhereIf(_userInfo.UserTypeEnumInt == (int)UserTypeEnum.GA,
.WhereIf(_userInfo.UserTypeEnumInt == (int)UserTypeEnum.GA,
t => /*!t.UserRoleList.Any(t => t.UserTypeEnum == UserTypeEnum.Admin || t.UserTypeEnum == UserTypeEnum.SuperAdmin || t.UserTypeEnum == UserTypeEnum.OA) &&*/
t.IdentityUserHospitalGroupList.Any(t => isGAGroupAdmin ? hospitalGroupAdminIdList.Contains(t.HospitalGroupId) : false))
@ -1044,9 +1044,14 @@ namespace IRaCIS.Core.Application.Service
{
await _fusionCache.RemoveAsync(CacheKeys.UserToken(identityUserId));
var userName = await _userRoleRepository.Where(t => t.Id == userRoleId).Select(t => t.UserName).FirstOrDefaultAsync();
var userName = await _identityUserRepository.Where(t => t.Id == identityUserId).Select(t => t.UserName).FirstOrDefaultAsync();
if (userName.IsNotNullOrEmpty())
{
await _userLogRepository.AddAsync(new UserLog() { IP = _userInfo.IP, ActionIdentityUserId = identityUserId, ActionUserName = userName, OptType = UserOptType.LoginOut }, true);
}
await _userLogRepository.AddAsync(new UserLog() { IP = _userInfo.IP, ActionIdentityUserId = identityUserId, ActionUserName = userName, OptType = UserOptType.LoginOut }, true);
return ResponseOutput.Ok();
}