mirror of
				https://gitee.com/hhyykk/ipms-sjy.git
				synced 2025-11-04 12:18:42 +08:00 
			
		
		
		
	1063 【轻量级 PR】:关闭菜单还是会显示的问题修复
This commit is contained in:
		@@ -140,17 +140,19 @@ public class MenuServiceImpl implements MenuService {
 | 
			
		||||
            return true;
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        // 1. 遍历到 parentId 为根节点,则无需判断
 | 
			
		||||
        // 1. 先判断自身是否禁用
 | 
			
		||||
        if (CommonStatusEnum.isDisable(node.getStatus())) {
 | 
			
		||||
            disabledMenuCache.add(node.getId());
 | 
			
		||||
            return true;
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        // 2. 遍历到 parentId 为根节点,则无需判断
 | 
			
		||||
        Long parentId = node.getParentId();
 | 
			
		||||
        if (ObjUtil.equal(parentId, ID_ROOT)) {
 | 
			
		||||
            if (CommonStatusEnum.isDisable(node.getStatus())) {
 | 
			
		||||
                disabledMenuCache.add(node.getId());
 | 
			
		||||
                return true;
 | 
			
		||||
            }
 | 
			
		||||
            return false;
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        // 2. 继续遍历 parent 节点
 | 
			
		||||
        // 3. 继续遍历 parent 节点
 | 
			
		||||
        MenuDO parent = menuMap.get(parentId);
 | 
			
		||||
        if (parent == null || isMenuDisabled(parent, menuMap, disabledMenuCache)) {
 | 
			
		||||
            disabledMenuCache.add(node.getId());
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user