delete from staff_sessions
where account_id in (
  select id
  from staff_accounts
  where phone = any(array[
    '13900000001',
    '13900000002',
    '13900000003',
    '13900000004',
    '13900000005',
    '13900000006',
    '13900000007',
    '13900000008'
  ]::text[])
);

update staff_accounts
set status = 'disabled',
    password_salt = '',
    password_hash = '',
    remark = '历史种子账号已停用；内部账号仅使用手机号验证码登录。',
    updated_at = now()
where phone = any(array[
  '13900000001',
  '13900000002',
  '13900000003',
  '13900000004',
  '13900000005',
  '13900000006',
  '13900000007',
  '13900000008'
]::text[]);

update products
set status = 'offline',
    updated_at = now()
where status = 'published'
  and (
    id in (
      'agent-admin-052741',
      'agent-test-agent-for-test-period',
      'agent-second-test',
      'agent-ceshiceshiceshi',
      'data-ceshibaogao',
      'agent-daguanjia',
      'data-wodedashuju'
    )
    or lower(slug) like '%test%'
    or lower(slug) like '%ceshi%'
    or title in (
      '后台发布测试智能体',
      '测试智能体测试',
      '我的大管家',
      '我的大数据',
      '测试报告'
    )
    or title like '%测试%'
  );
