<?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="pwc.taxtech.atms.invoice.OutputInvoiceDetailMapper">
  <resultMap id="BaseResultMap" type="pwc.taxtech.atms.vat.entity.OutputInvoiceDetail">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
    <id column="ID" jdbcType="VARCHAR" property="ID" />
    <result column="FPQQLSH" jdbcType="VARCHAR" property="FPQQLSH" />
    <result column="SPMC" jdbcType="VARCHAR" property="SPMC" />
    <result column="GGXH" jdbcType="VARCHAR" property="GGXH" />
    <result column="DW" jdbcType="VARCHAR" property="DW" />
    <result column="DJ" jdbcType="VARCHAR" property="DJ" />
    <result column="SL" jdbcType="VARCHAR" property="SL" />
    <result column="JE" jdbcType="VARCHAR" property="JE" />
    <result column="SLV" jdbcType="VARCHAR" property="SLV" />
    <result column="SE" jdbcType="VARCHAR" property="SE" />
    <result column="HSBZ" jdbcType="VARCHAR" property="HSBZ" />
    <result column="LSLBS" jdbcType="VARCHAR" property="LSLBS" />
    <result column="YHZCBS" jdbcType="VARCHAR" property="YHZCBS" />
    <result column="YHZCMC" jdbcType="VARCHAR" property="YHZCMC" />
    <result column="MXXH" jdbcType="DECIMAL" property="MXXH" />
    <result column="FPHXZ" jdbcType="VARCHAR" property="FPHXZ" />
    <result column="SSFLDM" jdbcType="VARCHAR" property="SSFLDM" />
    <result column="ZXBM" jdbcType="VARCHAR" property="ZXBM" />
    <result column="ZKHJJE" jdbcType="VARCHAR" property="ZKHJJE" />
    <result column="ZKSE" jdbcType="VARCHAR" property="ZKSE" />
    <result column="ZKJE" jdbcType="VARCHAR" property="ZKJE" />
    <result column="HJJE" jdbcType="VARCHAR" property="HJJE" />
    <result column="JHH" jdbcType="VARCHAR" property="JHH" />
    <result column="XSDD" jdbcType="VARCHAR" property="XSDD" />
    <result column="HSJUUID" jdbcType="VARCHAR" property="HSJUUID" />
  </resultMap>
  <sql id="Example_Where_Clause">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
    <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">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
    <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">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
    ID, FPQQLSH, SPMC, GGXH, DW, DJ, SL, JE, SLV, SE, HSBZ, LSLBS, YHZCBS, YHZCMC, MXXH, 
    FPHXZ, SSFLDM, ZXBM, ZKHJJE, ZKSE, ZKJE, HJJE, JHH, XSDD, HSJUUID
  </sql>
  <select id="selectByExample" parameterType="pwc.taxtech.atms.vat.entity.OutputInvoiceDetailExample" resultMap="BaseResultMap">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
    select
    <if test="distinct">
      distinct
    </if>
    <include refid="Base_Column_List" />
    from OUTPUT_INVOICE_DETAIL
    <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.String" resultMap="BaseResultMap">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
    select 
    <include refid="Base_Column_List" />
    from OUTPUT_INVOICE_DETAIL
    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 OUTPUT_INVOICE_DETAIL
    where ID = #{ID,jdbcType=VARCHAR}
  </delete>
  <delete id="deleteByExample" parameterType="pwc.taxtech.atms.vat.entity.OutputInvoiceDetailExample">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
    delete from OUTPUT_INVOICE_DETAIL
    <if test="_parameter != null">
      <include refid="Example_Where_Clause" />
    </if>
  </delete>
  <insert id="insert" parameterType="pwc.taxtech.atms.vat.entity.OutputInvoiceDetail">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
    insert into OUTPUT_INVOICE_DETAIL (ID, FPQQLSH, SPMC, 
      GGXH, DW, DJ, SL, 
      JE, SLV, SE, HSBZ, 
      LSLBS, YHZCBS, YHZCMC, 
      MXXH, FPHXZ, SSFLDM, 
      ZXBM, ZKHJJE, ZKSE, 
      ZKJE, HJJE, JHH, XSDD, 
      HSJUUID)
    values (#{ID,jdbcType=VARCHAR}, #{FPQQLSH,jdbcType=VARCHAR}, #{SPMC,jdbcType=VARCHAR}, 
      #{GGXH,jdbcType=VARCHAR}, #{DW,jdbcType=VARCHAR}, #{DJ,jdbcType=VARCHAR}, #{SL,jdbcType=VARCHAR}, 
      #{JE,jdbcType=VARCHAR}, #{SLV,jdbcType=VARCHAR}, #{SE,jdbcType=VARCHAR}, #{HSBZ,jdbcType=VARCHAR}, 
      #{LSLBS,jdbcType=VARCHAR}, #{YHZCBS,jdbcType=VARCHAR}, #{YHZCMC,jdbcType=VARCHAR}, 
      #{MXXH,jdbcType=DECIMAL}, #{FPHXZ,jdbcType=VARCHAR}, #{SSFLDM,jdbcType=VARCHAR}, 
      #{ZXBM,jdbcType=VARCHAR}, #{ZKHJJE,jdbcType=VARCHAR}, #{ZKSE,jdbcType=VARCHAR}, 
      #{ZKJE,jdbcType=VARCHAR}, #{HJJE,jdbcType=VARCHAR}, #{JHH,jdbcType=VARCHAR}, #{XSDD,jdbcType=VARCHAR}, 
      #{HSJUUID,jdbcType=VARCHAR})
  </insert>
  <insert id="insertSelective" parameterType="pwc.taxtech.atms.vat.entity.OutputInvoiceDetail">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
    insert into OUTPUT_INVOICE_DETAIL
    <trim prefix="(" suffix=")" suffixOverrides=",">
      <if test="ID != null">
        ID,
      </if>
      <if test="FPQQLSH != null">
        FPQQLSH,
      </if>
      <if test="SPMC != null">
        SPMC,
      </if>
      <if test="GGXH != null">
        GGXH,
      </if>
      <if test="DW != null">
        DW,
      </if>
      <if test="DJ != null">
        DJ,
      </if>
      <if test="SL != null">
        SL,
      </if>
      <if test="JE != null">
        JE,
      </if>
      <if test="SLV != null">
        SLV,
      </if>
      <if test="SE != null">
        SE,
      </if>
      <if test="HSBZ != null">
        HSBZ,
      </if>
      <if test="LSLBS != null">
        LSLBS,
      </if>
      <if test="YHZCBS != null">
        YHZCBS,
      </if>
      <if test="YHZCMC != null">
        YHZCMC,
      </if>
      <if test="MXXH != null">
        MXXH,
      </if>
      <if test="FPHXZ != null">
        FPHXZ,
      </if>
      <if test="SSFLDM != null">
        SSFLDM,
      </if>
      <if test="ZXBM != null">
        ZXBM,
      </if>
      <if test="ZKHJJE != null">
        ZKHJJE,
      </if>
      <if test="ZKSE != null">
        ZKSE,
      </if>
      <if test="ZKJE != null">
        ZKJE,
      </if>
      <if test="HJJE != null">
        HJJE,
      </if>
      <if test="JHH != null">
        JHH,
      </if>
      <if test="XSDD != null">
        XSDD,
      </if>
      <if test="HSJUUID != null">
        HSJUUID,
      </if>
    </trim>
    <trim prefix="values (" suffix=")" suffixOverrides=",">
      <if test="ID != null">
        #{ID,jdbcType=VARCHAR},
      </if>
      <if test="FPQQLSH != null">
        #{FPQQLSH,jdbcType=VARCHAR},
      </if>
      <if test="SPMC != null">
        #{SPMC,jdbcType=VARCHAR},
      </if>
      <if test="GGXH != null">
        #{GGXH,jdbcType=VARCHAR},
      </if>
      <if test="DW != null">
        #{DW,jdbcType=VARCHAR},
      </if>
      <if test="DJ != null">
        #{DJ,jdbcType=VARCHAR},
      </if>
      <if test="SL != null">
        #{SL,jdbcType=VARCHAR},
      </if>
      <if test="JE != null">
        #{JE,jdbcType=VARCHAR},
      </if>
      <if test="SLV != null">
        #{SLV,jdbcType=VARCHAR},
      </if>
      <if test="SE != null">
        #{SE,jdbcType=VARCHAR},
      </if>
      <if test="HSBZ != null">
        #{HSBZ,jdbcType=VARCHAR},
      </if>
      <if test="LSLBS != null">
        #{LSLBS,jdbcType=VARCHAR},
      </if>
      <if test="YHZCBS != null">
        #{YHZCBS,jdbcType=VARCHAR},
      </if>
      <if test="YHZCMC != null">
        #{YHZCMC,jdbcType=VARCHAR},
      </if>
      <if test="MXXH != null">
        #{MXXH,jdbcType=DECIMAL},
      </if>
      <if test="FPHXZ != null">
        #{FPHXZ,jdbcType=VARCHAR},
      </if>
      <if test="SSFLDM != null">
        #{SSFLDM,jdbcType=VARCHAR},
      </if>
      <if test="ZXBM != null">
        #{ZXBM,jdbcType=VARCHAR},
      </if>
      <if test="ZKHJJE != null">
        #{ZKHJJE,jdbcType=VARCHAR},
      </if>
      <if test="ZKSE != null">
        #{ZKSE,jdbcType=VARCHAR},
      </if>
      <if test="ZKJE != null">
        #{ZKJE,jdbcType=VARCHAR},
      </if>
      <if test="HJJE != null">
        #{HJJE,jdbcType=VARCHAR},
      </if>
      <if test="JHH != null">
        #{JHH,jdbcType=VARCHAR},
      </if>
      <if test="XSDD != null">
        #{XSDD,jdbcType=VARCHAR},
      </if>
      <if test="HSJUUID != null">
        #{HSJUUID,jdbcType=VARCHAR},
      </if>
    </trim>
  </insert>
  <select id="countByExample" parameterType="pwc.taxtech.atms.vat.entity.OutputInvoiceDetailExample" resultType="java.lang.Long">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
    select count(*) from OUTPUT_INVOICE_DETAIL
    <if test="_parameter != null">
      <include refid="Example_Where_Clause" />
    </if>
  </select>
  <update id="updateByExampleSelective" parameterType="map">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
    update OUTPUT_INVOICE_DETAIL
    <set>
      <if test="record.ID != null">
        ID = #{record.ID,jdbcType=VARCHAR},
      </if>
      <if test="record.FPQQLSH != null">
        FPQQLSH = #{record.FPQQLSH,jdbcType=VARCHAR},
      </if>
      <if test="record.SPMC != null">
        SPMC = #{record.SPMC,jdbcType=VARCHAR},
      </if>
      <if test="record.GGXH != null">
        GGXH = #{record.GGXH,jdbcType=VARCHAR},
      </if>
      <if test="record.DW != null">
        DW = #{record.DW,jdbcType=VARCHAR},
      </if>
      <if test="record.DJ != null">
        DJ = #{record.DJ,jdbcType=VARCHAR},
      </if>
      <if test="record.SL != null">
        SL = #{record.SL,jdbcType=VARCHAR},
      </if>
      <if test="record.JE != null">
        JE = #{record.JE,jdbcType=VARCHAR},
      </if>
      <if test="record.SLV != null">
        SLV = #{record.SLV,jdbcType=VARCHAR},
      </if>
      <if test="record.SE != null">
        SE = #{record.SE,jdbcType=VARCHAR},
      </if>
      <if test="record.HSBZ != null">
        HSBZ = #{record.HSBZ,jdbcType=VARCHAR},
      </if>
      <if test="record.LSLBS != null">
        LSLBS = #{record.LSLBS,jdbcType=VARCHAR},
      </if>
      <if test="record.YHZCBS != null">
        YHZCBS = #{record.YHZCBS,jdbcType=VARCHAR},
      </if>
      <if test="record.YHZCMC != null">
        YHZCMC = #{record.YHZCMC,jdbcType=VARCHAR},
      </if>
      <if test="record.MXXH != null">
        MXXH = #{record.MXXH,jdbcType=DECIMAL},
      </if>
      <if test="record.FPHXZ != null">
        FPHXZ = #{record.FPHXZ,jdbcType=VARCHAR},
      </if>
      <if test="record.SSFLDM != null">
        SSFLDM = #{record.SSFLDM,jdbcType=VARCHAR},
      </if>
      <if test="record.ZXBM != null">
        ZXBM = #{record.ZXBM,jdbcType=VARCHAR},
      </if>
      <if test="record.ZKHJJE != null">
        ZKHJJE = #{record.ZKHJJE,jdbcType=VARCHAR},
      </if>
      <if test="record.ZKSE != null">
        ZKSE = #{record.ZKSE,jdbcType=VARCHAR},
      </if>
      <if test="record.ZKJE != null">
        ZKJE = #{record.ZKJE,jdbcType=VARCHAR},
      </if>
      <if test="record.HJJE != null">
        HJJE = #{record.HJJE,jdbcType=VARCHAR},
      </if>
      <if test="record.JHH != null">
        JHH = #{record.JHH,jdbcType=VARCHAR},
      </if>
      <if test="record.XSDD != null">
        XSDD = #{record.XSDD,jdbcType=VARCHAR},
      </if>
      <if test="record.HSJUUID != null">
        HSJUUID = #{record.HSJUUID,jdbcType=VARCHAR},
      </if>
    </set>
    <if test="_parameter != null">
      <include refid="Update_By_Example_Where_Clause" />
    </if>
  </update>
  <update id="updateByExample" parameterType="map">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
    update OUTPUT_INVOICE_DETAIL
    set ID = #{record.ID,jdbcType=VARCHAR},
      FPQQLSH = #{record.FPQQLSH,jdbcType=VARCHAR},
      SPMC = #{record.SPMC,jdbcType=VARCHAR},
      GGXH = #{record.GGXH,jdbcType=VARCHAR},
      DW = #{record.DW,jdbcType=VARCHAR},
      DJ = #{record.DJ,jdbcType=VARCHAR},
      SL = #{record.SL,jdbcType=VARCHAR},
      JE = #{record.JE,jdbcType=VARCHAR},
      SLV = #{record.SLV,jdbcType=VARCHAR},
      SE = #{record.SE,jdbcType=VARCHAR},
      HSBZ = #{record.HSBZ,jdbcType=VARCHAR},
      LSLBS = #{record.LSLBS,jdbcType=VARCHAR},
      YHZCBS = #{record.YHZCBS,jdbcType=VARCHAR},
      YHZCMC = #{record.YHZCMC,jdbcType=VARCHAR},
      MXXH = #{record.MXXH,jdbcType=DECIMAL},
      FPHXZ = #{record.FPHXZ,jdbcType=VARCHAR},
      SSFLDM = #{record.SSFLDM,jdbcType=VARCHAR},
      ZXBM = #{record.ZXBM,jdbcType=VARCHAR},
      ZKHJJE = #{record.ZKHJJE,jdbcType=VARCHAR},
      ZKSE = #{record.ZKSE,jdbcType=VARCHAR},
      ZKJE = #{record.ZKJE,jdbcType=VARCHAR},
      HJJE = #{record.HJJE,jdbcType=VARCHAR},
      JHH = #{record.JHH,jdbcType=VARCHAR},
      XSDD = #{record.XSDD,jdbcType=VARCHAR},
      HSJUUID = #{record.HSJUUID,jdbcType=VARCHAR}
    <if test="_parameter != null">
      <include refid="Update_By_Example_Where_Clause" />
    </if>
  </update>
  <update id="updateByPrimaryKeySelective" parameterType="pwc.taxtech.atms.vat.entity.OutputInvoiceDetail">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
    update OUTPUT_INVOICE_DETAIL
    <set>
      <if test="FPQQLSH != null">
        FPQQLSH = #{FPQQLSH,jdbcType=VARCHAR},
      </if>
      <if test="SPMC != null">
        SPMC = #{SPMC,jdbcType=VARCHAR},
      </if>
      <if test="GGXH != null">
        GGXH = #{GGXH,jdbcType=VARCHAR},
      </if>
      <if test="DW != null">
        DW = #{DW,jdbcType=VARCHAR},
      </if>
      <if test="DJ != null">
        DJ = #{DJ,jdbcType=VARCHAR},
      </if>
      <if test="SL != null">
        SL = #{SL,jdbcType=VARCHAR},
      </if>
      <if test="JE != null">
        JE = #{JE,jdbcType=VARCHAR},
      </if>
      <if test="SLV != null">
        SLV = #{SLV,jdbcType=VARCHAR},
      </if>
      <if test="SE != null">
        SE = #{SE,jdbcType=VARCHAR},
      </if>
      <if test="HSBZ != null">
        HSBZ = #{HSBZ,jdbcType=VARCHAR},
      </if>
      <if test="LSLBS != null">
        LSLBS = #{LSLBS,jdbcType=VARCHAR},
      </if>
      <if test="YHZCBS != null">
        YHZCBS = #{YHZCBS,jdbcType=VARCHAR},
      </if>
      <if test="YHZCMC != null">
        YHZCMC = #{YHZCMC,jdbcType=VARCHAR},
      </if>
      <if test="MXXH != null">
        MXXH = #{MXXH,jdbcType=DECIMAL},
      </if>
      <if test="FPHXZ != null">
        FPHXZ = #{FPHXZ,jdbcType=VARCHAR},
      </if>
      <if test="SSFLDM != null">
        SSFLDM = #{SSFLDM,jdbcType=VARCHAR},
      </if>
      <if test="ZXBM != null">
        ZXBM = #{ZXBM,jdbcType=VARCHAR},
      </if>
      <if test="ZKHJJE != null">
        ZKHJJE = #{ZKHJJE,jdbcType=VARCHAR},
      </if>
      <if test="ZKSE != null">
        ZKSE = #{ZKSE,jdbcType=VARCHAR},
      </if>
      <if test="ZKJE != null">
        ZKJE = #{ZKJE,jdbcType=VARCHAR},
      </if>
      <if test="HJJE != null">
        HJJE = #{HJJE,jdbcType=VARCHAR},
      </if>
      <if test="JHH != null">
        JHH = #{JHH,jdbcType=VARCHAR},
      </if>
      <if test="XSDD != null">
        XSDD = #{XSDD,jdbcType=VARCHAR},
      </if>
      <if test="HSJUUID != null">
        HSJUUID = #{HSJUUID,jdbcType=VARCHAR},
      </if>
    </set>
    where ID = #{ID,jdbcType=VARCHAR}
  </update>
  <update id="updateByPrimaryKey" parameterType="pwc.taxtech.atms.vat.entity.OutputInvoiceDetail">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
    update OUTPUT_INVOICE_DETAIL
    set FPQQLSH = #{FPQQLSH,jdbcType=VARCHAR},
      SPMC = #{SPMC,jdbcType=VARCHAR},
      GGXH = #{GGXH,jdbcType=VARCHAR},
      DW = #{DW,jdbcType=VARCHAR},
      DJ = #{DJ,jdbcType=VARCHAR},
      SL = #{SL,jdbcType=VARCHAR},
      JE = #{JE,jdbcType=VARCHAR},
      SLV = #{SLV,jdbcType=VARCHAR},
      SE = #{SE,jdbcType=VARCHAR},
      HSBZ = #{HSBZ,jdbcType=VARCHAR},
      LSLBS = #{LSLBS,jdbcType=VARCHAR},
      YHZCBS = #{YHZCBS,jdbcType=VARCHAR},
      YHZCMC = #{YHZCMC,jdbcType=VARCHAR},
      MXXH = #{MXXH,jdbcType=DECIMAL},
      FPHXZ = #{FPHXZ,jdbcType=VARCHAR},
      SSFLDM = #{SSFLDM,jdbcType=VARCHAR},
      ZXBM = #{ZXBM,jdbcType=VARCHAR},
      ZKHJJE = #{ZKHJJE,jdbcType=VARCHAR},
      ZKSE = #{ZKSE,jdbcType=VARCHAR},
      ZKJE = #{ZKJE,jdbcType=VARCHAR},
      HJJE = #{HJJE,jdbcType=VARCHAR},
      JHH = #{JHH,jdbcType=VARCHAR},
      XSDD = #{XSDD,jdbcType=VARCHAR},
      HSJUUID = #{HSJUUID,jdbcType=VARCHAR}
    where ID = #{ID,jdbcType=VARCHAR}
  </update>
  <select id="selectByExampleWithRowbounds" parameterType="pwc.taxtech.atms.vat.entity.OutputInvoiceDetailExample" resultMap="BaseResultMap">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
    select
    <if test="distinct">
      distinct
    </if>
    <include refid="Base_Column_List" />
    from OUTPUT_INVOICE_DETAIL
    <if test="_parameter != null">
      <include refid="Example_Where_Clause" />
    </if>
    <if test="orderByClause != null">
      order by ${orderByClause}
    </if>
  </select>
</mapper>