ClassesDictHistoryMapper.xml 1.55 KB
<?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.meishu.mapper.ClassesDictHistoryMapper">

    <!-- 通用查询映射结果 -->
    <resultMap id="BaseResultMap" type="com.meishu.model.ClassesDictHistoryDO">
        <id column="id" property="id" />
        <result column="create_date" property="createDate" />
        <result column="update_date" property="updateDate" />
        <result column="class_dict_id" property="classDictId" />
        <result column="school" property="school" />
        <result column="grade" property="grade" />
        <result column="classes" property="classes" />
        <result column="session" property="session" />
        <result column="subject_type" property="subjectType" />
        <result column="class_name" property="className" />
        <result column="semester" property="semester" />
        <result column="status" property="status" />
    </resultMap>

    <!-- 通用查询结果列 -->
    <sql id="Base_Column_List">
        create_date,
        update_date,
        id, class_dict_id, school, grade, classes, session, subject_type, class_name, semester, status
    </sql>

    <select id="getAllPastSemester" parameterType="string" resultType="com.meishu.model.ClassesDictHistoryDO">
        SELECT
            *
        FROM
            classes_dict_history t
        WHERE
            t.grade = #{grade}
            AND t.status = '归档'
        ORDER BY
            t.classes *1
    </select>

</mapper>