zhibo/move_gift_to_live_manage.sql
2026-01-03 19:22:42 +08:00

20 lines
554 B
SQL
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

-- 将礼物打赏移到直播管理菜单下
-- 1. 获取直播管理的ID
SELECT @live_manage_id := id FROM eb_system_menu WHERE name = '直播管理' AND pid = 0;
-- 2. 更新礼物打赏的pid让它成为直播管理的子菜单
UPDATE eb_system_menu
SET pid = @live_manage_id, sort = 999
WHERE name = '礼物打赏';
-- 3. 验证结果
SELECT
m1.name as '父菜单',
m2.name as '子菜单',
m2.component as '路径'
FROM eb_system_menu m1
JOIN eb_system_menu m2 ON m1.id = m2.pid
WHERE m1.name = '直播管理'
ORDER BY m2.sort;