<?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.TbPlussMerchantTransferMapper">
  <resultMap id="BaseResultMap" type="com.chaozhanggui.dao.system.entity.TbPlussMerchantTransfer">
    <id column="id" jdbcType="INTEGER" property="id" />
    <result column="merchantCode" jdbcType="VARCHAR" property="merchantcode" />
    <result column="alias" jdbcType="VARCHAR" property="alias" />
    <result column="channelNo" jdbcType="VARCHAR" property="channelno" />
    <result column="channelId" jdbcType="INTEGER" property="channelid" />
    <result column="amount" jdbcType="DECIMAL" property="amount" />
    <result column="createDt" jdbcType="TIMESTAMP" property="createdt" />
    <result column="orderNo" jdbcType="VARCHAR" property="orderno" />
    <result column="content" jdbcType="VARCHAR" property="content" />
    <result column="transTime" jdbcType="TIMESTAMP" property="transtime" />
    <result column="transNo" jdbcType="VARCHAR" property="transno" />
    <result column="remark" jdbcType="VARCHAR" property="remark" />
  </resultMap>
  <sql id="Base_Column_List">
    id, merchantCode, alias, channelNo, channelId, amount, createDt, orderNo, content, 
    transTime, transNo, remark
  </sql>
  <select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
    select 
    <include refid="Base_Column_List" />
    from tb_pluss_merchant_transfer
    where id = #{id,jdbcType=INTEGER}
  </select>
  <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
    delete from tb_pluss_merchant_transfer
    where id = #{id,jdbcType=INTEGER}
  </delete>
  <insert id="insert" parameterType="com.chaozhanggui.dao.system.entity.TbPlussMerchantTransfer">
    insert into tb_pluss_merchant_transfer (id, merchantCode, alias, 
      channelNo, channelId, amount, 
      createDt, orderNo, content, 
      transTime, transNo, remark
      )
    values (#{id,jdbcType=INTEGER}, #{merchantcode,jdbcType=VARCHAR}, #{alias,jdbcType=VARCHAR}, 
      #{channelno,jdbcType=VARCHAR}, #{channelid,jdbcType=INTEGER}, #{amount,jdbcType=DECIMAL}, 
      #{createdt,jdbcType=TIMESTAMP}, #{orderno,jdbcType=VARCHAR}, #{content,jdbcType=VARCHAR}, 
      #{transtime,jdbcType=TIMESTAMP}, #{transno,jdbcType=VARCHAR}, #{remark,jdbcType=VARCHAR}
      )
  </insert>
  <insert id="insertSelective" parameterType="com.chaozhanggui.dao.system.entity.TbPlussMerchantTransfer">
    insert into tb_pluss_merchant_transfer
    <trim prefix="(" suffix=")" suffixOverrides=",">
      <if test="id != null">
        id,
      </if>
      <if test="merchantcode != null">
        merchantCode,
      </if>
      <if test="alias != null">
        alias,
      </if>
      <if test="channelno != null">
        channelNo,
      </if>
      <if test="channelid != null">
        channelId,
      </if>
      <if test="amount != null">
        amount,
      </if>
      <if test="createdt != null">
        createDt,
      </if>
      <if test="orderno != null">
        orderNo,
      </if>
      <if test="content != null">
        content,
      </if>
      <if test="transtime != null">
        transTime,
      </if>
      <if test="transno != null">
        transNo,
      </if>
      <if test="remark != null">
        remark,
      </if>
    </trim>
    <trim prefix="values (" suffix=")" suffixOverrides=",">
      <if test="id != null">
        #{id,jdbcType=INTEGER},
      </if>
      <if test="merchantcode != null">
        #{merchantcode,jdbcType=VARCHAR},
      </if>
      <if test="alias != null">
        #{alias,jdbcType=VARCHAR},
      </if>
      <if test="channelno != null">
        #{channelno,jdbcType=VARCHAR},
      </if>
      <if test="channelid != null">
        #{channelid,jdbcType=INTEGER},
      </if>
      <if test="amount != null">
        #{amount,jdbcType=DECIMAL},
      </if>
      <if test="createdt != null">
        #{createdt,jdbcType=TIMESTAMP},
      </if>
      <if test="orderno != null">
        #{orderno,jdbcType=VARCHAR},
      </if>
      <if test="content != null">
        #{content,jdbcType=VARCHAR},
      </if>
      <if test="transtime != null">
        #{transtime,jdbcType=TIMESTAMP},
      </if>
      <if test="transno != null">
        #{transno,jdbcType=VARCHAR},
      </if>
      <if test="remark != null">
        #{remark,jdbcType=VARCHAR},
      </if>
    </trim>
  </insert>
  <update id="updateByPrimaryKeySelective" parameterType="com.chaozhanggui.dao.system.entity.TbPlussMerchantTransfer">
    update tb_pluss_merchant_transfer
    <set>
      <if test="merchantcode != null">
        merchantCode = #{merchantcode,jdbcType=VARCHAR},
      </if>
      <if test="alias != null">
        alias = #{alias,jdbcType=VARCHAR},
      </if>
      <if test="channelno != null">
        channelNo = #{channelno,jdbcType=VARCHAR},
      </if>
      <if test="channelid != null">
        channelId = #{channelid,jdbcType=INTEGER},
      </if>
      <if test="amount != null">
        amount = #{amount,jdbcType=DECIMAL},
      </if>
      <if test="createdt != null">
        createDt = #{createdt,jdbcType=TIMESTAMP},
      </if>
      <if test="orderno != null">
        orderNo = #{orderno,jdbcType=VARCHAR},
      </if>
      <if test="content != null">
        content = #{content,jdbcType=VARCHAR},
      </if>
      <if test="transtime != null">
        transTime = #{transtime,jdbcType=TIMESTAMP},
      </if>
      <if test="transno != null">
        transNo = #{transno,jdbcType=VARCHAR},
      </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.TbPlussMerchantTransfer">
    update tb_pluss_merchant_transfer
    set merchantCode = #{merchantcode,jdbcType=VARCHAR},
      alias = #{alias,jdbcType=VARCHAR},
      channelNo = #{channelno,jdbcType=VARCHAR},
      channelId = #{channelid,jdbcType=INTEGER},
      amount = #{amount,jdbcType=DECIMAL},
      createDt = #{createdt,jdbcType=TIMESTAMP},
      orderNo = #{orderno,jdbcType=VARCHAR},
      content = #{content,jdbcType=VARCHAR},
      transTime = #{transtime,jdbcType=TIMESTAMP},
      transNo = #{transno,jdbcType=VARCHAR},
      remark = #{remark,jdbcType=VARCHAR}
    where id = #{id,jdbcType=INTEGER}
  </update>
</mapper>