refactor(exam): 重构摸底测试为考试词汇模块

- 删除原 Assessment 相关的实体、Mapper、Service 接口及实现和 Controller
- 重命名常量类 AssessmentConstant 为 ExamWordsConstant 并调整相关常量值
- 新增 ExamWordsController 替代 AssessmentController,使用新模板生成试卷
- 新增 ExamWordsService 及其实现,实现按年级、等级和学生列表生成考试词汇
- 新增 ListWordIdTypeHandler 处理 List<Integer> 与数据库间的 JSON 转换
- 调整 PngUtil 中常量引用改为 ExamWordsConstant
- 修改配置文件新增模板路径及临时目录设置
- 新增单元测试 ExamTest 验证考试词汇生成及文档导出功能
- 修改生成配置文件,支持 student_exam_words 表的数据操作
- 清理未使用的 Assessment 相关代码,精简项目结构
This commit is contained in:
lbw
2025-12-12 16:12:17 +08:00
parent d1349137b6
commit e0258c7ddf
32 changed files with 525 additions and 559 deletions

View File

@@ -0,0 +1,21 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.yinlihupo.enlish.service.domain.mapper.StudentExamWordsDOMapper">
<resultMap id="BaseResultMap" type="com.yinlihupo.enlish.service.domain.dataobject.StudentExamWordsDO">
<id column="id" jdbcType="INTEGER" property="id" />
<result column="student_id" jdbcType="INTEGER" property="studentId" />
<result column="exam_words_id" jdbcType="INTEGER" property="examWordsId" />
<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)
values
<foreach collection="studentIds" item="studentId" separator=",">
(#{studentId}, #{examWordsId}, 0, now())
</foreach>
</insert>
</mapper>