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