diff --git a/backend/src/main/java/io/metersphere/notice/sender/AbstractNoticeSender.java b/backend/src/main/java/io/metersphere/notice/sender/AbstractNoticeSender.java index 5d63b80278..fb00dddb06 100644 --- a/backend/src/main/java/io/metersphere/notice/sender/AbstractNoticeSender.java +++ b/backend/src/main/java/io/metersphere/notice/sender/AbstractNoticeSender.java @@ -146,6 +146,9 @@ public abstract class AbstractNoticeSender implements NoticeSender { toUsers.addAll(receivers); } } + if (paramMap.containsKey("executor")) { + toUsers.add(new Receiver((String) paramMap.get("executor"), NotificationConstants.Type.SYSTEM_NOTICE.name())); + } break; case NoticeConstants.RelatedUser.CREATOR: String creator = (String) paramMap.get("creator"); diff --git a/backend/src/main/java/io/metersphere/notice/sender/impl/MailNoticeSender.java b/backend/src/main/java/io/metersphere/notice/sender/impl/MailNoticeSender.java index ae62646023..7c9afb534b 100644 --- a/backend/src/main/java/io/metersphere/notice/sender/impl/MailNoticeSender.java +++ b/backend/src/main/java/io/metersphere/notice/sender/impl/MailNoticeSender.java @@ -21,10 +21,7 @@ import org.springframework.stereotype.Component; import javax.annotation.Resource; import javax.mail.internet.InternetAddress; import javax.mail.internet.MimeMessage; -import java.util.ArrayList; -import java.util.List; -import java.util.Map; -import java.util.Properties; +import java.util.*; import java.util.stream.Collectors; @Component @@ -97,7 +94,7 @@ public class MailNoticeSender extends AbstractNoticeSender { LogUtil.debug("helper" + helper); helper.setSubject("MeterSphere " + subject); - LogUtil.info("收件人地址: {}", users); + LogUtil.info("收件人地址: {}", Arrays.asList(users)); helper.setText(context, true); helper.setTo(users); if (cc != null && cc.length > 0) { diff --git a/backend/src/main/java/io/metersphere/track/service/TestPlanMessageService.java b/backend/src/main/java/io/metersphere/track/service/TestPlanMessageService.java index 71bb1bdb1a..e53dbea19d 100644 --- a/backend/src/main/java/io/metersphere/track/service/TestPlanMessageService.java +++ b/backend/src/main/java/io/metersphere/track/service/TestPlanMessageService.java @@ -108,6 +108,7 @@ public class TestPlanMessageService { paramMap.put("projectId", projectId); if (userDTO != null) { paramMap.put("operator", userDTO.getName()); + paramMap.put("executor", userDTO.getId()); } paramMap.putAll(new BeanMap(testPlanDTOWithMetric));