- 新增接口获取指定学生的历史考试结果列表 - 数据库层新增根据学生ID查询历史考试记录的查询方法 - 服务层新增获取学生历史考试结果列表的实现 - 前端api新增调用学生考试历史接口的方法 - 学生详情页增加考试历史记录图表展示板块 - 新增考试历史折线图组件,展示正确词数和错误词数的时间变化 - 使用echarts实现折线图并支持点击显示详情 - 更新项目依赖,新增echarts库用于图表展示
77 lines
3.5 KiB
XML
77 lines
3.5 KiB
XML
<?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">
|
|
insert into exam_words_judge_result
|
|
(ans_sheet_path, is_finished, start_date)
|
|
values (#{path}, 0, now())
|
|
</insert>
|
|
|
|
<select id="selectUnfinishedExamWordsJudgeResultDOList" resultMap="BaseResultMap">
|
|
select * from exam_words_judge_result
|
|
where is_finished = 0
|
|
limit #{count}
|
|
</select>
|
|
|
|
<update id="updateErrorMsg">
|
|
update exam_words_judge_result
|
|
set error_msg = #{errorMsg}
|
|
and is_finished = 2
|
|
where id = #{id}
|
|
</update>
|
|
|
|
<update id="updateExamWordsJudgeResultDO">
|
|
update exam_words_judge_result
|
|
set student_id = #{examWordsJudgeResultDO.studentId},
|
|
exam_words_id = #{examWordsJudgeResultDO.examWordsId},
|
|
correct_word_ids = #{examWordsJudgeResultDO.correctWordIds, typeHandler=com.yinlihupo.enlish.service.config.ListWordIdTypeHandler},
|
|
wrong_word_ids = #{examWordsJudgeResultDO.wrongWordIds, typeHandler=com.yinlihupo.enlish.service.config.ListWordIdTypeHandler},
|
|
correct_word_count = #{examWordsJudgeResultDO.correctWordCount},
|
|
wrong_word_count = #{examWordsJudgeResultDO.wrongWordCount},
|
|
is_finished = 1
|
|
where id = #{examWordsJudgeResultDO.id}
|
|
</update>
|
|
|
|
<select id="selectByPage" resultMap="BaseResultMap">
|
|
select *
|
|
from exam_words_judge_result
|
|
order by start_date
|
|
limit #{startIndex}, #{pageSize}
|
|
</select>
|
|
|
|
<select id="selectCount" resultType="java.lang.Integer">
|
|
select count(1)
|
|
from exam_words_judge_result
|
|
</select>
|
|
<select id="selectDetailById" resultMap="ResultMapWithBLOBs">
|
|
select *
|
|
from exam_words_judge_result
|
|
where id = #{id}
|
|
</select>
|
|
<select id="selectByStudentId" resultMap="BaseResultMap">
|
|
select *
|
|
from exam_words_judge_result
|
|
where student_id = #{studentId}
|
|
order by start_date desc
|
|
limit 500;
|
|
</select>
|
|
|
|
</mapper> |