修复正式考试批题错误

This commit is contained in:
2026-06-11 23:38:54 +08:00
parent a8e28e513d
commit aec860f85f
6 changed files with 523 additions and 247 deletions

428
bug.txt
View File

@@ -1,150 +1,82 @@
Creating a new SqlSession
SqlSession [org.apache.ibatis.session.defaults.DefaultSqlSession@74a5df74] was not registered for synchronization because synchronization is not active
JDBC Connection [HikariProxyConnection@833048452 wrapping com.mysql.cj.jdbc.ConnectionImpl@76ba610e] will not be managed by Spring
SqlSession [org.apache.ibatis.session.defaults.DefaultSqlSession@397c3388] was not registered for synchronization because synchronization is not active
JDBC Connection [HikariProxyConnection@1741726566 wrapping com.mysql.cj.jdbc.ConnectionImpl@51638967] will not be managed by Spring
==> Preparing: SELECT id,username,password,real_name,email,phone,avatar,user_type,status,dept_id,last_login_time,create_time,update_time FROM user WHERE id=?
==> Parameters: 1(Long)
<== Columns: id, username, password, real_name, email, phone, avatar, user_type, status, dept_id, last_login_time, create_time, update_time
<== Row: 1, admin, $2a$10$o/mdlaGbhm7Fm0yrYFGICODFyqYUu/cd9Nj1xzc/qD9r3ukNZQr8W, 系统管理员, admin@system.com, 13800000000, null, 1, 1, 1, null, 2026-04-16 09:05:15, 2026-05-10 19:08:59
<== Total: 1
Closing non transactional SqlSession [org.apache.ibatis.session.defaults.DefaultSqlSession@74a5df74]
2026-06-10 13:44:38 - 请求 | URL: http://localhost:8080/api/exam/grade | 方法: POST | IP: 127.0.0.1
2026-06-10 13:44:38 - ========== 批阅接口请求开始 ==========
2026-06-10 13:44:38 - 请求完整内容: {"answer_type":"practice","answers":[{"max_score":10.0,"question_content":{"answer":"加强吸烟场所维护的主要目的是确保设施设备处于良好状态,保障文明吸烟环境功能作用的最大发挥,进一步提高消费者满意度。","data":{"scoring_points":[{"point":"要点1确保设施设备良好状态","weight":0.5},{"point":"要点2保障文明吸烟环境功能发挥","weight":0.3},{"point":"要点3提高消费者满意度","weight":0.2}]},"stem":"请简述加强吸烟场所维护的主要目的及意义。"},"question_id":"806754e9-3951-4562-8641-553c42564ab8","question_type":"subjective","student_answer":"加强吸烟场所维护可以确保设施良好,提升吸烟环境,让消费者更满意。"}],"request_id":"test_005"}
Closing non transactional SqlSession [org.apache.ibatis.session.defaults.DefaultSqlSession@397c3388]
2026-06-11 14:19:33 - 请求 | URL: http://localhost:8080/api/exam/grade | 方法: POST | IP: 127.0.0.1
2026-06-11 14:19:33 - ========== 批阅接口请求开始 ==========
2026-06-11 14:19:33 - 请求完整内容: {"answer_type":"formal_exam","answers":[{"max_score":2.0,"question_content":{"answer":"B","data":{"options":[{"key":"A","content":"允许入住并记录信息"},{"key":"B","content":"一律不予入住并立即上报属地公安机关"},{"key":"C","content":"暂时允许入住并后续核查"},{"key":"D","content":"要求重新提供证件"}]},"stem":"根据文档内容,当发现人证不符、证件伪造或冒用证件时,应采取的措施是?"},"question_id":"ea6a7f44-9077-4f19-b10e-8239a5198f4d","question_type":"single_choice","student_answer":"B"},{"max_score":2.0,"question_content":{"answer":"B","data":{"options":[{"key":"A","content":"安保人员"},{"key":"B","content":"前台工作人员"},{"key":"C","content":"经理"},{"key":"D","content":"客户"}]},"stem":"根据文档内容,谁是住宿登记的第一责任人?"},"question_id":"9d59e7c5-edfc-4517-9fb5-780b389b66fb","question_type":"single_choice","student_answer":"B"}],"record_id":"683de5c4-cce6-47b4-8518-a582dce02ca4","request_id":"formal_683de5c4-cce6-47b4-8518-a582dce02ca4"}
Creating a new SqlSession
SqlSession [org.apache.ibatis.session.defaults.DefaultSqlSession@503b434e] was not registered for synchronization because synchronization is not active
JDBC Connection [HikariProxyConnection@437070389 wrapping com.mysql.cj.jdbc.ConnectionImpl@76ba610e] will not be managed by Spring
SqlSession [org.apache.ibatis.session.defaults.DefaultSqlSession@cf3c606] was not registered for synchronization because synchronization is not active
JDBC Connection [HikariProxyConnection@26303885 wrapping com.mysql.cj.jdbc.ConnectionImpl@51638967] will not be managed by Spring
==> Preparing: SELECT id,username,password,real_name,email,phone,avatar,user_type,status,dept_id,last_login_time,create_time,update_time FROM user WHERE id=?
==> Parameters: 1(Long)
<== Columns: id, username, password, real_name, email, phone, avatar, user_type, status, dept_id, last_login_time, create_time, update_time
<== Row: 1, admin, $2a$10$o/mdlaGbhm7Fm0yrYFGICODFyqYUu/cd9Nj1xzc/qD9r3ukNZQr8W, 系统管理员, admin@system.com, 13800000000, null, 1, 1, 1, null, 2026-04-16 09:05:15, 2026-05-10 19:08:59
<== Total: 1
Closing non transactional SqlSession [org.apache.ibatis.session.defaults.DefaultSqlSession@503b434e]
2026-06-10 13:44:38 - 当前用户ID: 1
2026-06-10 13:44:38 - 答案数量: 1
2026-06-10 13:44:38 - 日常练习/模拟考模式,开始验证答案数据...
2026-06-10 13:44:38 - 答案数据验证通过共1个答案
2026-06-10 13:44:38 - 空试卷标记: isBlankSubmission=false
2026-06-10 13:44:38 - 自动生成试卷ID: paperId=68b2574e-e68b-486a-b86b-5426ab2e488b
2026-06-10 13:44:38 - 自动生成sessionId: grade_e099f4df
2026-06-10 13:44:38 - ========== 准备调用批阅服务 ==========
2026-06-10 13:44:38 - 批改答案请求参数汇总:
2026-06-10 13:44:38 - - userId: 1
2026-06-10 13:44:38 - - requestId: test_005
2026-06-10 13:44:38 - - paperId: 68b2574e-e68b-486a-b86b-5426ab2e488b
2026-06-10 13:44:38 - - sessionId: grade_e099f4df
2026-06-10 13:44:38 - - answerType: practice
2026-06-10 13:44:38 - - answers count: 1
2026-06-10 13:44:38 - Service层开始批改题目
2026-06-10 13:44:38 - Service层参数详情:
2026-06-10 13:44:38 - - userId: 1
2026-06-10 13:44:38 - - paperId: 68b2574e-e68b-486a-b86b-5426ab2e488b
2026-06-10 13:44:38 - - sessionId: grade_e099f4df
2026-06-10 13:44:38 - - answerType: practice
2026-06-10 13:44:38 - - 答案数量: 1
2026-06-10 13:44:38 - - AI服务地址: http://localhost:5001/exam/grade
2026-06-10 13:44:38 - Service层准备发送请求到AI服务
2026-06-10 13:44:38 - 请求体内容: {"request_id":"test_005","paper_id":"68b2574e-e68b-486a-b86b-5426ab2e488b","session_id":"grade_e099f4df","record_id":null,"answer_type":"practice","answers":[{"question_id":"806754e9-3951-4562-8641-553c42564ab8","question_type":"subjective","question_content":{"stem":"请简述加强吸烟场所维护的主要目的及意义。","data":{"scoring_points":[{"point":"要点1确保设施设备良好状态","weight":0.5},{"point":"要点2保障文明吸烟环境功能发挥","weight":0.3},{"point":"要点3提高消费者满意度","weight":0.2}]},"answer":"加强吸烟场所维护的主要目的是确保设施设备处于良好状态,保障文明吸烟环境功能作用的最大发挥,进一步提高消费者满意度。"},"student_answer":"加强吸烟场所维护可以确保设施良好,提升吸烟环境,让消费者更满意。","max_score":10.0}]}
2026-06-10 13:44:38 - 请求超时时间: 60000ms (60秒)
2026-06-10 13:44:41 - Service层收到AI服务响应
2026-06-10 13:44:41 - 响应原始内容: {"data":{"request_id":"test_005","results":[{"details":{"highlights":["\u5b66\u751f\u7b54\u6848\u7b80\u6d01\u660e\u4e86\uff0c\u80fd\u591f\u6293\u4f4f\u6838\u5fc3\u8981\u70b9\u3002","\u5bf9\u6d88\u8d39\u8005\u6ee1\u610f\u5ea6\u7684\u8868\u8ff0\u51c6\u786e\u3002"],"overall_feedback":"\u5b66\u751f\u7684\u7b54\u6848\u57fa\u672c\u7b26\u5408\u8981\u6c42\uff0c\u80fd\u591f\u6293\u4f4f\u4e3b\u8981\u89c2\u70b9\uff0c\u4f46\u5728\u90e8\u5206\u8981\u70b9\u7684\u8868\u8fbe\u4e0a\u7565\u663e\u7b80\u7565\uff0c\u5efa\u8bae\u8fdb\u4e00\u6b65\u5b8c\u5584\u8bed\u8a00\u8868\u8ff0\u4ee5\u63d0\u9ad8\u51c6\u786e\u6027\u3002","scoring_breakdown":[{"achieved":0.8,"comment":"\u5b66\u751f\u7b54\u6848\u63d0\u5230\u4e86'\u786e\u4fdd\u8bbe\u65bd\u826f\u597d'\uff0c\u4e0e\u8981\u70b9\u57fa\u672c\u4e00\u81f4\uff0c\u4f46\u672a\u660e\u786e\u63d0\u5230'\u8bbe\u65bd\u8bbe\u5907'\u7684\u5b8c\u6574\u8868\u8ff0\u3002","point":"\u8981\u70b91\uff1a\u786e\u4fdd\u8bbe\u65bd\u8bbe\u5907\u826f\u597d\u72b6\u6001","weight":0.5},{"achieved":0.6,"comment":"\u5b66\u751f\u7b54\u6848\u63d0\u5230'\u63d0\u5347\u5438\u70df\u73af\u5883'\uff0c\u4f46\u672a\u76f4\u63a5\u4f53\u73b0'\u4fdd\u969c\u6587\u660e\u5438\u70df\u73af\u5883\u529f\u80fd\u53d1\u6325'\u7684\u6838\u5fc3\u5185\u5bb9\u3002","point":"\u8981\u70b92\uff1a\u4fdd\u969c\u6587\u660e\u5438\u70df\u73af\u5883\u529f\u80fd\u53d1\u6325","weight":0.3},{"achieved":1.0,"comment":"\u5b66\u751f\u7b54\u6848\u660e\u786e\u63d0\u5230'\u8ba9\u6d88\u8d39\u8005\u66f4\u6ee1\u610f'\uff0c\u4e0e\u8981\u70b9\u5b8c\u5168\u4e00\u81f4\u3002","point":"\u8981\u70b93\uff1a\u63d0\u9ad8\u6d88\u8d39\u8005\u6ee1\u610f\u5ea6","weight":0.2}],"shortcomings":["\u672a\u660e\u786e\u63d0\u53ca'\u8bbe\u65bd\u8bbe\u5907'\u7684\u5b8c\u6574\u8868\u8ff0\u3002","\u5bf9'\u6587\u660e\u5438\u70df\u73af\u5883\u529f\u80fd\u53d1\u6325'\u7684\u7406\u89e3\u4e0d\u591f\u6df1\u5165\u3002"]},"max_score":10.0,"question_id":"806754e9-3951-4562-8641-553c42564ab8","score":8.0}],"score_rate":80.0,"success":true,"total_max_score":10.0,"total_score":8.0},"message":"\u6279\u9605\u5b8c\u6210","status":"success","status_code":2021,"success":true}
2026-06-10 13:44:41 - 开始解析 1 道题
2026-06-10 13:44:41 - 第 1 题 resultNode 内容: {"details":{"highlights":["学生答案简洁明了,能够抓住核心要点。","对消费者满意度的表述准确。"],"overall_feedback":"学生的答案基本符合要求,能够抓住主要观点,但在部分要点的表达上略显简略,建议进一步完善语言表述以提高准确性。","scoring_breakdown":[{"achieved":0.8,"comment":"学生答案提到了'确保设施良好',与要点基本一致,但未明确提到'设施设备'的完整表述。","point":"要点1确保设施设备良好状态","weight":0.5},{"achieved":0.6,"comment":"学生答案提到'提升吸烟环境',但未直接体现'保障文明吸烟环境功能发挥'的核心内容。","point":"要点2保障文明吸烟环境功能发挥","weight":0.3},{"achieved":1.0,"comment":"学生答案明确提到'让消费者更满意',与要点完全一致。","point":"要点3提高消费者满意度","weight":0.2}],"shortcomings":["未明确提及'设施设备'的完整表述。","对'文明吸烟环境功能发挥'的理解不够深入。"]},"max_score":10.0,"question_id":"806754e9-3951-4562-8641-553c42564ab8","score":8.0}
2026-06-10 13:44:41 - resultNode 字段: , 10.0, 806754e9-3951-4562-8641-553c42564ab8, 8.0
2026-06-10 13:44:41 - 读取到 question_id: 806754e9-3951-4562-8641-553c42564ab8
2026-06-10 13:44:41 - 已解析 details 结构
2026-06-10 13:44:41 - 从请求中补全 question_type: subjective
2026-06-10 13:44:41 - 处理第 1 题, 类型: subjective, grading_status: null
2026-06-10 13:44:41 - 检测到主观题,手动解析 details
2026-06-10 13:44:41 - 主观题 feedback 已设置,长度: 408
2026-06-10 13:44:41 - Service层AI服务批改完成
2026-06-10 13:44:41 - 批改结果: success=true, totalScore=8.0, totalMaxScore=10.0, scoreRate=80.0
2026-06-10 13:44:41 - 各题目批改结果:
2026-06-10 13:44:41 - 题目1(806754e9-3951-4562-8641-553c42564ab8): correct=null, score=8.0/10.0, feedback=【亮点】
1. 学生答案简洁明了,能够抓住核心要点。
2. 对消费者满意度的表述准确。
【综合评价】
学生的答案基本符合要求,能够抓住主要观点,但在部分要点的表达上略显简略,建议进一步完善语言表述以提高准确性。
【评分详情】
- 要点1确保设施设备良好状态 (权重: 50%, 得分率: 80%)
评价: 学生答案提到了'确保设施良好',与要点基本一致,但未明确提到'设施设备'的完整表述。
- 要点2保障文明吸烟环境功能发挥 (权重: 30%, 得分率: 60%)
评价: 学生答案提到'提升吸烟环境',但未直接体现'保障文明吸烟环境功能发挥'的核心内容。
- 要点3提高消费者满意度 (权重: 20%, 得分率: 100%)
评价: 学生答案明确提到'让消费者更满意',与要点完全一致。
【可改进之处】
1. 未明确提及'设施设备'的完整表述。
2. 对'文明吸烟环境功能发挥'的理解不够深入。
2026-06-10 13:44:41 - ========== 批阅成功 ==========
2026-06-10 13:44:41 - 批阅结果: totalScore=8.0, totalMaxScore=10.0, scoreRate=80.0%
2026-06-10 13:44:41 - 开始批量保存答题记录: count=1
Closing non transactional SqlSession [org.apache.ibatis.session.defaults.DefaultSqlSession@cf3c606]
2026-06-11 14:19:33 - 当前用户ID: 1
2026-06-11 14:19:33 - 答案数量: 2
2026-06-11 14:19:33 - 检测到正式考试模式: recordId=683de5c4-cce6-47b4-8518-a582dce02ca4
2026-06-11 14:19:33 - 通过recordId提交考试: userId=1, recordId=683de5c4-cce6-47b4-8518-a582dce02ca4, 答案数量=2
2026-06-11 14:19:33 - gradeAnswersForRecord 开始
2026-06-11 14:19:33 - 请求参数: recordId=683de5c4-cce6-47b4-8518-a582dce02ca4, userId=1, answerType=formal_exam, answers count=2
Creating a new SqlSession
Registering transaction synchronization for SqlSession [org.apache.ibatis.session.defaults.DefaultSqlSession@70586209]
JDBC Connection [HikariProxyConnection@305915904 wrapping com.mysql.cj.jdbc.ConnectionImpl@76ba610e] will be managed by Spring
==> Preparing: SELECT id,user_id,question_id,question_type,answer_type,paper_id,session_id,user_answer,score,max_score,is_correct,grading_type,feedback,time_spent,paper_time_spent,created_at,updated_at FROM user_answer WHERE (user_id = ? AND question_id = ? AND paper_id = ? AND answer_type = ?)
==> Parameters: 1(Long), 806754e9-3951-4562-8641-553c42564ab8(String), 68b2574e-e68b-486a-b86b-5426ab2e488b(String), practice(String)
<== Total: 0
Releasing transactional SqlSession [org.apache.ibatis.session.defaults.DefaultSqlSession@70586209]
Fetched SqlSession [org.apache.ibatis.session.defaults.DefaultSqlSession@70586209] from current transaction
==> Preparing: INSERT INTO user_answer ( user_id, question_id, question_type, answer_type, paper_id, session_id, user_answer, score, max_score, is_correct, grading_type, feedback, created_at, updated_at ) VALUES ( ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ? )
==> Parameters: 1(Long), 806754e9-3951-4562-8641-553c42564ab8(String), subjective(String), practice(String), 68b2574e-e68b-486a-b86b-5426ab2e488b(String), grade_e099f4df(String), "加强吸烟场所维护可以确保设施良好,提升吸烟环境,让消费者更满意。"(String), 8.0(BigDecimal), 10.0(BigDecimal), 0(Integer), ai(String), 【亮点】
1. 学生答案简洁明了,能够抓住核心要点。
2. 对消费者满意度的表述准确。
【综合评价】
学生的答案基本符合要求,能够抓住主要观点,但在部分要点的表达上略显简略,建议进一步完善语言表述以提高准确性。
【评分详情】
- 要点1确保设施设备良好状态 (权重: 50%, 得分率: 80%)
评价: 学生答案提到了'确保设施良好',与要点基本一致,但未明确提到'设施设备'的完整表述。
- 要点2保障文明吸烟环境功能发挥 (权重: 30%, 得分率: 60%)
评价: 学生答案提到'提升吸烟环境',但未直接体现'保障文明吸烟环境功能发挥'的核心内容。
- 要点3提高消费者满意度 (权重: 20%, 得分率: 100%)
评价: 学生答案明确提到'让消费者更满意',与要点完全一致。
【可改进之处】
1. 未明确提及'设施设备'的完整表述。
2. 对'文明吸烟环境功能发挥'的理解不够深入。(String), 2026-06-10T13:44:41.140192733(LocalDateTime), 2026-06-10T13:44:41.140943974(LocalDateTime)
Releasing transactional SqlSession [org.apache.ibatis.session.defaults.DefaultSqlSession@70586209]
Transaction synchronization deregistering SqlSession [org.apache.ibatis.session.defaults.DefaultSqlSession@70586209]
Transaction synchronization closing SqlSession [org.apache.ibatis.session.defaults.DefaultSqlSession@70586209]
2026-06-10 13:44:41 - ========== 批改答案发生未知异常 ==========
2026-06-10 13:44:41 - 错误类型: org.springframework.dao.DataIntegrityViolationException
2026-06-10 13:44:41 - 错误信息:
### Error updating database. Cause: java.sql.SQLIntegrityConstraintViolationException: Cannot add or update a child row: a foreign key constraint fails (`knowledge_management_system`.`user_answer`, CONSTRAINT `fk_user_answer_question` FOREIGN KEY (`question_id`) REFERENCES `question` (`question_id`) ON DELETE CASCADE ON UPDATE RESTRICT)
### The error may exist in top/tqx/demo_1/mapper/UserAnswerMapper.java (best guess)
### The error may involve top.tqx.demo_1.mapper.UserAnswerMapper.insert-Inline
### The error occurred while setting parameters
### SQL: INSERT INTO user_answer ( user_id, question_id, question_type, answer_type, paper_id, session_id, user_answer, score, max_score, is_correct, grading_type, feedback, created_at, updated_at ) VALUES ( ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ? )
### Cause: java.sql.SQLIntegrityConstraintViolationException: Cannot add or update a child row: a foreign key constraint fails (`knowledge_management_system`.`user_answer`, CONSTRAINT `fk_user_answer_question` FOREIGN KEY (`question_id`) REFERENCES `question` (`question_id`) ON DELETE CASCADE ON UPDATE RESTRICT)
; Cannot add or update a child row: a foreign key constraint fails (`knowledge_management_system`.`user_answer`, CONSTRAINT `fk_user_answer_question` FOREIGN KEY (`question_id`) REFERENCES `question` (`question_id`) ON DELETE CASCADE ON UPDATE RESTRICT)
2026-06-10 13:44:41 - 可能的错误位置:
2026-06-10 13:44:41 - at top.tqx.demo_1.service.impl.UserAnswerServiceImpl.batchSaveAnswers:UserAnswerServiceImpl.java (行号: 98)
2026-06-10 13:44:41 - at top.tqx.demo_1.service.impl.UserAnswerServiceImpl$$SpringCGLIB$$0.batchSaveAnswers:<generated> (行号: -1)
2026-06-10 13:44:41 - at top.tqx.demo_1.controller.ExamController.saveUserAnswers:ExamController.java (行号: 583)
2026-06-10 13:44:41 - at top.tqx.demo_1.controller.ExamController.gradeAnswers:ExamController.java (行号: 416)
2026-06-10 13:44:41 - at top.tqx.demo_1.aspect.LogAspect.around:LogAspect.java (行号: 43)
2026-06-10 13:44:41 - at top.tqx.demo_1.controller.ExamController$$SpringCGLIB$$0.gradeAnswers:<generated> (行号: -1)
2026-06-10 13:44:41 - 完整堆栈:
org.springframework.dao.DataIntegrityViolationException:
### Error updating database. Cause: java.sql.SQLIntegrityConstraintViolationException: Cannot add or update a child row: a foreign key constraint fails (`knowledge_management_system`.`user_answer`, CONSTRAINT `fk_user_answer_question` FOREIGN KEY (`question_id`) REFERENCES `question` (`question_id`) ON DELETE CASCADE ON UPDATE RESTRICT)
### The error may exist in top/tqx/demo_1/mapper/UserAnswerMapper.java (best guess)
### The error may involve top.tqx.demo_1.mapper.UserAnswerMapper.insert-Inline
### The error occurred while setting parameters
### SQL: INSERT INTO user_answer ( user_id, question_id, question_type, answer_type, paper_id, session_id, user_answer, score, max_score, is_correct, grading_type, feedback, created_at, updated_at ) VALUES ( ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ? )
### Cause: java.sql.SQLIntegrityConstraintViolationException: Cannot add or update a child row: a foreign key constraint fails (`knowledge_management_system`.`user_answer`, CONSTRAINT `fk_user_answer_question` FOREIGN KEY (`question_id`) REFERENCES `question` (`question_id`) ON DELETE CASCADE ON UPDATE RESTRICT)
; Cannot add or update a child row: a foreign key constraint fails (`knowledge_management_system`.`user_answer`, CONSTRAINT `fk_user_answer_question` FOREIGN KEY (`question_id`) REFERENCES `question` (`question_id`) ON DELETE CASCADE ON UPDATE RESTRICT)
at org.springframework.jdbc.support.SQLErrorCodeSQLExceptionTranslator.doTranslate(SQLErrorCodeSQLExceptionTranslator.java:258)
at org.springframework.jdbc.support.AbstractFallbackSQLExceptionTranslator.translate(AbstractFallbackSQLExceptionTranslator.java:107)
at org.mybatis.spring.MyBatisExceptionTranslator.translateExceptionIfPossible(MyBatisExceptionTranslator.java:92)
at org.mybatis.spring.SqlSessionTemplate$SqlSessionInterceptor.invoke(SqlSessionTemplate.java:439)
at jdk.proxy2/jdk.proxy2.$Proxy87.insert(Unknown Source)
at org.mybatis.spring.SqlSessionTemplate.insert(SqlSessionTemplate.java:272)
at com.baomidou.mybatisplus.core.override.MybatisMapperMethod.execute(MybatisMapperMethod.java:59)
at com.baomidou.mybatisplus.core.override.MybatisMapperProxy$PlainMethodInvoker.invoke(MybatisMapperProxy.java:152)
at com.baomidou.mybatisplus.core.override.MybatisMapperProxy.invoke(MybatisMapperProxy.java:89)
at jdk.proxy2/jdk.proxy2.$Proxy107.insert(Unknown Source)
at top.tqx.demo_1.service.impl.UserAnswerServiceImpl.batchSaveAnswers(UserAnswerServiceImpl.java:98)
Registering transaction synchronization for SqlSession [org.apache.ibatis.session.defaults.DefaultSqlSession@7777103a]
JDBC Connection [HikariProxyConnection@1859153704 wrapping com.mysql.cj.jdbc.ConnectionImpl@51638967] will be managed by Spring
==> Preparing: SELECT id,record_id,paper_id,answer_type,user_id,status,total_score,submit_time,graded_time,graded_by,time_spent,start_time,last_active_time,created_at,updated_at FROM exam_record WHERE (record_id = ?)
==> Parameters: 683de5c4-cce6-47b4-8518-a582dce02ca4(String)
<== Columns: id, record_id, paper_id, answer_type, user_id, status, total_score, submit_time, graded_time, graded_by, time_spent, start_time, last_active_time, created_at, updated_at
<== Row: 263, 683de5c4-cce6-47b4-8518-a582dce02ca4, ff10df62-4fd4-4bc4-8f8b-4dfb348aae8b, formal_exam, 1, graded, 0.00, 2026-06-11 14:18:51, 2026-06-11 14:18:51, null, 401, 2026-06-11 14:12:09, 2026-06-11 14:12:09, 2026-06-11 14:12:04, 2026-06-11 14:18:51
<== Total: 1
Releasing transactional SqlSession [org.apache.ibatis.session.defaults.DefaultSqlSession@7777103a]
Fetched SqlSession [org.apache.ibatis.session.defaults.DefaultSqlSession@7777103a] from current transaction
==> Preparing: SELECT id,paper_id,title,description,total_score,duration,question_count,status,permission_scope,dept_id,question_ids,created_by,created_at,updated_at,publish_time,deadline FROM exam_paper WHERE (paper_id = ?)
==> Parameters: ff10df62-4fd4-4bc4-8f8b-4dfb348aae8b(String)
<== Columns: id, paper_id, title, description, total_score, duration, question_count, status, permission_scope, dept_id, question_ids, created_by, created_at, updated_at, publish_time, deadline
<== Row: 65, ff10df62-4fd4-4bc4-8f8b-4dfb348aae8b, 自动生成的试卷, <<BLOB>>, 4.00, 120, 2, published, 本部门, 1, <<BLOB>>, 1, 2026-06-11 14:11:57, 2026-06-11 14:12:04, 2026-06-11 14:12:04, null
<== Total: 1
Releasing transactional SqlSession [org.apache.ibatis.session.defaults.DefaultSqlSession@7777103a]
2026-06-11 14:19:33 - 检测到空试卷提交: isBlankSubmission=false
Fetched SqlSession [org.apache.ibatis.session.defaults.DefaultSqlSession@7777103a] from current transaction
==> Preparing: SELECT id,question_id,question_type,difficulty,tags,score,version,document_id,exclude_stems,knowledge_base_path,source_context,chunk_ids,source_chunks_used,exam_count,correct_count,last_exam_time,page_numbers,content,status,reviewer_comment,created_at,updated_at,is_deleted FROM question WHERE (question_id = ?)
==> Parameters: ea6a7f44-9077-4f19-b10e-8239a5198f4d(String)
<== Columns: id, question_id, question_type, difficulty, tags, score, version, document_id, exclude_stems, knowledge_base_path, source_context, chunk_ids, source_chunks_used, exam_count, correct_count, last_exam_time, page_numbers, content, status, reviewer_comment, created_at, updated_at, is_deleted
<== Row: 826, ea6a7f44-9077-4f19-b10e-8239a5198f4d, single_choice, 3, <<BLOB>>, 2.00, 1.0, 80, 根据文档内容,当发现人证不符、证件伪造或冒用证件时,应采取的措施是?, null, <<BLOB>>, <<BLOB>>, 22, 0, 0, null, <<BLOB>>, <<BLOB>>, pending, <<BLOB>>, 2026-06-10 06:24:40, 2026-06-10 06:24:40, 0
<== Total: 1
Releasing transactional SqlSession [org.apache.ibatis.session.defaults.DefaultSqlSession@7777103a]
2026-06-11 14:19:33 - 转换题目内容失败
com.fasterxml.jackson.databind.exc.UnrecognizedPropertyException: Unrecognized field "explanation" (class top.tqx.demo_1.dto.ExamGradeRequest$QuestionContent), not marked as ignorable (3 known properties: "stem", "data", "answer"])
at [Source: UNKNOWN; byte offset: #UNKNOWN] (through reference chain: top.tqx.demo_1.dto.ExamGradeRequest$QuestionContent["explanation"])
at com.fasterxml.jackson.databind.exc.UnrecognizedPropertyException.from(UnrecognizedPropertyException.java:61)
at com.fasterxml.jackson.databind.DeserializationContext.handleUnknownProperty(DeserializationContext.java:1138)
at com.fasterxml.jackson.databind.deser.std.StdDeserializer.handleUnknownProperty(StdDeserializer.java:2224)
at com.fasterxml.jackson.databind.deser.BeanDeserializerBase.handleUnknownProperty(BeanDeserializerBase.java:1719)
at com.fasterxml.jackson.databind.deser.BeanDeserializerBase.handleUnknownVanilla(BeanDeserializerBase.java:1697)
at com.fasterxml.jackson.databind.deser.BeanDeserializer.vanillaDeserialize(BeanDeserializer.java:320)
at com.fasterxml.jackson.databind.deser.BeanDeserializer.deserialize(BeanDeserializer.java:177)
at com.fasterxml.jackson.databind.deser.DefaultDeserializationContext.readRootValue(DefaultDeserializationContext.java:323)
at com.fasterxml.jackson.databind.ObjectMapper._readValue(ObjectMapper.java:4801)
at com.fasterxml.jackson.databind.ObjectMapper.readValue(ObjectMapper.java:2974)
at com.fasterxml.jackson.databind.ObjectMapper.treeToValue(ObjectMapper.java:3438)
at top.tqx.demo_1.service.impl.ExamServiceImpl.gradeAnswersForRecord(ExamServiceImpl.java:490)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
@@ -159,9 +91,8 @@ org.springframework.dao.DataIntegrityViolationException:
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:184)
at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:768)
at org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:720)
at top.tqx.demo_1.service.impl.UserAnswerServiceImpl$$SpringCGLIB$$0.batchSaveAnswers(<generated>)
at top.tqx.demo_1.controller.ExamController.saveUserAnswers(ExamController.java:583)
at top.tqx.demo_1.controller.ExamController.gradeAnswers(ExamController.java:416)
at top.tqx.demo_1.service.impl.ExamServiceImpl$$SpringCGLIB$$0.gradeAnswersForRecord(<generated>)
at top.tqx.demo_1.controller.ExamController.gradeAnswers(ExamController.java:330)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
@@ -172,8 +103,7 @@ org.springframework.dao.DataIntegrityViolationException:
at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:768)
at org.springframework.aop.aspectj.MethodInvocationProceedingJoinPoint.proceed(MethodInvocationProceedingJoinPoint.java:89)
at top.tqx.demo_1.aspect.LogAspect.around(LogAspect.java:43)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at jdk.internal.reflect.GeneratedMethodAccessor191.invoke(Unknown Source)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.base/java.lang.reflect.Method.invoke(Unknown Source)
at org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethodWithGivenArgs(AbstractAspectJAdvice.java:637)
@@ -240,43 +170,213 @@ org.springframework.dao.DataIntegrityViolationException:
at org.apache.tomcat.util.threads.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:659)
at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:63)
at java.base/java.lang.Thread.run(Unknown Source)
Caused by: java.sql.SQLIntegrityConstraintViolationException: Cannot add or update a child row: a foreign key constraint fails (`knowledge_management_system`.`user_answer`, CONSTRAINT `fk_user_answer_question` FOREIGN KEY (`question_id`) REFERENCES `question` (`question_id`) ON DELETE CASCADE ON UPDATE RESTRICT)
at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:118)
at com.mysql.cj.jdbc.exceptions.SQLExceptionsMapping.translateException(SQLExceptionsMapping.java:122)
at com.mysql.cj.jdbc.ClientPreparedStatement.executeInternal(ClientPreparedStatement.java:912)
at com.mysql.cj.jdbc.ClientPreparedStatement.execute(ClientPreparedStatement.java:354)
at com.zaxxer.hikari.pool.ProxyPreparedStatement.execute(ProxyPreparedStatement.java:44)
at com.zaxxer.hikari.pool.HikariProxyPreparedStatement.execute(HikariProxyPreparedStatement.java)
at jdk.internal.reflect.GeneratedMethodAccessor30.invoke(Unknown Source)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.base/java.lang.reflect.Method.invoke(Unknown Source)
at org.apache.ibatis.logging.jdbc.PreparedStatementLogger.invoke(PreparedStatementLogger.java:58)
at jdk.proxy3/jdk.proxy3.$Proxy163.execute(Unknown Source)
at org.apache.ibatis.executor.statement.PreparedStatementHandler.update(PreparedStatementHandler.java:48)
at org.apache.ibatis.executor.statement.RoutingStatementHandler.update(RoutingStatementHandler.java:75)
2026-06-11 14:19:33 - 题目内容为空,已设置默认值: questionId=ea6a7f44-9077-4f19-b10e-8239a5198f4d
Fetched SqlSession [org.apache.ibatis.session.defaults.DefaultSqlSession@7777103a] from current transaction
==> Preparing: SELECT id,question_id,question_type,difficulty,tags,score,version,document_id,exclude_stems,knowledge_base_path,source_context,chunk_ids,source_chunks_used,exam_count,correct_count,last_exam_time,page_numbers,content,status,reviewer_comment,created_at,updated_at,is_deleted FROM question WHERE (question_id = ?)
==> Parameters: 9d59e7c5-edfc-4517-9fb5-780b389b66fb(String)
<== Columns: id, question_id, question_type, difficulty, tags, score, version, document_id, exclude_stems, knowledge_base_path, source_context, chunk_ids, source_chunks_used, exam_count, correct_count, last_exam_time, page_numbers, content, status, reviewer_comment, created_at, updated_at, is_deleted
<== Row: 825, 9d59e7c5-edfc-4517-9fb5-780b389b66fb, single_choice, 3, <<BLOB>>, 2.00, 1.0, 80, 根据文档内容,谁是住宿登记的第一责任人?, null, <<BLOB>>, <<BLOB>>, 22, 0, 0, null, <<BLOB>>, <<BLOB>>, pending, <<BLOB>>, 2026-06-10 06:24:40, 2026-06-10 06:24:40, 0
<== Total: 1
Releasing transactional SqlSession [org.apache.ibatis.session.defaults.DefaultSqlSession@7777103a]
2026-06-11 14:19:33 - 转换题目内容失败
com.fasterxml.jackson.databind.exc.UnrecognizedPropertyException: Unrecognized field "explanation" (class top.tqx.demo_1.dto.ExamGradeRequest$QuestionContent), not marked as ignorable (3 known properties: "stem", "data", "answer"])
at [Source: UNKNOWN; byte offset: #UNKNOWN] (through reference chain: top.tqx.demo_1.dto.ExamGradeRequest$QuestionContent["explanation"])
at com.fasterxml.jackson.databind.exc.UnrecognizedPropertyException.from(UnrecognizedPropertyException.java:61)
at com.fasterxml.jackson.databind.DeserializationContext.handleUnknownProperty(DeserializationContext.java:1138)
at com.fasterxml.jackson.databind.deser.std.StdDeserializer.handleUnknownProperty(StdDeserializer.java:2224)
at com.fasterxml.jackson.databind.deser.BeanDeserializerBase.handleUnknownProperty(BeanDeserializerBase.java:1719)
at com.fasterxml.jackson.databind.deser.BeanDeserializerBase.handleUnknownVanilla(BeanDeserializerBase.java:1697)
at com.fasterxml.jackson.databind.deser.BeanDeserializer.vanillaDeserialize(BeanDeserializer.java:320)
at com.fasterxml.jackson.databind.deser.BeanDeserializer.deserialize(BeanDeserializer.java:177)
at com.fasterxml.jackson.databind.deser.DefaultDeserializationContext.readRootValue(DefaultDeserializationContext.java:323)
at com.fasterxml.jackson.databind.ObjectMapper._readValue(ObjectMapper.java:4801)
at com.fasterxml.jackson.databind.ObjectMapper.readValue(ObjectMapper.java:2974)
at com.fasterxml.jackson.databind.ObjectMapper.treeToValue(ObjectMapper.java:3438)
at top.tqx.demo_1.service.impl.ExamServiceImpl.gradeAnswersForRecord(ExamServiceImpl.java:490)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.base/java.lang.reflect.Method.invoke(Unknown Source)
at org.apache.ibatis.plugin.Plugin.invoke(Plugin.java:61)
at jdk.proxy2/jdk.proxy2.$Proxy161.update(Unknown Source)
at org.apache.ibatis.executor.SimpleExecutor.doUpdate(SimpleExecutor.java:50)
at org.apache.ibatis.executor.BaseExecutor.update(BaseExecutor.java:117)
at org.apache.ibatis.executor.CachingExecutor.update(CachingExecutor.java:76)
at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:354)
at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:196)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:163)
at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:768)
at org.springframework.transaction.interceptor.TransactionInterceptor$1.proceedWithInvocation(TransactionInterceptor.java:123)
at org.springframework.transaction.interceptor.TransactionAspectSupport.invokeWithinTransaction(TransactionAspectSupport.java:392)
at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:119)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:184)
at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:768)
at org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:720)
at top.tqx.demo_1.service.impl.ExamServiceImpl$$SpringCGLIB$$0.gradeAnswersForRecord(<generated>)
at top.tqx.demo_1.controller.ExamController.gradeAnswers(ExamController.java:330)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.base/java.lang.reflect.Method.invoke(Unknown Source)
at org.apache.ibatis.plugin.Invocation.proceed(Invocation.java:49)
at com.baomidou.mybatisplus.extension.plugins.MybatisPlusInterceptor.intercept(MybatisPlusInterceptor.java:106)
at org.apache.ibatis.plugin.Plugin.invoke(Plugin.java:59)
at jdk.proxy2/jdk.proxy2.$Proxy160.update(Unknown Source)
at org.apache.ibatis.session.defaults.DefaultSqlSession.update(DefaultSqlSession.java:197)
at org.apache.ibatis.session.defaults.DefaultSqlSession.insert(DefaultSqlSession.java:184)
at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:354)
at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:196)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:163)
at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:768)
at org.springframework.aop.aspectj.MethodInvocationProceedingJoinPoint.proceed(MethodInvocationProceedingJoinPoint.java:89)
at top.tqx.demo_1.aspect.LogAspect.around(LogAspect.java:43)
at jdk.internal.reflect.GeneratedMethodAccessor191.invoke(Unknown Source)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.base/java.lang.reflect.Method.invoke(Unknown Source)
at org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethodWithGivenArgs(AbstractAspectJAdvice.java:637)
at org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethod(AbstractAspectJAdvice.java:627)
at org.springframework.aop.aspectj.AspectJAroundAdvice.invoke(AspectJAroundAdvice.java:71)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:184)
at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:768)
at org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:97)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:184)
at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:768)
at org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:720)
at top.tqx.demo_1.controller.ExamController$$SpringCGLIB$$0.gradeAnswers(<generated>)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.base/java.lang.reflect.Method.invoke(Unknown Source)
at org.mybatis.spring.SqlSessionTemplate$SqlSessionInterceptor.invoke(SqlSessionTemplate.java:425)
... 102 common frames omitted
2026-06-10 13:44:41 - 响应 | 耗时: 2889ms
at org.springframework.web.method.support.InvocableHandlerMethod.doInvoke(InvocableHandlerMethod.java:255)
at org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:188)
at org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:118)
at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandlerMethod(RequestMappingHandlerAdapter.java:926)
at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:831)
at org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:87)
at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:1089)
at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:979)
at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:1014)
at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:914)
at jakarta.servlet.http.HttpServlet.service(HttpServlet.java:590)
at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:885)
at jakarta.servlet.http.HttpServlet.service(HttpServlet.java:658)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:206)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:150)
at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:51)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:175)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:150)
at org.springframework.web.filter.CorsFilter.doFilterInternal(CorsFilter.java:91)
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:116)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:175)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:150)
at org.springframework.web.filter.RequestContextFilter.doFilterInternal(RequestContextFilter.java:100)
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:116)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:175)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:150)
at org.springframework.web.filter.FormContentFilter.doFilterInternal(FormContentFilter.java:93)
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:116)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:175)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:150)
at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:201)
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:116)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:175)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:150)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:167)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:90)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:482)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:115)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:93)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:74)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:344)
at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:391)
at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:63)
at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:896)
at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1736)
at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:52)
at org.apache.tomcat.util.threads.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1191)
at org.apache.tomcat.util.threads.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:659)
at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:63)
at java.base/java.lang.Thread.run(Unknown Source)
2026-06-11 14:19:33 - 题目内容为空,已设置默认值: questionId=9d59e7c5-edfc-4517-9fb5-780b389b66fb
2026-06-11 14:19:33 - Service层开始批改题目
2026-06-11 14:19:33 - Service层参数详情:
2026-06-11 14:19:33 - - userId: 1
2026-06-11 14:19:33 - - paperId: ff10df62-4fd4-4bc4-8f8b-4dfb348aae8b
2026-06-11 14:19:33 - - sessionId: null
2026-06-11 14:19:33 - - answerType: formal_exam
2026-06-11 14:19:33 - - 答案数量: 2
2026-06-11 14:19:33 - - AI服务地址: http://localhost:5001/exam/grade
2026-06-11 14:19:33 - Service层准备发送请求到AI服务
2026-06-11 14:19:33 - 请求体内容: {"request_id":null,"paper_id":"ff10df62-4fd4-4bc4-8f8b-4dfb348aae8b","session_id":null,"record_id":"683de5c4-cce6-47b4-8518-a582dce02ca4","answer_type":"formal_exam","answers":[{"question_id":"ea6a7f44-9077-4f19-b10e-8239a5198f4d","question_type":"single_choice","question_content":{"stem":"","data":null,"answer":""},"student_answer":"B","max_score":2.00},{"question_id":"9d59e7c5-edfc-4517-9fb5-780b389b66fb","question_type":"single_choice","question_content":{"stem":"","data":null,"answer":""},"student_answer":"B","max_score":2.00}]}
2026-06-11 14:19:33 - 请求超时时间: 60000ms (60秒)
2026-06-11 14:19:33 - Service层收到AI服务响应
2026-06-11 14:19:33 - 响应原始内容: {"data":{"request_id":null,"results":[{"correct":false,"feedback":"\u6b63\u786e\u7b54\u6848: ","max_score":2.0,"question_id":"ea6a7f44-9077-4f19-b10e-8239a5198f4d","score":0},{"correct":false,"feedback":"\u6b63\u786e\u7b54\u6848: ","max_score":2.0,"question_id":"9d59e7c5-edfc-4517-9fb5-780b389b66fb","score":0}],"score_rate":0.0,"success":true,"total_max_score":4.0,"total_score":0},"message":"\u6279\u9605\u5b8c\u6210","status":"success","status_code":2021,"success":true}
2026-06-11 14:19:33 - 开始解析 2 道题
2026-06-11 14:19:33 - 第 1 题 resultNode 内容: {"correct":false,"feedback":"正确答案: ","max_score":2.0,"question_id":"ea6a7f44-9077-4f19-b10e-8239a5198f4d","score":0}
2026-06-11 14:19:33 - resultNode 字段: false, 正确答案: , 2.0, ea6a7f44-9077-4f19-b10e-8239a5198f4d, 0
2026-06-11 14:19:33 - 读取到 question_id: ea6a7f44-9077-4f19-b10e-8239a5198f4d
2026-06-11 14:19:33 - 第 2 题 resultNode 内容: {"correct":false,"feedback":"正确答案: ","max_score":2.0,"question_id":"9d59e7c5-edfc-4517-9fb5-780b389b66fb","score":0}
2026-06-11 14:19:33 - resultNode 字段: false, 正确答案: , 2.0, 9d59e7c5-edfc-4517-9fb5-780b389b66fb, 0
2026-06-11 14:19:33 - 读取到 question_id: 9d59e7c5-edfc-4517-9fb5-780b389b66fb
2026-06-11 14:19:33 - 从请求中补全 question_type: single_choice
2026-06-11 14:19:33 - 从请求中补全 question_type: single_choice
2026-06-11 14:19:33 - 处理第 1 题, 类型: single_choice, grading_status: null
2026-06-11 14:19:33 - 处理第 2 题, 类型: single_choice, grading_status: null
2026-06-11 14:19:33 - Service层AI服务批改完成
2026-06-11 14:19:33 - 批改结果: success=true, totalScore=0, totalMaxScore=4.0, scoreRate=0.0
2026-06-11 14:19:33 - 各题目批改结果:
2026-06-11 14:19:33 - 题目1(ea6a7f44-9077-4f19-b10e-8239a5198f4d): correct=false, score=0/2.0, feedback=正确答案:
2026-06-11 14:19:33 - 题目2(9d59e7c5-edfc-4517-9fb5-780b389b66fb): correct=false, score=0/2.0, feedback=正确答案:
Fetched SqlSession [org.apache.ibatis.session.defaults.DefaultSqlSession@7777103a] from current transaction
==> Preparing: UPDATE exam_record SET record_id=?, paper_id=?, answer_type=?, user_id=?, status=?, total_score=?, submit_time=?, graded_time=?, time_spent=?, start_time=?, last_active_time=?, created_at=?, updated_at=? WHERE id=?
==> Parameters: 683de5c4-cce6-47b4-8518-a582dce02ca4(String), ff10df62-4fd4-4bc4-8f8b-4dfb348aae8b(String), formal_exam(String), 1(Long), graded(String), 0(BigDecimal), 2026-06-11T14:19:33.301970170(LocalDateTime), 2026-06-11T14:19:33.301977884(LocalDateTime), 444(Integer), 2026-06-11T14:12:09(LocalDateTime), 2026-06-11T14:12:09(LocalDateTime), 2026-06-11T14:12:04(LocalDateTime), 2026-06-11T14:19:33.302076352(LocalDateTime), 263(Long)
<== Updates: 1
Releasing transactional SqlSession [org.apache.ibatis.session.defaults.DefaultSqlSession@7777103a]
Fetched SqlSession [org.apache.ibatis.session.defaults.DefaultSqlSession@7777103a] from current transaction
==> Preparing: INSERT INTO user_answer ( user_id, question_id, question_type, answer_type, paper_id, user_answer, score, max_score, is_correct, grading_type, feedback, created_at, updated_at ) VALUES ( ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ? )
==> Parameters: 1(Long), ea6a7f44-9077-4f19-b10e-8239a5198f4d(String), single_choice(String), formal_exam(String), ff10df62-4fd4-4bc4-8f8b-4dfb348aae8b(String), "B"(String), 0(BigDecimal), 2.0(BigDecimal), 0(Integer), ai(String), 正确答案: (String), 2026-06-11T14:19:33.309541700(LocalDateTime), 2026-06-11T14:19:33.309554819(LocalDateTime)
<== Updates: 1
Releasing transactional SqlSession [org.apache.ibatis.session.defaults.DefaultSqlSession@7777103a]
Fetched SqlSession [org.apache.ibatis.session.defaults.DefaultSqlSession@7777103a] from current transaction
==> Preparing: INSERT INTO user_answer ( user_id, question_id, question_type, answer_type, paper_id, user_answer, score, max_score, is_correct, grading_type, feedback, created_at, updated_at ) VALUES ( ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ? )
==> Parameters: 1(Long), 9d59e7c5-edfc-4517-9fb5-780b389b66fb(String), single_choice(String), formal_exam(String), ff10df62-4fd4-4bc4-8f8b-4dfb348aae8b(String), "B"(String), 0(BigDecimal), 2.0(BigDecimal), 0(Integer), ai(String), 正确答案: (String), 2026-06-11T14:19:33.315830690(LocalDateTime), 2026-06-11T14:19:33.315839473(LocalDateTime)
<== Updates: 1
Releasing transactional SqlSession [org.apache.ibatis.session.defaults.DefaultSqlSession@7777103a]
2026-06-11 14:19:33 - 保存了2条考试答题记录
2026-06-11 14:19:33 - gradeAnswersForRecord 完成,总分: 0
Transaction synchronization committing SqlSession [org.apache.ibatis.session.defaults.DefaultSqlSession@7777103a]
Transaction synchronization deregistering SqlSession [org.apache.ibatis.session.defaults.DefaultSqlSession@7777103a]
Transaction synchronization closing SqlSession [org.apache.ibatis.session.defaults.DefaultSqlSession@7777103a]
2026-06-11 14:19:33 - 正式考试批阅成功: recordId=683de5c4-cce6-47b4-8518-a582dce02ca4
2026-06-11 14:19:33 - 响应 | 耗时: 103ms
g.springframework.web.method.support.InvocableHandlerMethod.doInvoke(InvocableHandlerMethod.java:255)
at org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:188)
at org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:118)
at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandlerMethod(RequestMappingHandlerAdapter.java:926)
at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:831)
at org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:87)
at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:1089)
at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:979)
at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:1014)
at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:914)
at jakarta.servlet.http.HttpServlet.service(HttpServlet.java:590)
at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:885)
at jakarta.servlet.http.HttpServlet.service(HttpServlet.java:658)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:206)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:150)
at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:51)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:175)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:150)
at org.springframework.web.filter.CorsFilter.doFilterInternal(CorsFilter.java:91)
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:116)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:175)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:150)
at org.springframework.web.filter.RequestContextFilter.doFilterInternal(RequestContextFilter.java:100)
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:116)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:175)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:150)
at org.springframework.web.filter.FormContentFilter.doFilterInternal(FormContentFilter.java:93)
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:116)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:175)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:150)
at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:201)
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:116)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:175)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:150)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:167)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:90)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:482)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:115)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:93)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:74)
at org.apache.catalina.connector.CoyoteAd