fix: 切换协议,添加相同节点报错

This commit is contained in:
chenjianxing 2021-01-26 17:17:52 +08:00
parent 1bb837bb61
commit 8961ba6c98
1 changed files with 5 additions and 0 deletions

View File

@ -174,6 +174,11 @@ public class ApiModuleService extends NodeTreeService<ApiModuleDTO> {
ApiModuleExample.Criteria criteria = example.createCriteria();
criteria.andNameEqualTo(node.getName())
.andProjectIdEqualTo(node.getProjectId());
if (StringUtils.isNotBlank(node.getProtocol())) {
criteria.andProtocolEqualTo(node.getProtocol());
}
if (StringUtils.isNotBlank(node.getParentId())) {
criteria.andParentIdEqualTo(node.getParentId());
} else {