Blame view

ClassesDictHistoryMapper.xml 1.55 KB
涂亚平 committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40
<?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>