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

duhanyu
RuoYi 3 years ago
parent e7afea4cb7
commit e66d0e4f74

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

@ -49,7 +49,7 @@ public interface ISysRoleService
* @param userId ID * @param userId ID
* @return ID * @return ID
*/ */
public List<Integer> selectRoleListByUserId(Long userId); public List<Long> selectRoleListByUserId(Long userId);
/** /**
* ID * ID

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

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

Loading…
Cancel
Save