From 8356fff9ce1d8f29b63ff8735645833acb76a5a9 Mon Sep 17 00:00:00 2001 From: hang <872297557@qq.com> Date: Wed, 17 Sep 2025 14:17:26 +0800 Subject: [PATCH] =?UTF-8?q?=E9=80=9A=E8=BF=87=E9=82=AE=E7=AE=B1=E8=8E=B7?= =?UTF-8?q?=E5=8F=96=E7=94=A8=E6=88=B7=E4=BF=A1=E6=81=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Service/Management/UserService.cs | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/IRaCIS.Core.Application/Service/Management/UserService.cs b/IRaCIS.Core.Application/Service/Management/UserService.cs index b962c0ff6..c22f411b4 100644 --- a/IRaCIS.Core.Application/Service/Management/UserService.cs +++ b/IRaCIS.Core.Application/Service/Management/UserService.cs @@ -521,6 +521,20 @@ namespace IRaCIS.Core.Application.Service } + public async Task GetUserByEmail(string email) + { + + + var user = await _identityUserRepository.Where(t => t.EMail == email).ProjectTo(_mapper.ConfigurationProvider).FirstOrDefaultAsync(); + + if (user != null) + { + user.AccountList = await _userRoleRepository.Where(t => t.IdentityUserId == user.Id).ProjectTo(_mapper.ConfigurationProvider).OrderBy(t => t.UserTypeShortName).ToListAsync(); + + } + return user; + } + ///