fix(系统设置): 修复文件管理中针对跟目录id的判断方法
This commit is contained in:
parent
314a6fbfd4
commit
467942fc59
|
@ -94,7 +94,7 @@ public class FileModuleService extends ModuleTreeService implements CleanupProje
|
|||
*/
|
||||
protected void checkDataValidity(FileModule fileModule) {
|
||||
FileModuleExample example = new FileModuleExample();
|
||||
if (!StringUtils.equals(fileModule.getParentId(), ModuleConstants.ROOT_NODE_PARENT_ID)) {
|
||||
if (!StringUtils.equalsIgnoreCase(fileModule.getParentId(), ModuleConstants.ROOT_NODE_PARENT_ID)) {
|
||||
//检查父ID是否存在
|
||||
example.createCriteria().andIdEqualTo(fileModule.getParentId());
|
||||
if (fileModuleMapper.countByExample(example) == 0) {
|
||||
|
|
|
@ -59,7 +59,7 @@ public abstract class ModuleTreeService {
|
|||
while (CollectionUtils.isNotEmpty(traverseList) && traverseList.size() != lastSize) {
|
||||
List<BaseTreeNode> notMatchedList = new ArrayList<>();
|
||||
for (BaseTreeNode treeNode : traverseList) {
|
||||
if (StringUtils.equals(treeNode.getParentId(), ModuleConstants.ROOT_NODE_PARENT_ID)) {
|
||||
if (StringUtils.equalsIgnoreCase(treeNode.getParentId(), ModuleConstants.ROOT_NODE_PARENT_ID)) {
|
||||
BaseTreeNode node = new BaseTreeNode(treeNode.getId(), treeNode.getName(), treeNode.getType(), treeNode.getParentId());
|
||||
baseTreeNodeList.add(node);
|
||||
baseTreeNodeMap.put(treeNode.getId(), node);
|
||||
|
|
Loading…
Reference in New Issue