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

39 lines
1.2 KiB
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.

-- ========================================
-- 修复404问题将礼物打赏从直播管理中移除
-- ========================================
-- 问题分析:
-- 1. 礼物打赏菜单(id=823)的component是 /liveManage/gift/records/index
-- 2. 但前端有独立的 giftManageRouter路径是 /gift
-- 3. 这导致路由匹配冲突
-- 解决方案1将礼物打赏移到独立的礼物管理菜单下
-- 首先检查是否已有礼物管理顶级菜单
SELECT id, pid, name, component, is_show
FROM eb_system_menu
WHERE name = '礼物打赏' AND pid = 0;
-- 如果没有,创建礼物管理顶级菜单
-- INSERT INTO eb_system_menu (pid, name, icon, component, menu_type, sort, is_show)
-- VALUES (0, '礼物打赏', 'el-icon-present', '/gift', 'M', 99, 1);
-- 方案2直接删除礼物打赏菜单如果不需要在直播管理下显示
-- DELETE FROM eb_system_menu WHERE id = 823;
-- 方案3隐藏礼物打赏菜单推荐保留数据
UPDATE eb_system_menu
SET is_show = 0
WHERE id = 823;
-- 验证修改
SELECT
id,
pid,
name,
component,
is_show,
CASE WHEN is_show = 1 THEN '显示' ELSE '隐藏' END as status
FROM eb_system_menu
WHERE pid = 675 -- 直播管理的子菜单
ORDER BY sort;