-- 菜单 SQL
-- 企业微信统计管理父菜单
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, 'wecom', NULL, 1, 0, 'M', '0', '0', '', 'chart', 'admin', sysdate(), '', NULL, '企业微信统计管理目录');

-- 获取刚插入的父菜单ID（假设为2000，实际使用时需要查询获取）
SELECT @parent_id := menu_id FROM sys_menu WHERE menu_name = '企业微信统计' AND parent_id = 0;

-- 客户导出数据菜单
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 ('客户列表数据', @parent_id, 4, 'customerExport', 'wecom/customerExport/index', 1, 0, 'C', '0', '0', 'wecom:customerExport:list', 'download', '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 ('客户联系统计', @parent_id, 2, 'customerContact', 'wecom/customerContact/index', 1, 0, 'C', '0', '0', 'wecom:customerContact:list', 'peoples', '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 ('流量看板数据', @parent_id, 1, 'customerStatistics', 'wecom/customerStatistics/index', 1, 0, 'C', '0', '0', 'wecom:customerStatistics:list', 'table', '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 ('销售看板数据', @parent_id, 3, 'departmentStatistics', 'wecom/departmentStatistics/index', 1, 0, 'C', '0', '0', 'wecom:departmentStatistics:list', 'tree-table', 'admin', sysdate(), '', NULL, '销售看板数据菜单');

-- 获取刚插入的父菜单ID（假设为2000，实际使用时需要查询获取）
SELECT @parent_id := menu_id FROM sys_menu WHERE menu_name = '流量看板数据' AND parent_id = 0;

-- 客户统计数据查询按钮
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 ('流量看板数据查询', @parent_id, 1, '#', '', 1, 0, 'F', '0', '0', 'wecom:customerStatistics: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 ('流量看板数据导出', @parent_id, 2, '#', '', 1, 0, 'F', '0', '0', 'wecom:customerStatistics:export', '#', 'admin', sysdate(), '', NULL, '');

-- 获取刚插入的父菜单ID（假设为2000，实际使用时需要查询获取）
SELECT @parent_id := menu_id FROM sys_menu WHERE menu_name = '客户联系统计' AND parent_id = 0;



-- 客户联系统计数据查询按钮
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 ('客户联系统计查询', @parent_id, 1, '#', '', 1, 0, 'F', '0', '0', 'wecom:customerContact: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 ('客户联系统计导出', @parent_id, 2, '#', '', 1, 0, 'F', '0', '0', 'wecom:customerContact:export', '#', 'admin', sysdate(), '', NULL, '');


-- 获取刚插入的父菜单ID（假设为2000，实际使用时需要查询获取）
SELECT @parent_id := menu_id FROM sys_menu WHERE menu_name = '销售看板数据' AND parent_id = 0;


-- 部门统计数据查询按钮
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 ('销售看板数据查询', @parent_id, 1, '#', '', 1, 0, 'F', '0', '0', 'wecom:departmentStatistics: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 ('销售看板数据导出', @parent_id, 2, '#', '', 1, 0, 'F', '0', '0', 'wecom:departmentStatistics:export', '#', 'admin', sysdate(), '', NULL, '');

-- 获取刚插入的父菜单ID（假设为2000，实际使用时需要查询获取）
SELECT @parent_id := menu_id FROM sys_menu WHERE menu_name = '客户列表数据' AND parent_id = 0;

-- 客户导出数据查询按钮
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 ('客户列表数据查询',  @parent_id, 1, '#', '', 1, 0, 'F', '0', '0', 'wecom:customerExport: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 ('客户列表数据导出',  @parent_id, 2, '#', '', 1, 0, 'F', '0', '0', 'wecom:customerExport:export', '#', 'admin', sysdate(), '', NULL, '');


