Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
jinli gu
RuoYi Vue
Commits
965ebd0f
"vscode:/vscode.git/clone" did not exist on "cd8c0160cd9e10c67ada7bb515fcfcc190eedd39"
Commit
965ebd0f
authored
Dec 03, 2021
by
疯狂的狮子li
Browse files
fix 修复主键溢出问题 将查询返回类型改为 Long
parent
2c3f1c28
Changes
12
Hide whitespace changes
Inline
Side-by-side
ruoyi-system/src/main/java/com/ruoyi/system/mapper/SysDeptMapper.java
View file @
965ebd0f
...
...
@@ -26,7 +26,7 @@ public interface SysDeptMapper
* @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查询信息
...
...
ruoyi-system/src/main/java/com/ruoyi/system/mapper/SysMenuMapper.java
View file @
965ebd0f
...
...
@@ -64,7 +64,7 @@ public interface SysMenuMapper
* @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查询信息
...
...
ruoyi-system/src/main/java/com/ruoyi/system/mapper/SysPostMapper.java
View file @
965ebd0f
...
...
@@ -39,7 +39,7 @@ public interface SysPostMapper
* @param userId 用户ID
* @return 选中岗位ID列表
*/
public
List
<
Integer
>
selectPostListByUserId
(
Long
userId
);
public
List
<
Long
>
selectPostListByUserId
(
Long
userId
);
/**
* 查询用户所属岗位组
...
...
ruoyi-system/src/main/java/com/ruoyi/system/service/ISysDeptService.java
View file @
965ebd0f
...
...
@@ -41,7 +41,7 @@ public interface ISysDeptService
* @param roleId 角色ID
* @return 选中部门列表
*/
public
List
<
Integer
>
selectDeptListByRoleId
(
Long
roleId
);
public
List
<
Long
>
selectDeptListByRoleId
(
Long
roleId
);
/**
* 根据部门ID查询信息
...
...
ruoyi-system/src/main/java/com/ruoyi/system/service/ISysMenuService.java
View file @
965ebd0f
...
...
@@ -52,7 +52,7 @@ public interface ISysMenuService
* @param roleId 角色ID
* @return 选中菜单列表
*/
public
List
<
Integer
>
selectMenuListByRoleId
(
Long
roleId
);
public
List
<
Long
>
selectMenuListByRoleId
(
Long
roleId
);
/**
* 构建前端路由所需要的菜单
...
...
ruoyi-system/src/main/java/com/ruoyi/system/service/ISysPostService.java
View file @
965ebd0f
...
...
@@ -39,7 +39,7 @@ public interface ISysPostService
* @param userId 用户ID
* @return 选中岗位ID列表
*/
public
List
<
Integer
>
selectPostListByUserId
(
Long
userId
);
public
List
<
Long
>
selectPostListByUserId
(
Long
userId
);
/**
* 校验岗位名称
...
...
ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysDeptServiceImpl.java
View file @
965ebd0f
...
...
@@ -100,7 +100,7 @@ public class SysDeptServiceImpl implements ISysDeptService
* @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
());
...
...
ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysMenuServiceImpl.java
View file @
965ebd0f
...
...
@@ -128,7 +128,7 @@ public class SysMenuServiceImpl implements ISysMenuService
* @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
());
...
...
ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysPostServiceImpl.java
View file @
965ebd0f
...
...
@@ -67,7 +67,7 @@ public class SysPostServiceImpl implements ISysPostService
* @return 选中岗位ID列表
*/
@Override
public
List
<
Integer
>
selectPostListByUserId
(
Long
userId
)
public
List
<
Long
>
selectPostListByUserId
(
Long
userId
)
{
return
postMapper
.
selectPostListByUserId
(
userId
);
}
...
...
ruoyi-system/src/main/resources/mapper/system/SysDeptMapper.xml
View file @
965ebd0f
...
...
@@ -47,7 +47,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
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
...
...
ruoyi-system/src/main/resources/mapper/system/SysMenuMapper.xml
View file @
965ebd0f
...
...
@@ -84,7 +84,7 @@
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
...
...
ruoyi-system/src/main/resources/mapper/system/SysPostMapper.xml
View file @
965ebd0f
...
...
@@ -46,7 +46,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
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
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment