fuliqi
2024-06-03 a390fec8fd0821ad5e31e335d34de227ef59c65f
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
41
42
43
44
45
46
47
<?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.ycl.jxkg.mapper.SubjectMapper">
    <resultMap id="BaseResultMap" type="com.ycl.jxkg.domain.entity.Subject">
        <id column="id" jdbcType="INTEGER" property="id"/>
        <result column="name" jdbcType="VARCHAR" property="name"/>
        <result column="level" jdbcType="INTEGER" property="level"/>
        <result column="level_name" jdbcType="VARCHAR" property="levelName"/>
        <result column="item_order" jdbcType="INTEGER" property="itemOrder"/>
        <result column="deleted" jdbcType="BIT" property="deleted"/>
    </resultMap>
    <sql id="Base_Column_List">
        id
        , name, level, level_name, item_order, deleted
    </sql>
 
 
    <select id="getSubjectByLevel" resultMap="BaseResultMap">
        select
        <include refid="Base_Column_List"/>
        from t_subject where level= #{level}
        order by item_order
    </select>
 
 
    <select id="allSubject" resultMap="BaseResultMap">
        select
        <include refid="Base_Column_List"/>
        from t_subject
    </select>
 
    <select id="page" resultMap="BaseResultMap" parameterType="com.ycl.jxkg.domain.vo.admin.education.SubjectPageRequestVO">
        SELECT
        <include refid="Base_Column_List"/>
        FROM t_subject
        <where>
            and deleted=0
            <if test="id != null ">
                and id= #{id}
            </if>
            <if test="level != null ">
                and level= #{level}
            </if>
        </where>
    </select>
 
</mapper>