getUser 返回账户信息
continuous-integration/drone/push Build is passing Details

Test_HIR_Net8
hang 2025-03-27 17:31:01 +08:00
parent 89574e05bc
commit dcddf88a66
2 changed files with 11 additions and 3 deletions

View File

@ -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<UserAccountInfo> AccountList { get; set; }
}
public class UserInfo

View File

@ -410,7 +410,12 @@ namespace IRaCIS.Core.Application.Service
public async Task<UserDetailDTO> GetUser(Guid id)
{
var userQuery = _userRepository.Where(t => t.Id == id).ProjectTo<UserDetailDTO>(_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<UserAccountInfo>(_mapper.ConfigurationProvider).ToList();
return result;
}
/// <summary>
@ -627,11 +632,11 @@ namespace IRaCIS.Core.Application.Service
//public async Task<IResponseOutput<LoginReturnDTO>> HospitalUserLogin(string token)
//{
// //同济医院token 地址http://192.168.40.88:8080
// //同济医院token 地址http://192.168.40.88:8080 appid:third-hirs
// //本地测试地址接口
// //RestClientAPI.PostAsync<>
// RestClientAPI.PostAsync<>
//}