Files
en-edu/enlish-service/src/main/resources/mapper/GradeUnitDOMapper.xml
lbw 515bd8fae2 feat(exam): 实现考试阶段单词判卷与学生水平智能诊断
- 新增ActionType枚举定义系统动作类型
- 新增DiagnosisResult和ZoneStats数据模型支持诊断结果及区域统计
- 优化ExamWordsJudgeServiceImpl判卷逻辑,支持识别图片、更新考试判卷结果
- 基于分区词汇掌握情况,实现学生当前水平年级的智能判定
- 实现基于多分区准确率的升级、降级、复习和触发重测等动作建议
- 更新学生实际年级actualGradeId并展示在学生详情页面
- 修正ExamWordsConstant年级常量及年级名称映射方法
- 优化前端生成试题对年级和难度的校验逻辑,简化参数传递
- 修改服务端端口及API代理配置,保持一致性
- 调整相关数据库Mapper,支持批量查询和更新实际年级字段
- 修改错误信息字段命名,统一为msg
- 增删改代码注释与日志,提升容错性和可读性
2025-12-22 14:11:11 +08:00

42 lines
1.4 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.GradeUnitDOMapper">
<resultMap id="BaseResultMap" type="com.yinlihupo.enlish.service.domain.dataobject.GradeUnitDO">
<id column="id" jdbcType="INTEGER" property="id" />
<result column="grade_id" jdbcType="INTEGER" property="gradeId" />
<result column="unit_id" jdbcType="INTEGER" property="unitId" />
</resultMap>
<select id="selectUnitIdsByGradeId" resultType="java.lang.Integer">
select unit_id
from grade_unit
where grade_id = #{gradeId}
</select>
<select id="selectByUnitId" resultMap="BaseResultMap">
select *
from grade_unit
where unit_id = #{unitId}
</select>
<select id="selectByUnitIds" resultMap="BaseResultMap">
select *
from grade_unit
<if test="unitIds != null">
where unit_id in
<foreach collection="unitIds" item="unitId" separator="," open="(" close=")">
#{unitId}
</foreach>
</if>
</select>
<insert id="insert">
insert into grade_unit (grade_id, unit_id)
values (#{gradeId}, #{unitId})
</insert>
<delete id="deleteByUnitId">
delete from grade_unit
where unit_id = #{unitId}
</delete>
</mapper>