INSERT INTO sys_menu (
  id,
  parent_id,
  menu_name,
  path,
  menu_type,
  icon,
  create_user,
  update_user,
  sort,
  status,
  router,
  alias
)
SELECT
  1700000088,
  (SELECT id FROM sys_menu WHERE alias = 'TeamManager' LIMIT 1),
  'BD列表',
  'team/business-development/index',
  2,
  'form',
  '0',
  '0',
  241,
  0,
  'room/business-development',
  'BusinessDevelopment'
WHERE NOT EXISTS (
  SELECT 1 FROM sys_menu WHERE alias = 'BusinessDevelopment'
);

UPDATE sys_menu
SET
  parent_id = (
    SELECT team_menu.id
    FROM (
      SELECT id
      FROM sys_menu
      WHERE alias = 'TeamManager'
      LIMIT 1
    ) AS team_menu
  ),
  menu_name = 'BD列表',
  path = 'team/business-development/index',
  menu_type = 2,
  icon = 'form',
  create_user = '0',
  update_user = '0',
  sort = 241,
  status = 0,
  router = 'room/business-development'
WHERE alias = 'BusinessDevelopment';
