Compare commits

..

No commits in common. "c25c855b466aa4bfd2670cfa73e82e7b50ae092c" and "461976f6d30c5ee38c538789073ae7b3a85a2b6e" have entirely different histories.

2 changed files with 23 additions and 36 deletions

View File

@ -63,30 +63,17 @@
"OpenLoginMFA": false
},
//"SystemEmailSendConfig": {
// "Port": 465,
// "Host": "smtp.qiye.aliyun.com",
// "FromEmail": "test@extimaging.com",
// "FromName": "Test_IRC",
// "AuthorizationCode": "SHzyyl2021",
// "SiteUrl": "http://irc.test.extimaging.com/login",
// "CompanyName": "Extensive Imaging",
// "CompanyNameCN": "上海展影医疗科技有限公司",
// "CompanyShortName": "Extensive Imaging",
// "CompanyShortNameCN": "展影医疗"
//}
"SystemEmailSendConfig": {
"Port": 587,
"Host": "smtp-mail.outlook.com",
"FromEmail": "donotreply@elevateimaging.ai",
"FromName": "LiLi",
"AuthorizationCode": "Q#669869497420ul",
"CompanyName": "Elevate Imaging Inc.",
"Port": 465,
"Host": "smtp.qiye.aliyun.com",
"FromEmail": "test@extimaging.com",
"FromName": "Test_IRC",
"AuthorizationCode": "SHzyyl2021",
"SiteUrl": "http://irc.test.extimaging.com/login",
"CompanyName": "Extensive Imaging",
"CompanyNameCN": "上海展影医疗科技有限公司",
"CompanyShortName": "Elevate Imaging",
"CompanyShortNameCN": "展影医疗",
"SiteUrl": "https://lili.test.elevateimaging.ai/login"
"CompanyShortName": "Extensive Imaging",
"CompanyShortNameCN": "展影医疗"
}
}

View File

@ -305,15 +305,15 @@ namespace IRaCIS.Application.Services
}
//try
//{
await _mailVerificationService.AdminResetPwdSendEmailAsync(userId, pwd);
//}
//catch (Exception)
//{
// //---请检查邮箱地址或者联系维护人员, 邮件发送失败, 未能创建账户成功
// throw new BusinessValidationFailedException(_localizer["User_CreateFailed"]);
//}
try
{
await _mailVerificationService.AdminResetPwdSendEmailAsync(userId, pwd);
}
catch (Exception)
{
//---请检查邮箱地址或者联系维护人员, 邮件发送失败, 未能创建账户成功
throw new BusinessValidationFailedException(_localizer["User_CreateFailed"]);
}
await _userRepository.UpdatePartialNowNoQueryAsync(userId, u => new User()
@ -644,7 +644,7 @@ namespace IRaCIS.Application.Services
public async Task<UserBasicInfo> GetUserBasicInfo(Guid userId, string pwd)
{
var info = await _userRepository.Where(u => u.Id == userId && u.Password == pwd).ProjectTo<UserBasicInfo>(_mapper.ConfigurationProvider).FirstNotNullAsync();
var info = await _userRepository.Where(u => u.Id == userId && u.Password==pwd).ProjectTo<UserBasicInfo>(_mapper.ConfigurationProvider).FirstNotNullAsync();
return info;
}
@ -656,13 +656,13 @@ namespace IRaCIS.Application.Services
/// <param name="mfaType"></param>
/// <returns></returns>
[AllowAnonymous]
public async Task<IResponseOutput> SendMFAEmail(Guid userId, int mfaType)
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();
int verificationCode = new Random().Next(100000, 1000000);
await _mailVerificationService.SenMFAVerifyEmail(userId, userInfo.FullName, userInfo.EMail, verificationCode, (UserMFAType)mfaType);
await _mailVerificationService.SenMFAVerifyEmail(userId, userInfo.FullName, userInfo.EMail, verificationCode, (UserMFAType)mfaType );
return ResponseOutput.Ok();
}
@ -813,7 +813,7 @@ namespace IRaCIS.Application.Services
await _userRepository.BatchUpdateNoTrackingAsync(x => x.Id == loginUser.Id, x => new User()
{
LastLoginIP = _userInfo.IP,
LastLoginTime = DateTime.Now
LastLoginTime= DateTime.Now
});