From a0b18bbf72d6853b9dd621c2a4341ed030235fad Mon Sep 17 00:00:00 2001
From: hang <872297557@qq.com>
Date: Fri, 3 Jan 2025 09:50:18 +0800
Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E7=99=BB=E5=BD=95mfa?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
IRaCIS.Core.Application/IRaCIS.Core.Application.xml | 3 +--
.../Service/Management/Interface/IUserService.cs | 4 ++--
IRaCIS.Core.Application/Service/Management/UserService.cs | 6 +++---
3 files changed, 6 insertions(+), 7 deletions(-)
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);