-- ============================================================================
-- 个微朋友圈菜单（parent_id = 33104 微信管理）
-- 目标表：主库 ylrz_saas 的 tenant_sys_menu + tenant_company_menu
-- ============================================================================

INSERT INTO tenant_sys_menu (
  menu_id, menu_name, parent_id, order_num, path, component,
  menu_type, visible, status, perms, icon, is_frame, is_cache,
  create_by, create_time, remark
) VALUES (
  32980, '个微朋友圈', 33104, 6, 'wxMoment', 'wx/wxMoment/index',
  'C', '0', '0', 'company:wxMoment:list', 'el-icon-picture-outline', 1, 0,
  'admin', NOW(), '个微朋友圈同步与展示'
) ON DUPLICATE KEY UPDATE
  menu_name = VALUES(menu_name),
  parent_id = VALUES(parent_id),
  path = VALUES(path),
  component = VALUES(component),
  perms = VALUES(perms),
  icon = VALUES(icon);

INSERT INTO tenant_sys_menu (
  menu_id, menu_name, parent_id, order_num, path, component,
  menu_type, visible, status, perms, icon, is_frame, is_cache,
  create_by, create_time
) VALUES
(329801, '朋友圈查询', 32980, 1, '', '', 'F', '0', '0', 'company:wxMoment:list', '#', 1, 0, 'admin', NOW()),
(329802, '朋友圈详情', 32980, 2, '', '', 'F', '0', '0', 'company:wxMoment:query', '#', 1, 0, 'admin', NOW()),
(329803, '触发同步', 32980, 3, '', '', 'F', '0', '0', 'company:wxMoment:sync', '#', 1, 0, 'admin', NOW()),
(329804, '关联联系人', 32980, 4, '', '', 'F', '0', '0', 'company:wxMoment:link', '#', 1, 0, 'admin', NOW())
ON DUPLICATE KEY UPDATE perms = VALUES(perms);

INSERT INTO tenant_company_menu (
  menu_id, menu_name, parent_id, order_num, path, component,
  menu_type, visible, status, perms, icon, is_frame, is_cache,
  create_by, create_time, remark
) VALUES (
  32980, '个微朋友圈', 33104, 6, 'wxMoment', 'wx/wxMoment/index',
  'C', '0', '0', 'company:wxMoment:list', 'el-icon-picture-outline', 1, 0,
  'admin', NOW(), '个微朋友圈同步与展示'
) ON DUPLICATE KEY UPDATE
  menu_name = VALUES(menu_name),
  parent_id = VALUES(parent_id),
  path = VALUES(path),
  component = VALUES(component),
  perms = VALUES(perms),
  icon = VALUES(icon);

INSERT INTO tenant_company_menu (
  menu_id, menu_name, parent_id, order_num, path, component,
  menu_type, visible, status, perms, icon, is_frame, is_cache,
  create_by, create_time
) VALUES
(329801, '朋友圈查询', 32980, 1, '', '', 'F', '0', '0', 'company:wxMoment:list', '#', 1, 0, 'admin', NOW()),
(329802, '朋友圈详情', 32980, 2, '', '', 'F', '0', '0', 'company:wxMoment:query', '#', 1, 0, 'admin', NOW()),
(329803, '触发同步', 32980, 3, '', '', 'F', '0', '0', 'company:wxMoment:sync', '#', 1, 0, 'admin', NOW()),
(329804, '关联联系人', 32980, 4, '', '', 'F', '0', '0', 'company:wxMoment:link', '#', 1, 0, 'admin', NOW())
ON DUPLICATE KEY UPDATE perms = VALUES(perms);
