-- ============================================
-- 修复权限管理菜单乱码问题
-- 请在 Navicat/HeidiSQL/MySQL Workbench 等图形化工具中执行
-- ============================================

-- 设置字符集
SET NAMES utf8mb4;
SET CHARACTER SET utf8mb4;

-- 更新菜单名称
UPDATE `sys_menu` SET `name` = '权限管理' WHERE `id` = 28;
UPDATE `sys_menu` SET `name` = '菜单权限管理' WHERE `id` = 29;
UPDATE `sys_menu` SET `name` = '菜单查询' WHERE `id` = 30;
UPDATE `sys_menu` SET `name` = '菜单新增' WHERE `id` = 31;
UPDATE `sys_menu` SET `name` = '菜单编辑' WHERE `id` = 32;
UPDATE `sys_menu` SET `name` = '菜单删除' WHERE `id` = 33;
UPDATE `sys_menu` SET `name` = '角色分配' WHERE `id` = 34;
UPDATE `sys_menu` SET `name` = '操作权限管理' WHERE `id` = 35;
UPDATE `sys_menu` SET `name` = '权限查询' WHERE `id` = 36;
UPDATE `sys_menu` SET `name` = '权限分配' WHERE `id` = 37;
UPDATE `sys_menu` SET `name` = '角色管理' WHERE `id` = 38;

-- 验证结果
SELECT id, parent_id, type, name, route_url, authority 
FROM sys_menu 
WHERE id >= 28 
ORDER BY parent_id, sort, id;

-- 显示成功信息
SELECT '✅ 菜单名称已修复！' as status;

