<?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.steerinfo.TimedTask.rsbcread.mapper.RsBcreadMapper">
  <resultMap id="BaseResultMap" type="com.steerinfo.TimedTask.rsbcread.model.RsBcread">
    <id column="XH" jdbcType="DECIMAL" property="xh" />
    <result column="ZHONGLIAN" jdbcType="DECIMAL" property="zhonglian" />
  </resultMap>
  <sql id="columns">
    XH, ZHONGLIAN
  </sql>
  <sql id="columns_alias">
    t.XH, t.ZHONGLIAN
  </sql>
  <sql id="select">
    SELECT <include refid="columns" /> FROM RS_BCREAD
  </sql>
  <sql id="select_alias">
    SELECT <include refid="columns_alias" /> FROM RS_BCREAD t
  </sql>
  <sql id="where">
    <where> 
      <if test="xh != null">
        and XH = #{xh}
      </if>
      <if test="zhonglian != null">
        and ZHONGLIAN = #{zhonglian}
      </if>
    </where>
  </sql>
  <sql id="whereLike">
    <where> 
      <if test="xh != null">
        and XH = #{xh}
      </if>
      <if test="zhonglian != null">
        and ZHONGLIAN = #{zhonglian}
      </if>
    </where>
  </sql>
  <delete id="deleteByPrimaryKey" parameterType="java.math.BigDecimal">
    delete from RS_BCREAD
    where XH = #{xh,jdbcType=DECIMAL}
  </delete>
  <delete id="deleteBySelectiveElement" parameterType="java.util.HashMap">
    delete from RS_BCREAD
    where 1!=1 
      <if test="zhonglian != null">
        or ZHONGLIAN = #{zhonglian}
      </if>
  </delete>
  <insert id="insert" parameterType="com.steerinfo.TimedTask.rsbcread.model.RsBcread">
    insert into RS_BCREAD (XH, ZHONGLIAN)
    values (#{xh,jdbcType=DECIMAL}, #{zhonglian,jdbcType=DECIMAL})
  </insert>
  <insert id="insertSelective" parameterType="com.steerinfo.TimedTask.rsbcread.model.RsBcread">
    insert into RS_BCREAD
    <trim prefix="(" suffix=")" suffixOverrides=",">
      <if test="xh != null">
        XH,
      </if>
      <if test="zhonglian != null">
        ZHONGLIAN,
      </if>
    </trim>
    <trim prefix="values (" suffix=")" suffixOverrides=",">
      <if test="xh != null">
        #{xh,jdbcType=DECIMAL},
      </if>
      <if test="zhonglian != null">
        #{zhonglian,jdbcType=DECIMAL},
      </if>
    </trim>
  </insert>
  <update id="updateByPrimaryKey" parameterType="com.steerinfo.TimedTask.rsbcread.model.RsBcread">
    update RS_BCREAD
    set ZHONGLIAN = #{zhonglian,jdbcType=DECIMAL}
    where XH = #{xh,jdbcType=DECIMAL}
  </update>
  <update id="updateByPrimaryKeySelective" parameterType="com.steerinfo.TimedTask.rsbcread.model.RsBcread">
    update RS_BCREAD
    <set>
      <if test="zhonglian != null">
        ZHONGLIAN = #{zhonglian,jdbcType=DECIMAL},
      </if>
    </set>
    where XH = #{xh,jdbcType=DECIMAL}
  </update>
  <select id="selectByPrimaryKey" parameterType="java.math.BigDecimal" resultMap="BaseResultMap">
    <include refid="select" />
    where XH = #{xh,jdbcType=DECIMAL}
  </select>
  <select id="selectByParameters" parameterType="java.util.HashMap" resultMap="BaseResultMap">
    <include refid="select" />
    <include refid="where" />
  </select>
  <select id="selectLikeByParameters" parameterType="java.util.HashMap" resultMap="BaseResultMap">
    <include refid="select" />
    <include refid="whereLike" />
  </select>
  <insert id="batchInsert" parameterType="java.util.List">
    insert into RS_BCREAD 
      (XH, 
      ZHONGLIAN)
    ( <foreach collection="list" item="item" separator="union all"> 
   select  
      #{item.xh,jdbcType=DECIMAL}, 
      #{item.zhonglian,jdbcType=DECIMAL} from dual  
   </foreach> )
  </insert>
  <update id="batchUpdate" parameterType="java.util.List">
     update RS_BCREAD
     set
       XH=
       <foreach close="end" collection="list" index="index" item="item" open="case XH" separator=" ">
          when #{item.xh,jdbcType=DECIMAL} then #{item.xh,jdbcType=DECIMAL}
       </foreach>
       ,ZHONGLIAN=
       <foreach close="end" collection="list" index="index" item="item" open="case XH" separator=" ">
          when #{item.xh,jdbcType=DECIMAL} then #{item.zhonglian,jdbcType=DECIMAL}
       </foreach>
     where XH in 
     <foreach close=")" collection="list" index="index" item="item" open="(" separator=",">
    #{item.xh,jdbcType=DECIMAL}
     </foreach> 
  </update>
  <delete id="batchDelete" parameterType="java.util.List">
    delete from RS_BCREAD
    where XH in 
    <foreach close=")" collection="list" item="id" open="(" separator=",">
      #{id}
    </foreach>
  </delete>
  <!-- 友情提示！！！-->
  <!-- 请将自己写的代码放在此标签之下，方便以后粘贴复制。-->

</mapper>