!200 update ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysMenuServiceImpl.java.

Merge pull request !200 from yvan7123/N/A
master
若依 4 years ago
commit 9fa5c79713
  1. 10
      ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysMenuServiceImpl.java

@ -158,7 +158,7 @@ public class SysMenuServiceImpl implements ISysMenuService
router.setRedirect("noRedirect"); router.setRedirect("noRedirect");
router.setChildren(buildMenus(cMenus)); router.setChildren(buildMenus(cMenus));
} }
else if (isMeunFrame(menu)) else if (isMenuFrame(menu))
{ {
List<RouterVo> childrenList = new ArrayList<RouterVo>(); List<RouterVo> childrenList = new ArrayList<RouterVo>();
RouterVo children = new RouterVo(); RouterVo children = new RouterVo();
@ -321,7 +321,7 @@ public class SysMenuServiceImpl implements ISysMenuService
{ {
String routerName = StringUtils.capitalize(menu.getPath()); String routerName = StringUtils.capitalize(menu.getPath());
// 非外链并且是一级目录(类型为目录) // 非外链并且是一级目录(类型为目录)
if (isMeunFrame(menu)) if (isMenuFrame(menu))
{ {
routerName = StringUtils.EMPTY; routerName = StringUtils.EMPTY;
} }
@ -344,7 +344,7 @@ public class SysMenuServiceImpl implements ISysMenuService
routerPath = "/" + menu.getPath(); routerPath = "/" + menu.getPath();
} }
// 非外链并且是一级目录(类型为菜单) // 非外链并且是一级目录(类型为菜单)
else if (isMeunFrame(menu)) else if (isMenuFrame(menu))
{ {
routerPath = "/"; routerPath = "/";
} }
@ -360,7 +360,7 @@ public class SysMenuServiceImpl implements ISysMenuService
public String getComponent(SysMenu menu) public String getComponent(SysMenu menu)
{ {
String component = UserConstants.LAYOUT; String component = UserConstants.LAYOUT;
if (StringUtils.isNotEmpty(menu.getComponent()) && !isMeunFrame(menu)) if (StringUtils.isNotEmpty(menu.getComponent()) && !isMenuFrame(menu))
{ {
component = menu.getComponent(); component = menu.getComponent();
} }
@ -377,7 +377,7 @@ public class SysMenuServiceImpl implements ISysMenuService
* @param menu 菜单信息 * @param menu 菜单信息
* @return 结果 * @return 结果
*/ */
public boolean isMeunFrame(SysMenu menu) public boolean isMenuFrame(SysMenu menu)
{ {
return menu.getParentId().intValue() == 0 && UserConstants.TYPE_MENU.equals(menu.getMenuType()) return menu.getParentId().intValue() == 0 && UserConstants.TYPE_MENU.equals(menu.getMenuType())
&& menu.getIsFrame().equals(UserConstants.NO_FRAME); && menu.getIsFrame().equals(UserConstants.NO_FRAME);

Loading…
Cancel
Save