fix 修复主键溢出问题 将查询返回类型改为 Long

duhanyu
疯狂的狮子li 3 years ago
parent 2c3f1c28e5
commit 965ebd0f03

@ -26,7 +26,7 @@ public interface SysDeptMapper
* @param deptCheckStrictly * @param deptCheckStrictly
* @return * @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 * ID

@ -64,7 +64,7 @@ public interface SysMenuMapper
* @param menuCheckStrictly * @param menuCheckStrictly
* @return * @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 * ID

@ -39,7 +39,7 @@ public interface SysPostMapper
* @param userId ID * @param userId ID
* @return ID * @return ID
*/ */
public List<Integer> selectPostListByUserId(Long userId); public List<Long> selectPostListByUserId(Long userId);
/** /**
* *

@ -41,7 +41,7 @@ public interface ISysDeptService
* @param roleId ID * @param roleId ID
* @return * @return
*/ */
public List<Integer> selectDeptListByRoleId(Long roleId); public List<Long> selectDeptListByRoleId(Long roleId);
/** /**
* ID * ID

@ -52,7 +52,7 @@ public interface ISysMenuService
* @param roleId ID * @param roleId ID
* @return * @return
*/ */
public List<Integer> selectMenuListByRoleId(Long roleId); public List<Long> selectMenuListByRoleId(Long roleId);
/** /**
* *

@ -39,7 +39,7 @@ public interface ISysPostService
* @param userId ID * @param userId ID
* @return ID * @return ID
*/ */
public List<Integer> selectPostListByUserId(Long userId); public List<Long> selectPostListByUserId(Long userId);
/** /**
* *

@ -100,7 +100,7 @@ public class SysDeptServiceImpl implements ISysDeptService
* @return * @return
*/ */
@Override @Override
public List<Integer> selectDeptListByRoleId(Long roleId) public List<Long> selectDeptListByRoleId(Long roleId)
{ {
SysRole role = roleMapper.selectRoleById(roleId); SysRole role = roleMapper.selectRoleById(roleId);
return deptMapper.selectDeptListByRoleId(roleId, role.isDeptCheckStrictly()); return deptMapper.selectDeptListByRoleId(roleId, role.isDeptCheckStrictly());

@ -128,7 +128,7 @@ public class SysMenuServiceImpl implements ISysMenuService
* @return * @return
*/ */
@Override @Override
public List<Integer> selectMenuListByRoleId(Long roleId) public List<Long> selectMenuListByRoleId(Long roleId)
{ {
SysRole role = roleMapper.selectRoleById(roleId); SysRole role = roleMapper.selectRoleById(roleId);
return menuMapper.selectMenuListByRoleId(roleId, role.isMenuCheckStrictly()); return menuMapper.selectMenuListByRoleId(roleId, role.isMenuCheckStrictly());

@ -67,7 +67,7 @@ public class SysPostServiceImpl implements ISysPostService
* @return ID * @return ID
*/ */
@Override @Override
public List<Integer> selectPostListByUserId(Long userId) public List<Long> selectPostListByUserId(Long userId)
{ {
return postMapper.selectPostListByUserId(userId); return postMapper.selectPostListByUserId(userId);
} }

@ -47,7 +47,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
order by d.parent_id, d.order_num order by d.parent_id, d.order_num
</select> </select>
<select id="selectDeptListByRoleId" resultType="Integer"> <select id="selectDeptListByRoleId" resultType="Long">
select d.dept_id select d.dept_id
from sys_dept d 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

@ -84,7 +84,7 @@
order by m.parent_id, m.order_num order by m.parent_id, m.order_num
</select> </select>
<select id="selectMenuListByRoleId" resultType="Integer"> <select id="selectMenuListByRoleId" resultType="Long">
select m.menu_id select m.menu_id
from sys_menu m from sys_menu m
left join sys_role_menu rm on m.menu_id = rm.menu_id left join sys_role_menu rm on m.menu_id = rm.menu_id

@ -46,7 +46,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
where post_id = #{postId} where post_id = #{postId}
</select> </select>
<select id="selectPostListByUserId" parameterType="Long" resultType="Integer"> <select id="selectPostListByUserId" parameterType="Long" resultType="Long">
select p.post_id select p.post_id
from sys_post p from sys_post p
left join sys_user_post up on up.post_id = p.post_id left join sys_user_post up on up.post_id = p.post_id

Loading…
Cancel
Save