fix(任务中心): 查看集合报告默认环境问题

This commit is contained in:
WangXu10 2024-10-23 10:20:03 +08:00 committed by Craftsman
parent a5fab927ad
commit d86fe66d26
1 changed files with 5 additions and 3 deletions

View File

@ -390,9 +390,11 @@ public class ApiReportService {
private void setEnvironment(String reportId, ApiTaskReportDTO apiTaskReportDTO) {
ApiReport apiReport = apiReportMapper.selectByPrimaryKey(reportId);
Environment environment = environmentMapper.selectByPrimaryKey(apiReport.getEnvironmentId());
apiTaskReportDTO.setEnvironmentId(apiReport.getEnvironmentId());
apiTaskReportDTO.setEnvironmentName(environment.getName());
if (StringUtils.isNotBlank(apiReport.getEnvironmentId())) {
Environment environment = environmentMapper.selectByPrimaryKey(apiReport.getEnvironmentId());
apiTaskReportDTO.setEnvironmentId(environment.getName());
apiTaskReportDTO.setEnvironmentName(environment.getName());
}
}
private String getStepId(String reportId) {