feat(examWords): 新增识别题目图片上传接口及相关功能
- 添加ExamWordsJudgeResultDO及对应数据库表映射与Mapper接口 - 实现ExamWordsJudgeResultType枚举,管理判题状态 - 在ExamWordsService及实现类中新增保存图片并记录数据库的方法 - 在ExamWordsController中新增上传图片接口submit,处理上传文件并返回操作结果 - 调整application-dev.yml中的png临时文件目录路径配置 - 更新MyBatis生成配置,新增exam_words_judge_result表支持 - 优化ExamWordsConstant,清理未使用常量和注释内容
This commit is contained in:
@@ -0,0 +1,29 @@
|
||||
<?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.ExamWordsJudgeResultDOMapper">
|
||||
|
||||
<resultMap id="BaseResultMap" type="com.yinlihupo.enlish.service.domain.dataobject.ExamWordsJudgeResultDO">
|
||||
<id column="id" jdbcType="INTEGER" property="id" />
|
||||
<result column="ans_sheet_path" jdbcType="VARCHAR" property="ansSheetPath" />
|
||||
<result column="student_id" jdbcType="INTEGER" property="studentId" />
|
||||
<result column="exam_words_id" jdbcType="INTEGER" property="examWordsId" />
|
||||
<result column="correct_word_count" jdbcType="INTEGER" property="correctWordCount" />
|
||||
<result column="wrong_word_count" jdbcType="INTEGER" property="wrongWordCount" />
|
||||
<result column="is_finished" jdbcType="INTEGER" property="isFinished" />
|
||||
<result column="start_date" jdbcType="TIMESTAMP" property="startDate" />
|
||||
<result column="error_msg" jdbcType="VARCHAR" property="errorMsg" />
|
||||
</resultMap>
|
||||
|
||||
<resultMap extends="BaseResultMap" id="ResultMapWithBLOBs" type="com.yinlihupo.enlish.service.domain.dataobject.ExamWordsJudgeResultDO">
|
||||
<result column="correct_word_ids" jdbcType="LONGVARCHAR" property="correctWordIds" typeHandler="com.yinlihupo.enlish.service.config.ListWordIdTypeHandler" />
|
||||
<result column="wrong_word_ids" jdbcType="LONGVARCHAR" property="wrongWordIds" typeHandler="com.yinlihupo.enlish.service.config.ListWordIdTypeHandler" />
|
||||
</resultMap>
|
||||
|
||||
<insert id="insert" parameterType="com.yinlihupo.enlish.service.domain.dataobject.ExamWordsJudgeResultDO">
|
||||
insert into exam_words_judge_result
|
||||
(ans_sheet_path, is_finished, start_date)
|
||||
values (#{path}, 0, now())
|
||||
</insert>
|
||||
|
||||
|
||||
</mapper>
|
||||
Reference in New Issue
Block a user