From ad5307defd0b58bfbd5f89d110e1b94d5d239163 Mon Sep 17 00:00:00 2001 From: CaptainB Date: Wed, 22 Dec 2021 11:51:25 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E9=82=AE=E4=BB=B6?= =?UTF-8?q?=E6=A8=A1=E7=89=88=E4=B8=8D=E4=B8=80=E8=87=B4=E7=9A=84=E9=97=AE?= =?UTF-8?q?=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --bug=1009015 --user=刘瑞斌 【jenkins】邮件默认通知显示不一致 https://www.tapd.cn/55049933/s/1084854 --- .../api/service/ApiDefinitionExecResultService.java | 4 ++-- .../api/service/ApiScenarioReportService.java | 4 ++-- .../api/{CaseResult.html => CaseResultFailed.html} | 2 +- .../{ScenarioResult.html => CaseResultSuccess.html} | 2 +- .../resources/mail/api/ScenarioResultFailed.html | 12 ++++++++++++ .../resources/mail/api/ScenarioResultSuccess.html | 12 ++++++++++++ 6 files changed, 30 insertions(+), 6 deletions(-) rename backend/src/main/resources/mail/api/{CaseResult.html => CaseResultFailed.html} (63%) rename backend/src/main/resources/mail/api/{ScenarioResult.html => CaseResultSuccess.html} (62%) create mode 100644 backend/src/main/resources/mail/api/ScenarioResultFailed.html create mode 100644 backend/src/main/resources/mail/api/ScenarioResultSuccess.html diff --git a/backend/src/main/java/io/metersphere/api/service/ApiDefinitionExecResultService.java b/backend/src/main/java/io/metersphere/api/service/ApiDefinitionExecResultService.java index b4607c0f08..9fa47757c0 100644 --- a/backend/src/main/java/io/metersphere/api/service/ApiDefinitionExecResultService.java +++ b/backend/src/main/java/io/metersphere/api/service/ApiDefinitionExecResultService.java @@ -116,8 +116,8 @@ public class ApiDefinitionExecResultService { .operator(SessionUtils.getUserId()) .context(context) .subject("接口用例通知") - .successMailTemplate("api/CaseResult") - .failedMailTemplate("api/CaseResult") + .successMailTemplate("api/CaseResultSuccess") + .failedMailTemplate("api/CaseResultFailed") .paramMap(paramMap) .event(event) .build(); diff --git a/backend/src/main/java/io/metersphere/api/service/ApiScenarioReportService.java b/backend/src/main/java/io/metersphere/api/service/ApiScenarioReportService.java index af249440e9..8905e67734 100644 --- a/backend/src/main/java/io/metersphere/api/service/ApiScenarioReportService.java +++ b/backend/src/main/java/io/metersphere/api/service/ApiScenarioReportService.java @@ -437,8 +437,8 @@ public class ApiScenarioReportService { .operator(userId) .context(context) .subject("接口自动化通知") - .successMailTemplate("api/ScenarioResult") - .failedMailTemplate("api/ScenarioResult") + .successMailTemplate("api/ScenarioResultSuccess") + .failedMailTemplate("api/ScenarioResultFailed") .paramMap(paramMap) .event(event) .build(); diff --git a/backend/src/main/resources/mail/api/CaseResult.html b/backend/src/main/resources/mail/api/CaseResultFailed.html similarity index 63% rename from backend/src/main/resources/mail/api/CaseResult.html rename to backend/src/main/resources/mail/api/CaseResultFailed.html index 5596cebbe6..5fccb612c3 100644 --- a/backend/src/main/resources/mail/api/CaseResult.html +++ b/backend/src/main/resources/mail/api/CaseResultFailed.html @@ -6,7 +6,7 @@
-

${operator}执行接口用例: ${name}, 结果: ${status}

+

${operator}执行接口用例失败: ${name}

\ No newline at end of file diff --git a/backend/src/main/resources/mail/api/ScenarioResult.html b/backend/src/main/resources/mail/api/CaseResultSuccess.html similarity index 62% rename from backend/src/main/resources/mail/api/ScenarioResult.html rename to backend/src/main/resources/mail/api/CaseResultSuccess.html index 96b56287be..2721a527da 100644 --- a/backend/src/main/resources/mail/api/ScenarioResult.html +++ b/backend/src/main/resources/mail/api/CaseResultSuccess.html @@ -6,7 +6,7 @@
-

${operator}执行接口自动化: ${name}, 结果: ${status}

+

${operator}执行接口用例成功: ${name}

\ No newline at end of file diff --git a/backend/src/main/resources/mail/api/ScenarioResultFailed.html b/backend/src/main/resources/mail/api/ScenarioResultFailed.html new file mode 100644 index 0000000000..f71c57f7cd --- /dev/null +++ b/backend/src/main/resources/mail/api/ScenarioResultFailed.html @@ -0,0 +1,12 @@ + + + + + MeterSphere + + +
+

${operator}执行接口自动化失败: ${name}

+
+ + \ No newline at end of file diff --git a/backend/src/main/resources/mail/api/ScenarioResultSuccess.html b/backend/src/main/resources/mail/api/ScenarioResultSuccess.html new file mode 100644 index 0000000000..4c2f3fad52 --- /dev/null +++ b/backend/src/main/resources/mail/api/ScenarioResultSuccess.html @@ -0,0 +1,12 @@ + + + + + MeterSphere + + +
+

${operator}执行接口自动化成功: ${name}

+
+ + \ No newline at end of file