diff --git a/backend/services/project-management/src/main/java/io/metersphere/project/service/FileModuleService.java b/backend/services/project-management/src/main/java/io/metersphere/project/service/FileModuleService.java index 5fa28f2d34..011236d403 100644 --- a/backend/services/project-management/src/main/java/io/metersphere/project/service/FileModuleService.java +++ b/backend/services/project-management/src/main/java/io/metersphere/project/service/FileModuleService.java @@ -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) { diff --git a/backend/services/project-management/src/main/java/io/metersphere/project/service/ModuleTreeService.java b/backend/services/project-management/src/main/java/io/metersphere/project/service/ModuleTreeService.java index 148da19aa4..d6018522ce 100644 --- a/backend/services/project-management/src/main/java/io/metersphere/project/service/ModuleTreeService.java +++ b/backend/services/project-management/src/main/java/io/metersphere/project/service/ModuleTreeService.java @@ -59,7 +59,7 @@ public abstract class ModuleTreeService { while (CollectionUtils.isNotEmpty(traverseList) && traverseList.size() != lastSize) { List 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);