枚举不能识别
continuous-integration/drone/push Build is passing Details

IRC_NewDev
hang 2024-06-14 11:05:07 +08:00
parent ecbe8434f3
commit 493e4e8dca
4 changed files with 5 additions and 5 deletions

View File

@ -246,7 +246,7 @@ namespace IRaCIS.Api.Controllers
returnModel.Data.BasicInfo.EMail = hiddenEmail; returnModel.Data.BasicInfo.EMail = hiddenEmail;
await _userService.SendMFAEmail(userId,UserMFAType.Login); await _userService.SendMFAEmail(userId);
} }
else else

View File

@ -13265,7 +13265,7 @@
<param name="state"></param> <param name="state"></param>
<returns></returns> <returns></returns>
</member> </member>
<member name="M:IRaCIS.Application.Services.UserService.SendMFAEmail(System.Guid,IRaCIS.Core.Domain.Share.UserMFAType)"> <member name="M:IRaCIS.Application.Services.UserService.SendMFAEmail(System.Guid,System.Int32)">
<summary> <summary>
发送MFA 验证邮件 发送MFA 验证邮件
</summary> </summary>

View File

@ -12,7 +12,7 @@ namespace IRaCIS.Application.Services
Task<IResponseOutput<LoginReturnDTO>> Login(string userName, string password); Task<IResponseOutput<LoginReturnDTO>> Login(string userName, string password);
Task<IResponseOutput> VerifyMFACodeAsync(Guid userId, string Code); Task<IResponseOutput> VerifyMFACodeAsync(Guid userId, string Code);
Task<IResponseOutput> SendMFAEmail(Guid userId, UserMFAType mfaType); Task<IResponseOutput> SendMFAEmail(Guid userId, int mfaType=0);
Task<UserBasicInfo> GetUserBasicInfo(Guid userId,string pwd); Task<UserBasicInfo> GetUserBasicInfo(Guid userId,string pwd);
Task<IResponseOutput> ModifyPassword(EditPasswordCommand editPwModel); Task<IResponseOutput> ModifyPassword(EditPasswordCommand editPwModel);
Task<IResponseOutput> ResetPassword(Guid userId); Task<IResponseOutput> ResetPassword(Guid userId);

View File

@ -656,13 +656,13 @@ namespace IRaCIS.Application.Services
/// <param name="mfaType"></param> /// <param name="mfaType"></param>
/// <returns></returns> /// <returns></returns>
[AllowAnonymous] [AllowAnonymous]
public async Task<IResponseOutput> SendMFAEmail(Guid userId, UserMFAType mfaType = UserMFAType.Login) public async Task<IResponseOutput> SendMFAEmail(Guid userId, int mfaType )
{ {
var userInfo = await _userRepository.Where(u => u.Id == userId).Select(t => new { t.FullName, t.EMail }).FirstOrDefaultAsync(); var userInfo = await _userRepository.Where(u => u.Id == userId).Select(t => new { t.FullName, t.EMail }).FirstOrDefaultAsync();
int verificationCode = new Random().Next(100000, 1000000); int verificationCode = new Random().Next(100000, 1000000);
await _mailVerificationService.SenMFAVerifyEmail(userId, userInfo.FullName, userInfo.EMail, verificationCode, mfaType); await _mailVerificationService.SenMFAVerifyEmail(userId, userInfo.FullName, userInfo.EMail, verificationCode, (UserMFAType)mfaType );
return ResponseOutput.Ok(); return ResponseOutput.Ok();
} }