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,10 +390,12 @@ public class ApiReportService {
private void setEnvironment(String reportId, ApiTaskReportDTO apiTaskReportDTO) { private void setEnvironment(String reportId, ApiTaskReportDTO apiTaskReportDTO) {
ApiReport apiReport = apiReportMapper.selectByPrimaryKey(reportId); ApiReport apiReport = apiReportMapper.selectByPrimaryKey(reportId);
if (StringUtils.isNotBlank(apiReport.getEnvironmentId())) {
Environment environment = environmentMapper.selectByPrimaryKey(apiReport.getEnvironmentId()); Environment environment = environmentMapper.selectByPrimaryKey(apiReport.getEnvironmentId());
apiTaskReportDTO.setEnvironmentId(apiReport.getEnvironmentId()); apiTaskReportDTO.setEnvironmentId(environment.getName());
apiTaskReportDTO.setEnvironmentName(environment.getName()); apiTaskReportDTO.setEnvironmentName(environment.getName());
} }
}
private String getStepId(String reportId) { private String getStepId(String reportId) {
ApiReportStepExample example = new ApiReportStepExample(); ApiReportStepExample example = new ApiReportStepExample();