fix(admin): 修正角色ID参数类型为Long

- 将AdminUserRoleMapServiceImpl中getAuthorizeUser方法的roleId类型由Integer改为Long
- 修改IAdminUserRoleMapService接口中对应方法的roleId参数类型为Long
- 更新RoleController中getAuthorizeUser接口的roleId参数类型为Long,确保前后端一致
- 解决了不同类型可能导致的类型转换异常与潜在错误问题
This commit is contained in:
曹鹏飞 2026-05-14 17:08:54 +08:00
parent 08fa8e8084
commit 3cc0019d98
3 changed files with 3 additions and 3 deletions

View File

@ -145,7 +145,7 @@ public class RoleController extends ControllerBase {
*/
@GetMapping("getAuthorizeUser")
@ApiMark(moduleName = "角色管理", apiName = "获取已授权人员")
public ApiResult<List<AdminUserVO>> getAuthorizeUser(@RequestParam Integer roleId) {
public ApiResult<List<AdminUserVO>> getAuthorizeUser(@RequestParam Long roleId) {
return ApiResult.success(adminUserRoleMapService.getAuthorizeUser(roleId));
}
}

View File

@ -20,7 +20,7 @@ public interface IAdminUserRoleMapService extends IService<AdminUserRoleMap> {
void authorize(AuthorizeUserRequest request);
List<AdminUserVO> getAuthorizeUser(Integer roleId);
List<AdminUserVO> getAuthorizeUser(Long roleId);
List<RoleVO> getRoleList(Integer id);
}

View File

@ -48,7 +48,7 @@ public class AdminUserRoleMapServiceImpl extends ServiceImpl<AdminUserRoleMapMap
}
@Override
public List<AdminUserVO> getAuthorizeUser(Integer roleId) {
public List<AdminUserVO> getAuthorizeUser(Long roleId) {
List<Integer> userIds = lambdaQuery().eq(AdminUserRoleMap::getRoleId, roleId).list().stream().map(AdminUserRoleMap::getUserId).collect(Collectors.toList());
if (CollectionUtil.isEmpty(userIds)) {
return Collections.emptyList();