修复邮件bug

Uat_Study
hang 2022-11-23 16:54:07 +08:00
parent a651adb3b4
commit 59d20edabe
1 changed files with 14 additions and 5 deletions

View File

@ -80,7 +80,7 @@ namespace IRaCIS.Application.Services
}
//重置邮箱
//重置邮箱
public async Task SendMailEditEmail(Guid userId, string userName, string emailAddress, int verificationCode)
{
@ -523,12 +523,15 @@ namespace IRaCIS.Application.Services
saveItem.DoctorId = doctorId;
saveItem.UserTypeId = userType.Id;
sysUserInfo = await _userRepository.AddAsync(saveItem);
var savedUser = await _userRepository.AddAsync(saveItem);
//下面获取Token 需要这部分信息
sysUserInfo =savedUser.Clone();
sysUserInfo.UserTypeRole = userType;
await _userRepository.SaveChangesAsync();
sysUserInfo.UserTypeRole = userType;
}
else
{
@ -551,7 +554,13 @@ namespace IRaCIS.Application.Services
var builder = new BodyBuilder();
var token = _tokenService.GetToken(IRaCISClaims.Create(_mapper.Map<UserBasicInfo>(sysUserInfo)));
var basicInfo = IRaCISClaims.Create(_mapper.Map<UserBasicInfo>(sysUserInfo));
////第一次添加的时候 注意赋值
//basicInfo.PermissionStr = userType.PermissionStr;
//basicInfo.UserTypeShortName = userType.UserTypeShortName;
var token = _tokenService.GetToken(basicInfo);
if (sysUserInfo.IsFirstAdd)
{