<?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.chaozhanggui.dao.system.dao.TbPlussMerchantRateNewMapper">
  <resultMap id="BaseResultMap" type="com.chaozhanggui.dao.system.entity.TbPlussMerchantRateNew">
    <id column="id" jdbcType="INTEGER" property="id" />
    <result column="channel" jdbcType="INTEGER" property="channel" />
    <result column="merchantId" jdbcType="VARCHAR" property="merchantid" />
    <result column="wxRate" jdbcType="INTEGER" property="wxrate" />
    <result column="aliRate" jdbcType="INTEGER" property="alirate" />
    <result column="bankRate" jdbcType="INTEGER" property="bankrate" />
    <result column="bankRateLarge" jdbcType="INTEGER" property="bankratelarge" />
    <result column="createTime" jdbcType="TIMESTAMP" property="createtime" />
    <result column="updateTime" jdbcType="TIMESTAMP" property="updatetime" />
  </resultMap>
  <sql id="Base_Column_List">
    id, channel, merchantId, wxRate, aliRate, bankRate, bankRateLarge, createTime, updateTime
  </sql>
  <select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
    select 
    <include refid="Base_Column_List" />
    from tb_pluss_merchant_rate_new
    where id = #{id,jdbcType=INTEGER}
  </select>
  <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
    delete from tb_pluss_merchant_rate_new
    where id = #{id,jdbcType=INTEGER}
  </delete>
  <insert id="insert" parameterType="com.chaozhanggui.dao.system.entity.TbPlussMerchantRateNew">
    insert into tb_pluss_merchant_rate_new (id, channel, merchantId, 
      wxRate, aliRate, bankRate, 
      bankRateLarge, createTime, updateTime
      )
    values (#{id,jdbcType=INTEGER}, #{channel,jdbcType=INTEGER}, #{merchantid,jdbcType=VARCHAR}, 
      #{wxrate,jdbcType=INTEGER}, #{alirate,jdbcType=INTEGER}, #{bankrate,jdbcType=INTEGER}, 
      #{bankratelarge,jdbcType=INTEGER}, #{createtime,jdbcType=TIMESTAMP}, #{updatetime,jdbcType=TIMESTAMP}
      )
  </insert>
  <insert id="insertSelective" parameterType="com.chaozhanggui.dao.system.entity.TbPlussMerchantRateNew">
    insert into tb_pluss_merchant_rate_new
    <trim prefix="(" suffix=")" suffixOverrides=",">
      <if test="id != null">
        id,
      </if>
      <if test="channel != null">
        channel,
      </if>
      <if test="merchantid != null">
        merchantId,
      </if>
      <if test="wxrate != null">
        wxRate,
      </if>
      <if test="alirate != null">
        aliRate,
      </if>
      <if test="bankrate != null">
        bankRate,
      </if>
      <if test="bankratelarge != null">
        bankRateLarge,
      </if>
      <if test="createtime != null">
        createTime,
      </if>
      <if test="updatetime != null">
        updateTime,
      </if>
    </trim>
    <trim prefix="values (" suffix=")" suffixOverrides=",">
      <if test="id != null">
        #{id,jdbcType=INTEGER},
      </if>
      <if test="channel != null">
        #{channel,jdbcType=INTEGER},
      </if>
      <if test="merchantid != null">
        #{merchantid,jdbcType=VARCHAR},
      </if>
      <if test="wxrate != null">
        #{wxrate,jdbcType=INTEGER},
      </if>
      <if test="alirate != null">
        #{alirate,jdbcType=INTEGER},
      </if>
      <if test="bankrate != null">
        #{bankrate,jdbcType=INTEGER},
      </if>
      <if test="bankratelarge != null">
        #{bankratelarge,jdbcType=INTEGER},
      </if>
      <if test="createtime != null">
        #{createtime,jdbcType=TIMESTAMP},
      </if>
      <if test="updatetime != null">
        #{updatetime,jdbcType=TIMESTAMP},
      </if>
    </trim>
  </insert>
  <update id="updateByPrimaryKeySelective" parameterType="com.chaozhanggui.dao.system.entity.TbPlussMerchantRateNew">
    update tb_pluss_merchant_rate_new
    <set>
      <if test="channel != null">
        channel = #{channel,jdbcType=INTEGER},
      </if>
      <if test="merchantid != null">
        merchantId = #{merchantid,jdbcType=VARCHAR},
      </if>
      <if test="wxrate != null">
        wxRate = #{wxrate,jdbcType=INTEGER},
      </if>
      <if test="alirate != null">
        aliRate = #{alirate,jdbcType=INTEGER},
      </if>
      <if test="bankrate != null">
        bankRate = #{bankrate,jdbcType=INTEGER},
      </if>
      <if test="bankratelarge != null">
        bankRateLarge = #{bankratelarge,jdbcType=INTEGER},
      </if>
      <if test="createtime != null">
        createTime = #{createtime,jdbcType=TIMESTAMP},
      </if>
      <if test="updatetime != null">
        updateTime = #{updatetime,jdbcType=TIMESTAMP},
      </if>
    </set>
    where id = #{id,jdbcType=INTEGER}
  </update>
  <update id="updateByPrimaryKey" parameterType="com.chaozhanggui.dao.system.entity.TbPlussMerchantRateNew">
    update tb_pluss_merchant_rate_new
    set channel = #{channel,jdbcType=INTEGER},
      merchantId = #{merchantid,jdbcType=VARCHAR},
      wxRate = #{wxrate,jdbcType=INTEGER},
      aliRate = #{alirate,jdbcType=INTEGER},
      bankRate = #{bankrate,jdbcType=INTEGER},
      bankRateLarge = #{bankratelarge,jdbcType=INTEGER},
      createTime = #{createtime,jdbcType=TIMESTAMP},
      updateTime = #{updatetime,jdbcType=TIMESTAMP}
    where id = #{id,jdbcType=INTEGER}
  </update>
</mapper>