fix(消息通知): 修复测试计划执行结束后没有给执行人发通知的问题
--bug=1013979 --user=刘瑞斌 【消息通知】设置测试计划执行成功的邮件通知特定测试计划收不到消息 https://www.tapd.cn/55049933/s/1187352
This commit is contained in:
parent
23ec1794fa
commit
dcd52ff297
|
@ -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");
|
||||
|
|
|
@ -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) {
|
||||
|
|
|
@ -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));
|
||||
|
||||
|
|
Loading…
Reference in New Issue