-- 检查封禁菜单的完整配置
SELECT '=== 封禁菜单配置 ===' as info;
SELECT id, pid, `name`, perms, component, menu_type, sort, is_show, is_delte
FROM eb_system_menu 
WHERE `name` LIKE '%封禁%';

-- 检查管理员角色权限
SELECT '=== 管理员角色 ===' as info;
SELECT * FROM eb_system_role WHERE id = 1;

-- 检查角色菜单关联
SELECT '=== 角色菜单关联 ===' as info;
SELECT * FROM eb_system_role_menu WHERE rid = 1 ORDER BY menu_id DESC LIMIT 20;

-- 为管理员角色添加封禁菜单权限
INSERT IGNORE INTO eb_system_role_menu (rid, menu_id)
SELECT 1, id FROM eb_system_menu WHERE `name` IN ('用户封禁', '房间封禁');

-- 验证添加结果
SELECT '=== 添加权限后 ===' as info;
SELECT rm.rid, rm.menu_id, m.name, m.component
FROM eb_system_role_menu rm
JOIN eb_system_menu m ON rm.menu_id = m.id
WHERE m.name LIKE '%封禁%';
