<?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="cn.superdesk.uniorder.dao.mapper.organisation.SysEnterpriseExtInvoiceMapper">
  <resultMap id="BaseResultMap" type="cn.superdesk.uniorder.dao.entity.organisation.SysEnterpriseExtInvoice">
    <id column="id" jdbcType="BIGINT" property="id" />
    <result column="service_no" jdbcType="INTEGER" property="serviceNo" />
    <result column="serial_number" jdbcType="VARCHAR" property="serialNumber" />
    <result column="sys_org_id" jdbcType="BIGINT" property="sysOrgId" />
    <result column="sys_virt_id" jdbcType="BIGINT" property="sysVirtId" />
    <result column="out_org_id" jdbcType="BIGINT" property="outOrgId" />
    <result column="out_virt_id" jdbcType="BIGINT" property="outVirtId" />
    <result column="invoice_state" jdbcType="INTEGER" property="invoiceState" />
    <result column="invoice_type" jdbcType="INTEGER" property="invoiceType" />
    <result column="selected_invoice_title" jdbcType="INTEGER" property="selectedInvoiceTitle" />
    <result column="realname" jdbcType="VARCHAR" property="realname" />
    <result column="company_name" jdbcType="VARCHAR" property="companyName" />
    <result column="taxpayers_i_d_code" jdbcType="VARCHAR" property="taxpayersIDCode" />
    <result column="invoice_content" jdbcType="INTEGER" property="invoiceContent" />
    <result column="invoice_name" jdbcType="VARCHAR" property="invoiceName" />
    <result column="invoice_phone" jdbcType="VARCHAR" property="invoicePhone" />
    <result column="invoice_email" jdbcType="VARCHAR" property="invoiceEmail" />
    <result column="contacts_name" jdbcType="VARCHAR" property="contactsName" />
    <result column="contacts_email" jdbcType="VARCHAR" property="contactsEmail" />
    <result column="contacts_phone" jdbcType="VARCHAR" property="contactsPhone" />
    <result column="invoice_provice" jdbcType="INTEGER" property="invoiceProvice" />
    <result column="invoice_city" jdbcType="INTEGER" property="invoiceCity" />
    <result column="invoice_county" jdbcType="INTEGER" property="invoiceCounty" />
    <result column="invoice_address" jdbcType="VARCHAR" property="invoiceAddress" />
    <result column="invoice_address_phone" jdbcType="VARCHAR" property="invoiceAddressPhone" />
    <result column="invoice_bank_account_number" jdbcType="VARCHAR" property="invoiceBankAccountNumber" />
    <result column="invoice_bank" jdbcType="VARCHAR" property="invoiceBank" />
    <result column="invoice_account" jdbcType="VARCHAR" property="invoiceAccount" />
    <result column="remark" jdbcType="VARCHAR" property="remark" />
    <result column="is_default" jdbcType="TINYINT" property="isDefault" />
    <result column="deleted" jdbcType="TINYINT" property="deleted" />
    <result column="enabled" jdbcType="TINYINT" property="enabled" />
    <result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
    <result column="create_user_id" jdbcType="BIGINT" property="createUserId" />
    <result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
    <result column="update_user_id" jdbcType="BIGINT" property="updateUserId" />
  </resultMap>
  <sql id="Example_Where_Clause">
    <where>
      <foreach collection="oredCriteria" item="criteria" separator="or">
        <if test="criteria.valid">
          <trim prefix="(" prefixOverrides="and" suffix=")">
            <foreach collection="criteria.criteria" item="criterion">
              <choose>
                <when test="criterion.noValue">
                  and ${criterion.condition}
                </when>
                <when test="criterion.singleValue">
                  and ${criterion.condition} #{criterion.value}
                </when>
                <when test="criterion.betweenValue">
                  and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
                </when>
                <when test="criterion.listValue">
                  and ${criterion.condition}
                  <foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
                    #{listItem}
                  </foreach>
                </when>
              </choose>
            </foreach>
          </trim>
        </if>
      </foreach>
    </where>
  </sql>
  <sql id="Update_By_Example_Where_Clause">
    <where>
      <foreach collection="example.oredCriteria" item="criteria" separator="or">
        <if test="criteria.valid">
          <trim prefix="(" prefixOverrides="and" suffix=")">
            <foreach collection="criteria.criteria" item="criterion">
              <choose>
                <when test="criterion.noValue">
                  and ${criterion.condition}
                </when>
                <when test="criterion.singleValue">
                  and ${criterion.condition} #{criterion.value}
                </when>
                <when test="criterion.betweenValue">
                  and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
                </when>
                <when test="criterion.listValue">
                  and ${criterion.condition}
                  <foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
                    #{listItem}
                  </foreach>
                </when>
              </choose>
            </foreach>
          </trim>
        </if>
      </foreach>
    </where>
  </sql>
  <sql id="Base_Column_List">
    id, service_no, serial_number, sys_org_id, sys_virt_id, out_org_id, out_virt_id,
    invoice_state, invoice_type, selected_invoice_title, realname, company_name, taxpayers_i_d_code,
    invoice_content, invoice_name, invoice_phone, invoice_email, contacts_name, contacts_email,
    contacts_phone, invoice_provice, invoice_city, invoice_county, invoice_address, invoice_address_phone,
    invoice_bank_account_number, invoice_bank, invoice_account, remark, is_default, deleted,
    enabled, create_time, create_user_id, update_time, update_user_id
  </sql>
  <select id="selectByExample" parameterType="cn.superdesk.uniorder.dao.entity.organisation.SysEnterpriseExtInvoiceExample" resultMap="BaseResultMap">
    select
    <if test="distinct">
      distinct
    </if>
    <include refid="Base_Column_List" />
    from sys_enterprise_ext_invoice
    <if test="_parameter != null">
      <include refid="Example_Where_Clause" />
    </if>
    <if test="orderByClause != null">
      order by ${orderByClause}
    </if>
  </select>
  <select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
    select
    <include refid="Base_Column_List" />
    from sys_enterprise_ext_invoice
    where id = #{id,jdbcType=BIGINT}
  </select>
  <delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
    delete from sys_enterprise_ext_invoice
    where id = #{id,jdbcType=BIGINT}
  </delete>
  <delete id="deleteByExample" parameterType="cn.superdesk.uniorder.dao.entity.organisation.SysEnterpriseExtInvoiceExample">
    delete from sys_enterprise_ext_invoice
    <if test="_parameter != null">
      <include refid="Example_Where_Clause" />
    </if>
  </delete>
  <insert id="insert" parameterType="cn.superdesk.uniorder.dao.entity.organisation.SysEnterpriseExtInvoice">
    <selectKey keyProperty="id" order="AFTER" resultType="java.lang.Long">
      SELECT LAST_INSERT_ID()
    </selectKey>
    insert into sys_enterprise_ext_invoice (service_no, serial_number, sys_org_id,
      sys_virt_id, out_org_id, out_virt_id,
      invoice_state, invoice_type, selected_invoice_title,
      realname, company_name, taxpayers_i_d_code,
      invoice_content, invoice_name, invoice_phone,
      invoice_email, contacts_name, contacts_email,
      contacts_phone, invoice_provice, invoice_city,
      invoice_county, invoice_address, invoice_address_phone,
      invoice_bank_account_number, invoice_bank,
      invoice_account, remark, is_default,
      deleted, enabled, create_time,
      create_user_id, update_time, update_user_id
      )
    values (#{serviceNo,jdbcType=INTEGER}, #{serialNumber,jdbcType=VARCHAR}, #{sysOrgId,jdbcType=BIGINT},
      #{sysVirtId,jdbcType=BIGINT}, #{outOrgId,jdbcType=BIGINT}, #{outVirtId,jdbcType=BIGINT},
      #{invoiceState,jdbcType=INTEGER}, #{invoiceType,jdbcType=INTEGER}, #{selectedInvoiceTitle,jdbcType=INTEGER},
      #{realname,jdbcType=VARCHAR}, #{companyName,jdbcType=VARCHAR}, #{taxpayersIDCode,jdbcType=VARCHAR},
      #{invoiceContent,jdbcType=INTEGER}, #{invoiceName,jdbcType=VARCHAR}, #{invoicePhone,jdbcType=VARCHAR},
      #{invoiceEmail,jdbcType=VARCHAR}, #{contactsName,jdbcType=VARCHAR}, #{contactsEmail,jdbcType=VARCHAR},
      #{contactsPhone,jdbcType=VARCHAR}, #{invoiceProvice,jdbcType=INTEGER}, #{invoiceCity,jdbcType=INTEGER},
      #{invoiceCounty,jdbcType=INTEGER}, #{invoiceAddress,jdbcType=VARCHAR}, #{invoiceAddressPhone,jdbcType=VARCHAR},
      #{invoiceBankAccountNumber,jdbcType=VARCHAR}, #{invoiceBank,jdbcType=VARCHAR},
      #{invoiceAccount,jdbcType=VARCHAR}, #{remark,jdbcType=VARCHAR}, #{isDefault,jdbcType=TINYINT},
      #{deleted,jdbcType=TINYINT}, #{enabled,jdbcType=TINYINT}, #{createTime,jdbcType=TIMESTAMP},
      #{createUserId,jdbcType=BIGINT}, #{updateTime,jdbcType=TIMESTAMP}, #{updateUserId,jdbcType=BIGINT}
      )
  </insert>
  <insert id="insertSelective" parameterType="cn.superdesk.uniorder.dao.entity.organisation.SysEnterpriseExtInvoice">
    <selectKey keyProperty="id" order="AFTER" resultType="java.lang.Long">
      SELECT LAST_INSERT_ID()
    </selectKey>
    insert into sys_enterprise_ext_invoice
    <trim prefix="(" suffix=")" suffixOverrides=",">
      <if test="serviceNo != null">
        service_no,
      </if>
      <if test="serialNumber != null">
        serial_number,
      </if>
      <if test="sysOrgId != null">
        sys_org_id,
      </if>
      <if test="sysVirtId != null">
        sys_virt_id,
      </if>
      <if test="outOrgId != null">
        out_org_id,
      </if>
      <if test="outVirtId != null">
        out_virt_id,
      </if>
      <if test="invoiceState != null">
        invoice_state,
      </if>
      <if test="invoiceType != null">
        invoice_type,
      </if>
      <if test="selectedInvoiceTitle != null">
        selected_invoice_title,
      </if>
      <if test="realname != null">
        realname,
      </if>
      <if test="companyName != null">
        company_name,
      </if>
      <if test="taxpayersIDCode != null">
        taxpayers_i_d_code,
      </if>
      <if test="invoiceContent != null">
        invoice_content,
      </if>
      <if test="invoiceName != null">
        invoice_name,
      </if>
      <if test="invoicePhone != null">
        invoice_phone,
      </if>
      <if test="invoiceEmail != null">
        invoice_email,
      </if>
      <if test="contactsName != null">
        contacts_name,
      </if>
      <if test="contactsEmail != null">
        contacts_email,
      </if>
      <if test="contactsPhone != null">
        contacts_phone,
      </if>
      <if test="invoiceProvice != null">
        invoice_provice,
      </if>
      <if test="invoiceCity != null">
        invoice_city,
      </if>
      <if test="invoiceCounty != null">
        invoice_county,
      </if>
      <if test="invoiceAddress != null">
        invoice_address,
      </if>
      <if test="invoiceAddressPhone != null">
        invoice_address_phone,
      </if>
      <if test="invoiceBankAccountNumber != null">
        invoice_bank_account_number,
      </if>
      <if test="invoiceBank != null">
        invoice_bank,
      </if>
      <if test="invoiceAccount != null">
        invoice_account,
      </if>
      <if test="remark != null">
        remark,
      </if>
      <if test="isDefault != null">
        is_default,
      </if>
      <if test="deleted != null">
        deleted,
      </if>
      <if test="enabled != null">
        enabled,
      </if>
      <if test="createTime != null">
        create_time,
      </if>
      <if test="createUserId != null">
        create_user_id,
      </if>
      <if test="updateTime != null">
        update_time,
      </if>
      <if test="updateUserId != null">
        update_user_id,
      </if>
    </trim>
    <trim prefix="values (" suffix=")" suffixOverrides=",">
      <if test="serviceNo != null">
        #{serviceNo,jdbcType=INTEGER},
      </if>
      <if test="serialNumber != null">
        #{serialNumber,jdbcType=VARCHAR},
      </if>
      <if test="sysOrgId != null">
        #{sysOrgId,jdbcType=BIGINT},
      </if>
      <if test="sysVirtId != null">
        #{sysVirtId,jdbcType=BIGINT},
      </if>
      <if test="outOrgId != null">
        #{outOrgId,jdbcType=BIGINT},
      </if>
      <if test="outVirtId != null">
        #{outVirtId,jdbcType=BIGINT},
      </if>
      <if test="invoiceState != null">
        #{invoiceState,jdbcType=INTEGER},
      </if>
      <if test="invoiceType != null">
        #{invoiceType,jdbcType=INTEGER},
      </if>
      <if test="selectedInvoiceTitle != null">
        #{selectedInvoiceTitle,jdbcType=INTEGER},
      </if>
      <if test="realname != null">
        #{realname,jdbcType=VARCHAR},
      </if>
      <if test="companyName != null">
        #{companyName,jdbcType=VARCHAR},
      </if>
      <if test="taxpayersIDCode != null">
        #{taxpayersIDCode,jdbcType=VARCHAR},
      </if>
      <if test="invoiceContent != null">
        #{invoiceContent,jdbcType=INTEGER},
      </if>
      <if test="invoiceName != null">
        #{invoiceName,jdbcType=VARCHAR},
      </if>
      <if test="invoicePhone != null">
        #{invoicePhone,jdbcType=VARCHAR},
      </if>
      <if test="invoiceEmail != null">
        #{invoiceEmail,jdbcType=VARCHAR},
      </if>
      <if test="contactsName != null">
        #{contactsName,jdbcType=VARCHAR},
      </if>
      <if test="contactsEmail != null">
        #{contactsEmail,jdbcType=VARCHAR},
      </if>
      <if test="contactsPhone != null">
        #{contactsPhone,jdbcType=VARCHAR},
      </if>
      <if test="invoiceProvice != null">
        #{invoiceProvice,jdbcType=INTEGER},
      </if>
      <if test="invoiceCity != null">
        #{invoiceCity,jdbcType=INTEGER},
      </if>
      <if test="invoiceCounty != null">
        #{invoiceCounty,jdbcType=INTEGER},
      </if>
      <if test="invoiceAddress != null">
        #{invoiceAddress,jdbcType=VARCHAR},
      </if>
      <if test="invoiceAddressPhone != null">
        #{invoiceAddressPhone,jdbcType=VARCHAR},
      </if>
      <if test="invoiceBankAccountNumber != null">
        #{invoiceBankAccountNumber,jdbcType=VARCHAR},
      </if>
      <if test="invoiceBank != null">
        #{invoiceBank,jdbcType=VARCHAR},
      </if>
      <if test="invoiceAccount != null">
        #{invoiceAccount,jdbcType=VARCHAR},
      </if>
      <if test="remark != null">
        #{remark,jdbcType=VARCHAR},
      </if>
      <if test="isDefault != null">
        #{isDefault,jdbcType=TINYINT},
      </if>
      <if test="deleted != null">
        #{deleted,jdbcType=TINYINT},
      </if>
      <if test="enabled != null">
        #{enabled,jdbcType=TINYINT},
      </if>
      <if test="createTime != null">
        #{createTime,jdbcType=TIMESTAMP},
      </if>
      <if test="createUserId != null">
        #{createUserId,jdbcType=BIGINT},
      </if>
      <if test="updateTime != null">
        #{updateTime,jdbcType=TIMESTAMP},
      </if>
      <if test="updateUserId != null">
        #{updateUserId,jdbcType=BIGINT},
      </if>
    </trim>
  </insert>
  <select id="countByExample" parameterType="cn.superdesk.uniorder.dao.entity.organisation.SysEnterpriseExtInvoiceExample" resultType="java.lang.Long">
    select count(*) from sys_enterprise_ext_invoice
    <if test="_parameter != null">
      <include refid="Example_Where_Clause" />
    </if>
  </select>
  <update id="updateByExampleSelective" parameterType="map">
    update sys_enterprise_ext_invoice
    <set>
      <if test="record.id != null">
        id = #{record.id,jdbcType=BIGINT},
      </if>
      <if test="record.serviceNo != null">
        service_no = #{record.serviceNo,jdbcType=INTEGER},
      </if>
      <if test="record.serialNumber != null">
        serial_number = #{record.serialNumber,jdbcType=VARCHAR},
      </if>
      <if test="record.sysOrgId != null">
        sys_org_id = #{record.sysOrgId,jdbcType=BIGINT},
      </if>
      <if test="record.sysVirtId != null">
        sys_virt_id = #{record.sysVirtId,jdbcType=BIGINT},
      </if>
      <if test="record.outOrgId != null">
        out_org_id = #{record.outOrgId,jdbcType=BIGINT},
      </if>
      <if test="record.outVirtId != null">
        out_virt_id = #{record.outVirtId,jdbcType=BIGINT},
      </if>
      <if test="record.invoiceState != null">
        invoice_state = #{record.invoiceState,jdbcType=INTEGER},
      </if>
      <if test="record.invoiceType != null">
        invoice_type = #{record.invoiceType,jdbcType=INTEGER},
      </if>
      <if test="record.selectedInvoiceTitle != null">
        selected_invoice_title = #{record.selectedInvoiceTitle,jdbcType=INTEGER},
      </if>
      <if test="record.realname != null">
        realname = #{record.realname,jdbcType=VARCHAR},
      </if>
      <if test="record.companyName != null">
        company_name = #{record.companyName,jdbcType=VARCHAR},
      </if>
      <if test="record.taxpayersIDCode != null">
        taxpayers_i_d_code = #{record.taxpayersIDCode,jdbcType=VARCHAR},
      </if>
      <if test="record.invoiceContent != null">
        invoice_content = #{record.invoiceContent,jdbcType=INTEGER},
      </if>
      <if test="record.invoiceName != null">
        invoice_name = #{record.invoiceName,jdbcType=VARCHAR},
      </if>
      <if test="record.invoicePhone != null">
        invoice_phone = #{record.invoicePhone,jdbcType=VARCHAR},
      </if>
      <if test="record.invoiceEmail != null">
        invoice_email = #{record.invoiceEmail,jdbcType=VARCHAR},
      </if>
      <if test="record.contactsName != null">
        contacts_name = #{record.contactsName,jdbcType=VARCHAR},
      </if>
      <if test="record.contactsEmail != null">
        contacts_email = #{record.contactsEmail,jdbcType=VARCHAR},
      </if>
      <if test="record.contactsPhone != null">
        contacts_phone = #{record.contactsPhone,jdbcType=VARCHAR},
      </if>
      <if test="record.invoiceProvice != null">
        invoice_provice = #{record.invoiceProvice,jdbcType=INTEGER},
      </if>
      <if test="record.invoiceCity != null">
        invoice_city = #{record.invoiceCity,jdbcType=INTEGER},
      </if>
      <if test="record.invoiceCounty != null">
        invoice_county = #{record.invoiceCounty,jdbcType=INTEGER},
      </if>
      <if test="record.invoiceAddress != null">
        invoice_address = #{record.invoiceAddress,jdbcType=VARCHAR},
      </if>
      <if test="record.invoiceAddressPhone != null">
        invoice_address_phone = #{record.invoiceAddressPhone,jdbcType=VARCHAR},
      </if>
      <if test="record.invoiceBankAccountNumber != null">
        invoice_bank_account_number = #{record.invoiceBankAccountNumber,jdbcType=VARCHAR},
      </if>
      <if test="record.invoiceBank != null">
        invoice_bank = #{record.invoiceBank,jdbcType=VARCHAR},
      </if>
      <if test="record.invoiceAccount != null">
        invoice_account = #{record.invoiceAccount,jdbcType=VARCHAR},
      </if>
      <if test="record.remark != null">
        remark = #{record.remark,jdbcType=VARCHAR},
      </if>
      <if test="record.isDefault != null">
        is_default = #{record.isDefault,jdbcType=TINYINT},
      </if>
      <if test="record.deleted != null">
        deleted = #{record.deleted,jdbcType=TINYINT},
      </if>
      <if test="record.enabled != null">
        enabled = #{record.enabled,jdbcType=TINYINT},
      </if>
      <if test="record.createTime != null">
        create_time = #{record.createTime,jdbcType=TIMESTAMP},
      </if>
      <if test="record.createUserId != null">
        create_user_id = #{record.createUserId,jdbcType=BIGINT},
      </if>
      <if test="record.updateTime != null">
        update_time = #{record.updateTime,jdbcType=TIMESTAMP},
      </if>
      <if test="record.updateUserId != null">
        update_user_id = #{record.updateUserId,jdbcType=BIGINT},
      </if>
    </set>
    <if test="_parameter != null">
      <include refid="Update_By_Example_Where_Clause" />
    </if>
  </update>
  <update id="updateByExample" parameterType="map">
    update sys_enterprise_ext_invoice
    set id = #{record.id,jdbcType=BIGINT},
      service_no = #{record.serviceNo,jdbcType=INTEGER},
      serial_number = #{record.serialNumber,jdbcType=VARCHAR},
      sys_org_id = #{record.sysOrgId,jdbcType=BIGINT},
      sys_virt_id = #{record.sysVirtId,jdbcType=BIGINT},
      out_org_id = #{record.outOrgId,jdbcType=BIGINT},
      out_virt_id = #{record.outVirtId,jdbcType=BIGINT},
      invoice_state = #{record.invoiceState,jdbcType=INTEGER},
      invoice_type = #{record.invoiceType,jdbcType=INTEGER},
      selected_invoice_title = #{record.selectedInvoiceTitle,jdbcType=INTEGER},
      realname = #{record.realname,jdbcType=VARCHAR},
      company_name = #{record.companyName,jdbcType=VARCHAR},
      taxpayers_i_d_code = #{record.taxpayersIDCode,jdbcType=VARCHAR},
      invoice_content = #{record.invoiceContent,jdbcType=INTEGER},
      invoice_name = #{record.invoiceName,jdbcType=VARCHAR},
      invoice_phone = #{record.invoicePhone,jdbcType=VARCHAR},
      invoice_email = #{record.invoiceEmail,jdbcType=VARCHAR},
      contacts_name = #{record.contactsName,jdbcType=VARCHAR},
      contacts_email = #{record.contactsEmail,jdbcType=VARCHAR},
      contacts_phone = #{record.contactsPhone,jdbcType=VARCHAR},
      invoice_provice = #{record.invoiceProvice,jdbcType=INTEGER},
      invoice_city = #{record.invoiceCity,jdbcType=INTEGER},
      invoice_county = #{record.invoiceCounty,jdbcType=INTEGER},
      invoice_address = #{record.invoiceAddress,jdbcType=VARCHAR},
      invoice_address_phone = #{record.invoiceAddressPhone,jdbcType=VARCHAR},
      invoice_bank_account_number = #{record.invoiceBankAccountNumber,jdbcType=VARCHAR},
      invoice_bank = #{record.invoiceBank,jdbcType=VARCHAR},
      invoice_account = #{record.invoiceAccount,jdbcType=VARCHAR},
      remark = #{record.remark,jdbcType=VARCHAR},
      is_default = #{record.isDefault,jdbcType=TINYINT},
      deleted = #{record.deleted,jdbcType=TINYINT},
      enabled = #{record.enabled,jdbcType=TINYINT},
      create_time = #{record.createTime,jdbcType=TIMESTAMP},
      create_user_id = #{record.createUserId,jdbcType=BIGINT},
      update_time = #{record.updateTime,jdbcType=TIMESTAMP},
      update_user_id = #{record.updateUserId,jdbcType=BIGINT}
    <if test="_parameter != null">
      <include refid="Update_By_Example_Where_Clause" />
    </if>
  </update>
  <update id="updateByPrimaryKeySelective" parameterType="cn.superdesk.uniorder.dao.entity.organisation.SysEnterpriseExtInvoice">
    update sys_enterprise_ext_invoice
    <set>
      <if test="serviceNo != null">
        service_no = #{serviceNo,jdbcType=INTEGER},
      </if>
      <if test="serialNumber != null">
        serial_number = #{serialNumber,jdbcType=VARCHAR},
      </if>
      <if test="sysOrgId != null">
        sys_org_id = #{sysOrgId,jdbcType=BIGINT},
      </if>
      <if test="sysVirtId != null">
        sys_virt_id = #{sysVirtId,jdbcType=BIGINT},
      </if>
      <if test="outOrgId != null">
        out_org_id = #{outOrgId,jdbcType=BIGINT},
      </if>
      <if test="outVirtId != null">
        out_virt_id = #{outVirtId,jdbcType=BIGINT},
      </if>
      <if test="invoiceState != null">
        invoice_state = #{invoiceState,jdbcType=INTEGER},
      </if>
      <if test="invoiceType != null">
        invoice_type = #{invoiceType,jdbcType=INTEGER},
      </if>
      <if test="selectedInvoiceTitle != null">
        selected_invoice_title = #{selectedInvoiceTitle,jdbcType=INTEGER},
      </if>
      <if test="realname != null">
        realname = #{realname,jdbcType=VARCHAR},
      </if>
      <if test="companyName != null">
        company_name = #{companyName,jdbcType=VARCHAR},
      </if>
      <if test="taxpayersIDCode != null">
        taxpayers_i_d_code = #{taxpayersIDCode,jdbcType=VARCHAR},
      </if>
      <if test="invoiceContent != null">
        invoice_content = #{invoiceContent,jdbcType=INTEGER},
      </if>
      <if test="invoiceName != null">
        invoice_name = #{invoiceName,jdbcType=VARCHAR},
      </if>
      <if test="invoicePhone != null">
        invoice_phone = #{invoicePhone,jdbcType=VARCHAR},
      </if>
      <if test="invoiceEmail != null">
        invoice_email = #{invoiceEmail,jdbcType=VARCHAR},
      </if>
      <if test="contactsName != null">
        contacts_name = #{contactsName,jdbcType=VARCHAR},
      </if>
      <if test="contactsEmail != null">
        contacts_email = #{contactsEmail,jdbcType=VARCHAR},
      </if>
      <if test="contactsPhone != null">
        contacts_phone = #{contactsPhone,jdbcType=VARCHAR},
      </if>
      <if test="invoiceProvice != null">
        invoice_provice = #{invoiceProvice,jdbcType=INTEGER},
      </if>
      <if test="invoiceCity != null">
        invoice_city = #{invoiceCity,jdbcType=INTEGER},
      </if>
      <if test="invoiceCounty != null">
        invoice_county = #{invoiceCounty,jdbcType=INTEGER},
      </if>
      <if test="invoiceAddress != null">
        invoice_address = #{invoiceAddress,jdbcType=VARCHAR},
      </if>
      <if test="invoiceAddressPhone != null">
        invoice_address_phone = #{invoiceAddressPhone,jdbcType=VARCHAR},
      </if>
      <if test="invoiceBankAccountNumber != null">
        invoice_bank_account_number = #{invoiceBankAccountNumber,jdbcType=VARCHAR},
      </if>
      <if test="invoiceBank != null">
        invoice_bank = #{invoiceBank,jdbcType=VARCHAR},
      </if>
      <if test="invoiceAccount != null">
        invoice_account = #{invoiceAccount,jdbcType=VARCHAR},
      </if>
      <if test="remark != null">
        remark = #{remark,jdbcType=VARCHAR},
      </if>
      <if test="isDefault != null">
        is_default = #{isDefault,jdbcType=TINYINT},
      </if>
      <if test="deleted != null">
        deleted = #{deleted,jdbcType=TINYINT},
      </if>
      <if test="enabled != null">
        enabled = #{enabled,jdbcType=TINYINT},
      </if>
      <if test="createTime != null">
        create_time = #{createTime,jdbcType=TIMESTAMP},
      </if>
      <if test="createUserId != null">
        create_user_id = #{createUserId,jdbcType=BIGINT},
      </if>
      <if test="updateTime != null">
        update_time = #{updateTime,jdbcType=TIMESTAMP},
      </if>
      <if test="updateUserId != null">
        update_user_id = #{updateUserId,jdbcType=BIGINT},
      </if>
    </set>
    where id = #{id,jdbcType=BIGINT}
  </update>
  <update id="updateByPrimaryKey" parameterType="cn.superdesk.uniorder.dao.entity.organisation.SysEnterpriseExtInvoice">
    update sys_enterprise_ext_invoice
    set service_no = #{serviceNo,jdbcType=INTEGER},
      serial_number = #{serialNumber,jdbcType=VARCHAR},
      sys_org_id = #{sysOrgId,jdbcType=BIGINT},
      sys_virt_id = #{sysVirtId,jdbcType=BIGINT},
      out_org_id = #{outOrgId,jdbcType=BIGINT},
      out_virt_id = #{outVirtId,jdbcType=BIGINT},
      invoice_state = #{invoiceState,jdbcType=INTEGER},
      invoice_type = #{invoiceType,jdbcType=INTEGER},
      selected_invoice_title = #{selectedInvoiceTitle,jdbcType=INTEGER},
      realname = #{realname,jdbcType=VARCHAR},
      company_name = #{companyName,jdbcType=VARCHAR},
      taxpayers_i_d_code = #{taxpayersIDCode,jdbcType=VARCHAR},
      invoice_content = #{invoiceContent,jdbcType=INTEGER},
      invoice_name = #{invoiceName,jdbcType=VARCHAR},
      invoice_phone = #{invoicePhone,jdbcType=VARCHAR},
      invoice_email = #{invoiceEmail,jdbcType=VARCHAR},
      contacts_name = #{contactsName,jdbcType=VARCHAR},
      contacts_email = #{contactsEmail,jdbcType=VARCHAR},
      contacts_phone = #{contactsPhone,jdbcType=VARCHAR},
      invoice_provice = #{invoiceProvice,jdbcType=INTEGER},
      invoice_city = #{invoiceCity,jdbcType=INTEGER},
      invoice_county = #{invoiceCounty,jdbcType=INTEGER},
      invoice_address = #{invoiceAddress,jdbcType=VARCHAR},
      invoice_address_phone = #{invoiceAddressPhone,jdbcType=VARCHAR},
      invoice_bank_account_number = #{invoiceBankAccountNumber,jdbcType=VARCHAR},
      invoice_bank = #{invoiceBank,jdbcType=VARCHAR},
      invoice_account = #{invoiceAccount,jdbcType=VARCHAR},
      remark = #{remark,jdbcType=VARCHAR},
      is_default = #{isDefault,jdbcType=TINYINT},
      deleted = #{deleted,jdbcType=TINYINT},
      enabled = #{enabled,jdbcType=TINYINT},
      create_time = #{createTime,jdbcType=TIMESTAMP},
      create_user_id = #{createUserId,jdbcType=BIGINT},
      update_time = #{updateTime,jdbcType=TIMESTAMP},
      update_user_id = #{updateUserId,jdbcType=BIGINT}
    where id = #{id,jdbcType=BIGINT}
  </update>
</mapper>
