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:
@@ -9,27 +9,6 @@
|
||||
<result column="unit_id" jdbcType="INTEGER" property="unitId" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="Base_Column_List">
|
||||
id, word, `definition`, pronunciation, unit_id
|
||||
</sql>
|
||||
|
||||
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
|
||||
select
|
||||
<include refid="Base_Column_List" />
|
||||
from vocabulary_bank
|
||||
where id = #{id,jdbcType=INTEGER}
|
||||
</select>
|
||||
|
||||
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
|
||||
delete from vocabulary_bank
|
||||
where id = #{id,jdbcType=INTEGER}
|
||||
</delete>
|
||||
|
||||
<insert id="insert" parameterType="com.yinlihupo.enlish.service.domain.dataobject.VocabularyBankDO">
|
||||
insert into vocabulary_bank (id, word, `definition`, pronunciation, unit_id)
|
||||
values (#{id,jdbcType=INTEGER}, #{word,jdbcType=VARCHAR}, #{definition,jdbcType=VARCHAR},
|
||||
#{pronunciation,jdbcType=VARCHAR}, #{unitId,jdbcType=INTEGER})
|
||||
</insert>
|
||||
|
||||
<insert id="insertSelective" parameterType="com.yinlihupo.enlish.service.domain.dataobject.VocabularyBankDO">
|
||||
insert into vocabulary_bank
|
||||
@@ -69,39 +48,19 @@
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateByPrimaryKeySelective" parameterType="com.yinlihupo.enlish.service.domain.dataobject.VocabularyBankDO">
|
||||
update vocabulary_bank
|
||||
<set>
|
||||
<if test="word != null">
|
||||
word = #{word,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="definition != null">
|
||||
`definition` = #{definition,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="pronunciation != null">
|
||||
pronunciation = #{pronunciation,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="unitId != null">
|
||||
unit_id = #{unitId,jdbcType=INTEGER},
|
||||
</if>
|
||||
</set>
|
||||
where id = #{id,jdbcType=INTEGER}
|
||||
</update>
|
||||
|
||||
<update id="updateByPrimaryKey" parameterType="com.yinlihupo.enlish.service.domain.dataobject.VocabularyBankDO">
|
||||
update vocabulary_bank
|
||||
set word = #{word,jdbcType=VARCHAR},
|
||||
`definition` = #{definition,jdbcType=VARCHAR},
|
||||
pronunciation = #{pronunciation,jdbcType=VARCHAR},
|
||||
unit_id = #{unitId,jdbcType=INTEGER}
|
||||
where id = #{id,jdbcType=INTEGER}
|
||||
</update>
|
||||
|
||||
<select id="selectVocabularyBankDOListByUnitId" resultMap="BaseResultMap">
|
||||
select *
|
||||
from vocabulary_bank
|
||||
where unit_id = #{unitId}
|
||||
limit #{wordCount}
|
||||
</select>
|
||||
<select id="selectVocabularyBankDOListByIds" resultMap="BaseResultMap">
|
||||
select *
|
||||
from vocabulary_bank
|
||||
where id in
|
||||
<foreach item="id" collection="ids" separator="," open="(" close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
Reference in New Issue
Block a user