From 7d8b065754c599caedbe2770b12abfc2fc0595f1 Mon Sep 17 00:00:00 2001 From: shiziyuan9527 Date: Thu, 24 Feb 2022 15:11:11 +0800 Subject: [PATCH] =?UTF-8?q?fix(=E9=A1=B9=E7=9B=AE=E8=AE=BE=E7=BD=AE):=20?= =?UTF-8?q?=E5=AE=9A=E6=97=B6=E6=B8=85=E7=90=86=E6=B5=8B=E8=AF=95=E6=8A=A5?= =?UTF-8?q?=E5=91=8A=E6=9C=AA=E6=B8=85=E7=90=86CASE=E6=8A=A5=E5=91=8A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../metersphere/api/service/ApiScenarioReportService.java | 7 +++++++ 1 file changed, 7 insertions(+) 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 68424f694b..bfb8f5b40e 100644 --- a/backend/src/main/java/io/metersphere/api/service/ApiScenarioReportService.java +++ b/backend/src/main/java/io/metersphere/api/service/ApiScenarioReportService.java @@ -798,6 +798,13 @@ public class ApiScenarioReportService { example.createCriteria().andCreateTimeLessThan(time).andProjectIdEqualTo(projectId); List apiScenarioReports = apiScenarioReportMapper.selectByExample(example); List ids = apiScenarioReports.stream().map(ApiScenarioReport::getId).collect(Collectors.toList()); + + ApiDefinitionExecResultExample definitionExecResultExample = new ApiDefinitionExecResultExample(); + definitionExecResultExample.createCriteria().andCreateTimeLessThan(time).andProjectIdEqualTo(projectId); + List apiDefinitionExecResults = definitionExecResultMapper.selectByExample(definitionExecResultExample); + List definitionExecIds = apiDefinitionExecResults.stream().map(ApiDefinitionExecResult::getId).collect(Collectors.toList()); + + ids.addAll(definitionExecIds); if (CollectionUtils.isNotEmpty(ids)) { APIReportBatchRequest request = new APIReportBatchRequest(); request.setIds(ids);