From 686c7bac9b006ef8f7d9347f61495c797b90c926 Mon Sep 17 00:00:00 2001
From: hang <872297557@qq.com>
Date: Mon, 23 Dec 2024 17:49:25 +0800
Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E8=B4=A6=E6=88=B7=E4=BF=A1?=
=?UTF-8?q?=E6=81=AF?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../IRaCIS.Core.Application.xml | 3 +--
.../Service/Management/UserService.cs | 17 +++++++++--------
2 files changed, 10 insertions(+), 10 deletions(-)
diff --git a/IRaCIS.Core.Application/IRaCIS.Core.Application.xml b/IRaCIS.Core.Application/IRaCIS.Core.Application.xml
index 35de76d6f..d1e2ce5c1 100644
--- a/IRaCIS.Core.Application/IRaCIS.Core.Application.xml
+++ b/IRaCIS.Core.Application/IRaCIS.Core.Application.xml
@@ -2249,11 +2249,10 @@
-
+
根据用户Id获取用户详细信息[New]
-
xiuga
diff --git a/IRaCIS.Core.Application/Service/Management/UserService.cs b/IRaCIS.Core.Application/Service/Management/UserService.cs
index 721cb148a..8972ea053 100644
--- a/IRaCIS.Core.Application/Service/Management/UserService.cs
+++ b/IRaCIS.Core.Application/Service/Management/UserService.cs
@@ -509,16 +509,16 @@ namespace IRaCIS.Core.Application.Service
///
/// 根据用户Id获取用户详细信息[New]
///
- ///
/// xiuga
- [HttpGet("{userId:guid}")]
- public async Task GetUser(Guid userId)
+
+ public async Task GetUser()
{
- var userQuery = _userRepository.Where(t => t.Id == userId).ProjectTo(_mapper.ConfigurationProvider);
+ var userQuery = _userRepository.Where(t => t.IdentityUserId == _userInfo.IdentityUserId).ProjectTo(_mapper.ConfigurationProvider);
var userRole = await userQuery.FirstOrDefaultAsync();
- userRole.AccountList = await _userRepository.Where(t => t.IdentityUserId == userRole.IdentityUserId).ProjectTo(_mapper.ConfigurationProvider).ToListAsync();
+ userRole.AccountList = await _userRepository.Where(t => t.IdentityUserId == _userInfo.IdentityUserId).ProjectTo(_mapper.ConfigurationProvider).ToListAsync();
+
return userRole;
}
@@ -912,10 +912,11 @@ namespace IRaCIS.Core.Application.Service
[AllowAnonymous]
[HttpGet]
- public async Task LoginOut(Guid userId)
+ public async Task LoginOut(Guid identityUserId)
{
- await _fusionCache.RemoveAsync(CacheKeys.UserToken(_userInfo.IdentityUserId));
- await _userLogRepository.AddAsync(new UserLog() { IP = _userInfo.IP, LoginUserId = userId, OptUserId = _userInfo.Id, OptType = UserOptType.LoginOut }, true);
+ await _fusionCache.RemoveAsync(CacheKeys.UserToken(identityUserId));
+
+ //await _userLogRepository.AddAsync(new UserLog() { IP = _userInfo.IP, LoginUserId = userId, OptUserId = _userInfo.Id, OptType = UserOptType.LoginOut }, true);
return ResponseOutput.Ok();
}