diff --git a/IRaCIS.Core.Application/IRaCIS.Core.Application.xml b/IRaCIS.Core.Application/IRaCIS.Core.Application.xml index 0a00e57d8..910afcf53 100644 --- a/IRaCIS.Core.Application/IRaCIS.Core.Application.xml +++ b/IRaCIS.Core.Application/IRaCIS.Core.Application.xml @@ -12914,6 +12914,13 @@ + + + 项目人员 邮件过期 重新发送邀请邮件 + + + + Setting页面 项目参与人员勾选列表 diff --git a/IRaCIS.Core.Application/Service/Management/DTO/UserModel.cs b/IRaCIS.Core.Application/Service/Management/DTO/UserModel.cs index b008307ce..a05e65145 100644 --- a/IRaCIS.Core.Application/Service/Management/DTO/UserModel.cs +++ b/IRaCIS.Core.Application/Service/Management/DTO/UserModel.cs @@ -230,6 +230,15 @@ namespace IRaCIS.Application.Contracts } + + public class NewUserSendEmailCommand + { + public Guid IdentityUserId { get; set; } + public string BaseUrl { get; set; } = string.Empty; + public string RouteUrl { get; set; } = string.Empty; + + } + public class IdentityUserTypeDTO : UserAddUserType { public Guid Id { get; set; } @@ -312,6 +321,8 @@ namespace IRaCIS.Application.Contracts { //public bool CanEditUserType { get; set; } + public bool IsFirstAdd { get; set; } + public DateTime? LastLoginTime { get; set; } public DateTime CreateTime { get; set; } diff --git a/IRaCIS.Core.Application/Service/Management/UserService.cs b/IRaCIS.Core.Application/Service/Management/UserService.cs index bf7441a9e..c17d5a2a6 100644 --- a/IRaCIS.Core.Application/Service/Management/UserService.cs +++ b/IRaCIS.Core.Application/Service/Management/UserService.cs @@ -582,6 +582,14 @@ namespace IRaCIS.Core.Application.Service } + [HttpPost] + public async Task AddNewUserSendEmail(NewUserSendEmailCommand incommand) + { + await _mailVerificationService.AddUserSendEmailAsync(incommand.IdentityUserId, incommand.BaseUrl, incommand.RouteUrl); + + return ResponseOutput.Ok(); + } + /// /// 更新用户 /// diff --git a/IRaCIS.Core.Application/Service/TrialSiteUser/DTO/UserTrialViewModel.cs b/IRaCIS.Core.Application/Service/TrialSiteUser/DTO/UserTrialViewModel.cs index e55def7b9..140ad9408 100644 --- a/IRaCIS.Core.Application/Service/TrialSiteUser/DTO/UserTrialViewModel.cs +++ b/IRaCIS.Core.Application/Service/TrialSiteUser/DTO/UserTrialViewModel.cs @@ -531,6 +531,18 @@ namespace IRaCIS.Application.Contracts } + public class TrialUserSendJoinEmailCommand + { + [NotDefault] + public Guid TrialId { get; set; } + + [NotDefault] + public Guid IdentityUserId { get; set; } + + public string BaseUrl { get; set; } = string.Empty; + public string RouteUrl { get; set; } = string.Empty; + + } public class UpdateTrialUserRoleCommand { public List IdList { get; set; } diff --git a/IRaCIS.Core.Application/Service/TrialSiteUser/TrialMaintenanceService.cs b/IRaCIS.Core.Application/Service/TrialSiteUser/TrialMaintenanceService.cs index 1be7735ef..9deef590d 100644 --- a/IRaCIS.Core.Application/Service/TrialSiteUser/TrialMaintenanceService.cs +++ b/IRaCIS.Core.Application/Service/TrialSiteUser/TrialMaintenanceService.cs @@ -3,6 +3,7 @@ using IRaCIS.Application.Contracts; using IRaCIS.Application.Interfaces; using IRaCIS.Core.Application.Contracts.DTO; using IRaCIS.Core.Application.Filter; +using IRaCIS.Core.Domain.Models; using IRaCIS.Core.Domain.Share; using MassTransit.Serialization; using Microsoft.AspNetCore.Mvc; @@ -118,6 +119,25 @@ namespace IRaCIS.Core.Application.Service return ResponseOutput.Ok(); } + /// + /// 项目人员 邮件过期 重新发送邀请邮件 + /// + /// + /// + [HttpPost] + public async Task TrialUserSendJoinEmail(TrialUserSendJoinEmailCommand incommand, [FromServices] IMailVerificationService _mailVerificationService) + { + + var userTypeList = _trialIdentityUserRepository.Where(t => t.TrialId == incommand.TrialId && t.IdentityUserId == incommand.IdentityUserId).SelectMany(t => t.TrialUserRoleList).Select(t => t.UserRole.UserTypeRole.UserTypeName).ToList(); + + var usertyps = string.Join(',', userTypeList); + + await _mailVerificationService.ExternalUserJoinEmail(incommand.TrialId, incommand.IdentityUserId, usertyps, incommand.BaseUrl, incommand.RouteUrl); + + return ResponseOutput.Ok(); + } + + /// Setting页面 项目参与人员勾选列表 [HttpPost]