- 新增ActionType枚举定义系统动作类型 - 新增DiagnosisResult和ZoneStats数据模型支持诊断结果及区域统计 - 优化ExamWordsJudgeServiceImpl判卷逻辑,支持识别图片、更新考试判卷结果 - 基于分区词汇掌握情况,实现学生当前水平年级的智能判定 - 实现基于多分区准确率的升级、降级、复习和触发重测等动作建议 - 更新学生实际年级actualGradeId并展示在学生详情页面 - 修正ExamWordsConstant年级常量及年级名称映射方法 - 优化前端生成试题对年级和难度的校验逻辑,简化参数传递 - 修改服务端端口及API代理配置,保持一致性 - 调整相关数据库Mapper,支持批量查询和更新实际年级字段 - 修改错误信息字段命名,统一为msg - 增删改代码注释与日志,提升容错性和可读性
78 lines
2.8 KiB
XML
78 lines
2.8 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.StudentDOMapper">
|
|
<resultMap id="BaseResultMap" type="com.yinlihupo.enlish.service.domain.dataobject.StudentDO">
|
|
<id column="id" jdbcType="INTEGER" property="id" />
|
|
<result column="name" jdbcType="VARCHAR" property="name" />
|
|
<result column="class_id" jdbcType="INTEGER" property="classId" />
|
|
<result column="grade_id" jdbcType="INTEGER" property="gradeId" />
|
|
<result column="initial_vocabulary_size" jdbcType="INTEGER" property="initialVocabularySize" />
|
|
<result column="current_vocabulary_size" jdbcType="INTEGER" property="currentVocabularySize" />
|
|
<result column="is_deleted" jdbcType="INTEGER" property="isDeleted"/>
|
|
<result column="start_time" jdbcType="TIMESTAMP" property="startTime" />
|
|
<result column="actual_grade_id" jdbcType="INTEGER" property="actualGradeId" />
|
|
</resultMap>
|
|
|
|
<select id="selectStudentDOListByClassIdAndGradeId" resultMap="BaseResultMap">
|
|
select *
|
|
from student
|
|
where 1 = 1
|
|
<if test="classId != null">
|
|
AND class_id = #{classId}
|
|
</if>
|
|
<if test="gradeId != null">
|
|
AND grade_id = #{gradeId}
|
|
</if>
|
|
<if test="name != null">
|
|
AND name like concat('%', #{name}, '%')
|
|
</if>
|
|
and is_deleted = 0
|
|
order by start_time desc
|
|
LIMIT #{startIndex}, #{pageSize}
|
|
</select>
|
|
|
|
<select id="selectStudentCount">
|
|
select count(1)
|
|
from student
|
|
</select>
|
|
|
|
<select id="selectStudentById" resultMap="BaseResultMap">
|
|
select *
|
|
from student
|
|
where id = #{id}
|
|
</select>
|
|
|
|
<select id="selectStudentDOListByIds" resultMap="BaseResultMap">
|
|
select *
|
|
from student
|
|
where id in
|
|
<foreach item="id" collection="ids" separator="," open="(" close=")" index="index">
|
|
#{id}
|
|
</foreach>
|
|
</select>
|
|
|
|
<insert id="insert" useGeneratedKeys="true" keyProperty="id">
|
|
insert into student
|
|
(name, class_id, grade_id, is_deleted, start_time, actual_grade_id)
|
|
values (#{name}, #{classId}, #{gradeId}, 0, #{startTime}, #{actualGradeId})
|
|
</insert>
|
|
|
|
<update id="deleteById">
|
|
update student
|
|
set is_deleted = 1
|
|
where id = #{id}
|
|
</update>
|
|
|
|
<update id="updateStudentActualGradeId">
|
|
update student
|
|
set actual_grade_id = #{gradeId}
|
|
where id = #{studentId}
|
|
</update>
|
|
|
|
<select id="selectStudentCountByClassId" resultType="java.lang.Integer">
|
|
select count(1)
|
|
from student
|
|
where class_id = #{classId}
|
|
and is_deleted = 0
|
|
</select>
|
|
</mapper> |