mirror of
https://github.com/dromara/RuoYi-Vue-Plus.git
synced 2025-09-24 07:19:46 +08:00
Merge branch 'master' of https://gitee.com/y_project/RuoYi-Vue into dev
Conflicts: README.md pom.xml ruoyi-admin/pom.xml ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/SysProfileController.java ruoyi-admin/src/main/resources/application.yml ruoyi-common/pom.xml ruoyi-framework/pom.xml ruoyi-generator/pom.xml ruoyi-job/pom.xml ruoyi-quartz/src/main/java/com/ruoyi/quartz/util/JobInvokeUtil.java ruoyi-system/pom.xml ruoyi-system/src/main/java/com/ruoyi/system/mapper/SysDeptMapper.java ruoyi-system/src/main/java/com/ruoyi/system/mapper/SysMenuMapper.java ruoyi-system/src/main/java/com/ruoyi/system/mapper/SysPostMapper.java ruoyi-system/src/main/java/com/ruoyi/system/service/ISysDeptService.java ruoyi-system/src/main/java/com/ruoyi/system/service/ISysMenuService.java ruoyi-system/src/main/java/com/ruoyi/system/service/ISysPostService.java ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysDeptServiceImpl.java ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysMenuServiceImpl.java ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysPostServiceImpl.java ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysUserServiceImpl.java ruoyi-system/src/main/resources/mapper/system/SysDeptMapper.xml ruoyi-system/src/main/resources/mapper/system/SysMenuMapper.xml ruoyi-system/src/main/resources/mapper/system/SysPostMapper.xml ruoyi-ui/package.json ruoyi-ui/src/directive/index.js ruoyi-ui/src/plugins/download.js ruoyi-ui/src/views/index.vue ruoyi-ui/src/views/monitor/online/index.vue ruoyi-ui/src/views/system/user/authRole.vue ruoyi-ui/src/views/system/user/index.vue ruoyi-ui/src/views/tool/gen/basicInfoForm.vue ruoyi-ui/src/views/tool/gen/genInfoForm.vue
This commit is contained in:
@ -158,7 +158,7 @@ public class SysMenuServiceImpl extends ServicePlusImpl<SysMenuMapper, SysMenu,
|
||||
router.setPath("/inner");
|
||||
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));
|
||||
@ -302,7 +302,7 @@ public class SysMenuServiceImpl extends ServicePlusImpl<SysMenuMapper, SysMenu,
|
||||
String routerPath = menu.getPath();
|
||||
// 内链打开外网方式
|
||||
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())
|
||||
@ -420,4 +420,15 @@ public class SysMenuServiceImpl extends ServicePlusImpl<SysMenuMapper, SysMenu,
|
||||
private boolean hasChild(List<SysMenu> list, SysMenu t) {
|
||||
return getChildList(list, t).size() > 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* 内链域名特殊字符替换
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
public String innerLinkReplaceEach(String path)
|
||||
{
|
||||
return StringUtils.replaceEach(path, new String[] { Constants.HTTP, Constants.HTTPS },
|
||||
new String[] { "", "" });
|
||||
}
|
||||
}
|
||||
|
@ -52,7 +52,7 @@
|
||||
<select id="selectDeptListByRoleId" resultType="Long">
|
||||
select d.dept_id
|
||||
from sys_dept d
|
||||
left join sys_role_dept rd on d.dept_id = rd.dept_id
|
||||
left join sys_role_dept rd on d.dept_id = rd.dept_id
|
||||
where rd.role_id = #{roleId}
|
||||
<if test="deptCheckStrictly">
|
||||
and d.dept_id not in (select d.parent_id from sys_dept d inner join sys_role_dept rd on d.dept_id = rd.dept_id and rd.role_id = #{roleId})
|
||||
|
Reference in New Issue
Block a user