Files
ruoyi-java/sql/tencent_doc_batch_push_record.sql
2025-11-07 14:40:42 +08:00

35 lines
2.0 KiB
SQL
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

-- 腾讯文档批量推送记录表
CREATE TABLE IF NOT EXISTS `tencent_doc_batch_push_record` (
`id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键ID',
`batch_id` varchar(64) NOT NULL COMMENT '批次IDUUID',
`file_id` varchar(100) DEFAULT NULL COMMENT '文件ID',
`sheet_id` varchar(100) DEFAULT NULL COMMENT '工作表ID',
`push_type` varchar(20) DEFAULT 'AUTO' COMMENT '推送类型AUTO-自动推送MANUAL-手动推送',
`trigger_source` varchar(50) DEFAULT NULL COMMENT '触发来源DELAYED_TIMER-延迟定时器USER-用户手动',
`start_time` datetime DEFAULT NULL COMMENT '推送开始时间',
`end_time` datetime DEFAULT NULL COMMENT '推送结束时间',
`duration_ms` bigint(20) DEFAULT NULL COMMENT '推送耗时(毫秒)',
`start_row` int(11) DEFAULT NULL COMMENT '起始行号',
`end_row` int(11) DEFAULT NULL COMMENT '结束行号',
`total_rows` int(11) DEFAULT 0 COMMENT '总行数',
`success_count` int(11) DEFAULT 0 COMMENT '成功数量',
`skip_count` int(11) DEFAULT 0 COMMENT '跳过数量',
`error_count` int(11) DEFAULT 0 COMMENT '错误数量',
`status` varchar(20) DEFAULT 'RUNNING' COMMENT '状态RUNNING-执行中SUCCESS-成功PARTIAL-部分成功FAILED-失败',
`result_message` text COMMENT '结果消息',
`error_message` text COMMENT '错误信息',
`create_time` datetime DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
`update_time` datetime DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
PRIMARY KEY (`id`),
UNIQUE KEY `uk_batch_id` (`batch_id`),
KEY `idx_file_sheet` (`file_id`, `sheet_id`),
KEY `idx_create_time` (`create_time`),
KEY `idx_status` (`status`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='腾讯文档批量推送记录表';
-- 修改操作日志表添加批次ID字段
ALTER TABLE `tencent_doc_operation_log`
ADD COLUMN `batch_id` varchar(64) DEFAULT NULL COMMENT '批次ID关联批量推送记录' AFTER `id`,
ADD KEY `idx_batch_id` (`batch_id`);