<?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.TbPlussMerchantBankCardMapper">
  <resultMap id="BaseResultMap" type="com.chaozhanggui.dao.system.entity.TbPlussMerchantBankCard">
    <id column="id" jdbcType="INTEGER" property="id" />
    <result column="merchantCode" jdbcType="VARCHAR" property="merchantcode" />
    <result column="storeId" jdbcType="VARCHAR" property="storeid" />
    <result column="bankCardNo" jdbcType="VARCHAR" property="bankcardno" />
    <result column="bankAddressNo" jdbcType="VARCHAR" property="bankaddressno" />
    <result column="bankCertName" jdbcType="VARCHAR" property="bankcertname" />
    <result column="bankName" jdbcType="VARCHAR" property="bankname" />
    <result column="branchName" jdbcType="VARCHAR" property="branchname" />
    <result column="accountType" jdbcType="VARCHAR" property="accounttype" />
    <result column="contactLine" jdbcType="VARCHAR" property="contactline" />
    <result column="branchProvince" jdbcType="VARCHAR" property="branchprovince" />
    <result column="branchCity" jdbcType="VARCHAR" property="branchcity" />
    <result column="branchArea" jdbcType="VARCHAR" property="brancharea" />
    <result column="certType" jdbcType="VARCHAR" property="certtype" />
    <result column="certNo" jdbcType="VARCHAR" property="certno" />
    <result column="certStartTime" jdbcType="VARCHAR" property="certstarttime" />
    <result column="certEndTime" jdbcType="VARCHAR" property="certendtime" />
    <result column="cardHolderAddress" jdbcType="VARCHAR" property="cardholderaddress" />
    <result column="orderNo" jdbcType="VARCHAR" property="orderno" />
    <result column="merchantId" jdbcType="VARCHAR" property="merchantid" />
    <result column="registerStatus" jdbcType="VARCHAR" property="registerstatus" />
    <result column="failReason" jdbcType="VARCHAR" property="failreason" />
    <result column="accountNo" jdbcType="VARCHAR" property="accountno" />
    <result column="wechatChannelList" jdbcType="VARCHAR" property="wechatchannellist" />
    <result column="phone" jdbcType="VARCHAR" property="phone" />
    <result column="createDt" jdbcType="TIMESTAMP" property="createdt" />
    <result column="updateDt" jdbcType="TIMESTAMP" property="updatedt" />
    <result column="aisleSwitch" jdbcType="VARCHAR" property="aisleswitch" />
    <result column="certFullPhoto" jdbcType="VARCHAR" property="certfullphoto" />
    <result column="certBacKPhoto" jdbcType="VARCHAR" property="certbackphoto" />
    <result column="bankCardFrontPic" jdbcType="VARCHAR" property="bankcardfrontpic" />
    <result column="userId" jdbcType="VARCHAR" property="userid" />
  </resultMap>
  <sql id="Base_Column_List">
    id, merchantCode, storeId, bankCardNo, bankAddressNo, bankCertName, bankName, branchName, 
    accountType, contactLine, branchProvince, branchCity, branchArea, certType, certNo, 
    certStartTime, certEndTime, cardHolderAddress, orderNo, merchantId, registerStatus, 
    failReason, accountNo, wechatChannelList, phone, createDt, updateDt, aisleSwitch, 
    certFullPhoto, certBacKPhoto, bankCardFrontPic, userId
  </sql>
  <select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
    select 
    <include refid="Base_Column_List" />
    from tb_pluss_merchant_bank_card
    where id = #{id,jdbcType=INTEGER}
  </select>
  <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
    delete from tb_pluss_merchant_bank_card
    where id = #{id,jdbcType=INTEGER}
  </delete>
  <insert id="insert" parameterType="com.chaozhanggui.dao.system.entity.TbPlussMerchantBankCard">
    insert into tb_pluss_merchant_bank_card (id, merchantCode, storeId, 
      bankCardNo, bankAddressNo, bankCertName, 
      bankName, branchName, accountType, 
      contactLine, branchProvince, branchCity, 
      branchArea, certType, certNo, 
      certStartTime, certEndTime, cardHolderAddress, 
      orderNo, merchantId, registerStatus, 
      failReason, accountNo, wechatChannelList, 
      phone, createDt, updateDt, 
      aisleSwitch, certFullPhoto, certBacKPhoto, 
      bankCardFrontPic, userId)
    values (#{id,jdbcType=INTEGER}, #{merchantcode,jdbcType=VARCHAR}, #{storeid,jdbcType=VARCHAR}, 
      #{bankcardno,jdbcType=VARCHAR}, #{bankaddressno,jdbcType=VARCHAR}, #{bankcertname,jdbcType=VARCHAR}, 
      #{bankname,jdbcType=VARCHAR}, #{branchname,jdbcType=VARCHAR}, #{accounttype,jdbcType=VARCHAR}, 
      #{contactline,jdbcType=VARCHAR}, #{branchprovince,jdbcType=VARCHAR}, #{branchcity,jdbcType=VARCHAR}, 
      #{brancharea,jdbcType=VARCHAR}, #{certtype,jdbcType=VARCHAR}, #{certno,jdbcType=VARCHAR}, 
      #{certstarttime,jdbcType=VARCHAR}, #{certendtime,jdbcType=VARCHAR}, #{cardholderaddress,jdbcType=VARCHAR}, 
      #{orderno,jdbcType=VARCHAR}, #{merchantid,jdbcType=VARCHAR}, #{registerstatus,jdbcType=VARCHAR}, 
      #{failreason,jdbcType=VARCHAR}, #{accountno,jdbcType=VARCHAR}, #{wechatchannellist,jdbcType=VARCHAR}, 
      #{phone,jdbcType=VARCHAR}, #{createdt,jdbcType=TIMESTAMP}, #{updatedt,jdbcType=TIMESTAMP}, 
      #{aisleswitch,jdbcType=VARCHAR}, #{certfullphoto,jdbcType=VARCHAR}, #{certbackphoto,jdbcType=VARCHAR}, 
      #{bankcardfrontpic,jdbcType=VARCHAR}, #{userid,jdbcType=VARCHAR})
  </insert>
  <insert id="insertSelective" parameterType="com.chaozhanggui.dao.system.entity.TbPlussMerchantBankCard">
    insert into tb_pluss_merchant_bank_card
    <trim prefix="(" suffix=")" suffixOverrides=",">
      <if test="id != null">
        id,
      </if>
      <if test="merchantcode != null">
        merchantCode,
      </if>
      <if test="storeid != null">
        storeId,
      </if>
      <if test="bankcardno != null">
        bankCardNo,
      </if>
      <if test="bankaddressno != null">
        bankAddressNo,
      </if>
      <if test="bankcertname != null">
        bankCertName,
      </if>
      <if test="bankname != null">
        bankName,
      </if>
      <if test="branchname != null">
        branchName,
      </if>
      <if test="accounttype != null">
        accountType,
      </if>
      <if test="contactline != null">
        contactLine,
      </if>
      <if test="branchprovince != null">
        branchProvince,
      </if>
      <if test="branchcity != null">
        branchCity,
      </if>
      <if test="brancharea != null">
        branchArea,
      </if>
      <if test="certtype != null">
        certType,
      </if>
      <if test="certno != null">
        certNo,
      </if>
      <if test="certstarttime != null">
        certStartTime,
      </if>
      <if test="certendtime != null">
        certEndTime,
      </if>
      <if test="cardholderaddress != null">
        cardHolderAddress,
      </if>
      <if test="orderno != null">
        orderNo,
      </if>
      <if test="merchantid != null">
        merchantId,
      </if>
      <if test="registerstatus != null">
        registerStatus,
      </if>
      <if test="failreason != null">
        failReason,
      </if>
      <if test="accountno != null">
        accountNo,
      </if>
      <if test="wechatchannellist != null">
        wechatChannelList,
      </if>
      <if test="phone != null">
        phone,
      </if>
      <if test="createdt != null">
        createDt,
      </if>
      <if test="updatedt != null">
        updateDt,
      </if>
      <if test="aisleswitch != null">
        aisleSwitch,
      </if>
      <if test="certfullphoto != null">
        certFullPhoto,
      </if>
      <if test="certbackphoto != null">
        certBacKPhoto,
      </if>
      <if test="bankcardfrontpic != null">
        bankCardFrontPic,
      </if>
      <if test="userid != null">
        userId,
      </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="storeid != null">
        #{storeid,jdbcType=VARCHAR},
      </if>
      <if test="bankcardno != null">
        #{bankcardno,jdbcType=VARCHAR},
      </if>
      <if test="bankaddressno != null">
        #{bankaddressno,jdbcType=VARCHAR},
      </if>
      <if test="bankcertname != null">
        #{bankcertname,jdbcType=VARCHAR},
      </if>
      <if test="bankname != null">
        #{bankname,jdbcType=VARCHAR},
      </if>
      <if test="branchname != null">
        #{branchname,jdbcType=VARCHAR},
      </if>
      <if test="accounttype != null">
        #{accounttype,jdbcType=VARCHAR},
      </if>
      <if test="contactline != null">
        #{contactline,jdbcType=VARCHAR},
      </if>
      <if test="branchprovince != null">
        #{branchprovince,jdbcType=VARCHAR},
      </if>
      <if test="branchcity != null">
        #{branchcity,jdbcType=VARCHAR},
      </if>
      <if test="brancharea != null">
        #{brancharea,jdbcType=VARCHAR},
      </if>
      <if test="certtype != null">
        #{certtype,jdbcType=VARCHAR},
      </if>
      <if test="certno != null">
        #{certno,jdbcType=VARCHAR},
      </if>
      <if test="certstarttime != null">
        #{certstarttime,jdbcType=VARCHAR},
      </if>
      <if test="certendtime != null">
        #{certendtime,jdbcType=VARCHAR},
      </if>
      <if test="cardholderaddress != null">
        #{cardholderaddress,jdbcType=VARCHAR},
      </if>
      <if test="orderno != null">
        #{orderno,jdbcType=VARCHAR},
      </if>
      <if test="merchantid != null">
        #{merchantid,jdbcType=VARCHAR},
      </if>
      <if test="registerstatus != null">
        #{registerstatus,jdbcType=VARCHAR},
      </if>
      <if test="failreason != null">
        #{failreason,jdbcType=VARCHAR},
      </if>
      <if test="accountno != null">
        #{accountno,jdbcType=VARCHAR},
      </if>
      <if test="wechatchannellist != null">
        #{wechatchannellist,jdbcType=VARCHAR},
      </if>
      <if test="phone != null">
        #{phone,jdbcType=VARCHAR},
      </if>
      <if test="createdt != null">
        #{createdt,jdbcType=TIMESTAMP},
      </if>
      <if test="updatedt != null">
        #{updatedt,jdbcType=TIMESTAMP},
      </if>
      <if test="aisleswitch != null">
        #{aisleswitch,jdbcType=VARCHAR},
      </if>
      <if test="certfullphoto != null">
        #{certfullphoto,jdbcType=VARCHAR},
      </if>
      <if test="certbackphoto != null">
        #{certbackphoto,jdbcType=VARCHAR},
      </if>
      <if test="bankcardfrontpic != null">
        #{bankcardfrontpic,jdbcType=VARCHAR},
      </if>
      <if test="userid != null">
        #{userid,jdbcType=VARCHAR},
      </if>
    </trim>
  </insert>
  <update id="updateByPrimaryKeySelective" parameterType="com.chaozhanggui.dao.system.entity.TbPlussMerchantBankCard">
    update tb_pluss_merchant_bank_card
    <set>
      <if test="merchantcode != null">
        merchantCode = #{merchantcode,jdbcType=VARCHAR},
      </if>
      <if test="storeid != null">
        storeId = #{storeid,jdbcType=VARCHAR},
      </if>
      <if test="bankcardno != null">
        bankCardNo = #{bankcardno,jdbcType=VARCHAR},
      </if>
      <if test="bankaddressno != null">
        bankAddressNo = #{bankaddressno,jdbcType=VARCHAR},
      </if>
      <if test="bankcertname != null">
        bankCertName = #{bankcertname,jdbcType=VARCHAR},
      </if>
      <if test="bankname != null">
        bankName = #{bankname,jdbcType=VARCHAR},
      </if>
      <if test="branchname != null">
        branchName = #{branchname,jdbcType=VARCHAR},
      </if>
      <if test="accounttype != null">
        accountType = #{accounttype,jdbcType=VARCHAR},
      </if>
      <if test="contactline != null">
        contactLine = #{contactline,jdbcType=VARCHAR},
      </if>
      <if test="branchprovince != null">
        branchProvince = #{branchprovince,jdbcType=VARCHAR},
      </if>
      <if test="branchcity != null">
        branchCity = #{branchcity,jdbcType=VARCHAR},
      </if>
      <if test="brancharea != null">
        branchArea = #{brancharea,jdbcType=VARCHAR},
      </if>
      <if test="certtype != null">
        certType = #{certtype,jdbcType=VARCHAR},
      </if>
      <if test="certno != null">
        certNo = #{certno,jdbcType=VARCHAR},
      </if>
      <if test="certstarttime != null">
        certStartTime = #{certstarttime,jdbcType=VARCHAR},
      </if>
      <if test="certendtime != null">
        certEndTime = #{certendtime,jdbcType=VARCHAR},
      </if>
      <if test="cardholderaddress != null">
        cardHolderAddress = #{cardholderaddress,jdbcType=VARCHAR},
      </if>
      <if test="orderno != null">
        orderNo = #{orderno,jdbcType=VARCHAR},
      </if>
      <if test="merchantid != null">
        merchantId = #{merchantid,jdbcType=VARCHAR},
      </if>
      <if test="registerstatus != null">
        registerStatus = #{registerstatus,jdbcType=VARCHAR},
      </if>
      <if test="failreason != null">
        failReason = #{failreason,jdbcType=VARCHAR},
      </if>
      <if test="accountno != null">
        accountNo = #{accountno,jdbcType=VARCHAR},
      </if>
      <if test="wechatchannellist != null">
        wechatChannelList = #{wechatchannellist,jdbcType=VARCHAR},
      </if>
      <if test="phone != null">
        phone = #{phone,jdbcType=VARCHAR},
      </if>
      <if test="createdt != null">
        createDt = #{createdt,jdbcType=TIMESTAMP},
      </if>
      <if test="updatedt != null">
        updateDt = #{updatedt,jdbcType=TIMESTAMP},
      </if>
      <if test="aisleswitch != null">
        aisleSwitch = #{aisleswitch,jdbcType=VARCHAR},
      </if>
      <if test="certfullphoto != null">
        certFullPhoto = #{certfullphoto,jdbcType=VARCHAR},
      </if>
      <if test="certbackphoto != null">
        certBacKPhoto = #{certbackphoto,jdbcType=VARCHAR},
      </if>
      <if test="bankcardfrontpic != null">
        bankCardFrontPic = #{bankcardfrontpic,jdbcType=VARCHAR},
      </if>
      <if test="userid != null">
        userId = #{userid,jdbcType=VARCHAR},
      </if>
    </set>
    where id = #{id,jdbcType=INTEGER}
  </update>
  <update id="updateByPrimaryKey" parameterType="com.chaozhanggui.dao.system.entity.TbPlussMerchantBankCard">
    update tb_pluss_merchant_bank_card
    set merchantCode = #{merchantcode,jdbcType=VARCHAR},
      storeId = #{storeid,jdbcType=VARCHAR},
      bankCardNo = #{bankcardno,jdbcType=VARCHAR},
      bankAddressNo = #{bankaddressno,jdbcType=VARCHAR},
      bankCertName = #{bankcertname,jdbcType=VARCHAR},
      bankName = #{bankname,jdbcType=VARCHAR},
      branchName = #{branchname,jdbcType=VARCHAR},
      accountType = #{accounttype,jdbcType=VARCHAR},
      contactLine = #{contactline,jdbcType=VARCHAR},
      branchProvince = #{branchprovince,jdbcType=VARCHAR},
      branchCity = #{branchcity,jdbcType=VARCHAR},
      branchArea = #{brancharea,jdbcType=VARCHAR},
      certType = #{certtype,jdbcType=VARCHAR},
      certNo = #{certno,jdbcType=VARCHAR},
      certStartTime = #{certstarttime,jdbcType=VARCHAR},
      certEndTime = #{certendtime,jdbcType=VARCHAR},
      cardHolderAddress = #{cardholderaddress,jdbcType=VARCHAR},
      orderNo = #{orderno,jdbcType=VARCHAR},
      merchantId = #{merchantid,jdbcType=VARCHAR},
      registerStatus = #{registerstatus,jdbcType=VARCHAR},
      failReason = #{failreason,jdbcType=VARCHAR},
      accountNo = #{accountno,jdbcType=VARCHAR},
      wechatChannelList = #{wechatchannellist,jdbcType=VARCHAR},
      phone = #{phone,jdbcType=VARCHAR},
      createDt = #{createdt,jdbcType=TIMESTAMP},
      updateDt = #{updatedt,jdbcType=TIMESTAMP},
      aisleSwitch = #{aisleswitch,jdbcType=VARCHAR},
      certFullPhoto = #{certfullphoto,jdbcType=VARCHAR},
      certBacKPhoto = #{certbackphoto,jdbcType=VARCHAR},
      bankCardFrontPic = #{bankcardfrontpic,jdbcType=VARCHAR},
      userId = #{userid,jdbcType=VARCHAR}
    where id = #{id,jdbcType=INTEGER}
  </update>
</mapper>