diff --git a/shandan-bianmu/src/main/java/com/keyware/shandan/bianmu/controller/DirectoryController.java b/shandan-bianmu/src/main/java/com/keyware/shandan/bianmu/controller/DirectoryController.java index 474bab9..8a04293 100644 --- a/shandan-bianmu/src/main/java/com/keyware/shandan/bianmu/controller/DirectoryController.java +++ b/shandan-bianmu/src/main/java/com/keyware/shandan/bianmu/controller/DirectoryController.java @@ -76,10 +76,14 @@ public class DirectoryController extends BaseController metaDirList = Arrays.stream(metadataIds.split(",")) - .map(id -> directoryBuilder.buildMetadataDir(directoryId, id)) + .map(id -> directoryBuilder.buildMetadataDir(parentId, id)) .collect(Collectors.toList()); directoryService.saveBatch(metaDirList); diff --git a/shandan-system/src/main/java/com/keyware/shandan/bianmu/service/DirectoryTreeService.java b/shandan-system/src/main/java/com/keyware/shandan/bianmu/service/DirectoryTreeService.java index 7351196..aa6a12e 100644 --- a/shandan-system/src/main/java/com/keyware/shandan/bianmu/service/DirectoryTreeService.java +++ b/shandan-system/src/main/java/com/keyware/shandan/bianmu/service/DirectoryTreeService.java @@ -153,7 +153,7 @@ public class DirectoryTreeService { } Set allowDirIds = dirPermissionService.getByReadPermis(SecurityUtil.getLoginSysUser()); Set 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 query = new QueryWrapper<>(); query.in("PARENT_ID", dirIds); if (StringUtils.hasText(text)) { @@ -169,6 +169,14 @@ public class DirectoryTreeService { private void allDirectoryByParent(DirectoryVo parent, HashSet result) { 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 children = directoryService.childrenListByParent(parentId); children.forEach(dir -> { result.add(dir); diff --git a/shandan-system/src/main/java/com/keyware/shandan/system/controller/SysFileController.java b/shandan-system/src/main/java/com/keyware/shandan/system/controller/SysFileController.java index a06548e..52abb96 100644 --- a/shandan-system/src/main/java/com/keyware/shandan/system/controller/SysFileController.java +++ b/shandan-system/src/main/java/com/keyware/shandan/system/controller/SysFileController.java @@ -200,7 +200,7 @@ public class SysFileController extends BaseController mergerChunk(SysFile file) throws Exception { - FileChunkUploadUtil.mergeChunk(file, sysFIle -> sysFileService.save(sysFIle)); + FileChunkUploadUtil.mergeChunk(file, sysFile -> sysFileService.save(sysFile)); return Result.of(sysFileService.autoCreateDirAndUpdateFile(file)); } diff --git a/shandan-system/src/main/java/com/keyware/shandan/system/service/impl/SysFileServiceImpl.java b/shandan-system/src/main/java/com/keyware/shandan/system/service/impl/SysFileServiceImpl.java index 23a10f3..bd71d39 100644 --- a/shandan-system/src/main/java/com/keyware/shandan/system/service/impl/SysFileServiceImpl.java +++ b/shandan-system/src/main/java/com/keyware/shandan/system/service/impl/SysFileServiceImpl.java @@ -216,6 +216,10 @@ public class SysFileServiceImpl extends BaseServiceImpl