-- =====================================================
-- 菜单SQL：信息维护模块
-- 创建时间: 2025-02-04
-- 说明: 包含"信息维护"一级菜单及其两个二级菜单
-- =====================================================

-- 一级菜单：信息维护
INSERT INTO sys_menu(menu_id, menu_name, parent_id, order_num, path, component, query, route_name, is_frame, is_cache,
                     menu_type, visible, status, perms, icon, create_by, create_time, remark)
VALUES (2000, '信息维护', 0, 5, 'maintain', NULL, NULL, NULL, 1, 0, 'M', '0', '0', NULL, 'el-icon-collection', 'admin',
        NOW(), '信息维护目录');

-- 二级菜单：中介黑名单管理
INSERT INTO sys_menu(menu_id, menu_name, parent_id, order_num, path, component, query, route_name, is_frame, is_cache,
                     menu_type, visible, status, perms, icon, create_by, create_time, remark)
VALUES (2001, '中介黑名单管理', 2000, 1, 'intermediary', 'ccdiIntermediary/index', NULL, NULL, 1, 0, 'C', '0', '0',
        'ccdi:intermediary:list', '#', 'admin', NOW(), '中介黑名单管理菜单');

-- 二级菜单：员工信息维护
INSERT INTO sys_menu(menu_id, menu_name, parent_id, order_num, path, component, query, route_name, is_frame, is_cache,
                     menu_type, visible, status, perms, icon, create_by, create_time, remark)
VALUES (2002, '员工信息维护', 2000, 2, 'employee', 'ccdiEmployee/index', NULL, NULL, 1, 0, 'C', '0', '0',
        'ccdi:employee:list', '#', 'admin', NOW(), '员工信息维护菜单');

-- =====================================================
-- 中介黑名单管理 - 按钮权限
-- =====================================================
INSERT INTO sys_menu(menu_id, menu_name, parent_id, order_num, path, component, query, route_name, is_frame, is_cache,
                     menu_type, visible, status, perms, icon, create_by, create_time, remark)
VALUES (2010, '中介黑名单查询', 2001, 1, '', NULL, NULL, NULL, 1, 0, 'F', '0', '0', 'ccdi:intermediary:query', '#',
        'admin', NOW(), ''),
       (2011, '中介黑名单新增', 2001, 2, '', NULL, NULL, NULL, 1, 0, 'F', '0', '0', 'ccdi:intermediary:add', '#',
        'admin', NOW(), ''),
       (2012, '中介黑名单修改', 2001, 3, '', NULL, NULL, NULL, 1, 0, 'F', '0', '0', 'ccdi:intermediary:edit', '#',
        'admin', NOW(), ''),
       (2013, '中介黑名单删除', 2001, 4, '', NULL, NULL, NULL, 1, 0, 'F', '0', '0', 'ccdi:intermediary:remove', '#',
        'admin', NOW(), ''),
       (2014, '中介黑名单导出', 2001, 5, '', NULL, NULL, NULL, 1, 0, 'F', '0', '0', 'ccdi:intermediary:export', '#',
        'admin', NOW(), ''),
       (2015, '中介黑名单导入', 2001, 6, '', NULL, NULL, NULL, 1, 0, 'F', '0', '0', 'ccdi:intermediary:import', '#',
        'admin', NOW(), '');

-- =====================================================
-- 员工信息维护 - 按钮权限
-- =====================================================
INSERT INTO sys_menu(menu_id, menu_name, parent_id, order_num, path, component, query, route_name, is_frame, is_cache,
                     menu_type, visible, status, perms, icon, create_by, create_time, remark)
VALUES (2020, '员工信息查询', 2002, 1, '', NULL, NULL, NULL, 1, 0, 'F', '0', '0', 'ccdi:employee:query', '#', 'admin',
        NOW(), ''),
       (2021, '员工信息新增', 2002, 2, '', NULL, NULL, NULL, 1, 0, 'F', '0', '0', 'ccdi:employee:add', '#', 'admin',
        NOW(), ''),
       (2022, '员工信息修改', 2002, 3, '', NULL, NULL, NULL, 1, 0, 'F', '0', '0', 'ccdi:employee:edit', '#', 'admin',
        NOW(), ''),
       (2023, '员工信息删除', 2002, 4, '', NULL, NULL, NULL, 1, 0, 'F', '0', '0', 'ccdi:employee:remove', '#', 'admin',
        NOW(), ''),
       (2024, '员工信息导出', 2002, 5, '', NULL, NULL, NULL, 1, 0, 'F', '0', '0', 'ccdi:employee:export', '#', 'admin',
        NOW(), ''),
       (2025, '员工信息导入', 2002, 6, '', NULL, NULL, NULL, 1, 0, 'F', '0', '0', 'ccdi:employee:import', '#', 'admin',
        NOW(), '');

-- =====================================================
-- 回滚SQL（如需删除这些菜单，执行以下语句）
-- =====================================================
-- DELETE FROM sys_menu WHERE menu_id BETWEEN 2000 AND 2025;
