UPDATE `la_dev_crontab`
SET
    `name` = '赛事直播流与主播信息抓取',
    `remark` = 'Docker crawler 每分钟同步雨燕直播间、主播信息并抓取直播线路播放地址',
    `status` = 1,
    `expression` = '* * * * *',
    `update_time` = UNIX_TIMESTAMP()
WHERE `command` = 'crawler'
  AND `params` = 'match_live_stream'
  AND `delete_time` IS NULL;

INSERT INTO `la_dev_crontab`
(`name`, `type`, `system`, `remark`, `command`, `params`, `status`, `expression`, `create_time`, `update_time`)
SELECT
    '赛事直播流与主播信息抓取',
    1,
    0,
    'Docker crawler 每分钟同步雨燕直播间、主播信息并抓取直播线路播放地址',
    'crawler',
    'match_live_stream',
    1,
    '* * * * *',
    UNIX_TIMESTAMP(),
    UNIX_TIMESTAMP()
WHERE NOT EXISTS (
    SELECT 1
    FROM `la_dev_crontab`
    WHERE `command` = 'crawler'
      AND `params` = 'match_live_stream'
      AND `delete_time` IS NULL
);
