修改获取账户信息
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/push Build is passing
Details
parent
613957d0ac
commit
230852b2a9
|
@ -2249,6 +2249,13 @@
|
|||
<param name="inQuery"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:IRaCIS.Core.Application.Service.UserService.GetUser(System.Guid)">
|
||||
<summary>
|
||||
根据用户Id获取用户详细信息[New]
|
||||
</summary>
|
||||
<param name="userId"></param>
|
||||
<returns></returns>xiuga
|
||||
</member>
|
||||
<member name="M:IRaCIS.Core.Application.Service.UserService.AddUser(IRaCIS.Application.Contracts.UserCommand)">
|
||||
<summary>
|
||||
添加用户
|
||||
|
|
|
@ -158,7 +158,11 @@ namespace IRaCIS.Application.Contracts
|
|||
|
||||
public class UserDetailDTO : UserInfo
|
||||
{
|
||||
public bool CanEditUserType { get; set; }
|
||||
//public bool CanEditUserType { get; set; }
|
||||
|
||||
public Guid IdentityUserId { get; set; }
|
||||
|
||||
public List<UserAccountInfo> AccountList { get; set; }
|
||||
}
|
||||
|
||||
public class UserInfo
|
||||
|
|
|
@ -506,17 +506,21 @@ namespace IRaCIS.Core.Application.Service
|
|||
|
||||
}
|
||||
|
||||
///// <summary>
|
||||
///// 根据用户Id获取用户详细信息[New]
|
||||
///// </summary>
|
||||
///// <param name="id"></param>
|
||||
///// <returns></returns>xiuga
|
||||
//[HttpGet("{id:guid}")]
|
||||
//public async Task<UserDetailDTO> GetUser(Guid id)
|
||||
//{
|
||||
// var userQuery = _userRepository.Where(t => t.Id == id).ProjectTo<UserDetailDTO>(_mapper.ConfigurationProvider);
|
||||
// return await (userQuery.FirstOrDefaultAsync()).IfNullThrowException();
|
||||
//}
|
||||
/// <summary>
|
||||
/// 根据用户Id获取用户详细信息[New]
|
||||
/// </summary>
|
||||
/// <param name="userId"></param>
|
||||
/// <returns></returns>xiuga
|
||||
[HttpGet("{userId:guid}")]
|
||||
public async Task<UserDetailDTO> GetUser(Guid userId)
|
||||
{
|
||||
var userQuery = _userRepository.Where(t => t.Id == userId).ProjectTo<UserDetailDTO>(_mapper.ConfigurationProvider);
|
||||
|
||||
var userRole = await userQuery.FirstOrDefaultAsync();
|
||||
|
||||
userRole.AccountList = await _userRepository.Where(t => t.IdentityUserId == userRole.IdentityUserId).ProjectTo<UserAccountInfo>(_mapper.ConfigurationProvider).ToListAsync();
|
||||
return userRole;
|
||||
}
|
||||
|
||||
///// <summary>
|
||||
///// 删除用户
|
||||
|
|
|
@ -87,7 +87,9 @@ namespace IRaCIS.Core.Application.Service
|
|||
// .ForMember(d => d.UserType, u => u.MapFrom(s => s.UserTypeRole.UserTypeShortName))
|
||||
// .ForMember(d => d.CanEditUserType, u => u.MapFrom(s => !s.UserTrials.Any()));
|
||||
|
||||
var token = string.Empty;
|
||||
CreateMap<User, UserDetailDTO>();
|
||||
|
||||
var token = string.Empty;
|
||||
var userId = Guid.Empty;
|
||||
CreateMap<SystemNotice, SystemNoticeView>()
|
||||
.ForMember(t => t.PublishUserName, d => d.MapFrom(t => t.PublishedUser.UserName))
|
||||
|
|
Loading…
Reference in New Issue