Слияние кода завершено, страница обновится автоматически
// Сохранение авторизованных ролей
// export function updateAuthRole(data: Record<string, any>) {
// return request('/system/user/authRole', {
// method: 'put',
// params: data
// })
// }
// Сохранение авторизованных ролей с ошибкой в методе запроса
export function updateAuthRole(data: Record<string, any>) {
return request('/api/system/user/authRole', {
method: 'put',
data: {
...data,
},
});
}
@PreAuthorize("@ss.hasPermi('system:user:edit')")
@Log(title = "Управление пользователями", businessType = BusinessType.GRANT)
@PutMapping("/authRole")
public AjaxResult insertAuthRole(@RequestBody AuthRoleVO authRoleVO) {
userService.checkUserDataScope(authRoleVO.getUserId());
roleService.checkRoleDataScope(authRoleVO.getRoleIds());
userService.insertUserAuth(authRoleVO.getUserId(), authRoleVO.getRoleIds());
return success();
}