fix: 性能测试报告链接id修改

This commit is contained in:
wenyann 2020-09-29 16:32:57 +08:00
parent f5036e85c9
commit bd13c3ccb1
2 changed files with 5 additions and 5 deletions

View File

@ -42,12 +42,12 @@ public class MailService {
@Resource
private SystemParameterService systemParameterService;
public void sendPerformanceNotification(List<NoticeDetail> noticeList, String status, LoadTestWithBLOBs loadTest) {
public void sendPerformanceNotification(List<NoticeDetail> noticeList, String status, LoadTestWithBLOBs loadTest, String id) {
BaseSystemConfigDTO baseSystemConfigDTO = systemParameterService.getBaseInfo();
Map<String, String> context = new HashMap<>();
context.put("title", "Performance" + Translator.get("timing_task_result_notification"));
context.put("testName", loadTest.getName());
context.put("id", loadTest.getId());
context.put("id", id);
context.put("type", "performance");
context.put("url", baseSystemConfigDTO.getUrl());
String performanceTemplate = "";

View File

@ -242,7 +242,7 @@ public class PerformanceTestService {
if (request.getTriggerMode().equals("SCHEDULE")) {
try {
noticeList = noticeService.queryNotice(loadTest.getId());
mailService.sendPerformanceNotification(noticeList, PerformanceTestStatus.Completed.name(), loadTest);
mailService.sendPerformanceNotification(noticeList, PerformanceTestStatus.Completed.name(), loadTest, engine.getReportId());
} catch (Exception e) {
LogUtil.error(e.getMessage(), e);
}
@ -321,7 +321,7 @@ public class PerformanceTestService {
loadTestMapper.updateByPrimaryKeySelective(loadTest);
if (triggerMode.equals("SCHEDULE")) {
noticeList = noticeService.queryNotice(loadTest.getId());
mailService.sendPerformanceNotification(noticeList, loadTest.getStatus(), loadTest);
mailService.sendPerformanceNotification(noticeList, loadTest.getStatus(), loadTest, loadTest.getId());
}
throw e;
}
@ -449,7 +449,7 @@ public class PerformanceTestService {
if (loadTestReport.getTriggerMode().equals("SCHEDULE")) {
try {
noticeList = noticeService.queryNotice(loadTest.getId());
mailService.sendPerformanceNotification(noticeList, loadTestReport.getStatus(), loadTest);
mailService.sendPerformanceNotification(noticeList, loadTestReport.getStatus(), loadTest, loadTestReport.getId());
} catch (Exception e) {
LogUtil.error(e.getMessage(), e);
}