From 87fcfe0c56666c93b1af38c7348c101cfdcad31d Mon Sep 17 00:00:00 2001 From: RuoYi Date: Thu, 8 Apr 2021 22:19:05 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E6=B3=A8=E9=87=8A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/ruoyi/common/core/utils/StringUtils.java | 2 +- .../ruoyi/system/service/impl/SysMenuServiceImpl.java | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/ruoyi-common/ruoyi-common-core/src/main/java/com/ruoyi/common/core/utils/StringUtils.java b/ruoyi-common/ruoyi-common-core/src/main/java/com/ruoyi/common/core/utils/StringUtils.java index 715794a9..3aafe03c 100644 --- a/ruoyi-common/ruoyi-common-core/src/main/java/com/ruoyi/common/core/utils/StringUtils.java +++ b/ruoyi-common/ruoyi-common-core/src/main/java/com/ruoyi/common/core/utils/StringUtils.java @@ -259,7 +259,7 @@ public class StringUtils extends org.apache.commons.lang3.StringUtils } /** - * 下划线转驼峰命名 + * 驼峰转下划线命名 */ public static String toUnderScoreCase(String str) { diff --git a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysMenuServiceImpl.java b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysMenuServiceImpl.java index 74c74518..4d5867f6 100644 --- a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysMenuServiceImpl.java +++ b/ruoyi-modules/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.setChildren(buildMenus(cMenus)); } - else if (isMeunFrame(menu)) + else if (isMenuFrame(menu)) { List childrenList = new ArrayList(); RouterVo children = new RouterVo(); @@ -321,7 +321,7 @@ public class SysMenuServiceImpl implements ISysMenuService { String routerName = StringUtils.capitalize(menu.getPath()); // 非外链并且是一级目录(类型为目录) - if (isMeunFrame(menu)) + if (isMenuFrame(menu)) { routerName = StringUtils.EMPTY; } @@ -344,7 +344,7 @@ public class SysMenuServiceImpl implements ISysMenuService routerPath = "/" + menu.getPath(); } // 非外链并且是一级目录(类型为菜单) - else if (isMeunFrame(menu)) + else if (isMenuFrame(menu)) { routerPath = "/"; } @@ -360,7 +360,7 @@ public class SysMenuServiceImpl implements ISysMenuService public String getComponent(SysMenu menu) { String component = UserConstants.LAYOUT; - if (StringUtils.isNotEmpty(menu.getComponent()) && !isMeunFrame(menu)) + if (StringUtils.isNotEmpty(menu.getComponent()) && !isMenuFrame(menu)) { component = menu.getComponent(); } @@ -377,7 +377,7 @@ public class SysMenuServiceImpl implements ISysMenuService * @param menu 菜单信息 * @return 结果 */ - public boolean isMeunFrame(SysMenu menu) + public boolean isMenuFrame(SysMenu menu) { return menu.getParentId().intValue() == 0 && UserConstants.TYPE_MENU.equals(menu.getMenuType()) && menu.getIsFrame().equals(UserConstants.NO_FRAME);