feat: sync worldcup translations and ai comments
This commit is contained in:
@@ -0,0 +1,16 @@
|
||||
CREATE TABLE IF NOT EXISTS `la_article_ai_comment_task` (
|
||||
`id` int UNSIGNED NOT NULL AUTO_INCREMENT COMMENT '主键',
|
||||
`article_id` int UNSIGNED NOT NULL DEFAULT 0 COMMENT '文章ID',
|
||||
`virtual_user_id` int UNSIGNED NOT NULL DEFAULT 0 COMMENT '虚拟用户ID',
|
||||
`comment_content` text CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '评论内容',
|
||||
`run_at` int UNSIGNED NOT NULL DEFAULT 0 COMMENT '计划执行时间',
|
||||
`status` tinyint UNSIGNED NOT NULL DEFAULT 0 COMMENT '状态 0-待执行 1-已执行 2-失败',
|
||||
`error_msg` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL DEFAULT '' COMMENT '错误信息',
|
||||
`create_time` int UNSIGNED NOT NULL DEFAULT 0 COMMENT '创建时间',
|
||||
`update_time` int UNSIGNED NOT NULL DEFAULT 0 COMMENT '更新时间',
|
||||
`delete_time` int UNSIGNED NULL DEFAULT NULL COMMENT '删除时间',
|
||||
PRIMARY KEY (`id`) USING BTREE,
|
||||
INDEX `idx_article_status_runat`(`article_id` ASC, `status` ASC, `run_at` ASC) USING BTREE,
|
||||
INDEX `idx_virtual_user`(`virtual_user_id` ASC) USING BTREE
|
||||
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci COMMENT = '文章AI评论任务队列表' ROW_FORMAT = Dynamic;
|
||||
|
||||
@@ -0,0 +1,8 @@
|
||||
INSERT INTO `la_dev_crontab` (`name`, `type`, `system`, `remark`, `command`, `params`, `status`, `expression`, `create_time`, `update_time`)
|
||||
SELECT '资讯AI评论投放', 1, 0, '轮询文章AI评论任务队列,生成并落库虚拟评论', 'article_ai_comment', '', 1, '*/5 * * * *', UNIX_TIMESTAMP(), UNIX_TIMESTAMP()
|
||||
WHERE NOT EXISTS (
|
||||
SELECT 1 FROM `la_dev_crontab`
|
||||
WHERE `command` = 'article_ai_comment'
|
||||
AND `delete_time` IS NULL
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user