<?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.TbPlussMerchantSplitSettingMapper">
  <resultMap id="BaseResultMap" type="com.chaozhanggui.dao.system.entity.TbPlussMerchantSplitSetting">
    <id column="id" jdbcType="INTEGER" property="id" />
    <result column="chieMerchantCode" jdbcType="VARCHAR" property="chiemerchantcode" />
    <result column="chieMerchantId" jdbcType="VARCHAR" property="chiemerchantid" />
    <result column="isDivistion" jdbcType="VARCHAR" property="isdivistion" />
    <result column="divisionMode" jdbcType="VARCHAR" property="divisionmode" />
    <result column="diviMerchantCode" jdbcType="VARCHAR" property="divimerchantcode" />
    <result column="diviMerchantId" jdbcType="VARCHAR" property="divimerchantid" />
    <result column="divAmt" jdbcType="DECIMAL" property="divamt" />
    <result column="divRatio" jdbcType="DECIMAL" property="divratio" />
    <result column="isChargeFee" jdbcType="VARCHAR" property="ischargefee" />
    <result column="createTime" jdbcType="TIMESTAMP" property="createtime" />
    <result column="status" jdbcType="INTEGER" property="status" />
    <result column="notifyUrl" jdbcType="VARCHAR" property="notifyurl" />
  </resultMap>
  <sql id="Base_Column_List">
    id, chieMerchantCode, chieMerchantId, isDivistion, divisionMode, diviMerchantCode, 
    diviMerchantId, divAmt, divRatio, isChargeFee, createTime, status, notifyUrl
  </sql>
  <select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
    select 
    <include refid="Base_Column_List" />
    from tb_pluss_merchant_split_setting
    where id = #{id,jdbcType=INTEGER}
  </select>
  <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
    delete from tb_pluss_merchant_split_setting
    where id = #{id,jdbcType=INTEGER}
  </delete>
  <insert id="insert" parameterType="com.chaozhanggui.dao.system.entity.TbPlussMerchantSplitSetting">
    insert into tb_pluss_merchant_split_setting (id, chieMerchantCode, chieMerchantId, 
      isDivistion, divisionMode, diviMerchantCode, 
      diviMerchantId, divAmt, divRatio, 
      isChargeFee, createTime, status, 
      notifyUrl)
    values (#{id,jdbcType=INTEGER}, #{chiemerchantcode,jdbcType=VARCHAR}, #{chiemerchantid,jdbcType=VARCHAR}, 
      #{isdivistion,jdbcType=VARCHAR}, #{divisionmode,jdbcType=VARCHAR}, #{divimerchantcode,jdbcType=VARCHAR}, 
      #{divimerchantid,jdbcType=VARCHAR}, #{divamt,jdbcType=DECIMAL}, #{divratio,jdbcType=DECIMAL}, 
      #{ischargefee,jdbcType=VARCHAR}, #{createtime,jdbcType=TIMESTAMP}, #{status,jdbcType=INTEGER}, 
      #{notifyurl,jdbcType=VARCHAR})
  </insert>
  <insert id="insertSelective" parameterType="com.chaozhanggui.dao.system.entity.TbPlussMerchantSplitSetting">
    insert into tb_pluss_merchant_split_setting
    <trim prefix="(" suffix=")" suffixOverrides=",">
      <if test="id != null">
        id,
      </if>
      <if test="chiemerchantcode != null">
        chieMerchantCode,
      </if>
      <if test="chiemerchantid != null">
        chieMerchantId,
      </if>
      <if test="isdivistion != null">
        isDivistion,
      </if>
      <if test="divisionmode != null">
        divisionMode,
      </if>
      <if test="divimerchantcode != null">
        diviMerchantCode,
      </if>
      <if test="divimerchantid != null">
        diviMerchantId,
      </if>
      <if test="divamt != null">
        divAmt,
      </if>
      <if test="divratio != null">
        divRatio,
      </if>
      <if test="ischargefee != null">
        isChargeFee,
      </if>
      <if test="createtime != null">
        createTime,
      </if>
      <if test="status != null">
        status,
      </if>
      <if test="notifyurl != null">
        notifyUrl,
      </if>
    </trim>
    <trim prefix="values (" suffix=")" suffixOverrides=",">
      <if test="id != null">
        #{id,jdbcType=INTEGER},
      </if>
      <if test="chiemerchantcode != null">
        #{chiemerchantcode,jdbcType=VARCHAR},
      </if>
      <if test="chiemerchantid != null">
        #{chiemerchantid,jdbcType=VARCHAR},
      </if>
      <if test="isdivistion != null">
        #{isdivistion,jdbcType=VARCHAR},
      </if>
      <if test="divisionmode != null">
        #{divisionmode,jdbcType=VARCHAR},
      </if>
      <if test="divimerchantcode != null">
        #{divimerchantcode,jdbcType=VARCHAR},
      </if>
      <if test="divimerchantid != null">
        #{divimerchantid,jdbcType=VARCHAR},
      </if>
      <if test="divamt != null">
        #{divamt,jdbcType=DECIMAL},
      </if>
      <if test="divratio != null">
        #{divratio,jdbcType=DECIMAL},
      </if>
      <if test="ischargefee != null">
        #{ischargefee,jdbcType=VARCHAR},
      </if>
      <if test="createtime != null">
        #{createtime,jdbcType=TIMESTAMP},
      </if>
      <if test="status != null">
        #{status,jdbcType=INTEGER},
      </if>
      <if test="notifyurl != null">
        #{notifyurl,jdbcType=VARCHAR},
      </if>
    </trim>
  </insert>
  <update id="updateByPrimaryKeySelective" parameterType="com.chaozhanggui.dao.system.entity.TbPlussMerchantSplitSetting">
    update tb_pluss_merchant_split_setting
    <set>
      <if test="chiemerchantcode != null">
        chieMerchantCode = #{chiemerchantcode,jdbcType=VARCHAR},
      </if>
      <if test="chiemerchantid != null">
        chieMerchantId = #{chiemerchantid,jdbcType=VARCHAR},
      </if>
      <if test="isdivistion != null">
        isDivistion = #{isdivistion,jdbcType=VARCHAR},
      </if>
      <if test="divisionmode != null">
        divisionMode = #{divisionmode,jdbcType=VARCHAR},
      </if>
      <if test="divimerchantcode != null">
        diviMerchantCode = #{divimerchantcode,jdbcType=VARCHAR},
      </if>
      <if test="divimerchantid != null">
        diviMerchantId = #{divimerchantid,jdbcType=VARCHAR},
      </if>
      <if test="divamt != null">
        divAmt = #{divamt,jdbcType=DECIMAL},
      </if>
      <if test="divratio != null">
        divRatio = #{divratio,jdbcType=DECIMAL},
      </if>
      <if test="ischargefee != null">
        isChargeFee = #{ischargefee,jdbcType=VARCHAR},
      </if>
      <if test="createtime != null">
        createTime = #{createtime,jdbcType=TIMESTAMP},
      </if>
      <if test="status != null">
        status = #{status,jdbcType=INTEGER},
      </if>
      <if test="notifyurl != null">
        notifyUrl = #{notifyurl,jdbcType=VARCHAR},
      </if>
    </set>
    where id = #{id,jdbcType=INTEGER}
  </update>
  <update id="updateByPrimaryKey" parameterType="com.chaozhanggui.dao.system.entity.TbPlussMerchantSplitSetting">
    update tb_pluss_merchant_split_setting
    set chieMerchantCode = #{chiemerchantcode,jdbcType=VARCHAR},
      chieMerchantId = #{chiemerchantid,jdbcType=VARCHAR},
      isDivistion = #{isdivistion,jdbcType=VARCHAR},
      divisionMode = #{divisionmode,jdbcType=VARCHAR},
      diviMerchantCode = #{divimerchantcode,jdbcType=VARCHAR},
      diviMerchantId = #{divimerchantid,jdbcType=VARCHAR},
      divAmt = #{divamt,jdbcType=DECIMAL},
      divRatio = #{divratio,jdbcType=DECIMAL},
      isChargeFee = #{ischargefee,jdbcType=VARCHAR},
      createTime = #{createtime,jdbcType=TIMESTAMP},
      status = #{status,jdbcType=INTEGER},
      notifyUrl = #{notifyurl,jdbcType=VARCHAR}
    where id = #{id,jdbcType=INTEGER}
  </update>
</mapper>