| | |
| | | * @param deptCheckStrictly 部门树选择项是否关联显示
|
| | | * @return 选中部门列表
|
| | | */
|
| | | public List<Integer> selectDeptListByRoleId(@Param("roleId") Long roleId, @Param("deptCheckStrictly") boolean deptCheckStrictly);
|
| | | public List<Long> selectDeptListByRoleId(@Param("roleId") Long roleId, @Param("deptCheckStrictly") boolean deptCheckStrictly);
|
| | |
|
| | | /**
|
| | | * 根据部门ID查询信息
|
| | |
| | | * @param menuCheckStrictly 菜单树选择项是否关联显示
|
| | | * @return 选中菜单列表
|
| | | */
|
| | | public List<Integer> selectMenuListByRoleId(@Param("roleId") Long roleId, @Param("menuCheckStrictly") boolean menuCheckStrictly);
|
| | | public List<Long> selectMenuListByRoleId(@Param("roleId") Long roleId, @Param("menuCheckStrictly") boolean menuCheckStrictly);
|
| | |
|
| | | /**
|
| | | * 根据菜单ID查询信息
|
| | |
| | | * @param userId 用户ID
|
| | | * @return 选中岗位ID列表
|
| | | */
|
| | | public List<Integer> selectPostListByUserId(Long userId);
|
| | | public List<Long> selectPostListByUserId(Long userId);
|
| | |
|
| | | /**
|
| | | * 查询用户所属岗位组
|
| | |
| | | * @param roleId 角色ID
|
| | | * @return 选中部门列表
|
| | | */
|
| | | public List<Integer> selectDeptListByRoleId(Long roleId);
|
| | | public List<Long> selectDeptListByRoleId(Long roleId);
|
| | |
|
| | | /**
|
| | | * 根据部门ID查询信息
|
| | |
| | | * @param roleId 角色ID
|
| | | * @return 选中菜单列表
|
| | | */
|
| | | public List<Integer> selectMenuListByRoleId(Long roleId);
|
| | | public List<Long> selectMenuListByRoleId(Long roleId);
|
| | |
|
| | | /**
|
| | | * 构建前端路由所需要的菜单
|
| | |
| | | * @param userId 用户ID
|
| | | * @return 选中岗位ID列表
|
| | | */
|
| | | public List<Integer> selectPostListByUserId(Long userId);
|
| | | public List<Long> selectPostListByUserId(Long userId);
|
| | |
|
| | | /**
|
| | | * 校验岗位名称
|
| | |
| | | * @return 选中部门列表
|
| | | */
|
| | | @Override
|
| | | public List<Integer> selectDeptListByRoleId(Long roleId)
|
| | | public List<Long> selectDeptListByRoleId(Long roleId)
|
| | | {
|
| | | SysRole role = roleMapper.selectRoleById(roleId);
|
| | | return deptMapper.selectDeptListByRoleId(roleId, role.isDeptCheckStrictly());
|
| | |
| | | * @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());
|
| | |
| | | * @return 选中岗位ID列表
|
| | | */
|
| | | @Override
|
| | | public List<Integer> selectPostListByUserId(Long userId)
|
| | | public List<Long> selectPostListByUserId(Long userId)
|
| | | {
|
| | | return postMapper.selectPostListByUserId(userId);
|
| | | }
|
| | |
| | | order by d.parent_id, d.order_num
|
| | | </select>
|
| | |
|
| | | <select id="selectDeptListByRoleId" resultType="Integer">
|
| | | <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
|
| | |
| | | order by m.parent_id, m.order_num
|
| | | </select>
|
| | |
|
| | | <select id="selectMenuListByRoleId" resultType="Integer">
|
| | | <select id="selectMenuListByRoleId" resultType="Long">
|
| | | select m.menu_id
|
| | | from sys_menu m
|
| | | left join sys_role_menu rm on m.menu_id = rm.menu_id
|
| | |
| | | where post_id = #{postId}
|
| | | </select>
|
| | |
|
| | | <select id="selectPostListByUserId" parameterType="Long" resultType="Integer">
|
| | | <select id="selectPostListByUserId" parameterType="Long" resultType="Long">
|
| | | select p.post_id
|
| | | from sys_post p
|
| | | left join sys_user_post up on up.post_id = p.post_id
|