From 2a710d365df7248c254b7a860271347a7a0e4f58 Mon Sep 17 00:00:00 2001 From: "nathan.liu" Date: Sun, 18 Sep 2022 17:24:09 +0800 Subject: [PATCH] =?UTF-8?q?fix(UI=E8=87=AA=E5=8A=A8=E5=8C=96):=20=E4=BF=AE?= =?UTF-8?q?=E5=A4=8DUI=E5=88=86=E4=BA=AB=E6=8A=A5=E5=91=8A=E5=A4=B1?= =?UTF-8?q?=E6=95=88=E6=97=B6=E9=97=B4=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --bug=1016813 --user=刘瑶 【UI测试】测试报告-超出有效时间仍可打开分享链接 https://www.tapd.cn/55049933/s/1244384 --- .../io/metersphere/api/service/ShareInfoService.java | 9 +++++++++ backend/src/main/java/io/metersphere/xpack | 2 +- frontend/src/business/components/xpack | 2 +- .../template/report/ui/share/ShareUiReportTemplate.vue | 2 +- 4 files changed, 12 insertions(+), 3 deletions(-) diff --git a/backend/src/main/java/io/metersphere/api/service/ShareInfoService.java b/backend/src/main/java/io/metersphere/api/service/ShareInfoService.java index 2bdc011c4c..6276f9ae2c 100644 --- a/backend/src/main/java/io/metersphere/api/service/ShareInfoService.java +++ b/backend/src/main/java/io/metersphere/api/service/ShareInfoService.java @@ -657,6 +657,15 @@ public class ShareInfoService { } } } + + if (StringUtils.equals(shareInfo.getShareType(), "UI_REPORT")) { + type = ProjectApplicationType.UI_SHARE_REPORT_TIME.toString(); + APIScenarioReportResult reportResult = extApiScenarioReportMapper.get(shareInfo.getCustomData()); + if (reportResult != null) { + projectId = reportResult.getProjectId(); + } + } + if (StringUtils.isBlank(type) || Strings.isBlank(projectId)) { millisCheck(System.currentTimeMillis() - shareInfo.getUpdateTime(), 1000 * 60 * 60 * 24, shareInfo.getId()); } else { diff --git a/backend/src/main/java/io/metersphere/xpack b/backend/src/main/java/io/metersphere/xpack index e1ec9296dc..2860b379a3 160000 --- a/backend/src/main/java/io/metersphere/xpack +++ b/backend/src/main/java/io/metersphere/xpack @@ -1 +1 @@ -Subproject commit e1ec9296dc5a5b4f2603b12b9dcf70bab5d455fc +Subproject commit 2860b379a3a4d363df531b002bcd699c01c8a29f diff --git a/frontend/src/business/components/xpack b/frontend/src/business/components/xpack index b96271fdbd..80cf85c741 160000 --- a/frontend/src/business/components/xpack +++ b/frontend/src/business/components/xpack @@ -1 +1 @@ -Subproject commit b96271fdbdff5e80b1cd78cf921ee9f934983dbd +Subproject commit 80cf85c741f08c6e448ed051dea30aa193e01988 diff --git a/frontend/src/template/report/ui/share/ShareUiReportTemplate.vue b/frontend/src/template/report/ui/share/ShareUiReportTemplate.vue index 8b68d48dcf..fed0053242 100644 --- a/frontend/src/template/report/ui/share/ShareUiReportTemplate.vue +++ b/frontend/src/template/report/ui/share/ShareUiReportTemplate.vue @@ -21,7 +21,7 @@ export default { this.shareId = getShareId(); getShareInfo(this.shareId, (data) => { if (!data) { - this.$error('报告已删除!'); + this.$error('链接已失效,请重新获取!'); return; } if (data.shareType === 'UI_REPORT') {