修改外部人员邀请邮件以及添加账号
continuous-integration/drone/push Build is passing Details

Uat_IRC_Net8
hang 2024-12-27 12:33:48 +08:00
parent ecdd0fda85
commit ba2965e295
2 changed files with 6 additions and 4 deletions

View File

@ -479,7 +479,7 @@ namespace IRaCIS.Core.Application.Service
.WhereIf(inQuery.EndCreateTime != null, t => t.CreateTime <= inQuery.EndCreateTime) .WhereIf(inQuery.EndCreateTime != null, t => t.CreateTime <= inQuery.EndCreateTime)
.WhereIf(inQuery.BeginLastLoginTime != null, t => t.LastLoginTime >= inQuery.BeginLastLoginTime) .WhereIf(inQuery.BeginLastLoginTime != null, t => t.LastLoginTime >= inQuery.BeginLastLoginTime)
.WhereIf(inQuery.EndLastLoginTime != null, t => t.LastLoginTime <= inQuery.EndLastLoginTime) .WhereIf(inQuery.EndLastLoginTime != null, t => t.LastLoginTime <= inQuery.EndLastLoginTime)
.WhereIf(inQuery.BeginLastChangePassWordTime != null, t => t.LastChangePassWordTime >= inQuery.BeginLastChangePassWordTime) .WhereIf(inQuery.BeginLastChangePassWordTime != null, t => t.LastChangePassWordTime >= inQuery.BeginLastChangePassWordTime)
.WhereIf(inQuery.EndLastChangePassWordTime != null, t => t.LastChangePassWordTime <= inQuery.EndLastChangePassWordTime) .WhereIf(inQuery.EndLastChangePassWordTime != null, t => t.LastChangePassWordTime <= inQuery.EndLastChangePassWordTime)
.WhereIf(inQuery.UserType != null, t => t.UserRoleList.Any(t => t.UserTypeId == inQuery.UserType)) .WhereIf(inQuery.UserType != null, t => t.UserRoleList.Any(t => t.UserTypeId == inQuery.UserType))
.WhereIf(inQuery.UserState != null, t => t.Status == inQuery.UserState) .WhereIf(inQuery.UserState != null, t => t.Status == inQuery.UserState)

View File

@ -325,10 +325,11 @@ namespace IRaCIS.Core.Application.Service
IdentityUserId = identityUserId, IdentityUserId = identityUserId,
TrialId = trialId, TrialId = trialId,
JoinTime = DateTime.Now, JoinTime = DateTime.Now,
TrialUserRoleList = userTypeIdList.Select(u => new TrialUserRole() TrialUserRoleList = userTypeIdList.Select(u => new TrialUserRole()
{ {
TrialId = trialId, TrialId = trialId,
UserId = u, UserId = existSysUser.UserRoleList.FirstOrDefault(t=>t.UserTypeId==u).Id,
}).ToList() }).ToList()
}); });
@ -346,7 +347,7 @@ namespace IRaCIS.Core.Application.Service
if (findTrialUserRole == null) if (findTrialUserRole == null)
{ {
//添加该角色 //添加该角色
findTrialUser.TrialUserRoleList.Add(new TrialUserRole() { TrialUserId = findTrialUser.Id, TrialId = trialId, UserId = userTypeId }); findTrialUser.TrialUserRoleList.Add(new TrialUserRole() { TrialUserId = findTrialUser.Id, TrialId = trialId, UserId = existSysUser.UserRoleList.FirstOrDefault(t => t.UserTypeId == userTypeId).Id });
} }
else else
{ {
@ -361,8 +362,9 @@ namespace IRaCIS.Core.Application.Service
} }
} }
await _trialIdentityUserRepository.SaveChangesAsync();
var usertyps = string.Join(',', userTypeList.Select(t => t.UserTypeShortName)); var usertyps = string.Join(',', userTypeList.Where(t=> userTypeIdList.Contains(t.UserTypeId)).Select(t => t.UserTypeShortName));
await _mailVerificationService.ExternalUserJoinEmail(trialId, identityUserId, usertyps, sendEmail.BaseUrl, sendEmail.RouteUrl); await _mailVerificationService.ExternalUserJoinEmail(trialId, identityUserId, usertyps, sendEmail.BaseUrl, sendEmail.RouteUrl);