fix(UI自动化): 修复UI报告分享链接有效期设置没生效

--bug=1017328 --user=刘瑶 【UI测试】UI报告分享链接有效期设置没生效 https://www.tapd.cn/55049933/s/1264460
This commit is contained in:
nathan.liu 2022-10-17 16:18:57 +08:00 committed by nathanliu2022
parent 09548e18d1
commit d65dc5a398
5 changed files with 17 additions and 4 deletions

View File

@ -579,6 +579,15 @@ public class ShareInfoService {
projectId = reportResult.getProjectId();
}
}
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 {

View File

@ -67,5 +67,9 @@ public enum ProjectApplicationType {
/**
* 接口分享链接有效期
*/
API_SHARE_REPORT_TIME
API_SHARE_REPORT_TIME,
/**
* UI报告分享链接有效期
*/
UI_SHARE_REPORT_TIME
}

@ -1 +1 @@
Subproject commit a9db2120f547fd4cd88d6fb9ba115b182a9b80eb
Subproject commit 6fd455241b44c9d952979b68922801bb6a0bbe3d

@ -1 +1 @@
Subproject commit c698d5eac1182ad0c51f4ababdcc16c4b713416b
Subproject commit 74ec0740a0bf12327a064c36b3d9e2ce07d5b1e4

View File

@ -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') {