| | |
| | | }
|
| | |
|
| | | /**
|
| | | * 根据角色ID查询权限
|
| | | * |
| | | * @param roleId 角色ID
|
| | | * @return 权限列表
|
| | | */
|
| | | @Override
|
| | | public Set<String> selectMenuPermsByRoleId(Long roleId)
|
| | | {
|
| | | List<String> perms = menuMapper.selectMenuPermsByRoleId(roleId);
|
| | | Set<String> permsSet = new HashSet<>();
|
| | | for (String perm : perms)
|
| | | {
|
| | | if (StringUtils.isNotEmpty(perm))
|
| | | {
|
| | | permsSet.addAll(Arrays.asList(perm.trim().split(",")));
|
| | | }
|
| | | }
|
| | | return permsSet;
|
| | | }
|
| | |
|
| | | /**
|
| | | * 根据用户ID查询菜单
|
| | | *
|
| | | * @param userId 用户名称
|
| | |
| | | * @return 结果
|
| | | */
|
| | | @Override
|
| | | public String checkMenuNameUnique(SysMenu menu)
|
| | | public boolean checkMenuNameUnique(SysMenu menu)
|
| | | {
|
| | | Long menuId = StringUtils.isNull(menu.getMenuId()) ? -1L : menu.getMenuId();
|
| | | SysMenu info = menuMapper.checkMenuNameUnique(menu.getMenuName(), menu.getParentId());
|
| | |
| | | */
|
| | | public String innerLinkReplaceEach(String path)
|
| | | {
|
| | | return StringUtils.replaceEach(path, new String[] { Constants.HTTP, Constants.HTTPS },
|
| | | new String[] { "", "" });
|
| | | return StringUtils.replaceEach(path, new String[] { Constants.HTTP, Constants.HTTPS, Constants.WWW, "." },
|
| | | new String[] { "", "", "", "/" });
|
| | | }
|
| | | }
|