<?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.invoice.common.InvoiceTypeMapper">
  <resultMap id="BaseResultMap" type="cn.superdesk.uniorder.dao.entity.invoice.common.InvoiceType">
    <id column="id" jdbcType="BIGINT" property="id" />
    <result column="type_name" jdbcType="VARCHAR" property="typeName" />
    <result column="tax_bureau_invoice_type_name" jdbcType="VARCHAR" property="taxBureauInvoiceTypeName" />
    <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" />
    <result column="customer_goods_enable" jdbcType="TINYINT" property="customerGoodsEnable" />
    <result column="customer_credit_enable" jdbcType="TINYINT" property="customerCreditEnable" />
    <result column="supplier_goods_enable" jdbcType="TINYINT" property="supplierGoodsEnable" />
    <result column="customer_goods_mode_off_line_enable" jdbcType="TINYINT" property="customerGoodsModeOffLineEnable" />
    <result column="customer_credit_mode_off_line_enable" jdbcType="TINYINT" property="customerCreditModeOffLineEnable" />
    <result column="supplier_goods_mode_off_line_enable" jdbcType="TINYINT" property="supplierGoodsModeOffLineEnable" />
    <result column="customer_goods_mode_szhtxx_electronic_invoice_enable" jdbcType="TINYINT" property="customerGoodsModeSzhtxxElectronicInvoiceEnable" />
    <result column="customer_credit_mode_szhtxx_electronic_invoice_enable" jdbcType="TINYINT" property="customerCreditModeSzhtxxElectronicInvoiceEnable" />
    <result column="supplier_goods_mode_szhtxx_electronic_invoice_enable" jdbcType="TINYINT" property="supplierGoodsModeSzhtxxElectronicInvoiceEnable" />
    <result column="customer_goods_is_default" jdbcType="TINYINT" property="customerGoodsIsDefault" />
    <result column="customer_credit_is_default" jdbcType="TINYINT" property="customerCreditIsDefault" />
    <result column="supplier_goods_is_default" jdbcType="TINYINT" property="supplierGoodsIsDefault" />
    <result column="customer_goods_mode_szhtxx_paper_invoice_enable" jdbcType="TINYINT" property="customerGoodsModeSzhtxxPaperInvoiceEnable" />
    <result column="customer_credit_mode_szhtxx_paper_invoice_enable" jdbcType="TINYINT" property="customerCreditModeSzhtxxPaperInvoiceEnable" />
    <result column="supplier_goods_mode_szhtxx_paper_invoice_enable" jdbcType="TINYINT" property="supplierGoodsModeSzhtxxPaperInvoiceEnable" />
    <result column="customer_goods_update_time" jdbcType="TIMESTAMP" property="customerGoodsUpdateTime" />
    <result column="customer_credit_update_time" jdbcType="TIMESTAMP" property="customerCreditUpdateTime" />
    <result column="supplier_goods_update_time" jdbcType="TIMESTAMP" property="supplierGoodsUpdateTime" />
    <result column="customer_goods_update_user_id" jdbcType="BIGINT" property="customerGoodsUpdateUserId" />
    <result column="customer_credit_update_user_id" jdbcType="BIGINT" property="customerCreditUpdateUserId" />
    <result column="supplier_goods_update_user_id" jdbcType="BIGINT" property="supplierGoodsUpdateUserId" />
    <result column="customer_goods_update_user_name" jdbcType="VARCHAR" property="customerGoodsUpdateUserName" />
    <result column="customer_credit_update_user_name" jdbcType="VARCHAR" property="customerCreditUpdateUserName" />
    <result column="supplier_goods_update_user_name" jdbcType="VARCHAR" property="supplierGoodsUpdateUserName" />
  </resultMap>
  <resultMap extends="BaseResultMap" id="ResultMapWithBLOBs" type="cn.superdesk.uniorder.dao.entity.invoice.common.InvoiceType">
    <result column="moudel_x_mode_is_default_struct" jdbcType="LONGVARCHAR" property="moudelXModeIsDefaultStruct" />
  </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, type_name, tax_bureau_invoice_type_name, create_time, create_user_id, update_time, 
    update_user_id, customer_goods_enable, customer_credit_enable, supplier_goods_enable, 
    customer_goods_mode_off_line_enable, customer_credit_mode_off_line_enable, supplier_goods_mode_off_line_enable, 
    customer_goods_mode_szhtxx_electronic_invoice_enable, customer_credit_mode_szhtxx_electronic_invoice_enable, 
    supplier_goods_mode_szhtxx_electronic_invoice_enable, customer_goods_is_default, 
    customer_credit_is_default, supplier_goods_is_default, customer_goods_mode_szhtxx_paper_invoice_enable, 
    customer_credit_mode_szhtxx_paper_invoice_enable, supplier_goods_mode_szhtxx_paper_invoice_enable, 
    customer_goods_update_time, customer_credit_update_time, supplier_goods_update_time, 
    customer_goods_update_user_id, customer_credit_update_user_id, supplier_goods_update_user_id, 
    customer_goods_update_user_name, customer_credit_update_user_name, supplier_goods_update_user_name
  </sql>
  <sql id="Blob_Column_List">
    moudel_x_mode_is_default_struct
  </sql>
  <select id="selectByExampleWithBLOBs" parameterType="cn.superdesk.uniorder.dao.entity.invoice.common.InvoiceTypeExample" resultMap="ResultMapWithBLOBs">
    select
    <if test="distinct">
      distinct
    </if>
    <include refid="Base_Column_List" />
    ,
    <include refid="Blob_Column_List" />
    from invoice_type
    <if test="_parameter != null">
      <include refid="Example_Where_Clause" />
    </if>
    <if test="orderByClause != null">
      order by ${orderByClause}
    </if>
  </select>
  <select id="selectByExample" parameterType="cn.superdesk.uniorder.dao.entity.invoice.common.InvoiceTypeExample" resultMap="BaseResultMap">
    select
    <if test="distinct">
      distinct
    </if>
    <include refid="Base_Column_List" />
    from invoice_type
    <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="ResultMapWithBLOBs">
    select 
    <include refid="Base_Column_List" />
    ,
    <include refid="Blob_Column_List" />
    from invoice_type
    where id = #{id,jdbcType=BIGINT}
  </select>
  <delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
    delete from invoice_type
    where id = #{id,jdbcType=BIGINT}
  </delete>
  <delete id="deleteByExample" parameterType="cn.superdesk.uniorder.dao.entity.invoice.common.InvoiceTypeExample">
    delete from invoice_type
    <if test="_parameter != null">
      <include refid="Example_Where_Clause" />
    </if>
  </delete>
  <insert id="insert" parameterType="cn.superdesk.uniorder.dao.entity.invoice.common.InvoiceType">
    <selectKey keyProperty="id" order="AFTER" resultType="java.lang.Long">
      SELECT LAST_INSERT_ID()
    </selectKey>
    insert into invoice_type (type_name, tax_bureau_invoice_type_name, 
      create_time, create_user_id, update_time, 
      update_user_id, customer_goods_enable, customer_credit_enable, 
      supplier_goods_enable, customer_goods_mode_off_line_enable, 
      customer_credit_mode_off_line_enable, supplier_goods_mode_off_line_enable, 
      customer_goods_mode_szhtxx_electronic_invoice_enable, customer_credit_mode_szhtxx_electronic_invoice_enable, 
      supplier_goods_mode_szhtxx_electronic_invoice_enable, customer_goods_is_default, 
      customer_credit_is_default, supplier_goods_is_default, 
      customer_goods_mode_szhtxx_paper_invoice_enable, customer_credit_mode_szhtxx_paper_invoice_enable, 
      supplier_goods_mode_szhtxx_paper_invoice_enable, customer_goods_update_time, 
      customer_credit_update_time, supplier_goods_update_time, 
      customer_goods_update_user_id, customer_credit_update_user_id, 
      supplier_goods_update_user_id, customer_goods_update_user_name, 
      customer_credit_update_user_name, supplier_goods_update_user_name, 
      moudel_x_mode_is_default_struct)
    values (#{typeName,jdbcType=VARCHAR}, #{taxBureauInvoiceTypeName,jdbcType=VARCHAR}, 
      #{createTime,jdbcType=TIMESTAMP}, #{createUserId,jdbcType=BIGINT}, #{updateTime,jdbcType=TIMESTAMP}, 
      #{updateUserId,jdbcType=BIGINT}, #{customerGoodsEnable,jdbcType=TINYINT}, #{customerCreditEnable,jdbcType=TINYINT}, 
      #{supplierGoodsEnable,jdbcType=TINYINT}, #{customerGoodsModeOffLineEnable,jdbcType=TINYINT}, 
      #{customerCreditModeOffLineEnable,jdbcType=TINYINT}, #{supplierGoodsModeOffLineEnable,jdbcType=TINYINT}, 
      #{customerGoodsModeSzhtxxElectronicInvoiceEnable,jdbcType=TINYINT}, #{customerCreditModeSzhtxxElectronicInvoiceEnable,jdbcType=TINYINT}, 
      #{supplierGoodsModeSzhtxxElectronicInvoiceEnable,jdbcType=TINYINT}, #{customerGoodsIsDefault,jdbcType=TINYINT}, 
      #{customerCreditIsDefault,jdbcType=TINYINT}, #{supplierGoodsIsDefault,jdbcType=TINYINT}, 
      #{customerGoodsModeSzhtxxPaperInvoiceEnable,jdbcType=TINYINT}, #{customerCreditModeSzhtxxPaperInvoiceEnable,jdbcType=TINYINT}, 
      #{supplierGoodsModeSzhtxxPaperInvoiceEnable,jdbcType=TINYINT}, #{customerGoodsUpdateTime,jdbcType=TIMESTAMP}, 
      #{customerCreditUpdateTime,jdbcType=TIMESTAMP}, #{supplierGoodsUpdateTime,jdbcType=TIMESTAMP}, 
      #{customerGoodsUpdateUserId,jdbcType=BIGINT}, #{customerCreditUpdateUserId,jdbcType=BIGINT}, 
      #{supplierGoodsUpdateUserId,jdbcType=BIGINT}, #{customerGoodsUpdateUserName,jdbcType=VARCHAR}, 
      #{customerCreditUpdateUserName,jdbcType=VARCHAR}, #{supplierGoodsUpdateUserName,jdbcType=VARCHAR}, 
      #{moudelXModeIsDefaultStruct,jdbcType=LONGVARCHAR})
  </insert>
  <insert id="insertSelective" parameterType="cn.superdesk.uniorder.dao.entity.invoice.common.InvoiceType">
    <selectKey keyProperty="id" order="AFTER" resultType="java.lang.Long">
      SELECT LAST_INSERT_ID()
    </selectKey>
    insert into invoice_type
    <trim prefix="(" suffix=")" suffixOverrides=",">
      <if test="typeName != null">
        type_name,
      </if>
      <if test="taxBureauInvoiceTypeName != null">
        tax_bureau_invoice_type_name,
      </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>
      <if test="customerGoodsEnable != null">
        customer_goods_enable,
      </if>
      <if test="customerCreditEnable != null">
        customer_credit_enable,
      </if>
      <if test="supplierGoodsEnable != null">
        supplier_goods_enable,
      </if>
      <if test="customerGoodsModeOffLineEnable != null">
        customer_goods_mode_off_line_enable,
      </if>
      <if test="customerCreditModeOffLineEnable != null">
        customer_credit_mode_off_line_enable,
      </if>
      <if test="supplierGoodsModeOffLineEnable != null">
        supplier_goods_mode_off_line_enable,
      </if>
      <if test="customerGoodsModeSzhtxxElectronicInvoiceEnable != null">
        customer_goods_mode_szhtxx_electronic_invoice_enable,
      </if>
      <if test="customerCreditModeSzhtxxElectronicInvoiceEnable != null">
        customer_credit_mode_szhtxx_electronic_invoice_enable,
      </if>
      <if test="supplierGoodsModeSzhtxxElectronicInvoiceEnable != null">
        supplier_goods_mode_szhtxx_electronic_invoice_enable,
      </if>
      <if test="customerGoodsIsDefault != null">
        customer_goods_is_default,
      </if>
      <if test="customerCreditIsDefault != null">
        customer_credit_is_default,
      </if>
      <if test="supplierGoodsIsDefault != null">
        supplier_goods_is_default,
      </if>
      <if test="customerGoodsModeSzhtxxPaperInvoiceEnable != null">
        customer_goods_mode_szhtxx_paper_invoice_enable,
      </if>
      <if test="customerCreditModeSzhtxxPaperInvoiceEnable != null">
        customer_credit_mode_szhtxx_paper_invoice_enable,
      </if>
      <if test="supplierGoodsModeSzhtxxPaperInvoiceEnable != null">
        supplier_goods_mode_szhtxx_paper_invoice_enable,
      </if>
      <if test="customerGoodsUpdateTime != null">
        customer_goods_update_time,
      </if>
      <if test="customerCreditUpdateTime != null">
        customer_credit_update_time,
      </if>
      <if test="supplierGoodsUpdateTime != null">
        supplier_goods_update_time,
      </if>
      <if test="customerGoodsUpdateUserId != null">
        customer_goods_update_user_id,
      </if>
      <if test="customerCreditUpdateUserId != null">
        customer_credit_update_user_id,
      </if>
      <if test="supplierGoodsUpdateUserId != null">
        supplier_goods_update_user_id,
      </if>
      <if test="customerGoodsUpdateUserName != null">
        customer_goods_update_user_name,
      </if>
      <if test="customerCreditUpdateUserName != null">
        customer_credit_update_user_name,
      </if>
      <if test="supplierGoodsUpdateUserName != null">
        supplier_goods_update_user_name,
      </if>
      <if test="moudelXModeIsDefaultStruct != null">
        moudel_x_mode_is_default_struct,
      </if>
    </trim>
    <trim prefix="values (" suffix=")" suffixOverrides=",">
      <if test="typeName != null">
        #{typeName,jdbcType=VARCHAR},
      </if>
      <if test="taxBureauInvoiceTypeName != null">
        #{taxBureauInvoiceTypeName,jdbcType=VARCHAR},
      </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>
      <if test="customerGoodsEnable != null">
        #{customerGoodsEnable,jdbcType=TINYINT},
      </if>
      <if test="customerCreditEnable != null">
        #{customerCreditEnable,jdbcType=TINYINT},
      </if>
      <if test="supplierGoodsEnable != null">
        #{supplierGoodsEnable,jdbcType=TINYINT},
      </if>
      <if test="customerGoodsModeOffLineEnable != null">
        #{customerGoodsModeOffLineEnable,jdbcType=TINYINT},
      </if>
      <if test="customerCreditModeOffLineEnable != null">
        #{customerCreditModeOffLineEnable,jdbcType=TINYINT},
      </if>
      <if test="supplierGoodsModeOffLineEnable != null">
        #{supplierGoodsModeOffLineEnable,jdbcType=TINYINT},
      </if>
      <if test="customerGoodsModeSzhtxxElectronicInvoiceEnable != null">
        #{customerGoodsModeSzhtxxElectronicInvoiceEnable,jdbcType=TINYINT},
      </if>
      <if test="customerCreditModeSzhtxxElectronicInvoiceEnable != null">
        #{customerCreditModeSzhtxxElectronicInvoiceEnable,jdbcType=TINYINT},
      </if>
      <if test="supplierGoodsModeSzhtxxElectronicInvoiceEnable != null">
        #{supplierGoodsModeSzhtxxElectronicInvoiceEnable,jdbcType=TINYINT},
      </if>
      <if test="customerGoodsIsDefault != null">
        #{customerGoodsIsDefault,jdbcType=TINYINT},
      </if>
      <if test="customerCreditIsDefault != null">
        #{customerCreditIsDefault,jdbcType=TINYINT},
      </if>
      <if test="supplierGoodsIsDefault != null">
        #{supplierGoodsIsDefault,jdbcType=TINYINT},
      </if>
      <if test="customerGoodsModeSzhtxxPaperInvoiceEnable != null">
        #{customerGoodsModeSzhtxxPaperInvoiceEnable,jdbcType=TINYINT},
      </if>
      <if test="customerCreditModeSzhtxxPaperInvoiceEnable != null">
        #{customerCreditModeSzhtxxPaperInvoiceEnable,jdbcType=TINYINT},
      </if>
      <if test="supplierGoodsModeSzhtxxPaperInvoiceEnable != null">
        #{supplierGoodsModeSzhtxxPaperInvoiceEnable,jdbcType=TINYINT},
      </if>
      <if test="customerGoodsUpdateTime != null">
        #{customerGoodsUpdateTime,jdbcType=TIMESTAMP},
      </if>
      <if test="customerCreditUpdateTime != null">
        #{customerCreditUpdateTime,jdbcType=TIMESTAMP},
      </if>
      <if test="supplierGoodsUpdateTime != null">
        #{supplierGoodsUpdateTime,jdbcType=TIMESTAMP},
      </if>
      <if test="customerGoodsUpdateUserId != null">
        #{customerGoodsUpdateUserId,jdbcType=BIGINT},
      </if>
      <if test="customerCreditUpdateUserId != null">
        #{customerCreditUpdateUserId,jdbcType=BIGINT},
      </if>
      <if test="supplierGoodsUpdateUserId != null">
        #{supplierGoodsUpdateUserId,jdbcType=BIGINT},
      </if>
      <if test="customerGoodsUpdateUserName != null">
        #{customerGoodsUpdateUserName,jdbcType=VARCHAR},
      </if>
      <if test="customerCreditUpdateUserName != null">
        #{customerCreditUpdateUserName,jdbcType=VARCHAR},
      </if>
      <if test="supplierGoodsUpdateUserName != null">
        #{supplierGoodsUpdateUserName,jdbcType=VARCHAR},
      </if>
      <if test="moudelXModeIsDefaultStruct != null">
        #{moudelXModeIsDefaultStruct,jdbcType=LONGVARCHAR},
      </if>
    </trim>
  </insert>
  <select id="countByExample" parameterType="cn.superdesk.uniorder.dao.entity.invoice.common.InvoiceTypeExample" resultType="java.lang.Long">
    select count(*) from invoice_type
    <if test="_parameter != null">
      <include refid="Example_Where_Clause" />
    </if>
  </select>
  <update id="updateByExampleSelective" parameterType="map">
    update invoice_type
    <set>
      <if test="record.id != null">
        id = #{record.id,jdbcType=BIGINT},
      </if>
      <if test="record.typeName != null">
        type_name = #{record.typeName,jdbcType=VARCHAR},
      </if>
      <if test="record.taxBureauInvoiceTypeName != null">
        tax_bureau_invoice_type_name = #{record.taxBureauInvoiceTypeName,jdbcType=VARCHAR},
      </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>
      <if test="record.customerGoodsEnable != null">
        customer_goods_enable = #{record.customerGoodsEnable,jdbcType=TINYINT},
      </if>
      <if test="record.customerCreditEnable != null">
        customer_credit_enable = #{record.customerCreditEnable,jdbcType=TINYINT},
      </if>
      <if test="record.supplierGoodsEnable != null">
        supplier_goods_enable = #{record.supplierGoodsEnable,jdbcType=TINYINT},
      </if>
      <if test="record.customerGoodsModeOffLineEnable != null">
        customer_goods_mode_off_line_enable = #{record.customerGoodsModeOffLineEnable,jdbcType=TINYINT},
      </if>
      <if test="record.customerCreditModeOffLineEnable != null">
        customer_credit_mode_off_line_enable = #{record.customerCreditModeOffLineEnable,jdbcType=TINYINT},
      </if>
      <if test="record.supplierGoodsModeOffLineEnable != null">
        supplier_goods_mode_off_line_enable = #{record.supplierGoodsModeOffLineEnable,jdbcType=TINYINT},
      </if>
      <if test="record.customerGoodsModeSzhtxxElectronicInvoiceEnable != null">
        customer_goods_mode_szhtxx_electronic_invoice_enable = #{record.customerGoodsModeSzhtxxElectronicInvoiceEnable,jdbcType=TINYINT},
      </if>
      <if test="record.customerCreditModeSzhtxxElectronicInvoiceEnable != null">
        customer_credit_mode_szhtxx_electronic_invoice_enable = #{record.customerCreditModeSzhtxxElectronicInvoiceEnable,jdbcType=TINYINT},
      </if>
      <if test="record.supplierGoodsModeSzhtxxElectronicInvoiceEnable != null">
        supplier_goods_mode_szhtxx_electronic_invoice_enable = #{record.supplierGoodsModeSzhtxxElectronicInvoiceEnable,jdbcType=TINYINT},
      </if>
      <if test="record.customerGoodsIsDefault != null">
        customer_goods_is_default = #{record.customerGoodsIsDefault,jdbcType=TINYINT},
      </if>
      <if test="record.customerCreditIsDefault != null">
        customer_credit_is_default = #{record.customerCreditIsDefault,jdbcType=TINYINT},
      </if>
      <if test="record.supplierGoodsIsDefault != null">
        supplier_goods_is_default = #{record.supplierGoodsIsDefault,jdbcType=TINYINT},
      </if>
      <if test="record.customerGoodsModeSzhtxxPaperInvoiceEnable != null">
        customer_goods_mode_szhtxx_paper_invoice_enable = #{record.customerGoodsModeSzhtxxPaperInvoiceEnable,jdbcType=TINYINT},
      </if>
      <if test="record.customerCreditModeSzhtxxPaperInvoiceEnable != null">
        customer_credit_mode_szhtxx_paper_invoice_enable = #{record.customerCreditModeSzhtxxPaperInvoiceEnable,jdbcType=TINYINT},
      </if>
      <if test="record.supplierGoodsModeSzhtxxPaperInvoiceEnable != null">
        supplier_goods_mode_szhtxx_paper_invoice_enable = #{record.supplierGoodsModeSzhtxxPaperInvoiceEnable,jdbcType=TINYINT},
      </if>
      <if test="record.customerGoodsUpdateTime != null">
        customer_goods_update_time = #{record.customerGoodsUpdateTime,jdbcType=TIMESTAMP},
      </if>
      <if test="record.customerCreditUpdateTime != null">
        customer_credit_update_time = #{record.customerCreditUpdateTime,jdbcType=TIMESTAMP},
      </if>
      <if test="record.supplierGoodsUpdateTime != null">
        supplier_goods_update_time = #{record.supplierGoodsUpdateTime,jdbcType=TIMESTAMP},
      </if>
      <if test="record.customerGoodsUpdateUserId != null">
        customer_goods_update_user_id = #{record.customerGoodsUpdateUserId,jdbcType=BIGINT},
      </if>
      <if test="record.customerCreditUpdateUserId != null">
        customer_credit_update_user_id = #{record.customerCreditUpdateUserId,jdbcType=BIGINT},
      </if>
      <if test="record.supplierGoodsUpdateUserId != null">
        supplier_goods_update_user_id = #{record.supplierGoodsUpdateUserId,jdbcType=BIGINT},
      </if>
      <if test="record.customerGoodsUpdateUserName != null">
        customer_goods_update_user_name = #{record.customerGoodsUpdateUserName,jdbcType=VARCHAR},
      </if>
      <if test="record.customerCreditUpdateUserName != null">
        customer_credit_update_user_name = #{record.customerCreditUpdateUserName,jdbcType=VARCHAR},
      </if>
      <if test="record.supplierGoodsUpdateUserName != null">
        supplier_goods_update_user_name = #{record.supplierGoodsUpdateUserName,jdbcType=VARCHAR},
      </if>
      <if test="record.moudelXModeIsDefaultStruct != null">
        moudel_x_mode_is_default_struct = #{record.moudelXModeIsDefaultStruct,jdbcType=LONGVARCHAR},
      </if>
    </set>
    <if test="_parameter != null">
      <include refid="Update_By_Example_Where_Clause" />
    </if>
  </update>
  <update id="updateByExampleWithBLOBs" parameterType="map">
    update invoice_type
    set id = #{record.id,jdbcType=BIGINT},
      type_name = #{record.typeName,jdbcType=VARCHAR},
      tax_bureau_invoice_type_name = #{record.taxBureauInvoiceTypeName,jdbcType=VARCHAR},
      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},
      customer_goods_enable = #{record.customerGoodsEnable,jdbcType=TINYINT},
      customer_credit_enable = #{record.customerCreditEnable,jdbcType=TINYINT},
      supplier_goods_enable = #{record.supplierGoodsEnable,jdbcType=TINYINT},
      customer_goods_mode_off_line_enable = #{record.customerGoodsModeOffLineEnable,jdbcType=TINYINT},
      customer_credit_mode_off_line_enable = #{record.customerCreditModeOffLineEnable,jdbcType=TINYINT},
      supplier_goods_mode_off_line_enable = #{record.supplierGoodsModeOffLineEnable,jdbcType=TINYINT},
      customer_goods_mode_szhtxx_electronic_invoice_enable = #{record.customerGoodsModeSzhtxxElectronicInvoiceEnable,jdbcType=TINYINT},
      customer_credit_mode_szhtxx_electronic_invoice_enable = #{record.customerCreditModeSzhtxxElectronicInvoiceEnable,jdbcType=TINYINT},
      supplier_goods_mode_szhtxx_electronic_invoice_enable = #{record.supplierGoodsModeSzhtxxElectronicInvoiceEnable,jdbcType=TINYINT},
      customer_goods_is_default = #{record.customerGoodsIsDefault,jdbcType=TINYINT},
      customer_credit_is_default = #{record.customerCreditIsDefault,jdbcType=TINYINT},
      supplier_goods_is_default = #{record.supplierGoodsIsDefault,jdbcType=TINYINT},
      customer_goods_mode_szhtxx_paper_invoice_enable = #{record.customerGoodsModeSzhtxxPaperInvoiceEnable,jdbcType=TINYINT},
      customer_credit_mode_szhtxx_paper_invoice_enable = #{record.customerCreditModeSzhtxxPaperInvoiceEnable,jdbcType=TINYINT},
      supplier_goods_mode_szhtxx_paper_invoice_enable = #{record.supplierGoodsModeSzhtxxPaperInvoiceEnable,jdbcType=TINYINT},
      customer_goods_update_time = #{record.customerGoodsUpdateTime,jdbcType=TIMESTAMP},
      customer_credit_update_time = #{record.customerCreditUpdateTime,jdbcType=TIMESTAMP},
      supplier_goods_update_time = #{record.supplierGoodsUpdateTime,jdbcType=TIMESTAMP},
      customer_goods_update_user_id = #{record.customerGoodsUpdateUserId,jdbcType=BIGINT},
      customer_credit_update_user_id = #{record.customerCreditUpdateUserId,jdbcType=BIGINT},
      supplier_goods_update_user_id = #{record.supplierGoodsUpdateUserId,jdbcType=BIGINT},
      customer_goods_update_user_name = #{record.customerGoodsUpdateUserName,jdbcType=VARCHAR},
      customer_credit_update_user_name = #{record.customerCreditUpdateUserName,jdbcType=VARCHAR},
      supplier_goods_update_user_name = #{record.supplierGoodsUpdateUserName,jdbcType=VARCHAR},
      moudel_x_mode_is_default_struct = #{record.moudelXModeIsDefaultStruct,jdbcType=LONGVARCHAR}
    <if test="_parameter != null">
      <include refid="Update_By_Example_Where_Clause" />
    </if>
  </update>
  <update id="updateByExample" parameterType="map">
    update invoice_type
    set id = #{record.id,jdbcType=BIGINT},
      type_name = #{record.typeName,jdbcType=VARCHAR},
      tax_bureau_invoice_type_name = #{record.taxBureauInvoiceTypeName,jdbcType=VARCHAR},
      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},
      customer_goods_enable = #{record.customerGoodsEnable,jdbcType=TINYINT},
      customer_credit_enable = #{record.customerCreditEnable,jdbcType=TINYINT},
      supplier_goods_enable = #{record.supplierGoodsEnable,jdbcType=TINYINT},
      customer_goods_mode_off_line_enable = #{record.customerGoodsModeOffLineEnable,jdbcType=TINYINT},
      customer_credit_mode_off_line_enable = #{record.customerCreditModeOffLineEnable,jdbcType=TINYINT},
      supplier_goods_mode_off_line_enable = #{record.supplierGoodsModeOffLineEnable,jdbcType=TINYINT},
      customer_goods_mode_szhtxx_electronic_invoice_enable = #{record.customerGoodsModeSzhtxxElectronicInvoiceEnable,jdbcType=TINYINT},
      customer_credit_mode_szhtxx_electronic_invoice_enable = #{record.customerCreditModeSzhtxxElectronicInvoiceEnable,jdbcType=TINYINT},
      supplier_goods_mode_szhtxx_electronic_invoice_enable = #{record.supplierGoodsModeSzhtxxElectronicInvoiceEnable,jdbcType=TINYINT},
      customer_goods_is_default = #{record.customerGoodsIsDefault,jdbcType=TINYINT},
      customer_credit_is_default = #{record.customerCreditIsDefault,jdbcType=TINYINT},
      supplier_goods_is_default = #{record.supplierGoodsIsDefault,jdbcType=TINYINT},
      customer_goods_mode_szhtxx_paper_invoice_enable = #{record.customerGoodsModeSzhtxxPaperInvoiceEnable,jdbcType=TINYINT},
      customer_credit_mode_szhtxx_paper_invoice_enable = #{record.customerCreditModeSzhtxxPaperInvoiceEnable,jdbcType=TINYINT},
      supplier_goods_mode_szhtxx_paper_invoice_enable = #{record.supplierGoodsModeSzhtxxPaperInvoiceEnable,jdbcType=TINYINT},
      customer_goods_update_time = #{record.customerGoodsUpdateTime,jdbcType=TIMESTAMP},
      customer_credit_update_time = #{record.customerCreditUpdateTime,jdbcType=TIMESTAMP},
      supplier_goods_update_time = #{record.supplierGoodsUpdateTime,jdbcType=TIMESTAMP},
      customer_goods_update_user_id = #{record.customerGoodsUpdateUserId,jdbcType=BIGINT},
      customer_credit_update_user_id = #{record.customerCreditUpdateUserId,jdbcType=BIGINT},
      supplier_goods_update_user_id = #{record.supplierGoodsUpdateUserId,jdbcType=BIGINT},
      customer_goods_update_user_name = #{record.customerGoodsUpdateUserName,jdbcType=VARCHAR},
      customer_credit_update_user_name = #{record.customerCreditUpdateUserName,jdbcType=VARCHAR},
      supplier_goods_update_user_name = #{record.supplierGoodsUpdateUserName,jdbcType=VARCHAR}
    <if test="_parameter != null">
      <include refid="Update_By_Example_Where_Clause" />
    </if>
  </update>
  <update id="updateByPrimaryKeySelective" parameterType="cn.superdesk.uniorder.dao.entity.invoice.common.InvoiceType">
    update invoice_type
    <set>
      <if test="typeName != null">
        type_name = #{typeName,jdbcType=VARCHAR},
      </if>
      <if test="taxBureauInvoiceTypeName != null">
        tax_bureau_invoice_type_name = #{taxBureauInvoiceTypeName,jdbcType=VARCHAR},
      </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>
      <if test="customerGoodsEnable != null">
        customer_goods_enable = #{customerGoodsEnable,jdbcType=TINYINT},
      </if>
      <if test="customerCreditEnable != null">
        customer_credit_enable = #{customerCreditEnable,jdbcType=TINYINT},
      </if>
      <if test="supplierGoodsEnable != null">
        supplier_goods_enable = #{supplierGoodsEnable,jdbcType=TINYINT},
      </if>
      <if test="customerGoodsModeOffLineEnable != null">
        customer_goods_mode_off_line_enable = #{customerGoodsModeOffLineEnable,jdbcType=TINYINT},
      </if>
      <if test="customerCreditModeOffLineEnable != null">
        customer_credit_mode_off_line_enable = #{customerCreditModeOffLineEnable,jdbcType=TINYINT},
      </if>
      <if test="supplierGoodsModeOffLineEnable != null">
        supplier_goods_mode_off_line_enable = #{supplierGoodsModeOffLineEnable,jdbcType=TINYINT},
      </if>
      <if test="customerGoodsModeSzhtxxElectronicInvoiceEnable != null">
        customer_goods_mode_szhtxx_electronic_invoice_enable = #{customerGoodsModeSzhtxxElectronicInvoiceEnable,jdbcType=TINYINT},
      </if>
      <if test="customerCreditModeSzhtxxElectronicInvoiceEnable != null">
        customer_credit_mode_szhtxx_electronic_invoice_enable = #{customerCreditModeSzhtxxElectronicInvoiceEnable,jdbcType=TINYINT},
      </if>
      <if test="supplierGoodsModeSzhtxxElectronicInvoiceEnable != null">
        supplier_goods_mode_szhtxx_electronic_invoice_enable = #{supplierGoodsModeSzhtxxElectronicInvoiceEnable,jdbcType=TINYINT},
      </if>
      <if test="customerGoodsIsDefault != null">
        customer_goods_is_default = #{customerGoodsIsDefault,jdbcType=TINYINT},
      </if>
      <if test="customerCreditIsDefault != null">
        customer_credit_is_default = #{customerCreditIsDefault,jdbcType=TINYINT},
      </if>
      <if test="supplierGoodsIsDefault != null">
        supplier_goods_is_default = #{supplierGoodsIsDefault,jdbcType=TINYINT},
      </if>
      <if test="customerGoodsModeSzhtxxPaperInvoiceEnable != null">
        customer_goods_mode_szhtxx_paper_invoice_enable = #{customerGoodsModeSzhtxxPaperInvoiceEnable,jdbcType=TINYINT},
      </if>
      <if test="customerCreditModeSzhtxxPaperInvoiceEnable != null">
        customer_credit_mode_szhtxx_paper_invoice_enable = #{customerCreditModeSzhtxxPaperInvoiceEnable,jdbcType=TINYINT},
      </if>
      <if test="supplierGoodsModeSzhtxxPaperInvoiceEnable != null">
        supplier_goods_mode_szhtxx_paper_invoice_enable = #{supplierGoodsModeSzhtxxPaperInvoiceEnable,jdbcType=TINYINT},
      </if>
      <if test="customerGoodsUpdateTime != null">
        customer_goods_update_time = #{customerGoodsUpdateTime,jdbcType=TIMESTAMP},
      </if>
      <if test="customerCreditUpdateTime != null">
        customer_credit_update_time = #{customerCreditUpdateTime,jdbcType=TIMESTAMP},
      </if>
      <if test="supplierGoodsUpdateTime != null">
        supplier_goods_update_time = #{supplierGoodsUpdateTime,jdbcType=TIMESTAMP},
      </if>
      <if test="customerGoodsUpdateUserId != null">
        customer_goods_update_user_id = #{customerGoodsUpdateUserId,jdbcType=BIGINT},
      </if>
      <if test="customerCreditUpdateUserId != null">
        customer_credit_update_user_id = #{customerCreditUpdateUserId,jdbcType=BIGINT},
      </if>
      <if test="supplierGoodsUpdateUserId != null">
        supplier_goods_update_user_id = #{supplierGoodsUpdateUserId,jdbcType=BIGINT},
      </if>
      <if test="customerGoodsUpdateUserName != null">
        customer_goods_update_user_name = #{customerGoodsUpdateUserName,jdbcType=VARCHAR},
      </if>
      <if test="customerCreditUpdateUserName != null">
        customer_credit_update_user_name = #{customerCreditUpdateUserName,jdbcType=VARCHAR},
      </if>
      <if test="supplierGoodsUpdateUserName != null">
        supplier_goods_update_user_name = #{supplierGoodsUpdateUserName,jdbcType=VARCHAR},
      </if>
      <if test="moudelXModeIsDefaultStruct != null">
        moudel_x_mode_is_default_struct = #{moudelXModeIsDefaultStruct,jdbcType=LONGVARCHAR},
      </if>
    </set>
    where id = #{id,jdbcType=BIGINT}
  </update>
  <update id="updateByPrimaryKeyWithBLOBs" parameterType="cn.superdesk.uniorder.dao.entity.invoice.common.InvoiceType">
    update invoice_type
    set type_name = #{typeName,jdbcType=VARCHAR},
      tax_bureau_invoice_type_name = #{taxBureauInvoiceTypeName,jdbcType=VARCHAR},
      create_time = #{createTime,jdbcType=TIMESTAMP},
      create_user_id = #{createUserId,jdbcType=BIGINT},
      update_time = #{updateTime,jdbcType=TIMESTAMP},
      update_user_id = #{updateUserId,jdbcType=BIGINT},
      customer_goods_enable = #{customerGoodsEnable,jdbcType=TINYINT},
      customer_credit_enable = #{customerCreditEnable,jdbcType=TINYINT},
      supplier_goods_enable = #{supplierGoodsEnable,jdbcType=TINYINT},
      customer_goods_mode_off_line_enable = #{customerGoodsModeOffLineEnable,jdbcType=TINYINT},
      customer_credit_mode_off_line_enable = #{customerCreditModeOffLineEnable,jdbcType=TINYINT},
      supplier_goods_mode_off_line_enable = #{supplierGoodsModeOffLineEnable,jdbcType=TINYINT},
      customer_goods_mode_szhtxx_electronic_invoice_enable = #{customerGoodsModeSzhtxxElectronicInvoiceEnable,jdbcType=TINYINT},
      customer_credit_mode_szhtxx_electronic_invoice_enable = #{customerCreditModeSzhtxxElectronicInvoiceEnable,jdbcType=TINYINT},
      supplier_goods_mode_szhtxx_electronic_invoice_enable = #{supplierGoodsModeSzhtxxElectronicInvoiceEnable,jdbcType=TINYINT},
      customer_goods_is_default = #{customerGoodsIsDefault,jdbcType=TINYINT},
      customer_credit_is_default = #{customerCreditIsDefault,jdbcType=TINYINT},
      supplier_goods_is_default = #{supplierGoodsIsDefault,jdbcType=TINYINT},
      customer_goods_mode_szhtxx_paper_invoice_enable = #{customerGoodsModeSzhtxxPaperInvoiceEnable,jdbcType=TINYINT},
      customer_credit_mode_szhtxx_paper_invoice_enable = #{customerCreditModeSzhtxxPaperInvoiceEnable,jdbcType=TINYINT},
      supplier_goods_mode_szhtxx_paper_invoice_enable = #{supplierGoodsModeSzhtxxPaperInvoiceEnable,jdbcType=TINYINT},
      customer_goods_update_time = #{customerGoodsUpdateTime,jdbcType=TIMESTAMP},
      customer_credit_update_time = #{customerCreditUpdateTime,jdbcType=TIMESTAMP},
      supplier_goods_update_time = #{supplierGoodsUpdateTime,jdbcType=TIMESTAMP},
      customer_goods_update_user_id = #{customerGoodsUpdateUserId,jdbcType=BIGINT},
      customer_credit_update_user_id = #{customerCreditUpdateUserId,jdbcType=BIGINT},
      supplier_goods_update_user_id = #{supplierGoodsUpdateUserId,jdbcType=BIGINT},
      customer_goods_update_user_name = #{customerGoodsUpdateUserName,jdbcType=VARCHAR},
      customer_credit_update_user_name = #{customerCreditUpdateUserName,jdbcType=VARCHAR},
      supplier_goods_update_user_name = #{supplierGoodsUpdateUserName,jdbcType=VARCHAR},
      moudel_x_mode_is_default_struct = #{moudelXModeIsDefaultStruct,jdbcType=LONGVARCHAR}
    where id = #{id,jdbcType=BIGINT}
  </update>
  <update id="updateByPrimaryKey" parameterType="cn.superdesk.uniorder.dao.entity.invoice.common.InvoiceType">
    update invoice_type
    set type_name = #{typeName,jdbcType=VARCHAR},
      tax_bureau_invoice_type_name = #{taxBureauInvoiceTypeName,jdbcType=VARCHAR},
      create_time = #{createTime,jdbcType=TIMESTAMP},
      create_user_id = #{createUserId,jdbcType=BIGINT},
      update_time = #{updateTime,jdbcType=TIMESTAMP},
      update_user_id = #{updateUserId,jdbcType=BIGINT},
      customer_goods_enable = #{customerGoodsEnable,jdbcType=TINYINT},
      customer_credit_enable = #{customerCreditEnable,jdbcType=TINYINT},
      supplier_goods_enable = #{supplierGoodsEnable,jdbcType=TINYINT},
      customer_goods_mode_off_line_enable = #{customerGoodsModeOffLineEnable,jdbcType=TINYINT},
      customer_credit_mode_off_line_enable = #{customerCreditModeOffLineEnable,jdbcType=TINYINT},
      supplier_goods_mode_off_line_enable = #{supplierGoodsModeOffLineEnable,jdbcType=TINYINT},
      customer_goods_mode_szhtxx_electronic_invoice_enable = #{customerGoodsModeSzhtxxElectronicInvoiceEnable,jdbcType=TINYINT},
      customer_credit_mode_szhtxx_electronic_invoice_enable = #{customerCreditModeSzhtxxElectronicInvoiceEnable,jdbcType=TINYINT},
      supplier_goods_mode_szhtxx_electronic_invoice_enable = #{supplierGoodsModeSzhtxxElectronicInvoiceEnable,jdbcType=TINYINT},
      customer_goods_is_default = #{customerGoodsIsDefault,jdbcType=TINYINT},
      customer_credit_is_default = #{customerCreditIsDefault,jdbcType=TINYINT},
      supplier_goods_is_default = #{supplierGoodsIsDefault,jdbcType=TINYINT},
      customer_goods_mode_szhtxx_paper_invoice_enable = #{customerGoodsModeSzhtxxPaperInvoiceEnable,jdbcType=TINYINT},
      customer_credit_mode_szhtxx_paper_invoice_enable = #{customerCreditModeSzhtxxPaperInvoiceEnable,jdbcType=TINYINT},
      supplier_goods_mode_szhtxx_paper_invoice_enable = #{supplierGoodsModeSzhtxxPaperInvoiceEnable,jdbcType=TINYINT},
      customer_goods_update_time = #{customerGoodsUpdateTime,jdbcType=TIMESTAMP},
      customer_credit_update_time = #{customerCreditUpdateTime,jdbcType=TIMESTAMP},
      supplier_goods_update_time = #{supplierGoodsUpdateTime,jdbcType=TIMESTAMP},
      customer_goods_update_user_id = #{customerGoodsUpdateUserId,jdbcType=BIGINT},
      customer_credit_update_user_id = #{customerCreditUpdateUserId,jdbcType=BIGINT},
      supplier_goods_update_user_id = #{supplierGoodsUpdateUserId,jdbcType=BIGINT},
      customer_goods_update_user_name = #{customerGoodsUpdateUserName,jdbcType=VARCHAR},
      customer_credit_update_user_name = #{customerCreditUpdateUserName,jdbcType=VARCHAR},
      supplier_goods_update_user_name = #{supplierGoodsUpdateUserName,jdbcType=VARCHAR}
    where id = #{id,jdbcType=BIGINT}
  </update>
</mapper>