<?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.TbPlussMerchantTransferCashMapper">
  <resultMap id="BaseResultMap" type="com.chaozhanggui.dao.system.entity.TbPlussMerchantTransferCash">
    <id column="id" jdbcType="INTEGER" property="id" />
    <result column="cashAmt" jdbcType="DECIMAL" property="cashamt" />
    <result column="userId" jdbcType="INTEGER" property="userid" />
    <result column="userName" jdbcType="VARCHAR" property="username" />
    <result column="status" jdbcType="CHAR" property="status" />
    <result column="cashTime" jdbcType="TIMESTAMP" property="cashtime" />
    <result column="cashNo" jdbcType="VARCHAR" property="cashno" />
    <result column="createTime" jdbcType="TIMESTAMP" property="createtime" />
    <result column="remark" jdbcType="VARCHAR" property="remark" />
  </resultMap>
  <sql id="Base_Column_List">
    id, cashAmt, userId, userName, status, cashTime, cashNo, createTime, remark
  </sql>
  <select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
    select 
    <include refid="Base_Column_List" />
    from tb_pluss_merchant_transfer_cash
    where id = #{id,jdbcType=INTEGER}
  </select>
  <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
    delete from tb_pluss_merchant_transfer_cash
    where id = #{id,jdbcType=INTEGER}
  </delete>
  <insert id="insert" parameterType="com.chaozhanggui.dao.system.entity.TbPlussMerchantTransferCash">
    insert into tb_pluss_merchant_transfer_cash (id, cashAmt, userId, 
      userName, status, cashTime, 
      cashNo, createTime, remark
      )
    values (#{id,jdbcType=INTEGER}, #{cashamt,jdbcType=DECIMAL}, #{userid,jdbcType=INTEGER}, 
      #{username,jdbcType=VARCHAR}, #{status,jdbcType=CHAR}, #{cashtime,jdbcType=TIMESTAMP}, 
      #{cashno,jdbcType=VARCHAR}, #{createtime,jdbcType=TIMESTAMP}, #{remark,jdbcType=VARCHAR}
      )
  </insert>
  <insert id="insertSelective" parameterType="com.chaozhanggui.dao.system.entity.TbPlussMerchantTransferCash">
    insert into tb_pluss_merchant_transfer_cash
    <trim prefix="(" suffix=")" suffixOverrides=",">
      <if test="id != null">
        id,
      </if>
      <if test="cashamt != null">
        cashAmt,
      </if>
      <if test="userid != null">
        userId,
      </if>
      <if test="username != null">
        userName,
      </if>
      <if test="status != null">
        status,
      </if>
      <if test="cashtime != null">
        cashTime,
      </if>
      <if test="cashno != null">
        cashNo,
      </if>
      <if test="createtime != null">
        createTime,
      </if>
      <if test="remark != null">
        remark,
      </if>
    </trim>
    <trim prefix="values (" suffix=")" suffixOverrides=",">
      <if test="id != null">
        #{id,jdbcType=INTEGER},
      </if>
      <if test="cashamt != null">
        #{cashamt,jdbcType=DECIMAL},
      </if>
      <if test="userid != null">
        #{userid,jdbcType=INTEGER},
      </if>
      <if test="username != null">
        #{username,jdbcType=VARCHAR},
      </if>
      <if test="status != null">
        #{status,jdbcType=CHAR},
      </if>
      <if test="cashtime != null">
        #{cashtime,jdbcType=TIMESTAMP},
      </if>
      <if test="cashno != null">
        #{cashno,jdbcType=VARCHAR},
      </if>
      <if test="createtime != null">
        #{createtime,jdbcType=TIMESTAMP},
      </if>
      <if test="remark != null">
        #{remark,jdbcType=VARCHAR},
      </if>
    </trim>
  </insert>
  <update id="updateByPrimaryKeySelective" parameterType="com.chaozhanggui.dao.system.entity.TbPlussMerchantTransferCash">
    update tb_pluss_merchant_transfer_cash
    <set>
      <if test="cashamt != null">
        cashAmt = #{cashamt,jdbcType=DECIMAL},
      </if>
      <if test="userid != null">
        userId = #{userid,jdbcType=INTEGER},
      </if>
      <if test="username != null">
        userName = #{username,jdbcType=VARCHAR},
      </if>
      <if test="status != null">
        status = #{status,jdbcType=CHAR},
      </if>
      <if test="cashtime != null">
        cashTime = #{cashtime,jdbcType=TIMESTAMP},
      </if>
      <if test="cashno != null">
        cashNo = #{cashno,jdbcType=VARCHAR},
      </if>
      <if test="createtime != null">
        createTime = #{createtime,jdbcType=TIMESTAMP},
      </if>
      <if test="remark != null">
        remark = #{remark,jdbcType=VARCHAR},
      </if>
    </set>
    where id = #{id,jdbcType=INTEGER}
  </update>
  <update id="updateByPrimaryKey" parameterType="com.chaozhanggui.dao.system.entity.TbPlussMerchantTransferCash">
    update tb_pluss_merchant_transfer_cash
    set cashAmt = #{cashamt,jdbcType=DECIMAL},
      userId = #{userid,jdbcType=INTEGER},
      userName = #{username,jdbcType=VARCHAR},
      status = #{status,jdbcType=CHAR},
      cashTime = #{cashtime,jdbcType=TIMESTAMP},
      cashNo = #{cashno,jdbcType=VARCHAR},
      createTime = #{createtime,jdbcType=TIMESTAMP},
      remark = #{remark,jdbcType=VARCHAR}
    where id = #{id,jdbcType=INTEGER}
  </update>
</mapper>