180 lines
7.7 KiB
SQL
180 lines
7.7 KiB
SQL
-- ============================================================================
|
|
-- PPGo_Job 数据种子文件
|
|
-- 从 Docker 容器导出,用于新环境初始化
|
|
-- 生成时间: 2026-07-21
|
|
-- ============================================================================
|
|
-- 说明:
|
|
-- 1. 管理员和权限因子已由 boot/init.go 自动创建,此处不再重复
|
|
-- 2. 以下数据在 pp_task_group / pp_task 表为空时才会被 seed
|
|
-- ============================================================================
|
|
|
|
-- ============================================================================
|
|
-- 任务分组
|
|
-- ============================================================================
|
|
INSERT OR IGNORE INTO pp_task_group(id, group_name, description, create_id, update_id, create_time, update_time, status)
|
|
VALUES (1, '数据引擎', 'Data Engine 定时同步任务', 1, 1, unixepoch('now'), unixepoch('now'), 1);
|
|
|
|
-- ============================================================================
|
|
-- 定时任务(仅导出 status >= 0 的有效任务)
|
|
-- ============================================================================
|
|
|
|
-- 数据引擎 - 补偿扫描 (id=46, status=0 暂停中)
|
|
INSERT OR IGNORE INTO pp_task(
|
|
id, group_id, server_ids, server_type, task_name, description, cron_spec,
|
|
concurrent, task_type, command, url, method, headers, body,
|
|
timeout, execute_times, prev_time, status,
|
|
is_notify, notify_type, notify_tpl_id, notify_user_ids,
|
|
create_id, update_id, create_time, update_time
|
|
) VALUES (
|
|
46, 1, '', 0, '数据引擎-补偿扫描', '',
|
|
'0 */5 * * * *', 0, 'http', '',
|
|
'http://host.docker.internal:3013/sync/ctrl/compensate', 'POST',
|
|
'{"Content-Type":"application/json"}', '',
|
|
600, 0, 0, 0,
|
|
0, 0, 0, '',
|
|
1, 1, unixepoch('now'), unixepoch('now')
|
|
);
|
|
|
|
-- 腾讯广告 - 账户列表 (id=48, status=0 暂停中)
|
|
INSERT OR IGNORE INTO pp_task(
|
|
id, group_id, server_ids, server_type, task_name, description, cron_spec,
|
|
concurrent, task_type, command, url, method, headers, body,
|
|
timeout, execute_times, prev_time, status,
|
|
is_notify, notify_type, notify_tpl_id, notify_user_ids,
|
|
create_id, update_id, create_time, update_time
|
|
) VALUES (
|
|
48, 1, '', 0, '腾讯广告-账户列表(account_relation)', '',
|
|
'0 0 */6 * * *', 0, 'http', '',
|
|
'http://host.docker.internal:3013/sync/ctrl/trigger', 'POST',
|
|
'{"Content-Type":"application/json"}',
|
|
'{"platformCode":"tencent","interfaceCode":"account_relation","fullSync":false}',
|
|
1800, 0, 0, 0,
|
|
0, 0, 0, '',
|
|
1, 1, unixepoch('now'), unixepoch('now')
|
|
);
|
|
|
|
-- 腾讯广告 - 图片素材 (id=49, status=0 暂停中)
|
|
INSERT OR IGNORE INTO pp_task(
|
|
id, group_id, server_ids, server_type, task_name, description, cron_spec,
|
|
concurrent, task_type, command, url, method, headers, body,
|
|
timeout, execute_times, prev_time, status,
|
|
is_notify, notify_type, notify_tpl_id, notify_user_ids,
|
|
create_id, update_id, create_time, update_time
|
|
) VALUES (
|
|
49, 1, '', 0, '腾讯广告-图片素材(image)', '',
|
|
'0 0 * * * *', 0, 'http', '',
|
|
'http://host.docker.internal:3013/sync/ctrl/trigger', 'POST',
|
|
'{"Content-Type":"application/json"}',
|
|
'{"platformCode":"tencent","interfaceCode":"image","fullSync":false}',
|
|
3600, 0, 0, 0,
|
|
0, 0, 0, '',
|
|
1, 1, unixepoch('now'), unixepoch('now')
|
|
);
|
|
|
|
-- 腾讯广告 - 视频素材 (id=50, status=0 暂停中)
|
|
INSERT OR IGNORE INTO pp_task(
|
|
id, group_id, server_ids, server_type, task_name, description, cron_spec,
|
|
concurrent, task_type, command, url, method, headers, body,
|
|
timeout, execute_times, prev_time, status,
|
|
is_notify, notify_type, notify_tpl_id, notify_user_ids,
|
|
create_id, update_id, create_time, update_time
|
|
) VALUES (
|
|
50, 1, '', 0, '腾讯广告-视频素材(video)', '',
|
|
'0 0 * * * *', 0, 'http', '',
|
|
'http://host.docker.internal:3013/sync/ctrl/trigger', 'POST',
|
|
'{"Content-Type":"application/json"}',
|
|
'{"platformCode":"tencent","interfaceCode":"video","fullSync":false}',
|
|
3600, 0, 0, 0,
|
|
0, 0, 0, '',
|
|
1, 1, unixepoch('now'), unixepoch('now')
|
|
);
|
|
|
|
-- 腾讯广告 - 音频素材 (id=51, status=0 暂停中)
|
|
INSERT OR IGNORE INTO pp_task(
|
|
id, group_id, server_ids, server_type, task_name, description, cron_spec,
|
|
concurrent, task_type, command, url, method, headers, body,
|
|
timeout, execute_times, prev_time, status,
|
|
is_notify, notify_type, notify_tpl_id, notify_user_ids,
|
|
create_id, update_id, create_time, update_time
|
|
) VALUES (
|
|
51, 1, '', 0, '腾讯广告-音频素材(audio)', '',
|
|
'0 0 */6 * * *', 0, 'http', '',
|
|
'http://host.docker.internal:3013/sync/ctrl/trigger', 'POST',
|
|
'{"Content-Type":"application/json"}',
|
|
'{"platformCode":"tencent","interfaceCode":"audio","fullSync":false}',
|
|
1800, 0, 0, 0,
|
|
0, 0, 0, '',
|
|
1, 1, unixepoch('now'), unixepoch('now')
|
|
);
|
|
|
|
-- 腾讯广告 - Token刷新 (id=52, status=1 运行中)
|
|
INSERT OR IGNORE INTO pp_task(
|
|
id, group_id, server_ids, server_type, task_name, description, cron_spec,
|
|
concurrent, task_type, command, url, method, headers, body,
|
|
timeout, execute_times, prev_time, status,
|
|
is_notify, notify_type, notify_tpl_id, notify_user_ids,
|
|
create_id, update_id, create_time, update_time
|
|
) VALUES (
|
|
52, 1, '', 0, '腾讯广告-Token刷新', '',
|
|
'0 0 3 * * *', 0, 'http', '',
|
|
'http://host.docker.internal:3013/sync/ctrl/refreshToken', 'POST',
|
|
'{"Content-Type":"application/json"}',
|
|
'{"platformCode":"tencent"}',
|
|
0, 0, 0, 1,
|
|
0, 0, 0, '',
|
|
1, 1, unixepoch('now'), unixepoch('now')
|
|
);
|
|
|
|
-- CID - 图片批量送检 (id=53, status=0 暂停中)
|
|
INSERT OR IGNORE INTO pp_task(
|
|
id, group_id, server_ids, server_type, task_name, description, cron_spec,
|
|
concurrent, task_type, command, url, method, headers, body,
|
|
timeout, execute_times, prev_time, status,
|
|
is_notify, notify_type, notify_tpl_id, notify_user_ids,
|
|
create_id, update_id, create_time, update_time
|
|
) VALUES (
|
|
53, 1, '', 0, 'CID - 图片批量送检', '自动扫描待校验图片并提交到易盾检测',
|
|
'0/30 * * * * *', 0, 'http', '',
|
|
'http://host.docker.internal:3001/material/verify/controller/batch-verify-image', 'POST',
|
|
'{"Content-Type":"application/json"}',
|
|
'{limit:10}',
|
|
120, 0, 0, 0,
|
|
0, 0, 0, '',
|
|
1, 1, unixepoch('now'), unixepoch('now')
|
|
);
|
|
|
|
-- CID - 视频批量送检 (id=54, status=0 暂停中)
|
|
INSERT OR IGNORE INTO pp_task(
|
|
id, group_id, server_ids, server_type, task_name, description, cron_spec,
|
|
concurrent, task_type, command, url, method, headers, body,
|
|
timeout, execute_times, prev_time, status,
|
|
is_notify, notify_type, notify_tpl_id, notify_user_ids,
|
|
create_id, update_id, create_time, update_time
|
|
) VALUES (
|
|
54, 1, '', 0, 'CID - 视频批量送检', '自动扫描待校验视频并提交到易盾检测',
|
|
'15/30 * * * * *', 0, 'http', '',
|
|
'http://host.docker.internal:3001/material/verify/controller/batch-verify-video', 'POST',
|
|
'{"Content-Type":"application/json"}',
|
|
'{limit:10}',
|
|
120, 0, 0, 0,
|
|
0, 0, 0, '',
|
|
1, 1, unixepoch('now'), unixepoch('now')
|
|
);
|
|
|
|
-- CID - 检测结果轮询 (id=55, status=1 运行中)
|
|
INSERT OR IGNORE INTO pp_task(
|
|
id, group_id, server_ids, server_type, task_name, description, cron_spec,
|
|
concurrent, task_type, command, url, method, headers, body,
|
|
timeout, execute_times, prev_time, status,
|
|
is_notify, notify_type, notify_tpl_id, notify_user_ids,
|
|
create_id, update_id, create_time, update_time
|
|
) VALUES (
|
|
55, 1, '', 0, 'CID - 检测结果轮询', '自动查询易盾检测结果并更新到素材表',
|
|
'0 * * * * *', 0, 'http', '',
|
|
'http://host.docker.internal:3001/yidun/callback/controller/poll-all-results', 'POST',
|
|
'{}', '',
|
|
120, 0, 0, 1,
|
|
0, 0, 0, '',
|
|
1, 1, unixepoch('now'), unixepoch('now')
|
|
);
|