From dcddf88a66f5c134612f4e93e658de7576ed1c86 Mon Sep 17 00:00:00 2001 From: hang <872297557@qq.com> Date: Thu, 27 Mar 2025 17:31:01 +0800 Subject: [PATCH] =?UTF-8?q?getUser=20=E8=BF=94=E5=9B=9E=E8=B4=A6=E6=88=B7?= =?UTF-8?q?=E4=BF=A1=E6=81=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Service/Management/DTO/UserModel.cs | 3 +++ .../Service/Management/UserService.cs | 11 ++++++++--- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/IRaCIS.Core.Application/Service/Management/DTO/UserModel.cs b/IRaCIS.Core.Application/Service/Management/DTO/UserModel.cs index 5801402e4..5bc5d1afe 100644 --- a/IRaCIS.Core.Application/Service/Management/DTO/UserModel.cs +++ b/IRaCIS.Core.Application/Service/Management/DTO/UserModel.cs @@ -140,6 +140,9 @@ namespace IRaCIS.Application.Contracts public class UserDetailDTO : UserInfo { public bool CanEditUserType { get; set; } + + public bool IsMutiAccount => AccountList?.Count > 1; + public List AccountList { get; set; } } public class UserInfo diff --git a/IRaCIS.Core.Application/Service/Management/UserService.cs b/IRaCIS.Core.Application/Service/Management/UserService.cs index d5e7354b0..9bd8fc53c 100644 --- a/IRaCIS.Core.Application/Service/Management/UserService.cs +++ b/IRaCIS.Core.Application/Service/Management/UserService.cs @@ -410,7 +410,12 @@ namespace IRaCIS.Core.Application.Service public async Task GetUser(Guid id) { var userQuery = _userRepository.Where(t => t.Id == id).ProjectTo(_mapper.ConfigurationProvider); - return await (userQuery.FirstOrDefaultAsync()).IfNullThrowException(); + var result = await (userQuery.FirstOrDefaultAsync()).IfNullThrowException(); + + result.AccountList = _userRepository.Where(t => t.EMail == result.EMail && t.UserTypeEnum != UserTypeEnum.SuperAdmin) + .ProjectTo(_mapper.ConfigurationProvider).ToList(); + + return result; } /// @@ -627,11 +632,11 @@ namespace IRaCIS.Core.Application.Service //public async Task> HospitalUserLogin(string token) //{ - // //同济医院token 地址:http://192.168.40.88:8080 + // //同济医院token 地址:http://192.168.40.88:8080 appid:third-hirs // //本地测试地址接口 - // //RestClientAPI.PostAsync<> + // RestClientAPI.PostAsync<> //}