fix(mistakes): 修复错题掌握状态不返回的问题
Some checks failed
continuous-integration/drone/push Build is failing

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
yuliang_guo
2026-02-04 15:31:23 +08:00
parent 724e3e1073
commit c6f64de4cc
2 changed files with 3 additions and 1 deletions

View File

@@ -309,6 +309,7 @@ class MistakeService:
ExamMistake.question_type, ExamMistake.question_type,
ExamMistake.knowledge_point_id, ExamMistake.knowledge_point_id,
KnowledgePoint.name.label("knowledge_point_name"), KnowledgePoint.name.label("knowledge_point_name"),
ExamMistake.mastery_status,
ExamMistake.created_at ExamMistake.created_at
).select_from(ExamMistake).join( ).select_from(ExamMistake).join(
Exam, ExamMistake.exam_id == Exam.id Exam, ExamMistake.exam_id == Exam.id
@@ -339,6 +340,7 @@ class MistakeService:
"question_type": row.question_type, "question_type": row.question_type,
"knowledge_point_id": row.knowledge_point_id, "knowledge_point_id": row.knowledge_point_id,
"knowledge_point_name": row.knowledge_point_name, "knowledge_point_name": row.knowledge_point_name,
"mastery_status": row.mastery_status,
"created_at": row.created_at "created_at": row.created_at
}) })

View File

@@ -583,7 +583,7 @@ const loadMistakes = async () => {
id: item.id, id: item.id,
type: item.question_type || 'single', type: item.question_type || 'single',
difficulty: 'medium', // 暂无此字段 difficulty: 'medium', // 暂无此字段
masteryStatus: 'unmastered', // 暂无此字段 masteryStatus: item.mastery_status || 'unmastered',
title: item.question_content, title: item.question_content,
yourAnswer: item.user_answer, yourAnswer: item.user_answer,
correctAnswer: item.correct_answer, correctAnswer: item.correct_answer,