From 03ef08e52b60fb92f66f07f299421584e00b1cee Mon Sep 17 00:00:00 2001 From: "Captain.B" Date: Wed, 19 May 2021 15:18:45 +0800 Subject: [PATCH] =?UTF-8?q?fix(=E6=80=A7=E8=83=BD=E6=B5=8B=E8=AF=95):=20?= =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E5=88=A0=E9=99=A4=E6=B5=8B=E8=AF=95=E5=90=8E?= =?UTF-8?q?=E4=B8=8D=E8=83=BD=E6=98=BE=E7=A4=BA=E7=9B=91=E6=8E=A7tab?= =?UTF-8?q?=E7=9A=84bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../service/PerformanceReportService.java | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/backend/src/main/java/io/metersphere/performance/service/PerformanceReportService.java b/backend/src/main/java/io/metersphere/performance/service/PerformanceReportService.java index 0d50d58beb..6955c725db 100644 --- a/backend/src/main/java/io/metersphere/performance/service/PerformanceReportService.java +++ b/backend/src/main/java/io/metersphere/performance/service/PerformanceReportService.java @@ -345,14 +345,10 @@ public class PerformanceReportService { public String getPoolTypeByReportId(String reportId) { LoadTestReportWithBLOBs report = getReport(reportId); - String testId = report.getTestId(); - LoadTestWithBLOBs test = loadTestMapper.selectByPrimaryKey(testId); - if (test != null) { - String poolId = test.getTestResourcePoolId(); - TestResourcePool testResourcePool = testResourcePoolMapper.selectByPrimaryKey(poolId); - if (testResourcePool != null) { - return testResourcePool.getType(); - } + String poolId = report.getTestResourcePoolId(); + TestResourcePool testResourcePool = testResourcePoolMapper.selectByPrimaryKey(poolId); + if (testResourcePool != null) { + return testResourcePool.getType(); } return ""; }