fix: 不同模块下的同级子模块也不能用一样的名称
--bug=1012846 --user=陈建星 【UI测试】UI元素库 和 UI自动化,不同模块下的同级子模块也不能用一样的名称 https://www.tapd.cn/55049933/s/1151418
This commit is contained in:
parent
0ba2b65660
commit
35f84f54a9
|
@ -272,8 +272,13 @@ public class ApiModuleService extends NodeTreeService<ApiModuleDTO> {
|
||||||
ApiModuleExample example = new ApiModuleExample();
|
ApiModuleExample example = new ApiModuleExample();
|
||||||
ApiModuleExample.Criteria criteria = example.createCriteria();
|
ApiModuleExample.Criteria criteria = example.createCriteria();
|
||||||
criteria.andNameEqualTo(node.getName())
|
criteria.andNameEqualTo(node.getName())
|
||||||
.andProjectIdEqualTo(node.getProjectId())
|
.andProjectIdEqualTo(node.getProjectId());
|
||||||
.andLevelEqualTo(node.getLevel());
|
|
||||||
|
if (StringUtils.isNotBlank(node.getParentId())) {
|
||||||
|
criteria.andParentIdEqualTo(node.getParentId());
|
||||||
|
} else {
|
||||||
|
criteria.andLevelEqualTo(node.getLevel());
|
||||||
|
}
|
||||||
|
|
||||||
if (StringUtils.isNotBlank(node.getProtocol())) {
|
if (StringUtils.isNotBlank(node.getProtocol())) {
|
||||||
criteria.andProtocolEqualTo(node.getProtocol());
|
criteria.andProtocolEqualTo(node.getProtocol());
|
||||||
|
|
|
@ -233,8 +233,13 @@ public class ApiScenarioModuleService extends NodeTreeService<ApiScenarioModuleD
|
||||||
ApiScenarioModuleExample example = new ApiScenarioModuleExample();
|
ApiScenarioModuleExample example = new ApiScenarioModuleExample();
|
||||||
ApiScenarioModuleExample.Criteria criteria = example.createCriteria();
|
ApiScenarioModuleExample.Criteria criteria = example.createCriteria();
|
||||||
criteria.andNameEqualTo(node.getName())
|
criteria.andNameEqualTo(node.getName())
|
||||||
.andProjectIdEqualTo(node.getProjectId())
|
.andProjectIdEqualTo(node.getProjectId());
|
||||||
.andLevelEqualTo(node.getLevel());
|
|
||||||
|
if (StringUtils.isNotBlank(node.getParentId())) {
|
||||||
|
criteria.andParentIdEqualTo(node.getParentId());
|
||||||
|
} else {
|
||||||
|
criteria.andLevelEqualTo(node.getLevel());
|
||||||
|
}
|
||||||
|
|
||||||
if (StringUtils.isNotBlank(node.getId())) {
|
if (StringUtils.isNotBlank(node.getId())) {
|
||||||
criteria.andIdNotEqualTo(node.getId());
|
criteria.andIdNotEqualTo(node.getId());
|
||||||
|
|
|
@ -34,7 +34,6 @@ public class RelationshipGraphData {
|
||||||
private Integer category; // 分组
|
private Integer category; // 分组
|
||||||
private Integer x;
|
private Integer x;
|
||||||
private Integer y;
|
private Integer y;
|
||||||
private Boolean visited = false;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Getter
|
@Getter
|
||||||
|
|
|
@ -93,8 +93,13 @@ public class BaseModuleService extends NodeTreeService<ModuleNodeDTO> {
|
||||||
TestCaseNodeExample example = new TestCaseNodeExample();
|
TestCaseNodeExample example = new TestCaseNodeExample();
|
||||||
TestCaseNodeExample.Criteria criteria = example.createCriteria();
|
TestCaseNodeExample.Criteria criteria = example.createCriteria();
|
||||||
criteria.andNameEqualTo(node.getName())
|
criteria.andNameEqualTo(node.getName())
|
||||||
.andProjectIdEqualTo(node.getProjectId())
|
.andProjectIdEqualTo(node.getProjectId());
|
||||||
.andLevelEqualTo(node.getLevel());
|
|
||||||
|
if (StringUtils.isNotBlank(node.getParentId())) {
|
||||||
|
criteria.andParentIdEqualTo(node.getParentId());
|
||||||
|
} else {
|
||||||
|
criteria.andLevelEqualTo(node.getLevel());
|
||||||
|
}
|
||||||
|
|
||||||
if (StringUtils.isNotBlank(node.getId())) {
|
if (StringUtils.isNotBlank(node.getId())) {
|
||||||
criteria.andIdNotEqualTo(node.getId());
|
criteria.andIdNotEqualTo(node.getId());
|
||||||
|
|
|
@ -104,8 +104,13 @@ public class TestCaseNodeService extends NodeTreeService<TestCaseNodeDTO> {
|
||||||
TestCaseNodeExample example = new TestCaseNodeExample();
|
TestCaseNodeExample example = new TestCaseNodeExample();
|
||||||
TestCaseNodeExample.Criteria criteria = example.createCriteria();
|
TestCaseNodeExample.Criteria criteria = example.createCriteria();
|
||||||
criteria.andNameEqualTo(node.getName())
|
criteria.andNameEqualTo(node.getName())
|
||||||
.andProjectIdEqualTo(node.getProjectId())
|
.andProjectIdEqualTo(node.getProjectId());
|
||||||
.andLevelEqualTo(node.getLevel());
|
|
||||||
|
if (StringUtils.isNotBlank(node.getParentId())) {
|
||||||
|
criteria.andParentIdEqualTo(node.getParentId());
|
||||||
|
} else {
|
||||||
|
criteria.andLevelEqualTo(node.getLevel());
|
||||||
|
}
|
||||||
|
|
||||||
if (StringUtils.isNotBlank(node.getId())) {
|
if (StringUtils.isNotBlank(node.getId())) {
|
||||||
criteria.andIdNotEqualTo(node.getId());
|
criteria.andIdNotEqualTo(node.getId());
|
||||||
|
|
Loading…
Reference in New Issue