<?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.IndexAnalysisResultMapper">
  <resultMap id="BaseResultMap" type="pwc.taxtech.atms.vat.entity.IndexAnalysisResult">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
    <id column="ID" jdbcType="VARCHAR" property="id" />
    <result column="MODEL_ID" jdbcType="VARCHAR" property="modelId" />
    <result column="CODE" jdbcType="VARCHAR" property="code" />
    <result column="NAME" jdbcType="VARCHAR" property="name" />
    <result column="DESCRIPTION" jdbcType="VARCHAR" property="description" />
    <result column="MONTH_EXPLAIN" jdbcType="VARCHAR" property="monthExplain" />
    <result column="YEAR_EXPLAIN" jdbcType="VARCHAR" property="yearExplain" />
    <result column="SERVICE_TYPE_ID" jdbcType="VARCHAR" property="serviceTypeId" />
    <result column="CATEGORY_ID" jdbcType="VARCHAR" property="categoryId" />
    <result column="TYPE" jdbcType="DECIMAL" property="type" />
    <result column="INDEX_CODE_TOTAL" jdbcType="VARCHAR" property="indexCodeTotal" />
    <result column="IS_SHOW" jdbcType="DECIMAL" property="isShow" />
    <result column="IS_REPORT" jdbcType="DECIMAL" property="isReport" />
    <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, MODEL_ID, CODE, "NAME", DESCRIPTION, MONTH_EXPLAIN, YEAR_EXPLAIN, SERVICE_TYPE_ID, 
    CATEGORY_ID, "TYPE", INDEX_CODE_TOTAL, IS_SHOW, IS_REPORT, CREATE_TIME, UPDATE_TIME
  </sql>
  <select id="selectByExample" parameterType="pwc.taxtech.atms.vat.entity.IndexAnalysisResultExample" 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_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_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_RESULT
    where ID = #{id,jdbcType=VARCHAR}
  </delete>
  <delete id="deleteByExample" parameterType="pwc.taxtech.atms.vat.entity.IndexAnalysisResultExample">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
    delete from INDEX_ANALYSIS_RESULT
    <if test="_parameter != null">
      <include refid="Example_Where_Clause" />
    </if>
  </delete>
  <insert id="insert" parameterType="pwc.taxtech.atms.vat.entity.IndexAnalysisResult">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
    insert into INDEX_ANALYSIS_RESULT (ID, MODEL_ID, CODE, 
      "NAME", DESCRIPTION, MONTH_EXPLAIN, 
      YEAR_EXPLAIN, SERVICE_TYPE_ID, CATEGORY_ID, 
      "TYPE", INDEX_CODE_TOTAL, IS_SHOW, 
      IS_REPORT, CREATE_TIME, UPDATE_TIME
      )
    values (#{id,jdbcType=VARCHAR}, #{modelId,jdbcType=VARCHAR}, #{code,jdbcType=VARCHAR}, 
      #{name,jdbcType=VARCHAR}, #{description,jdbcType=VARCHAR}, #{monthExplain,jdbcType=VARCHAR}, 
      #{yearExplain,jdbcType=VARCHAR}, #{serviceTypeId,jdbcType=VARCHAR}, #{categoryId,jdbcType=VARCHAR}, 
      #{type,jdbcType=DECIMAL}, #{indexCodeTotal,jdbcType=VARCHAR}, #{isShow,jdbcType=DECIMAL}, 
      #{isReport,jdbcType=DECIMAL}, #{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP}
      )
  </insert>
  <insert id="insertSelective" parameterType="pwc.taxtech.atms.vat.entity.IndexAnalysisResult">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
    insert into INDEX_ANALYSIS_RESULT
    <trim prefix="(" suffix=")" suffixOverrides=",">
      <if test="id != null">
        ID,
      </if>
      <if test="modelId != null">
        MODEL_ID,
      </if>
      <if test="code != null">
        CODE,
      </if>
      <if test="name != null">
        "NAME",
      </if>
      <if test="description != null">
        DESCRIPTION,
      </if>
      <if test="monthExplain != null">
        MONTH_EXPLAIN,
      </if>
      <if test="yearExplain != null">
        YEAR_EXPLAIN,
      </if>
      <if test="serviceTypeId != null">
        SERVICE_TYPE_ID,
      </if>
      <if test="categoryId != null">
        CATEGORY_ID,
      </if>
      <if test="type != null">
        "TYPE",
      </if>
      <if test="indexCodeTotal != null">
        INDEX_CODE_TOTAL,
      </if>
      <if test="isShow != null">
        IS_SHOW,
      </if>
      <if test="isReport != null">
        IS_REPORT,
      </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="modelId != null">
        #{modelId,jdbcType=VARCHAR},
      </if>
      <if test="code != null">
        #{code,jdbcType=VARCHAR},
      </if>
      <if test="name != null">
        #{name,jdbcType=VARCHAR},
      </if>
      <if test="description != null">
        #{description,jdbcType=VARCHAR},
      </if>
      <if test="monthExplain != null">
        #{monthExplain,jdbcType=VARCHAR},
      </if>
      <if test="yearExplain != null">
        #{yearExplain,jdbcType=VARCHAR},
      </if>
      <if test="serviceTypeId != null">
        #{serviceTypeId,jdbcType=VARCHAR},
      </if>
      <if test="categoryId != null">
        #{categoryId,jdbcType=VARCHAR},
      </if>
      <if test="type != null">
        #{type,jdbcType=DECIMAL},
      </if>
      <if test="indexCodeTotal != null">
        #{indexCodeTotal,jdbcType=VARCHAR},
      </if>
      <if test="isShow != null">
        #{isShow,jdbcType=DECIMAL},
      </if>
      <if test="isReport != null">
        #{isReport,jdbcType=DECIMAL},
      </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.IndexAnalysisResultExample" resultType="java.lang.Long">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
    select count(*) from INDEX_ANALYSIS_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_RESULT
    <set>
      <if test="record.id != null">
        ID = #{record.id,jdbcType=VARCHAR},
      </if>
      <if test="record.modelId != null">
        MODEL_ID = #{record.modelId,jdbcType=VARCHAR},
      </if>
      <if test="record.code != null">
        CODE = #{record.code,jdbcType=VARCHAR},
      </if>
      <if test="record.name != null">
        "NAME" = #{record.name,jdbcType=VARCHAR},
      </if>
      <if test="record.description != null">
        DESCRIPTION = #{record.description,jdbcType=VARCHAR},
      </if>
      <if test="record.monthExplain != null">
        MONTH_EXPLAIN = #{record.monthExplain,jdbcType=VARCHAR},
      </if>
      <if test="record.yearExplain != null">
        YEAR_EXPLAIN = #{record.yearExplain,jdbcType=VARCHAR},
      </if>
      <if test="record.serviceTypeId != null">
        SERVICE_TYPE_ID = #{record.serviceTypeId,jdbcType=VARCHAR},
      </if>
      <if test="record.categoryId != null">
        CATEGORY_ID = #{record.categoryId,jdbcType=VARCHAR},
      </if>
      <if test="record.type != null">
        "TYPE" = #{record.type,jdbcType=DECIMAL},
      </if>
      <if test="record.indexCodeTotal != null">
        INDEX_CODE_TOTAL = #{record.indexCodeTotal,jdbcType=VARCHAR},
      </if>
      <if test="record.isShow != null">
        IS_SHOW = #{record.isShow,jdbcType=DECIMAL},
      </if>
      <if test="record.isReport != null">
        IS_REPORT = #{record.isReport,jdbcType=DECIMAL},
      </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_RESULT
    set ID = #{record.id,jdbcType=VARCHAR},
      MODEL_ID = #{record.modelId,jdbcType=VARCHAR},
      CODE = #{record.code,jdbcType=VARCHAR},
      "NAME" = #{record.name,jdbcType=VARCHAR},
      DESCRIPTION = #{record.description,jdbcType=VARCHAR},
      MONTH_EXPLAIN = #{record.monthExplain,jdbcType=VARCHAR},
      YEAR_EXPLAIN = #{record.yearExplain,jdbcType=VARCHAR},
      SERVICE_TYPE_ID = #{record.serviceTypeId,jdbcType=VARCHAR},
      CATEGORY_ID = #{record.categoryId,jdbcType=VARCHAR},
      "TYPE" = #{record.type,jdbcType=DECIMAL},
      INDEX_CODE_TOTAL = #{record.indexCodeTotal,jdbcType=VARCHAR},
      IS_SHOW = #{record.isShow,jdbcType=DECIMAL},
      IS_REPORT = #{record.isReport,jdbcType=DECIMAL},
      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.IndexAnalysisResult">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
    update INDEX_ANALYSIS_RESULT
    <set>
      <if test="modelId != null">
        MODEL_ID = #{modelId,jdbcType=VARCHAR},
      </if>
      <if test="code != null">
        CODE = #{code,jdbcType=VARCHAR},
      </if>
      <if test="name != null">
        "NAME" = #{name,jdbcType=VARCHAR},
      </if>
      <if test="description != null">
        DESCRIPTION = #{description,jdbcType=VARCHAR},
      </if>
      <if test="monthExplain != null">
        MONTH_EXPLAIN = #{monthExplain,jdbcType=VARCHAR},
      </if>
      <if test="yearExplain != null">
        YEAR_EXPLAIN = #{yearExplain,jdbcType=VARCHAR},
      </if>
      <if test="serviceTypeId != null">
        SERVICE_TYPE_ID = #{serviceTypeId,jdbcType=VARCHAR},
      </if>
      <if test="categoryId != null">
        CATEGORY_ID = #{categoryId,jdbcType=VARCHAR},
      </if>
      <if test="type != null">
        "TYPE" = #{type,jdbcType=DECIMAL},
      </if>
      <if test="indexCodeTotal != null">
        INDEX_CODE_TOTAL = #{indexCodeTotal,jdbcType=VARCHAR},
      </if>
      <if test="isShow != null">
        IS_SHOW = #{isShow,jdbcType=DECIMAL},
      </if>
      <if test="isReport != null">
        IS_REPORT = #{isReport,jdbcType=DECIMAL},
      </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.IndexAnalysisResult">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
    update INDEX_ANALYSIS_RESULT
    set MODEL_ID = #{modelId,jdbcType=VARCHAR},
      CODE = #{code,jdbcType=VARCHAR},
      "NAME" = #{name,jdbcType=VARCHAR},
      DESCRIPTION = #{description,jdbcType=VARCHAR},
      MONTH_EXPLAIN = #{monthExplain,jdbcType=VARCHAR},
      YEAR_EXPLAIN = #{yearExplain,jdbcType=VARCHAR},
      SERVICE_TYPE_ID = #{serviceTypeId,jdbcType=VARCHAR},
      CATEGORY_ID = #{categoryId,jdbcType=VARCHAR},
      "TYPE" = #{type,jdbcType=DECIMAL},
      INDEX_CODE_TOTAL = #{indexCodeTotal,jdbcType=VARCHAR},
      IS_SHOW = #{isShow,jdbcType=DECIMAL},
      IS_REPORT = #{isReport,jdbcType=DECIMAL},
      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.IndexAnalysisResultExample" 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_RESULT
    <if test="_parameter != null">
      <include refid="Example_Where_Clause" />
    </if>
    <if test="orderByClause != null">
      order by ${orderByClause}
    </if>
  </select>
</mapper>