<?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="item_order" jdbcType="INTEGER" property="itemOrder"/>
|
<result column="status" jdbcType="INTEGER" property="status"/>
|
<result column="create_user" jdbcType="INTEGER" property="createUser"/>
|
<result column="create_time" jdbcType="TIMESTAMP" property="createTime"/>
|
<result column="deleted" jdbcType="BIT" property="deleted"/>
|
</resultMap>
|
<sql id="Base_Column_List">
|
id, name, item_order, deleted, status, create_user, create_time
|
</sql>
|
|
|
<select id="getSubjectByLevel" resultMap="BaseResultMap">
|
select
|
<include refid="Base_Column_List"/>
|
from t_subject
|
where deleted = 0 and status = 1
|
order by item_order
|
</select>
|
|
|
<select id="allSubject" resultMap="BaseResultMap">
|
select
|
<include refid="Base_Column_List"/>
|
from t_subject
|
where deleted = 0 and status = 1
|
order by item_order
|
</select>
|
|
<select id="page" resultType="com.ycl.jxkg.domain.vo.admin.education.SubjectResponseVO" parameterType="com.ycl.jxkg.domain.vo.admin.education.SubjectPageRequestVO">
|
SELECT
|
<include refid="Base_Column_List"/>
|
FROM t_subject
|
<where>
|
and deleted = 0
|
<if test="status != null">
|
and status = #{status}
|
</if>
|
<if test="name != null and name != ''">
|
and instr(name, #{name})
|
</if>
|
</where>
|
</select>
|
|
</mapper>
|