-- ============================================================
-- 重点关注人员管理 - 菜单清理修复SQL
-- 修复原因：旧版SQL引用了不存在的菜单ID导致角色授权失败
-- 执行前请先删除已插入的脏数据
-- 执行顺序：先清理，再重新执行 V20260603_1__menu_insert_FocusPersonnel.sql
-- ============================================================

-- 1. 删除已插入的角色授权（如有脏数据）
DELETE FROM sys_role_permission WHERE permission_id IN (
    '178060100000001', '178060100000002',
    '178060100000010', '178060100000011', '178060100000012',
    '178060100000013', '178060100000014', '178060100000015', '178060100000016'
);

-- 2. 删除已插入的按钮权限
DELETE FROM sys_permission WHERE id IN (
    '178060100000011', '178060100000012', '178060100000013',
    '178060100000014', '178060100000015', '178060100000016'
);

-- 3. 删除已插入的页面菜单
DELETE FROM sys_permission WHERE id IN ('178060100000010', '178060100000002');

-- 4. 重新执行 V20260603_1__menu_insert_FocusPersonnel.sql 中的全部INSERT语句