通过邮箱获取用户信息
parent
5a2136f205
commit
8356fff9ce
|
|
@ -521,6 +521,20 @@ namespace IRaCIS.Core.Application.Service
|
|||
}
|
||||
|
||||
|
||||
public async Task<UserDetailDTO?> GetUserByEmail(string email)
|
||||
{
|
||||
|
||||
|
||||
var user = await _identityUserRepository.Where(t => t.EMail == email).ProjectTo<UserDetailDTO>(_mapper.ConfigurationProvider).FirstOrDefaultAsync();
|
||||
|
||||
if (user != null)
|
||||
{
|
||||
user.AccountList = await _userRoleRepository.Where(t => t.IdentityUserId == user.Id).ProjectTo<UserAccountInfo>(_mapper.ConfigurationProvider).OrderBy(t => t.UserTypeShortName).ToListAsync();
|
||||
|
||||
}
|
||||
return user;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/// <summary>
|
||||
|
|
|
|||
Loading…
Reference in New Issue