fix(性能测试): 修复删除测试后不能显示监控tab的bug

This commit is contained in:
Captain.B 2021-05-19 15:18:45 +08:00 committed by 刘瑞斌
parent 08c3274379
commit 03ef08e52b
1 changed files with 4 additions and 8 deletions

View File

@ -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 "";
}