USE cattletrade;

-- 检查销售概览菜单是否已插入
SELECT 
    id,
    parent_id,
    type,
    icon,
    name,
    sort,
    route_url,
    page_url,
    org_type,
    authority,
    is_delete,
    create_time
FROM sys_menu 
WHERE name = '销售概览' 
ORDER BY type, sort;

-- 检查是否有重复的销售概览菜单
SELECT COUNT(*) as count, name, type
FROM sys_menu 
WHERE name = '销售概览' AND is_delete = 0
GROUP BY name, type;

-- 查询所有顶级菜单（parent_id = 0）用于参考
SELECT 
    id,
    name,
    type,
    icon,
    sort,
    page_url,
    org_type,
    authority
FROM sys_menu 
WHERE parent_id = 0 AND is_delete = 0
ORDER BY sort;

