feat(enlish-service): 新增自动判卷功能及学生单词记忆管理模块
- 支持数据库多语句查询,修改数据源连接配置增加allowMultiQueries参数 - 添加定时任务AutoJudgeExamWordsTask,实现每5秒自动触发判卷 - 增加ExamWordsJudge接口及其实现类ExamWordsJudgeImpl,完成考试判卷逻辑 - 新增多张数据库映射文件及对应Mapper,如ExamWordsDOMapper、ExamWordsJudgeResultDOMapper、StudentExamWordsDOMapper和WordMasteryLogDOMapper,支持相关数据操作 - 扩展PngUtil工具类,支持从答题卡图片中解析学生考试信息和识别未记忆单词 - 修改数据库表结构映射,新增word_mastery_log表和相关字段,管理学生单词记忆强度及复习次数 - 配置@EnableScheduling以启用定时任务调度功能 - 增加测试用例包括ExamWordsJudgeTest和WordMasteryLogInsertTest,验证判卷和学生单词记忆初始化功能 - 重命名测试类TestInsert为TestVocabularyBankInsert,提升代码语义清晰度
This commit is contained in:
@@ -8,6 +8,7 @@
|
||||
<result column="is_completed" jdbcType="INTEGER" property="isCompleted" />
|
||||
<result column="start_data" jdbcType="TIMESTAMP" property="startData" />
|
||||
</resultMap>
|
||||
|
||||
<insert id="insertStudentsExam">
|
||||
insert into student_exam_words
|
||||
(student_id, exam_words_id, is_completed, start_data)
|
||||
@@ -17,5 +18,20 @@
|
||||
</foreach>
|
||||
</insert>
|
||||
|
||||
<select id="selectByStudentIdAndExamWordsId" resultMap="BaseResultMap">
|
||||
select *
|
||||
from student_exam_words
|
||||
where student_id = #{studentId}
|
||||
and exam_words_id = #{examWordsId}
|
||||
and is_completed = 0
|
||||
</select>
|
||||
|
||||
<update id="updateStudentExamWordsFinished">
|
||||
update student_exam_words
|
||||
set is_completed = 1
|
||||
where student_id = #{studentId}
|
||||
and exam_words_id = #{examWordsId}
|
||||
and is_completed = 0
|
||||
</update>
|
||||
|
||||
</mapper>
|
||||
Reference in New Issue
Block a user