bug
jiangping
2023-11-07 64b432916af9c9218ab3f3eca614e26c542142ae
server/src/main/java/doumeemes/biz/system/impl/SystemMenuBizImpl.java
@@ -113,7 +113,8 @@
        String rPath =systemDictDataBiz.queryByCode(Constants.OSS,Constants.RESOURCE_PATH).getCode()+systemDictDataBiz.queryByCode(Constants.OSS,Constants.MENU_IMG).getCode();
        for (SystemMenu menu : menus) {
            if(Constants.equalsInteger(menu.getType(),Constants.PlatType.companyH5) && StringUtils.isNotBlank(menu.getIcon())){
                menu.setIcon(rPath+menu.getIcon());
                menu.setIcon(menu.getIcon());
                menu.setResourcePath(rPath);
            }
            if (menu.getParentId() == null) {
                SystemMenuListVO rootMenu = new SystemMenuListVO();
@@ -125,7 +126,8 @@
        menus.removeIf(menu -> menu.getParentId() == null);
        for (SystemMenuListVO child : rootMenus) {
            if(Constants.equalsInteger(child.getType(),Constants.PlatType.companyH5) && StringUtils.isNotBlank(child.getIcon())){
                child.setIcon(rPath+child.getIcon());
                child.setIcon(child.getIcon());
                child.setResourcePath(rPath);
            }
            this.fillChildren(child, menus);
        }
@@ -156,6 +158,7 @@
                nodeVO.setIndex("menu_" + menu.getId());
                nodeVO.setLabel(menu.getName());
                nodeVO.setUrl(menu.getPath());
                nodeVO.setUrlSec(menu.getPathSec());
                nodeVO.setIcon(menu.getIcon());
                nodeVO.setChildren(new ArrayList<>());
                rootNodes.add(nodeVO);
@@ -180,7 +183,7 @@
            if (menu == null) {
                continue;
            }
            if (menu.getFixed()) {
            if (menu.getFixed() !=null && menu.getFixed()) {
                throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(), "请勿删除" + menu.getName() + ", 因为这是固定菜单");
            }
        }
@@ -243,6 +246,7 @@
                child.setId(menu.getId());
                child.setLabel(menu.getName());
                child.setUrl(menu.getPath());
                child.setUrlSec(menu.getPathSec());
                child.setIcon(menu.getIcon());
                child.setIndex("menu_" + menu.getId());
                child.setChildren(new ArrayList<>());