-- =====================================================
-- 菜单路径修正SQL
-- 确保数据库菜单路径与前端路由完全匹配
-- =====================================================

-- 数据监控
UPDATE eb_system_menu SET component = '/monitor/overview' WHERE name = '监控概览' AND component LIKE '%monitor%';
UPDATE eb_system_menu SET component = '/monitor/users' WHERE name = '在线用户' AND component LIKE '%monitor%';
UPDATE eb_system_menu SET component = '/monitor/rooms' WHERE name = '活跃房间' AND component LIKE '%monitor%';
UPDATE eb_system_menu SET component = '/monitor/system' WHERE name = '系统状态' AND component LIKE '%monitor%';

-- 用户管理
UPDATE eb_system_menu SET component = '/userManage/list' WHERE name = '用户列表' AND component LIKE '%userManage%';
UPDATE eb_system_menu SET component = '/userManage/chat' WHERE name = '私聊管理' AND component LIKE '%userManage%';
UPDATE eb_system_menu SET component = '/userManage/grade' WHERE name = '用户等级' AND component LIKE '%userManage%';
UPDATE eb_system_menu SET component = '/userManage/label' WHERE name = '用户标签' AND component LIKE '%userManage%';
UPDATE eb_system_menu SET component = '/userManage/member/package' WHERE name = '会员包管理' AND component LIKE '%userManage%';
UPDATE eb_system_menu SET component = '/userManage/noble/list' WHERE name = '贵族等级' AND component LIKE '%userManage%';
UPDATE eb_system_menu SET component = '/userManage/charm/level' WHERE name = '魅力值等级' AND component LIKE '%userManage%';
UPDATE eb_system_menu SET component = '/userManage/auth/car' WHERE name = '车辆认证' AND component LIKE '%userManage%';
UPDATE eb_system_menu SET component = '/userManage/blacklist/room' WHERE name = '房间拉黑' AND component LIKE '%userManage%';
UPDATE eb_system_menu SET component = '/userManage/blacklist/user' WHERE name = '用户拉黑' AND component LIKE '%userManage%';

-- 直播管理
UPDATE eb_system_menu SET component = '/liveManage/room/list' WHERE name = '房间列表' AND component LIKE '%liveManage%';
UPDATE eb_system_menu SET component = '/liveManage/room/type' WHERE name = '房间类型' AND component LIKE '%liveManage%';
UPDATE eb_system_menu SET component = '/liveManage/room/background' WHERE name = '房间背景' AND component LIKE '%liveManage%';
UPDATE eb_system_menu SET component = '/liveManage/family/list' WHERE name = '家族列表' AND component LIKE '%liveManage%';
UPDATE eb_system_menu SET component = '/liveManage/family/level' WHERE name = '家族级别' AND component LIKE '%liveManage%';
UPDATE eb_system_menu SET component = '/liveManage/family/member' WHERE name = '家族成员' AND component LIKE '%liveManage%';
UPDATE eb_system_menu SET component = '/liveManage/fanGroup/list' WHERE name = '粉丝团管理' AND component LIKE '%liveManage%';

-- 社交互动
UPDATE eb_system_menu SET component = '/socialManage/friend/list' WHERE name = '好友关系' AND component LIKE '%socialManage%';
UPDATE eb_system_menu SET component = '/socialManage/friend/requests' WHERE name = '好友请求' AND component LIKE '%socialManage%';
UPDATE eb_system_menu SET component = '/socialManage/friend/statistics' WHERE name = '好友统计' AND component LIKE '%socialManage%';
UPDATE eb_system_menu SET component = '/socialManage/follow/record' WHERE name = '关注记录' AND component LIKE '%socialManage%';
UPDATE eb_system_menu SET component = '/socialManage/call/list' WHERE name = '通话记录' AND component LIKE '%socialManage%';
UPDATE eb_system_menu SET component = '/socialManage/call/statistics' WHERE name = '通话统计' AND component LIKE '%socialManage%';
UPDATE eb_system_menu SET component = '/socialManage/session/list' WHERE name = '会话管理' AND component LIKE '%socialManage%';
UPDATE eb_system_menu SET component = '/socialManage/chatPhrase/list' WHERE name = '聊天常用语' AND component LIKE '%socialManage%';
UPDATE eb_system_menu SET component = '/socialManage/comment/dynamic' WHERE name = '动态评论' AND component LIKE '%socialManage%';
UPDATE eb_system_menu SET component = '/socialManage/comment/reply' WHERE name = '评论回复' AND component LIKE '%socialManage%';
UPDATE eb_system_menu SET component = '/socialManage/dynamic/list' WHERE name = '动态列表' AND component LIKE '%socialManage%';
UPDATE eb_system_menu SET component = '/socialManage/interact/index' WHERE name = '互动列表' AND component LIKE '%socialManage%';

-- 礼物打赏
UPDATE eb_system_menu SET component = '/giftManage/list' WHERE name = '礼物列表' AND component LIKE '%giftManage%';
UPDATE eb_system_menu SET component = '/giftManage/num' WHERE name = '礼物数量' AND component LIKE '%giftManage%';
UPDATE eb_system_menu SET component = '/giftManage/reward/record' WHERE name = '打赏记录' AND component LIKE '%giftManage%';

-- 虚拟道具
UPDATE eb_system_menu SET component = '/virtualProps/mount/list' WHERE name = '坐骑列表' AND component LIKE '%virtualProps%';
UPDATE eb_system_menu SET component = '/virtualProps/mount/order' WHERE name = '坐骑购买记录' AND component LIKE '%virtualProps%';
UPDATE eb_system_menu SET component = '/virtualProps/headwear/list' WHERE name = '头饰列表' AND component LIKE '%virtualProps%';

-- 营销活动
UPDATE eb_system_menu SET component = '/activityManage/platform/list' WHERE name = '平台活动' AND component LIKE '%activityManage%';
UPDATE eb_system_menu SET component = '/activityManage/lottery/prize' WHERE name = '抽奖奖品' AND component LIKE '%activityManage%';
UPDATE eb_system_menu SET component = '/activityManage/lottery/probability' WHERE name = '抽奖概率' AND component LIKE '%activityManage%';
UPDATE eb_system_menu SET component = '/activityManage/coupon/list' WHERE name = '优惠券列表' AND component LIKE '%activityManage%';
UPDATE eb_system_menu SET component = '/activityManage/coupon/record' WHERE name = '领取记录' AND component LIKE '%activityManage%';
UPDATE eb_system_menu SET component = '/activityManage/seckill/config' WHERE name = '秒杀配置' AND component LIKE '%activityManage%';
UPDATE eb_system_menu SET component = '/activityManage/integral/config' WHERE name = '积分配置' AND component LIKE '%activityManage%';
UPDATE eb_system_menu SET component = '/activityManage/integral/log' WHERE name = '积分日志' AND component LIKE '%activityManage%';
UPDATE eb_system_menu SET component = '/activityManage/invite/list' WHERE name = '邀请管理' AND component LIKE '%activityManage%';
UPDATE eb_system_menu SET component = '/activityManage/couple/matchText' WHERE name = '夫妻相文案' AND component LIKE '%activityManage%';

-- 任务系统
UPDATE eb_system_menu SET component = '/taskManage/sign/config' WHERE name = '签到配置' AND component LIKE '%taskManage%';
UPDATE eb_system_menu SET component = '/taskManage/sign/list' WHERE name = '签到记录' AND component LIKE '%taskManage%';
UPDATE eb_system_menu SET component = '/taskManage/novice/list' WHERE name = '新手任务' AND component LIKE '%taskManage%';
UPDATE eb_system_menu SET component = '/taskManage/novice/userTask' WHERE name = '任务记录' AND component LIKE '%taskManage%';

-- 财务管理
UPDATE eb_system_menu SET component = '/financeManage/withdraw/index' WHERE name = '提现审核' AND component LIKE '%financeManage%';
UPDATE eb_system_menu SET component = '/financeManage/withdraw/amount' WHERE name = '提现金额配置' AND component LIKE '%financeManage%';
UPDATE eb_system_menu SET component = '/financeManage/charge/record' WHERE name = '充值记录' AND component LIKE '%financeManage%';
UPDATE eb_system_menu SET component = '/financeManage/monitor' WHERE name = '资金监控' AND component LIKE '%financeManage%';
UPDATE eb_system_menu SET component = '/financeManage/exchange/record' WHERE name = '兑换记录' AND component LIKE '%financeManage%';
UPDATE eb_system_menu SET component = '/financeManage/detail/coin' WHERE name = '金币明细' AND component LIKE '%financeManage%';
UPDATE eb_system_menu SET component = '/financeManage/detail/diamond' WHERE name = '钻石明细' AND component LIKE '%financeManage%';
UPDATE eb_system_menu SET component = '/financeManage/detail/charm' WHERE name = '魅力值明细' AND component LIKE '%financeManage%';
UPDATE eb_system_menu SET component = '/financeManage/config/goldDiamond' WHERE name = '金币钻石配置' AND component LIKE '%financeManage%';
UPDATE eb_system_menu SET component = '/financeManage/config/chatPay' WHERE name = '聊天付费配置' AND component LIKE '%financeManage%';
UPDATE eb_system_menu SET component = '/financeManage/order/list' WHERE name = '订单列表' AND component LIKE '%financeManage%';
UPDATE eb_system_menu SET component = '/financeManage/order/recharge' WHERE name = '充值订单' AND component LIKE '%financeManage%';

-- 订单商城
UPDATE eb_system_menu SET component = '/shopManage/store/index' WHERE name = '商品管理' AND component LIKE '%shopManage%';
UPDATE eb_system_menu SET component = '/shopManage/store/sort' WHERE name = '商品分类' AND component LIKE '%shopManage%';
UPDATE eb_system_menu SET component = '/shopManage/store/attr' WHERE name = '商品规格' AND component LIKE '%shopManage%';
UPDATE eb_system_menu SET component = '/shopManage/store/comment' WHERE name = '商品评论' AND component LIKE '%shopManage%';
UPDATE eb_system_menu SET component = '/shopManage/order/index' WHERE name = '订单管理' AND component LIKE '%shopManage%';
UPDATE eb_system_menu SET component = '/shopManage/distribution/index' WHERE name = '分销员管理' AND component LIKE '%shopManage%';
UPDATE eb_system_menu SET component = '/shopManage/distribution/config' WHERE name = '分销配置' AND component LIKE '%shopManage%';

