|
@@ -92,7 +92,8 @@ public abstract class AbstractTreeSortService<E extends TreeSortSupportEntity<PK
|
|
applyPath(entity);
|
|
applyPath(entity);
|
|
List<E> childrenList = new ArrayList<>();
|
|
List<E> childrenList = new ArrayList<>();
|
|
TreeSupportEntity.expandTree2List(entity, childrenList, getIDGenerator());
|
|
TreeSupportEntity.expandTree2List(entity, childrenList, getIDGenerator());
|
|
- super.insert(entity);
|
|
|
|
|
|
+// super.insert(entity);
|
|
|
|
+// childrenList.remove(entity);
|
|
childrenList.forEach(this::saveOrUpdateForSingle);
|
|
childrenList.forEach(this::saveOrUpdateForSingle);
|
|
return entity.getId();
|
|
return entity.getId();
|
|
}
|
|
}
|
|
@@ -115,7 +116,8 @@ public abstract class AbstractTreeSortService<E extends TreeSortSupportEntity<PK
|
|
assertNotNull(entity);
|
|
assertNotNull(entity);
|
|
List<E> childrenList = new ArrayList<>();
|
|
List<E> childrenList = new ArrayList<>();
|
|
TreeSupportEntity.expandTree2List(entity, childrenList, getIDGenerator());
|
|
TreeSupportEntity.expandTree2List(entity, childrenList, getIDGenerator());
|
|
- this.saveOrUpdateForSingle(entity);
|
|
|
|
|
|
+// this.saveOrUpdateForSingle(entity);
|
|
|
|
+// childrenList.remove(entity);
|
|
childrenList.forEach(this::saveOrUpdateForSingle);
|
|
childrenList.forEach(this::saveOrUpdateForSingle);
|
|
return childrenList.size() + 1;
|
|
return childrenList.size() + 1;
|
|
}
|
|
}
|