|
|
|
@ -129,17 +129,26 @@ public class DirectoryTreeService { |
|
|
|
|
private List<DirectoryVo> getDirectoryList(DirectoryVo parentDir, boolean allChild, boolean hasResource, int busType) { |
|
|
|
|
QueryWrapper<DirectoryVo> wrapper = new QueryWrapper<>(); |
|
|
|
|
if (parentDir == null) { |
|
|
|
|
switch (busType) { |
|
|
|
|
case 2: |
|
|
|
|
wrapper.in("ID", "ROOT", "ROOT_BASIC_DATA"); |
|
|
|
|
break; |
|
|
|
|
case 1: |
|
|
|
|
wrapper.eq("ID", "ROOT_BASIC_DATA"); |
|
|
|
|
break; |
|
|
|
|
case 0: |
|
|
|
|
default: |
|
|
|
|
wrapper.eq("ID", "ROOT"); |
|
|
|
|
} |
|
|
|
|
} else { |
|
|
|
|
wrapper.in(!hasResource, "DIRECTORY_TYPE", DirectoryType.DIRECTORY, DirectoryType.LINK_DIR).eq("IS_BASIC_DIR", busType); |
|
|
|
|
if (parentDir != null) { |
|
|
|
|
wrapper.in(!hasResource, "DIRECTORY_TYPE", DirectoryType.DIRECTORY, DirectoryType.LINK_DIR).eq("IS_BASIC_DIR", (busType == 1 || busType == 2)); |
|
|
|
|
|
|
|
|
|
if (allChild) { |
|
|
|
|
wrapper.likeRight("DIRECTORY_PATH", parentDir.getDirectoryPath() + "/"); |
|
|
|
|
} else { |
|
|
|
|
wrapper.eq("PARENT_ID", parentDir.getId()); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
return directoryService.list(wrapper); |
|
|
|
|
} |
|
|
|
|