From 62fafeb7d217d84b3c4b60e1a4a82cd91fbec184 Mon Sep 17 00:00:00 2001
From: hang <872297557@qq.com>
Date: Wed, 8 Jan 2025 09:50:25 +0800
Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E7=94=A8=E6=88=B7=20?=
=?UTF-8?q?=E9=87=8D=E6=96=B0=E5=8F=91=E9=80=81=E9=82=AE=E4=BB=B6?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../IRaCIS.Core.Application.xml | 7 +++++++
.../Service/Management/DTO/UserModel.cs | 11 ++++++++++
.../Service/Management/UserService.cs | 8 ++++++++
.../TrialSiteUser/DTO/UserTrialViewModel.cs | 12 +++++++++++
.../TrialSiteUser/TrialMaintenanceService.cs | 20 +++++++++++++++++++
5 files changed, 58 insertions(+)
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]