-- 检查当前菜单状态，找出可能导致404的原因

-- 1. 检查直播管理及其所有子菜单的显示状态
SELECT 
    id,
    pid,
    name,
    component,
    is_show,
    sort,
    CASE WHEN is_show = 1 THEN '✓ 显示' ELSE '✗ 隐藏' END as status
FROM eb_system_menu 
WHERE id = 675 OR pid = 675
ORDER BY pid, sort;

-- 2. 检查是否有其他菜单使用了相同或相似的component路径
SELECT 
    id,
    pid,
    name,
    component,
    is_show
FROM eb_system_menu 
WHERE component LIKE '/liveManage%'
  AND is_show = 1
ORDER BY component;

-- 3. 检查礼物相关菜单
SELECT 
    id,
    pid,
    name,
    component,
    is_show,
    CASE WHEN is_show = 1 THEN '✓ 显示' ELSE '✗ 隐藏' END as status
FROM eb_system_menu 
WHERE component LIKE '%gift%'
ORDER BY component;

-- 4. 查看是否有独立的礼物管理顶级菜单
SELECT 
    id,
    pid,
    name,
    component,
    is_show,
    sort
FROM eb_system_menu 
WHERE (name LIKE '%礼物%' OR component LIKE '/gift%')
  AND pid = 0
ORDER BY sort;
