<?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.mwt.oes.dao.StudentHomeRotationImgMapper" >
  <resultMap id="BaseResultMap" type="com.mwt.oes.domain.StudentHomeRotationImg" >
    <id column="img_id" property="imgId" jdbcType="INTEGER" />
    <result column="img_title" property="imgTitle" jdbcType="VARCHAR" />
    <result column="img_src" property="imgSrc" jdbcType="VARCHAR" />
    <result column="img_create_time" property="imgCreateTime" jdbcType="TIMESTAMP" />
    <result column="ano" property="ano" jdbcType="INTEGER" />
    <result column="adm_name" property="admName" jdbcType="VARCHAR" />
  </resultMap>
  <sql id="Example_Where_Clause" >
    <where >
      <foreach collection="oredCriteria" item="criteria" separator="or" >
        <if test="criteria.valid" >
          <trim prefix="(" suffix=")" prefixOverrides="and" >
            <foreach collection="criteria.criteria" item="criterion" >
              <choose >
                <when test="criterion.noValue" >
                  and ${criterion.condition}
                </when>
                <when test="criterion.singleValue" >
                  and ${criterion.condition} #{criterion.value}
                </when>
                <when test="criterion.betweenValue" >
                  and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
                </when>
                <when test="criterion.listValue" >
                  and ${criterion.condition}
                  <foreach collection="criterion.value" item="listItem" open="(" close=")" separator="," >
                    #{listItem}
                  </foreach>
                </when>
              </choose>
            </foreach>
          </trim>
        </if>
      </foreach>
    </where>
  </sql>
  <sql id="Update_By_Example_Where_Clause" >
    <where >
      <foreach collection="example.oredCriteria" item="criteria" separator="or" >
        <if test="criteria.valid" >
          <trim prefix="(" suffix=")" prefixOverrides="and" >
            <foreach collection="criteria.criteria" item="criterion" >
              <choose >
                <when test="criterion.noValue" >
                  and ${criterion.condition}
                </when>
                <when test="criterion.singleValue" >
                  and ${criterion.condition} #{criterion.value}
                </when>
                <when test="criterion.betweenValue" >
                  and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
                </when>
                <when test="criterion.listValue" >
                  and ${criterion.condition}
                  <foreach collection="criterion.value" item="listItem" open="(" close=")" separator="," >
                    #{listItem}
                  </foreach>
                </when>
              </choose>
            </foreach>
          </trim>
        </if>
      </foreach>
    </where>
  </sql>
  <sql id="Base_Column_List" >
    img_id, img_title, img_src, img_create_time, ano, adm_name
  </sql>
  <select id="selectByExample" resultMap="BaseResultMap" parameterType="com.mwt.oes.domain.StudentHomeRotationImgExample" >
    select
    <if test="distinct" >
      distinct
    </if>
    <include refid="Base_Column_List" />
    from student_home_rotation_img
    <if test="_parameter != null" >
      <include refid="Example_Where_Clause" />
    </if>
    <if test="orderByClause != null" >
      order by ${orderByClause}
    </if>
  </select>
  <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Integer" >
    select 
    <include refid="Base_Column_List" />
    from student_home_rotation_img
    where img_id = #{imgId,jdbcType=INTEGER}
  </select>
  <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer" >
    delete from student_home_rotation_img
    where img_id = #{imgId,jdbcType=INTEGER}
  </delete>
  <delete id="deleteByExample" parameterType="com.mwt.oes.domain.StudentHomeRotationImgExample" >
    delete from student_home_rotation_img
    <if test="_parameter != null" >
      <include refid="Example_Where_Clause" />
    </if>
  </delete>
  <insert id="insert" parameterType="com.mwt.oes.domain.StudentHomeRotationImg" >
    insert into student_home_rotation_img (img_id, img_title, img_src, 
      img_create_time, ano, adm_name
      )
    values (#{imgId,jdbcType=INTEGER}, #{imgTitle,jdbcType=VARCHAR}, #{imgSrc,jdbcType=VARCHAR}, 
      #{imgCreateTime,jdbcType=TIMESTAMP}, #{ano,jdbcType=INTEGER}, #{admName,jdbcType=VARCHAR}
      )
  </insert>
  <insert id="insertSelective" parameterType="com.mwt.oes.domain.StudentHomeRotationImg" >
    insert into student_home_rotation_img
    <trim prefix="(" suffix=")" suffixOverrides="," >
      <if test="imgId != null" >
        img_id,
      </if>
      <if test="imgTitle != null" >
        img_title,
      </if>
      <if test="imgSrc != null" >
        img_src,
      </if>
      <if test="imgCreateTime != null" >
        img_create_time,
      </if>
      <if test="ano != null" >
        ano,
      </if>
      <if test="admName != null" >
        adm_name,
      </if>
    </trim>
    <trim prefix="values (" suffix=")" suffixOverrides="," >
      <if test="imgId != null" >
        #{imgId,jdbcType=INTEGER},
      </if>
      <if test="imgTitle != null" >
        #{imgTitle,jdbcType=VARCHAR},
      </if>
      <if test="imgSrc != null" >
        #{imgSrc,jdbcType=VARCHAR},
      </if>
      <if test="imgCreateTime != null" >
        #{imgCreateTime,jdbcType=TIMESTAMP},
      </if>
      <if test="ano != null" >
        #{ano,jdbcType=INTEGER},
      </if>
      <if test="admName != null" >
        #{admName,jdbcType=VARCHAR},
      </if>
    </trim>
  </insert>
  <select id="countByExample" parameterType="com.mwt.oes.domain.StudentHomeRotationImgExample" resultType="java.lang.Integer" >
    select count(*) from student_home_rotation_img
    <if test="_parameter != null" >
      <include refid="Example_Where_Clause" />
    </if>
  </select>
  <update id="updateByExampleSelective" parameterType="map" >
    update student_home_rotation_img
    <set >
      <if test="record.imgId != null" >
        img_id = #{record.imgId,jdbcType=INTEGER},
      </if>
      <if test="record.imgTitle != null" >
        img_title = #{record.imgTitle,jdbcType=VARCHAR},
      </if>
      <if test="record.imgSrc != null" >
        img_src = #{record.imgSrc,jdbcType=VARCHAR},
      </if>
      <if test="record.imgCreateTime != null" >
        img_create_time = #{record.imgCreateTime,jdbcType=TIMESTAMP},
      </if>
      <if test="record.ano != null" >
        ano = #{record.ano,jdbcType=INTEGER},
      </if>
      <if test="record.admName != null" >
        adm_name = #{record.admName,jdbcType=VARCHAR},
      </if>
    </set>
    <if test="_parameter != null" >
      <include refid="Update_By_Example_Where_Clause" />
    </if>
  </update>
  <update id="updateByExample" parameterType="map" >
    update student_home_rotation_img
    set img_id = #{record.imgId,jdbcType=INTEGER},
      img_title = #{record.imgTitle,jdbcType=VARCHAR},
      img_src = #{record.imgSrc,jdbcType=VARCHAR},
      img_create_time = #{record.imgCreateTime,jdbcType=TIMESTAMP},
      ano = #{record.ano,jdbcType=INTEGER},
      adm_name = #{record.admName,jdbcType=VARCHAR}
    <if test="_parameter != null" >
      <include refid="Update_By_Example_Where_Clause" />
    </if>
  </update>
  <update id="updateByPrimaryKeySelective" parameterType="com.mwt.oes.domain.StudentHomeRotationImg" >
    update student_home_rotation_img
    <set >
      <if test="imgTitle != null" >
        img_title = #{imgTitle,jdbcType=VARCHAR},
      </if>
      <if test="imgSrc != null" >
        img_src = #{imgSrc,jdbcType=VARCHAR},
      </if>
      <if test="imgCreateTime != null" >
        img_create_time = #{imgCreateTime,jdbcType=TIMESTAMP},
      </if>
      <if test="ano != null" >
        ano = #{ano,jdbcType=INTEGER},
      </if>
      <if test="admName != null" >
        adm_name = #{admName,jdbcType=VARCHAR},
      </if>
    </set>
    where img_id = #{imgId,jdbcType=INTEGER}
  </update>
  <update id="updateByPrimaryKey" parameterType="com.mwt.oes.domain.StudentHomeRotationImg" >
    update student_home_rotation_img
    set img_title = #{imgTitle,jdbcType=VARCHAR},
      img_src = #{imgSrc,jdbcType=VARCHAR},
      img_create_time = #{imgCreateTime,jdbcType=TIMESTAMP},
      ano = #{ano,jdbcType=INTEGER},
      adm_name = #{admName,jdbcType=VARCHAR}
    where img_id = #{imgId,jdbcType=INTEGER}
  </update>
</mapper>