diff --git a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/extRepo/service/impl/ExtRepoFolderServiceImpl.java b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/extRepo/service/impl/ExtRepoFolderServiceImpl.java index 1a233e147..442ab9d67 100644 --- a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/extRepo/service/impl/ExtRepoFolderServiceImpl.java +++ b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/extRepo/service/impl/ExtRepoFolderServiceImpl.java @@ -241,7 +241,6 @@ public class ExtRepoFolderServiceImpl extends ServiceImpl resList = new ArrayList<>(); for (ExtRepoFolder erf : list) { if (supId.equals(erf.getSupFolder())) { - //int childLevel = level + 1; if (haveViewAuth(erf.getId())) { ERFTreeData date = new ERFTreeData(erf.getFolderName(), erf.getId(), level, erf.getOrderId()); boolean parentRightClick = haveManageAuth(erf.getId()); @@ -252,7 +251,7 @@ public class ExtRepoFolderServiceImpl extends ServiceImpl(),level,parentRightClick)); + date.setChildren(subFolderTree(new ArrayList(),date)); date.sortChildren(); resList.add(date); } else { @@ -265,20 +264,18 @@ public class ExtRepoFolderServiceImpl extends ServiceImpl subFolderTree(String folder,List childTree,int level,boolean parentRightClick) { - int childLevel = level + 1; - List listBySupFolder = getListBySupFolder(folder); - ExtRepoFolder father = queryById(folder); + private List subFolderTree(List childTree,ERFTreeData father) { + int childLevel = father.getLevel() + 1; + List listBySupFolder = getListBySupFolder(father.getKey()); for (ExtRepoFolder extRepoFolder : listBySupFolder) { ERFTreeData date = new ERFTreeData(extRepoFolder.getFolderName(), extRepoFolder.getId(), childLevel, extRepoFolder.getOrderId()); //是否有管理权限 boolean childRightClick = haveManageAuth(extRepoFolder.getId()); - if (parentRightClick||childRightClick) { - childRightClick = true; + if (father.isManager()||childRightClick) { date.setManager(true); } //如果参数为空则延续父文件夹权限,反之用自己的 @@ -296,7 +293,7 @@ public class ExtRepoFolderServiceImpl extends ServiceImpl(),childLevel,childRightClick)); + date.setChildren(subFolderTree(new ArrayList(),date)); date.sortChildren(); childTree.add(date); }