refactor(项目管理): 优化显示mock环境的url
This commit is contained in:
parent
98aa4677b3
commit
6061e7787b
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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()));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue