-- 修复工单管理菜单的路径配置
-- 问题：父菜单的 path 配置为 testWorkOrder，导致路由跳转错误
-- 解决：将 path 修改为 test_work_order

-- 查看修改前的配置
SELECT 
    menu_id,
    menu_name,
    parent_id,
    path,
    component,
    menu_type
FROM sys_menu
WHERE menu_id IN (2098, 2092);

-- 修复父菜单的路径
UPDATE sys_menu
SET 
    path = 'test_work_order',
    update_time = NOW()
WHERE menu_id = 2098;

-- 验证修改后的配置
SELECT 
    menu_id,
    menu_name,
    parent_id,
    path,
    component,
    menu_type,
    update_time
FROM sys_menu
WHERE menu_id IN (2098, 2092);

-- 查看完整的工单管理菜单树
SELECT 
    m1.menu_id,
    m1.menu_name,
    m1.parent_id,
    m1.path,
    m1.component,
    m1.menu_type,
    m1.order_num
FROM sys_menu m1
WHERE m1.menu_id = 2098 
   OR m1.parent_id = 2098
   OR m1.parent_id = 2092
ORDER BY m1.parent_id, m1.order_num;
