-- 修复父路由的组件路径
-- 父路由（有子菜单的）应该只用 layout.base，不需要指定具体视图
USE soybean_admin;

-- 修复所有父路由的 component 字段
UPDATE sys_route SET component = 'layout.base' WHERE route_id = 'device';
UPDATE sys_route SET component = 'layout.base' WHERE route_id = 'screen';
UPDATE sys_route SET component = 'layout.base' WHERE route_id = 'user_manage';
UPDATE sys_route SET component = 'layout.base' WHERE route_id = 'application';
UPDATE sys_route SET component = 'layout.base' WHERE route_id = 'system';
UPDATE sys_route SET component = 'layout.base' WHERE route_id = 'my_device';
UPDATE sys_route SET component = 'layout.base' WHERE route_id = 'my_application';

-- 验证修改结果
SELECT '=== 父路由组件路径（应该都是 layout.base）===' AS info;
SELECT route_id, name, component 
FROM sys_route 
WHERE route_id IN ('device', 'screen', 'user_manage', 'application', 'system', 'my_device', 'my_application');
