-- 更新现有的"打赏记录"菜单，使用我们新创建的页面

-- 1. 查看现有的打赏记录菜单
SELECT id, pid, name, component, menu_type, is_show 
FROM eb_system_menu 
WHERE name LIKE '%打赏%' OR name LIKE '%记录%'
AND is_delte = 0
ORDER BY pid, sort;

-- 2. 找到"打赏记录"菜单（ID应该是633，在礼物打赏管理532下）
-- 更新它的component为我们新创建的页面
UPDATE eb_system_menu 
SET component = 'gift/records/index',
    name = '礼物打赏记录',
    update_time = NOW()
WHERE id = 633;

-- 3. 验证更新
SELECT id, pid, name, component, menu_type, is_show 
FROM eb_system_menu 
WHERE id = 633;

-- 4. 确保父菜单（礼物打赏管理）是显示的
UPDATE eb_system_menu 
SET is_show = 1 
WHERE id = 532;

-- 5. 查看更新后的菜单结构
SELECT 
    m1.id as parent_id,
    m1.name as parent_name,
    m2.id as child_id,
    m2.name as child_name,
    m2.component
FROM eb_system_menu m1
LEFT JOIN eb_system_menu m2 ON m1.id = m2.pid
WHERE m1.id = 532 AND m1.is_delte = 0;
