From f441ac1e0793499dec98580c08e66580c88d730d Mon Sep 17 00:00:00 2001
From: RuoYi <yzz_ivy@163.com>
Date: 星期五, 29 七月 2022 20:29:26 +0800
Subject: [PATCH] 优化任务过期不执行调度
---
src/main/java/com/ruoyi/project/system/service/impl/SysMenuServiceImpl.java | 25 ++++++++++++++++++-------
1 files changed, 18 insertions(+), 7 deletions(-)
diff --git a/src/main/java/com/ruoyi/project/system/service/impl/SysMenuServiceImpl.java b/src/main/java/com/ruoyi/project/system/service/impl/SysMenuServiceImpl.java
index a70110f..7946f97 100644
--- a/src/main/java/com/ruoyi/project/system/service/impl/SysMenuServiceImpl.java
+++ b/src/main/java/com/ruoyi/project/system/service/impl/SysMenuServiceImpl.java
@@ -128,7 +128,7 @@
* @return 閫変腑鑿滃崟鍒楄〃
*/
@Override
- public List<Integer> selectMenuListByRoleId(Long roleId)
+ public List<Long> selectMenuListByRoleId(Long roleId)
{
SysRole role = roleMapper.selectRoleById(roleId);
return menuMapper.selectMenuListByRoleId(roleId, role.isMenuCheckStrictly());
@@ -176,10 +176,10 @@
else if (menu.getParentId().intValue() == 0 && isInnerLink(menu))
{
router.setMeta(new MetaVo(menu.getMenuName(), menu.getIcon()));
- router.setPath("/inner");
+ router.setPath("/");
List<RouterVo> childrenList = new ArrayList<RouterVo>();
RouterVo children = new RouterVo();
- String routerPath = StringUtils.replaceEach(menu.getPath(), new String[] { Constants.HTTP, Constants.HTTPS }, new String[] { "", "" });
+ String routerPath = innerLinkReplaceEach(menu.getPath());
children.setPath(routerPath);
children.setComponent(UserConstants.INNER_LINK);
children.setName(StringUtils.capitalize(routerPath));
@@ -259,7 +259,7 @@
public boolean hasChildByMenuId(Long menuId)
{
int result = menuMapper.hasChildByMenuId(menuId);
- return result > 0 ? true : false;
+ return result > 0;
}
/**
@@ -272,7 +272,7 @@
public boolean checkMenuExistRole(Long menuId)
{
int result = roleMenuMapper.checkMenuExistRole(menuId);
- return result > 0 ? true : false;
+ return result > 0;
}
/**
@@ -358,7 +358,7 @@
// 鍐呴摼鎵撳紑澶栫綉鏂瑰紡
if (menu.getParentId().intValue() != 0 && isInnerLink(menu))
{
- routerPath = StringUtils.replaceEach(routerPath, new String[] { Constants.HTTP, Constants.HTTPS }, new String[] { "", "" });
+ routerPath = innerLinkReplaceEach(routerPath);
}
// 闈炲閾惧苟涓旀槸涓�绾х洰褰曪紙绫诲瀷涓虹洰褰曪級
if (0 == menu.getParentId().intValue() && UserConstants.TYPE_DIR.equals(menu.getMenuType())
@@ -498,6 +498,17 @@
*/
private boolean hasChild(List<SysMenu> list, SysMenu t)
{
- return getChildList(list, t).size() > 0 ? true : false;
+ return getChildList(list, t).size() > 0;
+ }
+
+ /**
+ * 鍐呴摼鍩熷悕鐗规畩瀛楃鏇挎崲
+ *
+ * @return
+ */
+ public String innerLinkReplaceEach(String path)
+ {
+ return StringUtils.replaceEach(path, new String[] { Constants.HTTP, Constants.HTTPS },
+ new String[] { "", "" });
}
}
--
Gitblit v1.9.3