Browse Source

角色列表返回类型保持一致

tags/v3.3.0
RuoYi 3 years ago
parent
commit
a8eba6949e
  1. 2
      ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/mapper/SysRoleMapper.java
  2. 2
      ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/service/ISysRoleService.java
  3. 2
      ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysRoleServiceImpl.java
  4. 2
      ruoyi-modules/ruoyi-system/src/main/resources/mapper/system/SysRoleMapper.xml

2
ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/mapper/SysRoleMapper.java

@ -40,7 +40,7 @@ public interface SysRoleMapper @@ -40,7 +40,7 @@ public interface SysRoleMapper
* @param userId 用户ID
* @return 选中角色ID列表
*/
public List<Integer> selectRoleListByUserId(Long userId);
public List<Long> selectRoleListByUserId(Long userId);
/**
* 通过角色ID查询角色

2
ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/service/ISysRoleService.java

@ -49,7 +49,7 @@ public interface ISysRoleService @@ -49,7 +49,7 @@ public interface ISysRoleService
* @param userId 用户ID
* @return 选中角色ID列表
*/
public List<Integer> selectRoleListByUserId(Long userId);
public List<Long> selectRoleListByUserId(Long userId);
/**
* 通过角色ID查询角色

2
ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysRoleServiceImpl.java

@ -122,7 +122,7 @@ public class SysRoleServiceImpl implements ISysRoleService @@ -122,7 +122,7 @@ public class SysRoleServiceImpl implements ISysRoleService
* @return 选中角色ID列表
*/
@Override
public List<Integer> selectRoleListByUserId(Long userId)
public List<Long> selectRoleListByUserId(Long userId)
{
return roleMapper.selectRoleListByUserId(userId);
}

2
ruoyi-modules/ruoyi-system/src/main/resources/mapper/system/SysRoleMapper.xml

@ -65,7 +65,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" @@ -65,7 +65,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<include refid="selectRoleVo"/>
</select>
<select id="selectRoleListByUserId" parameterType="Long" resultType="Integer">
<select id="selectRoleListByUserId" parameterType="Long" resultType="Long">
select r.role_id
from sys_role r
left join sys_user_role ur on ur.role_id = r.role_id

Loading…
Cancel
Save