|
|
@ -153,7 +153,7 @@ public class DirectoryTreeService { |
|
|
|
} |
|
|
|
} |
|
|
|
Set<String> allowDirIds = dirPermissionService.getByReadPermis(SecurityUtil.getLoginSysUser()); |
|
|
|
Set<String> allowDirIds = dirPermissionService.getByReadPermis(SecurityUtil.getLoginSysUser()); |
|
|
|
Set<String> dirIds = allDir.stream().map(DirectoryVo::getId).filter(allowDirIds::contains).collect(Collectors.toSet()); |
|
|
|
Set<String> dirIds = allDir.stream().map(DirectoryVo::getId).filter(allowDirIds::contains).collect(Collectors.toSet()); |
|
|
|
dirIds.add(parentId); |
|
|
|
//dirIds.add(DirectoryType.LINK_DIR == parent.getDirectoryType() ? parent.getResourceId() : parentId);
|
|
|
|
QueryWrapper<DirectoryResource> query = new QueryWrapper<>(); |
|
|
|
QueryWrapper<DirectoryResource> query = new QueryWrapper<>(); |
|
|
|
query.in("PARENT_ID", dirIds); |
|
|
|
query.in("PARENT_ID", dirIds); |
|
|
|
if (StringUtils.hasText(text)) { |
|
|
|
if (StringUtils.hasText(text)) { |
|
|
@ -169,6 +169,14 @@ public class DirectoryTreeService { |
|
|
|
|
|
|
|
|
|
|
|
private void allDirectoryByParent(DirectoryVo parent, HashSet<DirectoryVo> result) { |
|
|
|
private void allDirectoryByParent(DirectoryVo parent, HashSet<DirectoryVo> result) { |
|
|
|
String parentId = DirectoryType.LINK_DIR == parent.getDirectoryType() ? parent.getResourceId() : parent.getId(); |
|
|
|
String parentId = DirectoryType.LINK_DIR == parent.getDirectoryType() ? parent.getResourceId() : parent.getId(); |
|
|
|
|
|
|
|
if(DirectoryType.LINK_DIR == parent.getDirectoryType()){ |
|
|
|
|
|
|
|
DirectoryVo linkDir = directoryService.getById(parent.getResourceId()); |
|
|
|
|
|
|
|
if(linkDir != null){ |
|
|
|
|
|
|
|
result.add(linkDir); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
}else{ |
|
|
|
|
|
|
|
result.add(parent); |
|
|
|
|
|
|
|
} |
|
|
|
List<DirectoryVo> children = directoryService.childrenListByParent(parentId); |
|
|
|
List<DirectoryVo> children = directoryService.childrenListByParent(parentId); |
|
|
|
children.forEach(dir -> { |
|
|
|
children.forEach(dir -> { |
|
|
|
result.add(dir); |
|
|
|
result.add(dir); |
|
|
|