fix (接口自动化): 增加关系重复验证
This commit is contained in:
parent
d9a24b10a5
commit
4ffb6baf48
|
@ -153,7 +153,9 @@ public class RelationshipEdgeService {
|
||||||
|
|
||||||
relationshipEdges.forEach(item -> {
|
relationshipEdges.forEach(item -> {
|
||||||
if (addEdgesIds.contains(item.getSourceId() + item.getTargetId())) {
|
if (addEdgesIds.contains(item.getSourceId() + item.getTargetId())) {
|
||||||
batchMapper.insert(item);
|
if(batchMapper.selectByPrimaryKey(item) == null ) {
|
||||||
|
batchMapper.insert(item);
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
item.setGraphId(graphId); // 把原来图的id设置成合并后新的图的id
|
item.setGraphId(graphId); // 把原来图的id设置成合并后新的图的id
|
||||||
batchMapper.updateByPrimaryKey(item);
|
batchMapper.updateByPrimaryKey(item);
|
||||||
|
|
Loading…
Reference in New Issue