-- 修复数据库中 route_id 和 name 字段的混乱
-- 问题：route_id 和 name 字段值不一致，导致路由层级判断错误

USE soybean_admin;

-- 查看当前问题数据
SELECT route_id AS '错误的route_id', name AS '正确的name', path 
FROM sys_route 
WHERE route_id != name
ORDER BY order_num;

-- 修复：将 route_id 设置为与 name 一致
UPDATE sys_route SET route_id = name WHERE route_id != name;

-- 验证修复结果
SELECT route_id, name, path, component 
FROM sys_route 
WHERE status = 1
ORDER BY order_num;
