parentId设置范围限制
This commit is contained in:
parent
78ba865d4a
commit
5d75d6abf0
@ -241,6 +241,9 @@ public class SaasFeatureResourceServiceImpl implements SaasFeatureResourceServic
|
||||
}
|
||||
|
||||
private void newResource(SaasFeatureResource resource, String parentPath) {
|
||||
if (resource.getParentId() != null && resource.getParentId() < 0) {
|
||||
resource.setParentId(0L);
|
||||
}
|
||||
featureResourceDao.save(resource);
|
||||
//path追加自身ID
|
||||
resource.setPath(StringUtils.isBlank(parentPath) ? resource.getId().toString() : parentPath + "," + resource.getId());
|
||||
@ -269,7 +272,7 @@ public class SaasFeatureResourceServiceImpl implements SaasFeatureResourceServic
|
||||
if (!CollectionUtil.isEmpty(children)) {
|
||||
for (int i = 0; i < children.size(); i++) {
|
||||
FeatureComponentSaveReq childComponent = children.get(i);
|
||||
if (childComponent.getParentId() != null) {
|
||||
if (childComponent.getParentId() == null) {
|
||||
childComponent.setParentId(saasFeatureResource.getId());
|
||||
}
|
||||
// 递归新增修改删除子节点
|
||||
|
||||
Loading…
Reference in New Issue
Block a user