diff --git a/IRaCIS.Core.Application/IRaCIS.Core.Application.xml b/IRaCIS.Core.Application/IRaCIS.Core.Application.xml index ea66877a7..556be2a66 100644 --- a/IRaCIS.Core.Application/IRaCIS.Core.Application.xml +++ b/IRaCIS.Core.Application/IRaCIS.Core.Application.xml @@ -2277,11 +2277,10 @@ - + 验证MFA 邮件 - diff --git a/IRaCIS.Core.Application/Service/Management/Interface/IUserService.cs b/IRaCIS.Core.Application/Service/Management/Interface/IUserService.cs index 6c863dfbe..ff7fe8917 100644 --- a/IRaCIS.Core.Application/Service/Management/Interface/IUserService.cs +++ b/IRaCIS.Core.Application/Service/Management/Interface/IUserService.cs @@ -10,9 +10,9 @@ namespace IRaCIS.Core.Application.Service //Task GetUser(Guid id); Task> GetUserList(UserListQueryDTO param); Task> Login(string userName, string password); - Task VerifyMFACodeAsync(Guid userId, string Code); + Task VerifyMFACodeAsync(string Code); - Task SendMFAEmail(Guid userId, UserMFAType mfaType = 0); + Task SendMFAEmail(Guid identityUserId, UserMFAType mfaType = 0); Task GetUserBasicInfo(Guid userId, string pwd); Task ModifyPassword(EditPasswordCommand editPwModel); Task ResetPassword(Guid userId); diff --git a/IRaCIS.Core.Application/Service/Management/UserService.cs b/IRaCIS.Core.Application/Service/Management/UserService.cs index ae64be999..c1fbb25fe 100644 --- a/IRaCIS.Core.Application/Service/Management/UserService.cs +++ b/IRaCIS.Core.Application/Service/Management/UserService.cs @@ -735,12 +735,12 @@ namespace IRaCIS.Core.Application.Service /// /// 发送MFA 验证邮件 /// + /// /// /// - public async Task SendMFAEmail(UserMFAType mfaType) + public async Task SendMFAEmail(Guid identityUserId, UserMFAType mfaType) { - var identityUserId = _userInfo.IdentityUserId; - + identityUserId = identityUserId == Guid.Empty ? _userInfo.IdentityUserId : identityUserId; var userInfo = await _identityUserRepository.Where(u => u.Id == identityUserId).Select(t => new { t.FullName, t.EMail }).FirstOrDefaultAsync(); int verificationCode = new Random().Next(100000, 1000000);