<?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.TbPlussLeshuaMakeMoneyMapper">
  <resultMap id="BaseResultMap" type="com.chaozhanggui.dao.system.entity.TbPlussLeshuaMakeMoney">
    <id column="id" jdbcType="INTEGER" property="id" />
    <result column="billId" jdbcType="VARCHAR" property="billid" />
    <result column="createTime" jdbcType="VARCHAR" property="createtime" />
    <result column="merchantId" jdbcType="VARCHAR" property="merchantid" />
    <result column="planAmount" jdbcType="DOUBLE" property="planamount" />
    <result column="suspendAmount" jdbcType="DOUBLE" property="suspendamount" />
    <result column="realAmount" jdbcType="DOUBLE" property="realamount" />
    <result column="state" jdbcType="VARCHAR" property="state" />
    <result column="failReason" jdbcType="VARCHAR" property="failreason" />
    <result column="remark" jdbcType="VARCHAR" property="remark" />
    <result column="recreateFlag" jdbcType="VARCHAR" property="recreateflag" />
    <result column="settType" jdbcType="VARCHAR" property="setttype" />
    <result column="settDate" jdbcType="VARCHAR" property="settdate" />
    <result column="tag" jdbcType="VARCHAR" property="tag" />
    <result column="bankretTime" jdbcType="VARCHAR" property="bankrettime" />
    <result column="bankAccount" jdbcType="VARCHAR" property="bankaccount" />
    <result column="bankHolder" jdbcType="VARCHAR" property="bankholder" />
  </resultMap>
  <sql id="Base_Column_List">
    id, billId, createTime, merchantId, planAmount, suspendAmount, realAmount, state, 
    failReason, remark, recreateFlag, settType, settDate, tag, bankretTime, bankAccount, 
    bankHolder
  </sql>
  <select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
    select 
    <include refid="Base_Column_List" />
    from tb_pluss_leshua_make_money
    where id = #{id,jdbcType=INTEGER}
  </select>
  <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
    delete from tb_pluss_leshua_make_money
    where id = #{id,jdbcType=INTEGER}
  </delete>
  <insert id="insert" parameterType="com.chaozhanggui.dao.system.entity.TbPlussLeshuaMakeMoney">
    insert into tb_pluss_leshua_make_money (id, billId, createTime, 
      merchantId, planAmount, suspendAmount, 
      realAmount, state, failReason, 
      remark, recreateFlag, settType, 
      settDate, tag, bankretTime, 
      bankAccount, bankHolder)
    values (#{id,jdbcType=INTEGER}, #{billid,jdbcType=VARCHAR}, #{createtime,jdbcType=VARCHAR}, 
      #{merchantid,jdbcType=VARCHAR}, #{planamount,jdbcType=DOUBLE}, #{suspendamount,jdbcType=DOUBLE}, 
      #{realamount,jdbcType=DOUBLE}, #{state,jdbcType=VARCHAR}, #{failreason,jdbcType=VARCHAR}, 
      #{remark,jdbcType=VARCHAR}, #{recreateflag,jdbcType=VARCHAR}, #{setttype,jdbcType=VARCHAR}, 
      #{settdate,jdbcType=VARCHAR}, #{tag,jdbcType=VARCHAR}, #{bankrettime,jdbcType=VARCHAR}, 
      #{bankaccount,jdbcType=VARCHAR}, #{bankholder,jdbcType=VARCHAR})
  </insert>
  <insert id="insertSelective" parameterType="com.chaozhanggui.dao.system.entity.TbPlussLeshuaMakeMoney">
    insert into tb_pluss_leshua_make_money
    <trim prefix="(" suffix=")" suffixOverrides=",">
      <if test="id != null">
        id,
      </if>
      <if test="billid != null">
        billId,
      </if>
      <if test="createtime != null">
        createTime,
      </if>
      <if test="merchantid != null">
        merchantId,
      </if>
      <if test="planamount != null">
        planAmount,
      </if>
      <if test="suspendamount != null">
        suspendAmount,
      </if>
      <if test="realamount != null">
        realAmount,
      </if>
      <if test="state != null">
        state,
      </if>
      <if test="failreason != null">
        failReason,
      </if>
      <if test="remark != null">
        remark,
      </if>
      <if test="recreateflag != null">
        recreateFlag,
      </if>
      <if test="setttype != null">
        settType,
      </if>
      <if test="settdate != null">
        settDate,
      </if>
      <if test="tag != null">
        tag,
      </if>
      <if test="bankrettime != null">
        bankretTime,
      </if>
      <if test="bankaccount != null">
        bankAccount,
      </if>
      <if test="bankholder != null">
        bankHolder,
      </if>
    </trim>
    <trim prefix="values (" suffix=")" suffixOverrides=",">
      <if test="id != null">
        #{id,jdbcType=INTEGER},
      </if>
      <if test="billid != null">
        #{billid,jdbcType=VARCHAR},
      </if>
      <if test="createtime != null">
        #{createtime,jdbcType=VARCHAR},
      </if>
      <if test="merchantid != null">
        #{merchantid,jdbcType=VARCHAR},
      </if>
      <if test="planamount != null">
        #{planamount,jdbcType=DOUBLE},
      </if>
      <if test="suspendamount != null">
        #{suspendamount,jdbcType=DOUBLE},
      </if>
      <if test="realamount != null">
        #{realamount,jdbcType=DOUBLE},
      </if>
      <if test="state != null">
        #{state,jdbcType=VARCHAR},
      </if>
      <if test="failreason != null">
        #{failreason,jdbcType=VARCHAR},
      </if>
      <if test="remark != null">
        #{remark,jdbcType=VARCHAR},
      </if>
      <if test="recreateflag != null">
        #{recreateflag,jdbcType=VARCHAR},
      </if>
      <if test="setttype != null">
        #{setttype,jdbcType=VARCHAR},
      </if>
      <if test="settdate != null">
        #{settdate,jdbcType=VARCHAR},
      </if>
      <if test="tag != null">
        #{tag,jdbcType=VARCHAR},
      </if>
      <if test="bankrettime != null">
        #{bankrettime,jdbcType=VARCHAR},
      </if>
      <if test="bankaccount != null">
        #{bankaccount,jdbcType=VARCHAR},
      </if>
      <if test="bankholder != null">
        #{bankholder,jdbcType=VARCHAR},
      </if>
    </trim>
  </insert>
  <update id="updateByPrimaryKeySelective" parameterType="com.chaozhanggui.dao.system.entity.TbPlussLeshuaMakeMoney">
    update tb_pluss_leshua_make_money
    <set>
      <if test="billid != null">
        billId = #{billid,jdbcType=VARCHAR},
      </if>
      <if test="createtime != null">
        createTime = #{createtime,jdbcType=VARCHAR},
      </if>
      <if test="merchantid != null">
        merchantId = #{merchantid,jdbcType=VARCHAR},
      </if>
      <if test="planamount != null">
        planAmount = #{planamount,jdbcType=DOUBLE},
      </if>
      <if test="suspendamount != null">
        suspendAmount = #{suspendamount,jdbcType=DOUBLE},
      </if>
      <if test="realamount != null">
        realAmount = #{realamount,jdbcType=DOUBLE},
      </if>
      <if test="state != null">
        state = #{state,jdbcType=VARCHAR},
      </if>
      <if test="failreason != null">
        failReason = #{failreason,jdbcType=VARCHAR},
      </if>
      <if test="remark != null">
        remark = #{remark,jdbcType=VARCHAR},
      </if>
      <if test="recreateflag != null">
        recreateFlag = #{recreateflag,jdbcType=VARCHAR},
      </if>
      <if test="setttype != null">
        settType = #{setttype,jdbcType=VARCHAR},
      </if>
      <if test="settdate != null">
        settDate = #{settdate,jdbcType=VARCHAR},
      </if>
      <if test="tag != null">
        tag = #{tag,jdbcType=VARCHAR},
      </if>
      <if test="bankrettime != null">
        bankretTime = #{bankrettime,jdbcType=VARCHAR},
      </if>
      <if test="bankaccount != null">
        bankAccount = #{bankaccount,jdbcType=VARCHAR},
      </if>
      <if test="bankholder != null">
        bankHolder = #{bankholder,jdbcType=VARCHAR},
      </if>
    </set>
    where id = #{id,jdbcType=INTEGER}
  </update>
  <update id="updateByPrimaryKey" parameterType="com.chaozhanggui.dao.system.entity.TbPlussLeshuaMakeMoney">
    update tb_pluss_leshua_make_money
    set billId = #{billid,jdbcType=VARCHAR},
      createTime = #{createtime,jdbcType=VARCHAR},
      merchantId = #{merchantid,jdbcType=VARCHAR},
      planAmount = #{planamount,jdbcType=DOUBLE},
      suspendAmount = #{suspendamount,jdbcType=DOUBLE},
      realAmount = #{realamount,jdbcType=DOUBLE},
      state = #{state,jdbcType=VARCHAR},
      failReason = #{failreason,jdbcType=VARCHAR},
      remark = #{remark,jdbcType=VARCHAR},
      recreateFlag = #{recreateflag,jdbcType=VARCHAR},
      settType = #{setttype,jdbcType=VARCHAR},
      settDate = #{settdate,jdbcType=VARCHAR},
      tag = #{tag,jdbcType=VARCHAR},
      bankretTime = #{bankrettime,jdbcType=VARCHAR},
      bankAccount = #{bankaccount,jdbcType=VARCHAR},
      bankHolder = #{bankholder,jdbcType=VARCHAR}
    where id = #{id,jdbcType=INTEGER}
  </update>
</mapper>