-- 首页管理菜单配置

-- 首页管理父菜单
INSERT INTO sys_menu (menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_by, create_time, update_by, update_time, remark)
VALUES ('首页管理', 0, 5, 'homepage', NULL, 1, 0, 'M', '0', '0', NULL, 'dashboard', 'admin', sysdate(), '', NULL, '首页管理目录');

-- 获取刚插入的首页管理菜单ID（假设为2000）
SET @homepage_menu_id = LAST_INSERT_ID();

-- 新闻动态菜单
INSERT INTO sys_menu (menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_by, create_time, update_by, update_time, remark)
VALUES ('新闻动态', @homepage_menu_id, 1, 'news', 'homepage/news/index', 1, 0, 'C', '0', '0', 'homepage:news:list', 'form', 'admin', sysdate(), '', NULL, '新闻动态菜单');

-- 获取新闻动态菜单ID
SET @news_menu_id = LAST_INSERT_ID();

-- 新闻动态按钮权限
INSERT INTO sys_menu (menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_by, create_time, update_by, update_time, remark)
VALUES ('新闻动态查询', @news_menu_id, 1, '', '', 1, 0, 'F', '0', '0', 'homepage:news:query', '#', 'admin', sysdate(), '', NULL, '');

INSERT INTO sys_menu (menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_by, create_time, update_by, update_time, remark)
VALUES ('新闻动态新增', @news_menu_id, 2, '', '', 1, 0, 'F', '0', '0', 'homepage:news:add', '#', 'admin', sysdate(), '', NULL, '');

INSERT INTO sys_menu (menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_by, create_time, update_by, update_time, remark)
VALUES ('新闻动态修改', @news_menu_id, 3, '', '', 1, 0, 'F', '0', '0', 'homepage:news:edit', '#', 'admin', sysdate(), '', NULL, '');

INSERT INTO sys_menu (menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_by, create_time, update_by, update_time, remark)
VALUES ('新闻动态删除', @news_menu_id, 4, '', '', 1, 0, 'F', '0', '0', 'homepage:news:remove', '#', 'admin', sysdate(), '', NULL, '');

INSERT INTO sys_menu (menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_by, create_time, update_by, update_time, remark)
VALUES ('新闻动态导出', @news_menu_id, 5, '', '', 1, 0, 'F', '0', '0', 'homepage:news:export', '#', 'admin', sysdate(), '', NULL, '');

-- 概况菜单
INSERT INTO sys_menu (menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_by, create_time, update_by, update_time, remark)
VALUES ('概况', @homepage_menu_id, 2, 'overview', 'homepage/overview/index', 1, 0, 'C', '0', '0', 'homepage:overview:list', 'edit', 'admin', sysdate(), '', NULL, '概况菜单');

-- 获取概况菜单ID
SET @overview_menu_id = LAST_INSERT_ID();

-- 概况按钮权限
INSERT INTO sys_menu (menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_by, create_time, update_by, update_time, remark)
VALUES ('概况查询', @overview_menu_id, 1, '', '', 1, 0, 'F', '0', '0', 'homepage:overview:query', '#', 'admin', sysdate(), '', NULL, '');

INSERT INTO sys_menu (menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_by, create_time, update_by, update_time, remark)
VALUES ('概况修改', @overview_menu_id, 2, '', '', 1, 0, 'F', '0', '0', 'homepage:overview:edit', '#', 'admin', sysdate(), '', NULL, '');

-- 总体介绍菜单
INSERT INTO sys_menu (menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_by, create_time, update_by, update_time, remark)
VALUES ('总体介绍', @homepage_menu_id, 3, 'introduction', 'homepage/introduction/index', 1, 0, 'C', '0', '0', 'homepage:introduction:list', 'tree', 'admin', sysdate(), '', NULL, '总体介绍菜单');

-- 获取总体介绍菜单ID
SET @introduction_menu_id = LAST_INSERT_ID();

-- 总体介绍按钮权限
INSERT INTO sys_menu (menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_by, create_time, update_by, update_time, remark)
VALUES ('总体介绍查询', @introduction_menu_id, 1, '', '', 1, 0, 'F', '0', '0', 'homepage:introduction:query', '#', 'admin', sysdate(), '', NULL, '');

INSERT INTO sys_menu (menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_by, create_time, update_by, update_time, remark)
VALUES ('总体介绍修改', @introduction_menu_id, 2, '', '', 1, 0, 'F', '0', '0', 'homepage:introduction:edit', '#', 'admin', sysdate(), '', NULL, '');

-- 价值与作用菜单
INSERT INTO sys_menu (menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_by, create_time, update_by, update_time, remark)
VALUES ('价值与作用', @homepage_menu_id, 4, 'value', 'homepage/value/index', 1, 0, 'C', '0', '0', 'homepage:value:list', 'star', 'admin', sysdate(), '', NULL, '价值与作用菜单');

-- 获取价值与作用菜单ID
SET @value_menu_id = LAST_INSERT_ID();

-- 价值与作用按钮权限
INSERT INTO sys_menu (menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_by, create_time, update_by, update_time, remark)
VALUES ('价值与作用查询', @value_menu_id, 1, '', '', 1, 0, 'F', '0', '0', 'homepage:value:query', '#', 'admin', sysdate(), '', NULL, '');

INSERT INTO sys_menu (menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_by, create_time, update_by, update_time, remark)
VALUES ('价值与作用新增', @value_menu_id, 2, '', '', 1, 0, 'F', '0', '0', 'homepage:value:add', '#', 'admin', sysdate(), '', NULL, '');

INSERT INTO sys_menu (menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_by, create_time, update_by, update_time, remark)
VALUES ('价值与作用修改', @value_menu_id, 3, '', '', 1, 0, 'F', '0', '0', 'homepage:value:edit', '#', 'admin', sysdate(), '', NULL, '');

INSERT INTO sys_menu (menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_by, create_time, update_by, update_time, remark)
VALUES ('价值与作用删除', @value_menu_id, 4, '', '', 1, 0, 'F', '0', '0', 'homepage:value:remove', '#', 'admin', sysdate(), '', NULL, '');

INSERT INTO sys_menu (menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_by, create_time, update_by, update_time, remark)
VALUES ('价值与作用导出', @value_menu_id, 5, '', '', 1, 0, 'F', '0', '0', 'homepage:value:export', '#', 'admin', sysdate(), '', NULL, '');
