From 2aba1a00e29700662a5502b3778dca00916e43e0 Mon Sep 17 00:00:00 2001 From: fit2-zhao Date: Fri, 10 Jun 2022 21:03:36 +0800 Subject: [PATCH] =?UTF-8?q?refactor(=E6=B5=8B=E8=AF=95=E8=B7=9F=E8=B8=AA):?= =?UTF-8?q?=20=E4=BC=98=E5=8C=96=E5=AF=BC=E5=87=BA=E6=B5=8B=E8=AF=95?= =?UTF-8?q?=E8=AE=A1=E5=88=92=E6=8A=A5=E5=91=8A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --bug=1013577 --user=赵勇 【测试跟踪】测试计划报告页面 导出报告 导出报告时间过长 差不多10秒,建议优化下 https://www.tapd.cn/55049933/s/1179328 --- .../java/io/metersphere/track/service/TestPlanService.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/backend/src/main/java/io/metersphere/track/service/TestPlanService.java b/backend/src/main/java/io/metersphere/track/service/TestPlanService.java index 7fc9709c9d..d3decacaa6 100644 --- a/backend/src/main/java/io/metersphere/track/service/TestPlanService.java +++ b/backend/src/main/java/io/metersphere/track/service/TestPlanService.java @@ -1415,9 +1415,9 @@ public class TestPlanService { List reportIds = cases.stream().map(TestPlanFailureApiDTO::getReportId).collect(Collectors.toList()); ApiDefinitionExecResultExample example = new ApiDefinitionExecResultExample(); example.createCriteria().andIdIn(reportIds); - List results = apiDefinitionExecResultMapper.selectByExampleWithBLOBs(example); + List results = apiDefinitionExecResultMapper.selectByExampleWithBLOBs(example); // 格式化数据结果 - Map resultMap = results.stream().collect(Collectors.toMap(ApiDefinitionExecResult::getId, item -> item, (k, v) -> k)); + Map resultMap = results.stream().collect(Collectors.toMap(ApiDefinitionExecResult::getId, item -> item, (k, v) -> k)); cases.forEach(item -> { if (resultMap.get(item.getReportId()) != null && StringUtils.isNotBlank(resultMap.get(item.getReportId()).getContent())) {