SET NAMES utf8mb4;

INSERT INTO `tb_sys_menu` (`id`, `parent_id`, `menu_type`, `menu_title`, `menu_url`, `component`, `menu_icon`, `is_show`, `permission_tag`, `sort_no`, `status`, `created`, `created_by`, `modified`, `modified_by`, `remark`)
SELECT 367400000000000019, 367400000000000001, 1, '分类管理', '', '', '', 0, '/api/v1/skill/category', 9, 0, CURRENT_TIMESTAMP, 1, CURRENT_TIMESTAMP, 1, 'Skill-分类管理'
FROM DUAL WHERE NOT EXISTS (SELECT 1 FROM `tb_sys_menu` WHERE `id` = 367400000000000019);

INSERT INTO `tb_sys_menu` (`id`, `parent_id`, `menu_type`, `menu_title`, `menu_url`, `component`, `menu_icon`, `is_show`, `permission_tag`, `sort_no`, `status`, `created`, `created_by`, `modified`, `modified_by`, `remark`)
SELECT 367400000000000020, 367400000000000001, 1, '文件管理', '', '', '', 0, '/api/v1/skill/file', 10, 0, CURRENT_TIMESTAMP, 1, CURRENT_TIMESTAMP, 1, 'Skill-文件管理'
FROM DUAL WHERE NOT EXISTS (SELECT 1 FROM `tb_sys_menu` WHERE `id` = 367400000000000020);

INSERT INTO `tb_sys_menu` (`id`, `parent_id`, `menu_type`, `menu_title`, `menu_url`, `component`, `menu_icon`, `is_show`, `permission_tag`, `sort_no`, `status`, `created`, `created_by`, `modified`, `modified_by`, `remark`)
SELECT 367400000000000021, 367400000000000001, 1, '导入', '', '', '', 0, '/api/v1/skill/import', 11, 0, CURRENT_TIMESTAMP, 1, CURRENT_TIMESTAMP, 1, 'Skill-导入'
FROM DUAL WHERE NOT EXISTS (SELECT 1 FROM `tb_sys_menu` WHERE `id` = 367400000000000021);

INSERT INTO `tb_sys_menu` (`id`, `parent_id`, `menu_type`, `menu_title`, `menu_url`, `component`, `menu_icon`, `is_show`, `permission_tag`, `sort_no`, `status`, `created`, `created_by`, `modified`, `modified_by`, `remark`)
SELECT 367400000000000022, 367400000000000001, 1, '导出', '', '', '', 0, '/api/v1/skill/export', 12, 0, CURRENT_TIMESTAMP, 1, CURRENT_TIMESTAMP, 1, 'Skill-导出'
FROM DUAL WHERE NOT EXISTS (SELECT 1 FROM `tb_sys_menu` WHERE `id` = 367400000000000022);

INSERT INTO `tb_sys_menu` (`id`, `parent_id`, `menu_type`, `menu_title`, `menu_url`, `component`, `menu_icon`, `is_show`, `permission_tag`, `sort_no`, `status`, `created`, `created_by`, `modified`, `modified_by`, `remark`)
SELECT 367400000000000024, 367400000000000001, 1, '能力绑定', '', '', '', 0, '/api/v1/skill/capability', 14, 0, CURRENT_TIMESTAMP, 1, CURRENT_TIMESTAMP, 1, 'Skill-能力绑定'
FROM DUAL WHERE NOT EXISTS (SELECT 1 FROM `tb_sys_menu` WHERE `id` = 367400000000000024);

INSERT INTO `tb_sys_role_menu` (`id`, `role_id`, `menu_id`)
SELECT 367400000000000119, 1, 367400000000000019 FROM DUAL
WHERE NOT EXISTS (SELECT 1 FROM `tb_sys_role_menu` WHERE `role_id` = 1 AND `menu_id` = 367400000000000019);
INSERT INTO `tb_sys_role_menu` (`id`, `role_id`, `menu_id`)
SELECT 367400000000000120, 1, 367400000000000020 FROM DUAL
WHERE NOT EXISTS (SELECT 1 FROM `tb_sys_role_menu` WHERE `role_id` = 1 AND `menu_id` = 367400000000000020);
INSERT INTO `tb_sys_role_menu` (`id`, `role_id`, `menu_id`)
SELECT 367400000000000121, 1, 367400000000000021 FROM DUAL
WHERE NOT EXISTS (SELECT 1 FROM `tb_sys_role_menu` WHERE `role_id` = 1 AND `menu_id` = 367400000000000021);
INSERT INTO `tb_sys_role_menu` (`id`, `role_id`, `menu_id`)
SELECT 367400000000000122, 1, 367400000000000022 FROM DUAL
WHERE NOT EXISTS (SELECT 1 FROM `tb_sys_role_menu` WHERE `role_id` = 1 AND `menu_id` = 367400000000000022);
INSERT INTO `tb_sys_role_menu` (`id`, `role_id`, `menu_id`)
SELECT 367400000000000124, 1, 367400000000000024 FROM DUAL
WHERE NOT EXISTS (SELECT 1 FROM `tb_sys_role_menu` WHERE `role_id` = 1 AND `menu_id` = 367400000000000024);
