refactor(项目管理): 优化显示mock环境的url

This commit is contained in:
wxg0103 2024-03-12 18:07:30 +08:00 committed by Craftsman
parent 98aa4677b3
commit 6061e7787b
2 changed files with 2 additions and 0 deletions

View File

@ -63,6 +63,7 @@ public class CreateEnvironmentResourceService implements CreateProjectResourceSe
if (CollectionUtils.isEmpty(httpConfigs)) {
HttpConfig httpConfig = new HttpConfig();
httpConfig.setHostname(StringUtils.join(baseUrl, MOCK_EVN_SOCKET, project.getNum()));
httpConfig.setDescription("根据系统配置的当前站点自动生成");
httpConfigs.add(httpConfig);
}
}

View File

@ -203,6 +203,7 @@ public class EnvironmentService extends MoveNodeService {
if (StringUtils.isNotEmpty(baseUrl)) {
Project project = projectMapper.selectByPrimaryKey(environment.getProjectId());
environmentInfoDTO.getConfig().getHttpConfig().getFirst().setHostname(StringUtils.join(baseUrl, MOCK_EVN_SOCKET, project.getNum()));
environmentInfoDTO.getConfig().getHttpConfig().getFirst().setUrl(StringUtils.join(baseUrl, MOCK_EVN_SOCKET, project.getNum()));
}
}
}