|
@@ -166,6 +166,7 @@ public class DefaultTreeService<M extends BaseMapper<T>, T extends TreeEntity<?
|
|
|
@Override
|
|
|
public boolean save(@NonNull T entity) {
|
|
|
return DatabaseContextHolder.transactional((Supplier<Boolean>) () -> {
|
|
|
+ entity.setSequence(StringUtils.EMPTY);
|
|
|
boolean success = super.save(entity);
|
|
|
if (success) {
|
|
|
// 更新树形节点序号
|
|
@@ -182,6 +183,7 @@ public class DefaultTreeService<M extends BaseMapper<T>, T extends TreeEntity<?
|
|
|
return false;
|
|
|
}
|
|
|
return DatabaseContextHolder.transactional((Supplier<Boolean>) () -> {
|
|
|
+ entities.forEach(entity -> entity.setSequence(StringUtils.EMPTY));
|
|
|
boolean success = super.saveBatch(entities, batchSize);
|
|
|
if (success) {
|
|
|
// 更新树形节点序号
|