用户修改减少一次角色列表关联查询
This commit is contained in:
		| @@ -104,9 +104,10 @@ public class SysUserController extends BaseController | |||||||
|         ajax.put("posts", postService.selectPostAll()); |         ajax.put("posts", postService.selectPostAll()); | ||||||
|         if (StringUtils.isNotNull(userId)) |         if (StringUtils.isNotNull(userId)) | ||||||
|         { |         { | ||||||
|  |             SysUser sysUser = userService.selectUserById(userId); | ||||||
|             ajax.put(AjaxResult.DATA_TAG, userService.selectUserById(userId)); |             ajax.put(AjaxResult.DATA_TAG, userService.selectUserById(userId)); | ||||||
|             ajax.put("postIds", postService.selectPostListByUserId(userId)); |             ajax.put("postIds", postService.selectPostListByUserId(userId)); | ||||||
|             ajax.put("roleIds", roleService.selectRoleListByUserId(userId)); |             ajax.put("roleIds", sysUser.getRoles().stream().map(SysRole::getRoleId).collect(Collectors.toList())); | ||||||
|         } |         } | ||||||
|         return ajax; |         return ajax; | ||||||
|     } |     } | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user