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 f1564befb6..860da8aa38 100644 --- a/backend/src/main/java/io/metersphere/api/service/ShareInfoService.java +++ b/backend/src/main/java/io/metersphere/api/service/ShareInfoService.java @@ -19,7 +19,6 @@ import io.metersphere.commons.utils.LogUtil; import io.metersphere.i18n.Translator; import io.metersphere.service.ProjectApplicationService; import io.metersphere.track.service.TestPlanApiCaseService; -import io.metersphere.track.service.TestPlanScenarioCaseService; import org.apache.commons.collections.CollectionUtils; import org.apache.commons.lang3.StringUtils; import org.apache.logging.log4j.util.Strings; @@ -49,8 +48,6 @@ public class ShareInfoService { @Resource TestPlanApiCaseService testPlanApiCaseService; @Resource - TestPlanScenarioCaseService testPlanScenarioCaseService; - @Resource TestPlanReportMapper testPlanReportMapper; @Resource private ProjectApplicationService projectApplicationService; @@ -64,6 +61,8 @@ public class ShareInfoService { TestPlanMapper testPlanMapper; @Resource private ExtApiScenarioReportMapper extApiScenarioReportMapper; + @Resource + private ApiScenarioReportService apiScenarioReportService; public List findApiDocumentSimpleInfoByRequest(ApiDocumentRequest request) { @@ -574,6 +573,12 @@ public class ShareInfoService { APIScenarioReportResult reportResult = extApiScenarioReportMapper.get(shareInfo.getCustomData()); if (reportResult != null) { projectId = reportResult.getProjectId(); + } else { + // case 集成报告 + APIScenarioReportResult result = apiScenarioReportService.getApiIntegrated(shareInfo.getCustomData()); + if (result != null) { + projectId = result.getProjectId(); + } } } if (StringUtils.isBlank(type) || Strings.isBlank(projectId)) {