新增解答题拍照判分:百炼 Qwen-VL 按评分点逐点判分,无 API Key 时演示判分回退;混合卷按真实分值加权计分;判分照片与评分点进错题本;补齐历史迁移缺口(0005 模板生效方式/0006 五张缺失表+grammar_progress point_id)

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
jacobxu666
2026-08-17 16:24:23 +08:00
co-authored by Claude Opus 4.8
parent 4033abc21d
commit f80a931ef0
21 changed files with 1377 additions and 45 deletions
+22
View File
@@ -0,0 +1,22 @@
CREATE TABLE `ai_grade_log` (
`id` bigint AUTO_INCREMENT NOT NULL,
`child_user_id` bigint NOT NULL,
`paper_id` varchar(191) NOT NULL,
`question_index` int NOT NULL,
`oss_key` varchar(300) NOT NULL,
`status` varchar(20) NOT NULL,
`earned` int NOT NULL DEFAULT 0,
`points` int NOT NULL DEFAULT 0,
`verdict` text,
`mock` boolean NOT NULL DEFAULT false,
`model` varchar(60),
`ms` int,
`created_at` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
CONSTRAINT `ai_grade_log_id` PRIMARY KEY(`id`)
);
--> statement-breakpoint
ALTER TABLE `ai_grade_log` ADD CONSTRAINT `ai_grade_log_child_user_id_user_id_fk` FOREIGN KEY (`child_user_id`) REFERENCES `user`(`id`) ON DELETE cascade ON UPDATE no action;
--> statement-breakpoint
CREATE INDEX `idx_ai_grade_child_date` ON `ai_grade_log` (`child_user_id`,`created_at`);
--> statement-breakpoint
CREATE INDEX `idx_ai_grade_paper_q` ON `ai_grade_log` (`child_user_id`,`paper_id`,`question_index`);