Преглед на файлове

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

RuoYi преди 4 години
родител
ревизия
a8eba6949e

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

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

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

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

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

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

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

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