-- 内容管理
UPDATE eb_system_menu SET component = '/contentManage/article/list' WHERE name = '文章管理' AND component LIKE '%contentManage%';
UPDATE eb_system_menu SET component = '/contentManage/article/category' WHERE name = '文章分类' AND component LIKE '%contentManage%';
UPDATE eb_system_menu SET component = '/contentManage/banner/list' WHERE name = '轮播图管理' AND component LIKE '%contentManage%';
UPDATE eb_system_menu SET component = '/contentManage/message/list' WHERE name = '系统消息' AND component LIKE '%contentManage%';
UPDATE eb_system_menu SET component = '/contentManage/help/customerService' WHERE name = '客服联系方式' AND component LIKE '%contentManage%';

-- 用户反馈
UPDATE eb_system_menu SET component = '/feedbackManage/report/list' WHERE name = '举报列表' AND component LIKE '%feedbackManage%';
UPDATE eb_system_menu SET component = '/feedbackManage/feedback/list' WHERE name = '反馈列表' AND component LIKE '%feedbackManage%';
UPDATE eb_system_menu SET component = '/feedbackManage/appeal/list' WHERE name = '申诉管理' AND component LIKE '%feedbackManage%';

-- 代理管理
UPDATE eb_system_menu SET component = '/agentManage/list' WHERE name = '代理列表' AND component LIKE '%agentManage%';
UPDATE eb_system_menu SET component = '/agentManage/withdraw' WHERE name = '提现申请' AND component LIKE '%agentManage%';
UPDATE eb_system_menu SET component = '/agentManage/message' WHERE name = '消息记录' AND component LIKE '%agentManage%';
UPDATE eb_system_menu SET component = '/agentManage/social/dynamic' WHERE name = '社会动态' AND component LIKE '%agentManage%';

-- 系统设置
UPDATE eb_system_menu SET component = '/systemSetting/basic' WHERE name = '系统设置' AND component LIKE '%systemSetting%' AND pid > 0;
UPDATE eb_system_menu SET component = '/systemSetting/notification' WHERE name = '消息通知' AND component LIKE '%systemSetting%';
UPDATE eb_system_menu SET component = '/systemSetting/role/identity' WHERE name = '角色管理' AND component LIKE '%systemSetting%';
UPDATE eb_system_menu SET component = '/systemSetting/role/admin' WHERE name = '管理员列表' AND component LIKE '%systemSetting%';
UPDATE eb_system_menu SET component = '/systemSetting/role/permission' WHERE name = '权限规则' AND component LIKE '%systemSetting%';
UPDATE eb_system_menu SET component = '/systemSetting/design/theme' WHERE name = '一键换色' AND component LIKE '%systemSetting%';
UPDATE eb_system_menu SET component = '/systemSetting/design/page' WHERE name = '页面设计' AND component LIKE '%systemSetting%';
UPDATE eb_system_menu SET component = '/systemSetting/design/home' WHERE name = '首页装修' AND component LIKE '%systemSetting%';
UPDATE eb_system_menu SET component = '/systemSetting/version/list' WHERE name = '版本管理' AND component LIKE '%systemSetting%';
UPDATE eb_system_menu SET component = '/systemSetting/sensitiveWord/list' WHERE name = '敏感词管理' AND component LIKE '%systemSetting%';
UPDATE eb_system_menu SET component = '/systemSetting/verifycode/list' WHERE name = '验证码管理' AND component LIKE '%systemSetting%';
UPDATE eb_system_menu SET component = '/systemSetting/config/params' WHERE name = '参数配置' AND component LIKE '%systemSetting%';
UPDATE eb_system_menu SET component = '/systemSetting/dev/category' WHERE name = '配置分类' AND component LIKE '%systemSetting%';
UPDATE eb_system_menu SET component = '/systemSetting/dev/combinedData' WHERE name = '组合数据' AND component LIKE '%systemSetting%';
UPDATE eb_system_menu SET component = '/systemSetting/picture' WHERE name = '素材管理' AND component LIKE '%systemSetting%';
UPDATE eb_system_menu SET component = '/systemSetting/clearCache' WHERE name = '缓存清除' AND component LIKE '%systemSetting%';
UPDATE eb_system_menu SET component = '/systemSetting/schedule/list' WHERE name = '定时任务' AND component LIKE '%systemSetting%';
UPDATE eb_system_menu SET component = '/systemSetting/schedule/log' WHERE name = '任务日志' AND component LIKE '%systemSetting%';

-- 完成提示
SELECT '菜单路径修正完成！请清除Redis缓存后刷新页面。' AS message;
