@RequestMapping(value = "updateRoleAuth", method = RequestMethod.POST)
    @ResponseBody
    public Object updateRoleAuth(
            @RequestParam int roleId,
            @RequestParam int[] menuIds
    ) {
        Map<String, Object> map = new HashMap<>();

        Role role = roleService.getById(roleId);
        List<Menu> menus = new ArrayList<>();

        if (role == null) {
            map.put("success", false);
            map.put("msg", "角色不存在！");
            return map;
        }

        for (int menuId : menuIds) {
            if (menuId == 0) {
                continue;
            }

            menus.add(menuService.getById(menuId));
        }

        roleService.updateRoleAuth(role, menus);

        map.put("success", true);
        map.put("msg", "修改权限成功！");

        return map;
    }