<?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.thirdpart.szhtxx.electronicInvoice.SzhtxxElectronicInvoiceFptxxXmxxMapper">
  <resultMap id="BaseResultMap" type="cn.superdesk.uniorder.dao.entity.thirdpart.szhtxx.electronicInvoice.SzhtxxElectronicInvoiceFptxxXmxx">
    <id column="id" jdbcType="BIGINT" property="id" />
    <result column="fpqqlsh" jdbcType="VARCHAR" property="fpqqlsh" />
    <result column="xmmc" jdbcType="VARCHAR" property="xmmc" />
    <result column="xmdw" jdbcType="VARCHAR" property="xmdw" />
    <result column="ggxh" jdbcType="VARCHAR" property="ggxh" />
    <result column="xmsl" jdbcType="DECIMAL" property="xmsl" />
    <result column="hsbz" jdbcType="VARCHAR" property="hsbz" />
    <result column="xmdj" jdbcType="DECIMAL" property="xmdj" />
    <result column="fphxz" jdbcType="CHAR" property="fphxz" />
    <result column="spbm" jdbcType="VARCHAR" property="spbm" />
    <result column="yhzcbs" jdbcType="VARCHAR" property="yhzcbs" />
    <result column="lslbs" jdbcType="VARCHAR" property="lslbs" />
    <result column="zzstsgl" jdbcType="VARCHAR" property="zzstsgl" />
    <result column="kce" jdbcType="DECIMAL" property="kce" />
    <result column="xmje" jdbcType="DECIMAL" property="xmje" />
    <result column="sl" jdbcType="VARCHAR" property="sl" />
    <result column="se" jdbcType="DECIMAL" property="se" />
    <result column="deleted" jdbcType="TINYINT" property="deleted" />
    <result column="batch_id" jdbcType="VARCHAR" property="batchId" />
  </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, fpqqlsh, xmmc, xmdw, ggxh, xmsl, hsbz, xmdj, fphxz, spbm, yhzcbs, lslbs, zzstsgl,
    kce, xmje, sl, se, deleted, batch_id
  </sql>
  <select id="selectByExample" parameterType="cn.superdesk.uniorder.dao.entity.thirdpart.szhtxx.electronicInvoice.SzhtxxElectronicInvoiceFptxxXmxxExample" resultMap="BaseResultMap">
    select
    <if test="distinct">
      distinct
    </if>
    <include refid="Base_Column_List" />
    from szhtxx_electronic_invoice_fptxx_xmxx
    <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 szhtxx_electronic_invoice_fptxx_xmxx
    where id = #{id,jdbcType=BIGINT}
  </select>
  <delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
    delete from szhtxx_electronic_invoice_fptxx_xmxx
    where id = #{id,jdbcType=BIGINT}
  </delete>
  <delete id="deleteByExample" parameterType="cn.superdesk.uniorder.dao.entity.thirdpart.szhtxx.electronicInvoice.SzhtxxElectronicInvoiceFptxxXmxxExample">
    delete from szhtxx_electronic_invoice_fptxx_xmxx
    <if test="_parameter != null">
      <include refid="Example_Where_Clause" />
    </if>
  </delete>
  <insert id="insert" parameterType="cn.superdesk.uniorder.dao.entity.thirdpart.szhtxx.electronicInvoice.SzhtxxElectronicInvoiceFptxxXmxx">
    <selectKey keyProperty="id" order="AFTER" resultType="java.lang.Long">
      SELECT LAST_INSERT_ID()
    </selectKey>
    insert into szhtxx_electronic_invoice_fptxx_xmxx (fpqqlsh, xmmc, xmdw,
      ggxh, xmsl, hsbz, xmdj,
      fphxz, spbm, yhzcbs, lslbs,
      zzstsgl, kce, xmje,
      sl, se, deleted, batch_id
      )
    values (#{fpqqlsh,jdbcType=VARCHAR}, #{xmmc,jdbcType=VARCHAR}, #{xmdw,jdbcType=VARCHAR},
      #{ggxh,jdbcType=VARCHAR}, #{xmsl,jdbcType=DECIMAL}, #{hsbz,jdbcType=VARCHAR}, #{xmdj,jdbcType=DECIMAL},
      #{fphxz,jdbcType=CHAR}, #{spbm,jdbcType=VARCHAR}, #{yhzcbs,jdbcType=VARCHAR}, #{lslbs,jdbcType=VARCHAR},
      #{zzstsgl,jdbcType=VARCHAR}, #{kce,jdbcType=DECIMAL}, #{xmje,jdbcType=DECIMAL},
      #{sl,jdbcType=VARCHAR}, #{se,jdbcType=DECIMAL}, #{deleted,jdbcType=TINYINT}, #{batchId,jdbcType=VARCHAR}
      )
  </insert>
  <insert id="insertSelective" parameterType="cn.superdesk.uniorder.dao.entity.thirdpart.szhtxx.electronicInvoice.SzhtxxElectronicInvoiceFptxxXmxx">
    <selectKey keyProperty="id" order="AFTER" resultType="java.lang.Long">
      SELECT LAST_INSERT_ID()
    </selectKey>
    insert into szhtxx_electronic_invoice_fptxx_xmxx
    <trim prefix="(" suffix=")" suffixOverrides=",">
      <if test="fpqqlsh != null">
        fpqqlsh,
      </if>
      <if test="xmmc != null">
        xmmc,
      </if>
      <if test="xmdw != null">
        xmdw,
      </if>
      <if test="ggxh != null">
        ggxh,
      </if>
      <if test="xmsl != null">
        xmsl,
      </if>
      <if test="hsbz != null">
        hsbz,
      </if>
      <if test="xmdj != null">
        xmdj,
      </if>
      <if test="fphxz != null">
        fphxz,
      </if>
      <if test="spbm != null">
        spbm,
      </if>
      <if test="yhzcbs != null">
        yhzcbs,
      </if>
      <if test="lslbs != null">
        lslbs,
      </if>
      <if test="zzstsgl != null">
        zzstsgl,
      </if>
      <if test="kce != null">
        kce,
      </if>
      <if test="xmje != null">
        xmje,
      </if>
      <if test="sl != null">
        sl,
      </if>
      <if test="se != null">
        se,
      </if>
      <if test="deleted != null">
        deleted,
      </if>
      <if test="batchId != null">
        batch_id,
      </if>
    </trim>
    <trim prefix="values (" suffix=")" suffixOverrides=",">
      <if test="fpqqlsh != null">
        #{fpqqlsh,jdbcType=VARCHAR},
      </if>
      <if test="xmmc != null">
        #{xmmc,jdbcType=VARCHAR},
      </if>
      <if test="xmdw != null">
        #{xmdw,jdbcType=VARCHAR},
      </if>
      <if test="ggxh != null">
        #{ggxh,jdbcType=VARCHAR},
      </if>
      <if test="xmsl != null">
        #{xmsl,jdbcType=DECIMAL},
      </if>
      <if test="hsbz != null">
        #{hsbz,jdbcType=VARCHAR},
      </if>
      <if test="xmdj != null">
        #{xmdj,jdbcType=DECIMAL},
      </if>
      <if test="fphxz != null">
        #{fphxz,jdbcType=CHAR},
      </if>
      <if test="spbm != null">
        #{spbm,jdbcType=VARCHAR},
      </if>
      <if test="yhzcbs != null">
        #{yhzcbs,jdbcType=VARCHAR},
      </if>
      <if test="lslbs != null">
        #{lslbs,jdbcType=VARCHAR},
      </if>
      <if test="zzstsgl != null">
        #{zzstsgl,jdbcType=VARCHAR},
      </if>
      <if test="kce != null">
        #{kce,jdbcType=DECIMAL},
      </if>
      <if test="xmje != null">
        #{xmje,jdbcType=DECIMAL},
      </if>
      <if test="sl != null">
        #{sl,jdbcType=VARCHAR},
      </if>
      <if test="se != null">
        #{se,jdbcType=DECIMAL},
      </if>
      <if test="deleted != null">
        #{deleted,jdbcType=TINYINT},
      </if>
      <if test="batchId != null">
        #{batchId,jdbcType=VARCHAR},
      </if>
    </trim>
  </insert>
  <select id="countByExample" parameterType="cn.superdesk.uniorder.dao.entity.thirdpart.szhtxx.electronicInvoice.SzhtxxElectronicInvoiceFptxxXmxxExample" resultType="java.lang.Long">
    select count(*) from szhtxx_electronic_invoice_fptxx_xmxx
    <if test="_parameter != null">
      <include refid="Example_Where_Clause" />
    </if>
  </select>
  <update id="updateByExampleSelective" parameterType="map">
    update szhtxx_electronic_invoice_fptxx_xmxx
    <set>
      <if test="record.id != null">
        id = #{record.id,jdbcType=BIGINT},
      </if>
      <if test="record.fpqqlsh != null">
        fpqqlsh = #{record.fpqqlsh,jdbcType=VARCHAR},
      </if>
      <if test="record.xmmc != null">
        xmmc = #{record.xmmc,jdbcType=VARCHAR},
      </if>
      <if test="record.xmdw != null">
        xmdw = #{record.xmdw,jdbcType=VARCHAR},
      </if>
      <if test="record.ggxh != null">
        ggxh = #{record.ggxh,jdbcType=VARCHAR},
      </if>
      <if test="record.xmsl != null">
        xmsl = #{record.xmsl,jdbcType=DECIMAL},
      </if>
      <if test="record.hsbz != null">
        hsbz = #{record.hsbz,jdbcType=VARCHAR},
      </if>
      <if test="record.xmdj != null">
        xmdj = #{record.xmdj,jdbcType=DECIMAL},
      </if>
      <if test="record.fphxz != null">
        fphxz = #{record.fphxz,jdbcType=CHAR},
      </if>
      <if test="record.spbm != null">
        spbm = #{record.spbm,jdbcType=VARCHAR},
      </if>
      <if test="record.yhzcbs != null">
        yhzcbs = #{record.yhzcbs,jdbcType=VARCHAR},
      </if>
      <if test="record.lslbs != null">
        lslbs = #{record.lslbs,jdbcType=VARCHAR},
      </if>
      <if test="record.zzstsgl != null">
        zzstsgl = #{record.zzstsgl,jdbcType=VARCHAR},
      </if>
      <if test="record.kce != null">
        kce = #{record.kce,jdbcType=DECIMAL},
      </if>
      <if test="record.xmje != null">
        xmje = #{record.xmje,jdbcType=DECIMAL},
      </if>
      <if test="record.sl != null">
        sl = #{record.sl,jdbcType=VARCHAR},
      </if>
      <if test="record.se != null">
        se = #{record.se,jdbcType=DECIMAL},
      </if>
      <if test="record.deleted != null">
        deleted = #{record.deleted,jdbcType=TINYINT},
      </if>
      <if test="record.batchId != null">
        batch_id = #{record.batchId,jdbcType=VARCHAR},
      </if>
    </set>
    <if test="_parameter != null">
      <include refid="Update_By_Example_Where_Clause" />
    </if>
  </update>
  <update id="updateByExample" parameterType="map">
    update szhtxx_electronic_invoice_fptxx_xmxx
    set id = #{record.id,jdbcType=BIGINT},
      fpqqlsh = #{record.fpqqlsh,jdbcType=VARCHAR},
      xmmc = #{record.xmmc,jdbcType=VARCHAR},
      xmdw = #{record.xmdw,jdbcType=VARCHAR},
      ggxh = #{record.ggxh,jdbcType=VARCHAR},
      xmsl = #{record.xmsl,jdbcType=DECIMAL},
      hsbz = #{record.hsbz,jdbcType=VARCHAR},
      xmdj = #{record.xmdj,jdbcType=DECIMAL},
      fphxz = #{record.fphxz,jdbcType=CHAR},
      spbm = #{record.spbm,jdbcType=VARCHAR},
      yhzcbs = #{record.yhzcbs,jdbcType=VARCHAR},
      lslbs = #{record.lslbs,jdbcType=VARCHAR},
      zzstsgl = #{record.zzstsgl,jdbcType=VARCHAR},
      kce = #{record.kce,jdbcType=DECIMAL},
      xmje = #{record.xmje,jdbcType=DECIMAL},
      sl = #{record.sl,jdbcType=VARCHAR},
      se = #{record.se,jdbcType=DECIMAL},
      deleted = #{record.deleted,jdbcType=TINYINT},
      batch_id = #{record.batchId,jdbcType=VARCHAR}
    <if test="_parameter != null">
      <include refid="Update_By_Example_Where_Clause" />
    </if>
  </update>
  <update id="updateByPrimaryKeySelective" parameterType="cn.superdesk.uniorder.dao.entity.thirdpart.szhtxx.electronicInvoice.SzhtxxElectronicInvoiceFptxxXmxx">
    update szhtxx_electronic_invoice_fptxx_xmxx
    <set>
      <if test="fpqqlsh != null">
        fpqqlsh = #{fpqqlsh,jdbcType=VARCHAR},
      </if>
      <if test="xmmc != null">
        xmmc = #{xmmc,jdbcType=VARCHAR},
      </if>
      <if test="xmdw != null">
        xmdw = #{xmdw,jdbcType=VARCHAR},
      </if>
      <if test="ggxh != null">
        ggxh = #{ggxh,jdbcType=VARCHAR},
      </if>
      <if test="xmsl != null">
        xmsl = #{xmsl,jdbcType=DECIMAL},
      </if>
      <if test="hsbz != null">
        hsbz = #{hsbz,jdbcType=VARCHAR},
      </if>
      <if test="xmdj != null">
        xmdj = #{xmdj,jdbcType=DECIMAL},
      </if>
      <if test="fphxz != null">
        fphxz = #{fphxz,jdbcType=CHAR},
      </if>
      <if test="spbm != null">
        spbm = #{spbm,jdbcType=VARCHAR},
      </if>
      <if test="yhzcbs != null">
        yhzcbs = #{yhzcbs,jdbcType=VARCHAR},
      </if>
      <if test="lslbs != null">
        lslbs = #{lslbs,jdbcType=VARCHAR},
      </if>
      <if test="zzstsgl != null">
        zzstsgl = #{zzstsgl,jdbcType=VARCHAR},
      </if>
      <if test="kce != null">
        kce = #{kce,jdbcType=DECIMAL},
      </if>
      <if test="xmje != null">
        xmje = #{xmje,jdbcType=DECIMAL},
      </if>
      <if test="sl != null">
        sl = #{sl,jdbcType=VARCHAR},
      </if>
      <if test="se != null">
        se = #{se,jdbcType=DECIMAL},
      </if>
      <if test="deleted != null">
        deleted = #{deleted,jdbcType=TINYINT},
      </if>
      <if test="batchId != null">
        batch_id = #{batchId,jdbcType=VARCHAR},
      </if>
    </set>
    where id = #{id,jdbcType=BIGINT}
  </update>
  <update id="updateByPrimaryKey" parameterType="cn.superdesk.uniorder.dao.entity.thirdpart.szhtxx.electronicInvoice.SzhtxxElectronicInvoiceFptxxXmxx">
    update szhtxx_electronic_invoice_fptxx_xmxx
    set fpqqlsh = #{fpqqlsh,jdbcType=VARCHAR},
      xmmc = #{xmmc,jdbcType=VARCHAR},
      xmdw = #{xmdw,jdbcType=VARCHAR},
      ggxh = #{ggxh,jdbcType=VARCHAR},
      xmsl = #{xmsl,jdbcType=DECIMAL},
      hsbz = #{hsbz,jdbcType=VARCHAR},
      xmdj = #{xmdj,jdbcType=DECIMAL},
      fphxz = #{fphxz,jdbcType=CHAR},
      spbm = #{spbm,jdbcType=VARCHAR},
      yhzcbs = #{yhzcbs,jdbcType=VARCHAR},
      lslbs = #{lslbs,jdbcType=VARCHAR},
      zzstsgl = #{zzstsgl,jdbcType=VARCHAR},
      kce = #{kce,jdbcType=DECIMAL},
      xmje = #{xmje,jdbcType=DECIMAL},
      sl = #{sl,jdbcType=VARCHAR},
      se = #{se,jdbcType=DECIMAL},
      deleted = #{deleted,jdbcType=TINYINT},
      batch_id = #{batchId,jdbcType=VARCHAR}
    where id = #{id,jdbcType=BIGINT}
  </update>
</mapper>
