<?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.vat.dao.IndexAnalysisDetailResultMapper">
  <resultMap id="BaseResultMap" type="pwc.taxtech.atms.vat.entity.IndexAnalysisDetailResult">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
    <id column="ID" jdbcType="VARCHAR" property="id" />
    <result column="RESULT_ID" jdbcType="VARCHAR" property="resultId" />
    <result column="YEAR" jdbcType="DECIMAL" property="year" />
    <result column="PERIOD" jdbcType="DECIMAL" property="period" />
    <result column="INDEX_NAME" jdbcType="VARCHAR" property="indexName" />
    <result column="SEQUENCE" jdbcType="DECIMAL" property="sequence" />
    <result column="DISPLAY_TYPE" jdbcType="DECIMAL" property="displayType" />
    <result column="IS_VISIBLE" jdbcType="DECIMAL" property="isVisible" />
    <result column="IS_MAIN_VALUE" jdbcType="DECIMAL" property="isMainValue" />
    <result column="IS_YEAR_VALUE" jdbcType="DECIMAL" property="isYearValue" />
    <result column="IS_MON_EXP" jdbcType="DECIMAL" property="isMonExp" />
    <result column="IS_YEAR_EXP" jdbcType="DECIMAL" property="isYearExp" />
    <result column="INDEX_RESULT" jdbcType="VARCHAR" property="indexResult" />
    <result column="INDEX_CODE" jdbcType="VARCHAR" property="indexCode" />
    <result column="CREATE_TIME" jdbcType="TIMESTAMP" property="createTime" />
    <result column="UPDATE_TIME" jdbcType="TIMESTAMP" property="updateTime" />
  </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, RESULT_ID, "YEAR", PERIOD, INDEX_NAME, "SEQUENCE", DISPLAY_TYPE, IS_VISIBLE, 
    IS_MAIN_VALUE, IS_YEAR_VALUE, IS_MON_EXP, IS_YEAR_EXP, INDEX_RESULT, INDEX_CODE, 
    CREATE_TIME, UPDATE_TIME
  </sql>
  <select id="selectByExample" parameterType="pwc.taxtech.atms.vat.entity.IndexAnalysisDetailResultExample" 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 INDEX_ANALYSIS_DETAIL_RESULT
    <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 INDEX_ANALYSIS_DETAIL_RESULT
    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 INDEX_ANALYSIS_DETAIL_RESULT
    where ID = #{id,jdbcType=VARCHAR}
  </delete>
  <delete id="deleteByExample" parameterType="pwc.taxtech.atms.vat.entity.IndexAnalysisDetailResultExample">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
    delete from INDEX_ANALYSIS_DETAIL_RESULT
    <if test="_parameter != null">
      <include refid="Example_Where_Clause" />
    </if>
  </delete>
  <insert id="insert" parameterType="pwc.taxtech.atms.vat.entity.IndexAnalysisDetailResult">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
    insert into INDEX_ANALYSIS_DETAIL_RESULT (ID, RESULT_ID, "YEAR", 
      PERIOD, INDEX_NAME, "SEQUENCE", 
      DISPLAY_TYPE, IS_VISIBLE, IS_MAIN_VALUE, 
      IS_YEAR_VALUE, IS_MON_EXP, IS_YEAR_EXP, 
      INDEX_RESULT, INDEX_CODE, CREATE_TIME, 
      UPDATE_TIME)
    values (#{id,jdbcType=VARCHAR}, #{resultId,jdbcType=VARCHAR}, #{year,jdbcType=DECIMAL}, 
      #{period,jdbcType=DECIMAL}, #{indexName,jdbcType=VARCHAR}, #{sequence,jdbcType=DECIMAL}, 
      #{displayType,jdbcType=DECIMAL}, #{isVisible,jdbcType=DECIMAL}, #{isMainValue,jdbcType=DECIMAL}, 
      #{isYearValue,jdbcType=DECIMAL}, #{isMonExp,jdbcType=DECIMAL}, #{isYearExp,jdbcType=DECIMAL}, 
      #{indexResult,jdbcType=VARCHAR}, #{indexCode,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP}, 
      #{updateTime,jdbcType=TIMESTAMP})
  </insert>
  <insert id="insertSelective" parameterType="pwc.taxtech.atms.vat.entity.IndexAnalysisDetailResult">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
    insert into INDEX_ANALYSIS_DETAIL_RESULT
    <trim prefix="(" suffix=")" suffixOverrides=",">
      <if test="id != null">
        ID,
      </if>
      <if test="resultId != null">
        RESULT_ID,
      </if>
      <if test="year != null">
        "YEAR",
      </if>
      <if test="period != null">
        PERIOD,
      </if>
      <if test="indexName != null">
        INDEX_NAME,
      </if>
      <if test="sequence != null">
        "SEQUENCE",
      </if>
      <if test="displayType != null">
        DISPLAY_TYPE,
      </if>
      <if test="isVisible != null">
        IS_VISIBLE,
      </if>
      <if test="isMainValue != null">
        IS_MAIN_VALUE,
      </if>
      <if test="isYearValue != null">
        IS_YEAR_VALUE,
      </if>
      <if test="isMonExp != null">
        IS_MON_EXP,
      </if>
      <if test="isYearExp != null">
        IS_YEAR_EXP,
      </if>
      <if test="indexResult != null">
        INDEX_RESULT,
      </if>
      <if test="indexCode != null">
        INDEX_CODE,
      </if>
      <if test="createTime != null">
        CREATE_TIME,
      </if>
      <if test="updateTime != null">
        UPDATE_TIME,
      </if>
    </trim>
    <trim prefix="values (" suffix=")" suffixOverrides=",">
      <if test="id != null">
        #{id,jdbcType=VARCHAR},
      </if>
      <if test="resultId != null">
        #{resultId,jdbcType=VARCHAR},
      </if>
      <if test="year != null">
        #{year,jdbcType=DECIMAL},
      </if>
      <if test="period != null">
        #{period,jdbcType=DECIMAL},
      </if>
      <if test="indexName != null">
        #{indexName,jdbcType=VARCHAR},
      </if>
      <if test="sequence != null">
        #{sequence,jdbcType=DECIMAL},
      </if>
      <if test="displayType != null">
        #{displayType,jdbcType=DECIMAL},
      </if>
      <if test="isVisible != null">
        #{isVisible,jdbcType=DECIMAL},
      </if>
      <if test="isMainValue != null">
        #{isMainValue,jdbcType=DECIMAL},
      </if>
      <if test="isYearValue != null">
        #{isYearValue,jdbcType=DECIMAL},
      </if>
      <if test="isMonExp != null">
        #{isMonExp,jdbcType=DECIMAL},
      </if>
      <if test="isYearExp != null">
        #{isYearExp,jdbcType=DECIMAL},
      </if>
      <if test="indexResult != null">
        #{indexResult,jdbcType=VARCHAR},
      </if>
      <if test="indexCode != null">
        #{indexCode,jdbcType=VARCHAR},
      </if>
      <if test="createTime != null">
        #{createTime,jdbcType=TIMESTAMP},
      </if>
      <if test="updateTime != null">
        #{updateTime,jdbcType=TIMESTAMP},
      </if>
    </trim>
  </insert>
  <select id="countByExample" parameterType="pwc.taxtech.atms.vat.entity.IndexAnalysisDetailResultExample" resultType="java.lang.Long">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
    select count(*) from INDEX_ANALYSIS_DETAIL_RESULT
    <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 INDEX_ANALYSIS_DETAIL_RESULT
    <set>
      <if test="record.id != null">
        ID = #{record.id,jdbcType=VARCHAR},
      </if>
      <if test="record.resultId != null">
        RESULT_ID = #{record.resultId,jdbcType=VARCHAR},
      </if>
      <if test="record.year != null">
        "YEAR" = #{record.year,jdbcType=DECIMAL},
      </if>
      <if test="record.period != null">
        PERIOD = #{record.period,jdbcType=DECIMAL},
      </if>
      <if test="record.indexName != null">
        INDEX_NAME = #{record.indexName,jdbcType=VARCHAR},
      </if>
      <if test="record.sequence != null">
        "SEQUENCE" = #{record.sequence,jdbcType=DECIMAL},
      </if>
      <if test="record.displayType != null">
        DISPLAY_TYPE = #{record.displayType,jdbcType=DECIMAL},
      </if>
      <if test="record.isVisible != null">
        IS_VISIBLE = #{record.isVisible,jdbcType=DECIMAL},
      </if>
      <if test="record.isMainValue != null">
        IS_MAIN_VALUE = #{record.isMainValue,jdbcType=DECIMAL},
      </if>
      <if test="record.isYearValue != null">
        IS_YEAR_VALUE = #{record.isYearValue,jdbcType=DECIMAL},
      </if>
      <if test="record.isMonExp != null">
        IS_MON_EXP = #{record.isMonExp,jdbcType=DECIMAL},
      </if>
      <if test="record.isYearExp != null">
        IS_YEAR_EXP = #{record.isYearExp,jdbcType=DECIMAL},
      </if>
      <if test="record.indexResult != null">
        INDEX_RESULT = #{record.indexResult,jdbcType=VARCHAR},
      </if>
      <if test="record.indexCode != null">
        INDEX_CODE = #{record.indexCode,jdbcType=VARCHAR},
      </if>
      <if test="record.createTime != null">
        CREATE_TIME = #{record.createTime,jdbcType=TIMESTAMP},
      </if>
      <if test="record.updateTime != null">
        UPDATE_TIME = #{record.updateTime,jdbcType=TIMESTAMP},
      </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 INDEX_ANALYSIS_DETAIL_RESULT
    set ID = #{record.id,jdbcType=VARCHAR},
      RESULT_ID = #{record.resultId,jdbcType=VARCHAR},
      "YEAR" = #{record.year,jdbcType=DECIMAL},
      PERIOD = #{record.period,jdbcType=DECIMAL},
      INDEX_NAME = #{record.indexName,jdbcType=VARCHAR},
      "SEQUENCE" = #{record.sequence,jdbcType=DECIMAL},
      DISPLAY_TYPE = #{record.displayType,jdbcType=DECIMAL},
      IS_VISIBLE = #{record.isVisible,jdbcType=DECIMAL},
      IS_MAIN_VALUE = #{record.isMainValue,jdbcType=DECIMAL},
      IS_YEAR_VALUE = #{record.isYearValue,jdbcType=DECIMAL},
      IS_MON_EXP = #{record.isMonExp,jdbcType=DECIMAL},
      IS_YEAR_EXP = #{record.isYearExp,jdbcType=DECIMAL},
      INDEX_RESULT = #{record.indexResult,jdbcType=VARCHAR},
      INDEX_CODE = #{record.indexCode,jdbcType=VARCHAR},
      CREATE_TIME = #{record.createTime,jdbcType=TIMESTAMP},
      UPDATE_TIME = #{record.updateTime,jdbcType=TIMESTAMP}
    <if test="_parameter != null">
      <include refid="Update_By_Example_Where_Clause" />
    </if>
  </update>
  <update id="updateByPrimaryKeySelective" parameterType="pwc.taxtech.atms.vat.entity.IndexAnalysisDetailResult">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
    update INDEX_ANALYSIS_DETAIL_RESULT
    <set>
      <if test="resultId != null">
        RESULT_ID = #{resultId,jdbcType=VARCHAR},
      </if>
      <if test="year != null">
        "YEAR" = #{year,jdbcType=DECIMAL},
      </if>
      <if test="period != null">
        PERIOD = #{period,jdbcType=DECIMAL},
      </if>
      <if test="indexName != null">
        INDEX_NAME = #{indexName,jdbcType=VARCHAR},
      </if>
      <if test="sequence != null">
        "SEQUENCE" = #{sequence,jdbcType=DECIMAL},
      </if>
      <if test="displayType != null">
        DISPLAY_TYPE = #{displayType,jdbcType=DECIMAL},
      </if>
      <if test="isVisible != null">
        IS_VISIBLE = #{isVisible,jdbcType=DECIMAL},
      </if>
      <if test="isMainValue != null">
        IS_MAIN_VALUE = #{isMainValue,jdbcType=DECIMAL},
      </if>
      <if test="isYearValue != null">
        IS_YEAR_VALUE = #{isYearValue,jdbcType=DECIMAL},
      </if>
      <if test="isMonExp != null">
        IS_MON_EXP = #{isMonExp,jdbcType=DECIMAL},
      </if>
      <if test="isYearExp != null">
        IS_YEAR_EXP = #{isYearExp,jdbcType=DECIMAL},
      </if>
      <if test="indexResult != null">
        INDEX_RESULT = #{indexResult,jdbcType=VARCHAR},
      </if>
      <if test="indexCode != null">
        INDEX_CODE = #{indexCode,jdbcType=VARCHAR},
      </if>
      <if test="createTime != null">
        CREATE_TIME = #{createTime,jdbcType=TIMESTAMP},
      </if>
      <if test="updateTime != null">
        UPDATE_TIME = #{updateTime,jdbcType=TIMESTAMP},
      </if>
    </set>
    where ID = #{id,jdbcType=VARCHAR}
  </update>
  <update id="updateByPrimaryKey" parameterType="pwc.taxtech.atms.vat.entity.IndexAnalysisDetailResult">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
    update INDEX_ANALYSIS_DETAIL_RESULT
    set RESULT_ID = #{resultId,jdbcType=VARCHAR},
      "YEAR" = #{year,jdbcType=DECIMAL},
      PERIOD = #{period,jdbcType=DECIMAL},
      INDEX_NAME = #{indexName,jdbcType=VARCHAR},
      "SEQUENCE" = #{sequence,jdbcType=DECIMAL},
      DISPLAY_TYPE = #{displayType,jdbcType=DECIMAL},
      IS_VISIBLE = #{isVisible,jdbcType=DECIMAL},
      IS_MAIN_VALUE = #{isMainValue,jdbcType=DECIMAL},
      IS_YEAR_VALUE = #{isYearValue,jdbcType=DECIMAL},
      IS_MON_EXP = #{isMonExp,jdbcType=DECIMAL},
      IS_YEAR_EXP = #{isYearExp,jdbcType=DECIMAL},
      INDEX_RESULT = #{indexResult,jdbcType=VARCHAR},
      INDEX_CODE = #{indexCode,jdbcType=VARCHAR},
      CREATE_TIME = #{createTime,jdbcType=TIMESTAMP},
      UPDATE_TIME = #{updateTime,jdbcType=TIMESTAMP}
    where ID = #{id,jdbcType=VARCHAR}
  </update>
  <select id="selectByExampleWithRowbounds" parameterType="pwc.taxtech.atms.vat.entity.IndexAnalysisDetailResultExample" 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 INDEX_ANALYSIS_DETAIL_RESULT
    <if test="_parameter != null">
      <include refid="Example_Where_Clause" />
    </if>
    <if test="orderByClause != null">
      order by ${orderByClause}
    </if>
  </select>
</mapper>