-- 检查"我的设备"路由配置
USE soybean_admin;

SELECT '=== 我的设备路由配置 ===' AS info;
SELECT 
    route_id,
    name,
    path,
    component,
    JSON_EXTRACT(meta, '$.title') as title,
    status,
    order_num
FROM sys_route 
WHERE name LIKE 'my-device%' 
ORDER BY order_num;

SELECT '=== 检查父路由 ===' AS info;
SELECT 
    route_id,
    name,
    path,
    component,
    CASE 
        WHEN component = 'layout.base' THEN '✅ 正确'
        ELSE '❌ 错误 - 应该是 layout.base'
    END as component_check
FROM sys_route 
WHERE name = 'my-device';

SELECT '=== 检查子路由 ===' AS info;
SELECT 
    route_id,
    name,
    path,
    component,
    CASE 
        WHEN component LIKE 'view.my-device_%' THEN '✅ 正确'
        ELSE '❌ 错误 - 应该是 view.my-device_xxx'
    END as component_check
FROM sys_route 
WHERE name LIKE 'my-device_%';
