<?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="resources/basecode.CClientInvoiceMapper">
  <resultMap id="BaseResultMap" type="com.ag.dynamicmodule.basecode.pojo.CClientInvoice">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
    <id column="ID" jdbcType="VARCHAR" property="id" />
    <result column="CLIENT_CODE" jdbcType="VARCHAR" property="clientCode" />
    <result column="INV_NAME" jdbcType="VARCHAR" property="invName" />
    <result column="ADDRESS_CH" jdbcType="VARCHAR" property="addressCh" />
    <result column="ADDRESS_EN" jdbcType="VARCHAR" property="addressEn" />
    <result column="RELA_TELEX" jdbcType="VARCHAR" property="relaTelex" />
    <result column="RELA_MAN" jdbcType="VARCHAR" property="relaMan" />
    <result column="SETTLE_WAY_ID" jdbcType="VARCHAR" property="settleWayId" />
    <result column="INV_KIND_FLAG" jdbcType="VARCHAR" property="invKindFlag" />
    <result column="INV_TAX_RATE" jdbcType="DECIMAL" property="invTaxRate" />
    <result column="INV_TAX_NO" jdbcType="VARCHAR" property="invTaxNo" />
    <result column="INV_TEL" jdbcType="VARCHAR" property="invTel" />
    <result column="INV_ADDRESS" jdbcType="VARCHAR" property="invAddress" />
    <result column="INV_CNY_BANK" jdbcType="VARCHAR" property="invCnyBank" />
    <result column="INV_CNY_BANK_NO" jdbcType="VARCHAR" property="invCnyBankNo" />
    <result column="INV_USD_BANK" jdbcType="VARCHAR" property="invUsdBank" />
    <result column="INV_USD_BANK_NO" jdbcType="VARCHAR" property="invUsdBankNo" />
    <result column="NOTES" jdbcType="VARCHAR" property="notes" />
    <result column="CREATED_BY" jdbcType="VARCHAR" property="createdBy" />
    <result column="CREATED_ON" jdbcType="TIMESTAMP" property="createdOn" />
    <result column="UPDATED_BY" jdbcType="VARCHAR" property="updatedBy" />
    <result column="UPDATED_ON" jdbcType="TIMESTAMP" property="updatedOn" />
  </resultMap>
  <sql id="Base_Column_List">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
    ID, CLIENT_CODE, INV_NAME, ADDRESS_CH, ADDRESS_EN, RELA_TELEX, RELA_MAN, SETTLE_WAY_ID, 
    INV_KIND_FLAG, INV_TAX_RATE, INV_TAX_NO, INV_TEL, INV_ADDRESS, INV_CNY_BANK, INV_CNY_BANK_NO, 
    INV_USD_BANK, INV_USD_BANK_NO, NOTES, CREATED_BY, CREATED_ON, UPDATED_BY, UPDATED_ON
  </sql>
  <select id="selectByPrimaryKey" parameterType="java.lang.String" resultMap="BaseResultMap">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
    select 
    <include refid="Base_Column_List" />
    from c_client_invoice
    where ID = #{id,jdbcType=VARCHAR}
  </select>
  <delete id="deleteByPrimaryKey" parameterType="java.lang.String">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
    delete from c_client_invoice
    where ID = #{id,jdbcType=VARCHAR}
  </delete>
  <insert id="insert" parameterType="com.ag.dynamicmodule.basecode.pojo.CClientInvoice">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
    insert into c_client_invoice (ID, CLIENT_CODE, INV_NAME, 
      ADDRESS_CH, ADDRESS_EN, RELA_TELEX, 
      RELA_MAN, SETTLE_WAY_ID, INV_KIND_FLAG, 
      INV_TAX_RATE, INV_TAX_NO, INV_TEL, 
      INV_ADDRESS, INV_CNY_BANK, INV_CNY_BANK_NO, 
      INV_USD_BANK, INV_USD_BANK_NO, NOTES, 
      CREATED_BY, CREATED_ON, UPDATED_BY, 
      UPDATED_ON)
    values (#{id,jdbcType=VARCHAR}, #{clientCode,jdbcType=VARCHAR}, #{invName,jdbcType=VARCHAR}, 
      #{addressCh,jdbcType=VARCHAR}, #{addressEn,jdbcType=VARCHAR}, #{relaTelex,jdbcType=VARCHAR}, 
      #{relaMan,jdbcType=VARCHAR}, #{settleWayId,jdbcType=VARCHAR}, #{invKindFlag,jdbcType=VARCHAR}, 
      #{invTaxRate,jdbcType=DECIMAL}, #{invTaxNo,jdbcType=VARCHAR}, #{invTel,jdbcType=VARCHAR}, 
      #{invAddress,jdbcType=VARCHAR}, #{invCnyBank,jdbcType=VARCHAR}, #{invCnyBankNo,jdbcType=VARCHAR}, 
      #{invUsdBank,jdbcType=VARCHAR}, #{invUsdBankNo,jdbcType=VARCHAR}, #{notes,jdbcType=VARCHAR}, 
      #{createdBy,jdbcType=VARCHAR}, #{createdOn,jdbcType=TIMESTAMP}, #{updatedBy,jdbcType=VARCHAR}, 
      #{updatedOn,jdbcType=TIMESTAMP})
  </insert>
  <insert id="insertSelective" parameterType="com.ag.dynamicmodule.basecode.pojo.CClientInvoice">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
    insert into c_client_invoice
    <trim prefix="(" suffix=")" suffixOverrides=",">
      <if test="id != null">
        ID,
      </if>
      <if test="clientCode != null">
        CLIENT_CODE,
      </if>
      <if test="invName != null">
        INV_NAME,
      </if>
      <if test="addressCh != null">
        ADDRESS_CH,
      </if>
      <if test="addressEn != null">
        ADDRESS_EN,
      </if>
      <if test="relaTelex != null">
        RELA_TELEX,
      </if>
      <if test="relaMan != null">
        RELA_MAN,
      </if>
      <if test="settleWayId != null">
        SETTLE_WAY_ID,
      </if>
      <if test="invKindFlag != null">
        INV_KIND_FLAG,
      </if>
      <if test="invTaxRate != null">
        INV_TAX_RATE,
      </if>
      <if test="invTaxNo != null">
        INV_TAX_NO,
      </if>
      <if test="invTel != null">
        INV_TEL,
      </if>
      <if test="invAddress != null">
        INV_ADDRESS,
      </if>
      <if test="invCnyBank != null">
        INV_CNY_BANK,
      </if>
      <if test="invCnyBankNo != null">
        INV_CNY_BANK_NO,
      </if>
      <if test="invUsdBank != null">
        INV_USD_BANK,
      </if>
      <if test="invUsdBankNo != null">
        INV_USD_BANK_NO,
      </if>
      <if test="notes != null">
        NOTES,
      </if>
      <if test="createdBy != null">
        CREATED_BY,
      </if>
      <if test="createdOn != null">
        CREATED_ON,
      </if>
      <if test="updatedBy != null">
        UPDATED_BY,
      </if>
      <if test="updatedOn != null">
        UPDATED_ON,
      </if>
    </trim>
    <trim prefix="values (" suffix=")" suffixOverrides=",">
      <if test="id != null">
        #{id,jdbcType=VARCHAR},
      </if>
      <if test="clientCode != null">
        #{clientCode,jdbcType=VARCHAR},
      </if>
      <if test="invName != null">
        #{invName,jdbcType=VARCHAR},
      </if>
      <if test="addressCh != null">
        #{addressCh,jdbcType=VARCHAR},
      </if>
      <if test="addressEn != null">
        #{addressEn,jdbcType=VARCHAR},
      </if>
      <if test="relaTelex != null">
        #{relaTelex,jdbcType=VARCHAR},
      </if>
      <if test="relaMan != null">
        #{relaMan,jdbcType=VARCHAR},
      </if>
      <if test="settleWayId != null">
        #{settleWayId,jdbcType=VARCHAR},
      </if>
      <if test="invKindFlag != null">
        #{invKindFlag,jdbcType=VARCHAR},
      </if>
      <if test="invTaxRate != null">
        #{invTaxRate,jdbcType=DECIMAL},
      </if>
      <if test="invTaxNo != null">
        #{invTaxNo,jdbcType=VARCHAR},
      </if>
      <if test="invTel != null">
        #{invTel,jdbcType=VARCHAR},
      </if>
      <if test="invAddress != null">
        #{invAddress,jdbcType=VARCHAR},
      </if>
      <if test="invCnyBank != null">
        #{invCnyBank,jdbcType=VARCHAR},
      </if>
      <if test="invCnyBankNo != null">
        #{invCnyBankNo,jdbcType=VARCHAR},
      </if>
      <if test="invUsdBank != null">
        #{invUsdBank,jdbcType=VARCHAR},
      </if>
      <if test="invUsdBankNo != null">
        #{invUsdBankNo,jdbcType=VARCHAR},
      </if>
      <if test="notes != null">
        #{notes,jdbcType=VARCHAR},
      </if>
      <if test="createdBy != null">
        #{createdBy,jdbcType=VARCHAR},
      </if>
      <if test="createdOn != null">
        #{createdOn,jdbcType=TIMESTAMP},
      </if>
      <if test="updatedBy != null">
        #{updatedBy,jdbcType=VARCHAR},
      </if>
      <if test="updatedOn != null">
        #{updatedOn,jdbcType=TIMESTAMP},
      </if>
    </trim>
  </insert>
  <update id="updateByPrimaryKeySelective" parameterType="com.ag.dynamicmodule.basecode.pojo.CClientInvoice">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
    update c_client_invoice
    <set>
      <if test="clientCode != null">
        CLIENT_CODE = #{clientCode,jdbcType=VARCHAR},
      </if>
      <if test="invName != null">
        INV_NAME = #{invName,jdbcType=VARCHAR},
      </if>
      <if test="addressCh != null">
        ADDRESS_CH = #{addressCh,jdbcType=VARCHAR},
      </if>
      <if test="addressEn != null">
        ADDRESS_EN = #{addressEn,jdbcType=VARCHAR},
      </if>
      <if test="relaTelex != null">
        RELA_TELEX = #{relaTelex,jdbcType=VARCHAR},
      </if>
      <if test="relaMan != null">
        RELA_MAN = #{relaMan,jdbcType=VARCHAR},
      </if>
      <if test="settleWayId != null">
        SETTLE_WAY_ID = #{settleWayId,jdbcType=VARCHAR},
      </if>
      <if test="invKindFlag != null">
        INV_KIND_FLAG = #{invKindFlag,jdbcType=VARCHAR},
      </if>
      <if test="invTaxRate != null">
        INV_TAX_RATE = #{invTaxRate,jdbcType=DECIMAL},
      </if>
      <if test="invTaxNo != null">
        INV_TAX_NO = #{invTaxNo,jdbcType=VARCHAR},
      </if>
      <if test="invTel != null">
        INV_TEL = #{invTel,jdbcType=VARCHAR},
      </if>
      <if test="invAddress != null">
        INV_ADDRESS = #{invAddress,jdbcType=VARCHAR},
      </if>
      <if test="invCnyBank != null">
        INV_CNY_BANK = #{invCnyBank,jdbcType=VARCHAR},
      </if>
      <if test="invCnyBankNo != null">
        INV_CNY_BANK_NO = #{invCnyBankNo,jdbcType=VARCHAR},
      </if>
      <if test="invUsdBank != null">
        INV_USD_BANK = #{invUsdBank,jdbcType=VARCHAR},
      </if>
      <if test="invUsdBankNo != null">
        INV_USD_BANK_NO = #{invUsdBankNo,jdbcType=VARCHAR},
      </if>
      <if test="notes != null">
        NOTES = #{notes,jdbcType=VARCHAR},
      </if>
      <if test="createdBy != null">
        CREATED_BY = #{createdBy,jdbcType=VARCHAR},
      </if>
      <if test="createdOn != null">
        CREATED_ON = #{createdOn,jdbcType=TIMESTAMP},
      </if>
      <if test="updatedBy != null">
        UPDATED_BY = #{updatedBy,jdbcType=VARCHAR},
      </if>
      <if test="updatedOn != null">
        UPDATED_ON = #{updatedOn,jdbcType=TIMESTAMP},
      </if>
    </set>
    where ID = #{id,jdbcType=VARCHAR}
  </update>
  <update id="updateByPrimaryKey" parameterType="com.ag.dynamicmodule.basecode.pojo.CClientInvoice">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
    update c_client_invoice
    set CLIENT_CODE = #{clientCode,jdbcType=VARCHAR},
      INV_NAME = #{invName,jdbcType=VARCHAR},
      ADDRESS_CH = #{addressCh,jdbcType=VARCHAR},
      ADDRESS_EN = #{addressEn,jdbcType=VARCHAR},
      RELA_TELEX = #{relaTelex,jdbcType=VARCHAR},
      RELA_MAN = #{relaMan,jdbcType=VARCHAR},
      SETTLE_WAY_ID = #{settleWayId,jdbcType=VARCHAR},
      INV_KIND_FLAG = #{invKindFlag,jdbcType=VARCHAR},
      INV_TAX_RATE = #{invTaxRate,jdbcType=DECIMAL},
      INV_TAX_NO = #{invTaxNo,jdbcType=VARCHAR},
      INV_TEL = #{invTel,jdbcType=VARCHAR},
      INV_ADDRESS = #{invAddress,jdbcType=VARCHAR},
      INV_CNY_BANK = #{invCnyBank,jdbcType=VARCHAR},
      INV_CNY_BANK_NO = #{invCnyBankNo,jdbcType=VARCHAR},
      INV_USD_BANK = #{invUsdBank,jdbcType=VARCHAR},
      INV_USD_BANK_NO = #{invUsdBankNo,jdbcType=VARCHAR},
      NOTES = #{notes,jdbcType=VARCHAR},
      CREATED_BY = #{createdBy,jdbcType=VARCHAR},
      CREATED_ON = #{createdOn,jdbcType=TIMESTAMP},
      UPDATED_BY = #{updatedBy,jdbcType=VARCHAR},
      UPDATED_ON = #{updatedOn,jdbcType=TIMESTAMP}
    where ID = #{id,jdbcType=VARCHAR}
  </update>
</mapper>