<?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.vatDao.CellDataMapper">
  <resultMap id="BaseResultMap" type="pwc.taxtech.atms.vatEntitiy.CellData">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
    <id column="ID" jdbcType="VARCHAR" property="ID" />
    <result column="ReportID" jdbcType="VARCHAR" property="reportID" />
    <result column="CellTemplateID" jdbcType="VARCHAR" property="cellTemplateID" />
    <result column="Data" jdbcType="VARCHAR" property="data" />
    <result column="FormulaExp" jdbcType="VARCHAR" property="formulaExp" />
    <result column="Creator" jdbcType="VARCHAR" property="creator" />
    <result column="CreateTime" jdbcType="TIMESTAMP" property="createTime" />
    <result column="Updater" jdbcType="VARCHAR" property="updater" />
    <result column="UpdateTime" 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, ReportID, CellTemplateID, Data, FormulaExp, Creator, CreateTime, Updater, UpdateTime
  </sql>
  <select id="selectByExample" parameterType="pwc.taxtech.atms.vatEntitiy.CellDataExample" 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 CellData
    <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 CellData
    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 CellData
    where ID = #{ID,jdbcType=VARCHAR}
  </delete>
  <delete id="deleteByExample" parameterType="pwc.taxtech.atms.vatEntitiy.CellDataExample">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
    delete from CellData
    <if test="_parameter != null">
      <include refid="Example_Where_Clause" />
    </if>
  </delete>
  <insert id="insert" parameterType="pwc.taxtech.atms.vatEntitiy.CellData">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
    insert into CellData (ID, ReportID, CellTemplateID, 
      Data, FormulaExp, Creator, 
      CreateTime, Updater, UpdateTime
      )
    values (#{ID,jdbcType=VARCHAR}, #{reportID,jdbcType=VARCHAR}, #{cellTemplateID,jdbcType=VARCHAR}, 
      #{data,jdbcType=VARCHAR}, #{formulaExp,jdbcType=VARCHAR}, #{creator,jdbcType=VARCHAR}, 
      #{createTime,jdbcType=TIMESTAMP}, #{updater,jdbcType=VARCHAR}, #{updateTime,jdbcType=TIMESTAMP}
      )
  </insert>
  <insert id="insertSelective" parameterType="pwc.taxtech.atms.vatEntitiy.CellData">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
    insert into CellData
    <trim prefix="(" suffix=")" suffixOverrides=",">
      <if test="ID != null">
        ID,
      </if>
      <if test="reportID != null">
        ReportID,
      </if>
      <if test="cellTemplateID != null">
        CellTemplateID,
      </if>
      <if test="data != null">
        Data,
      </if>
      <if test="formulaExp != null">
        FormulaExp,
      </if>
      <if test="creator != null">
        Creator,
      </if>
      <if test="createTime != null">
        CreateTime,
      </if>
      <if test="updater != null">
        Updater,
      </if>
      <if test="updateTime != null">
        UpdateTime,
      </if>
    </trim>
    <trim prefix="values (" suffix=")" suffixOverrides=",">
      <if test="ID != null">
        #{ID,jdbcType=VARCHAR},
      </if>
      <if test="reportID != null">
        #{reportID,jdbcType=VARCHAR},
      </if>
      <if test="cellTemplateID != null">
        #{cellTemplateID,jdbcType=VARCHAR},
      </if>
      <if test="data != null">
        #{data,jdbcType=VARCHAR},
      </if>
      <if test="formulaExp != null">
        #{formulaExp,jdbcType=VARCHAR},
      </if>
      <if test="creator != null">
        #{creator,jdbcType=VARCHAR},
      </if>
      <if test="createTime != null">
        #{createTime,jdbcType=TIMESTAMP},
      </if>
      <if test="updater != null">
        #{updater,jdbcType=VARCHAR},
      </if>
      <if test="updateTime != null">
        #{updateTime,jdbcType=TIMESTAMP},
      </if>
    </trim>
  </insert>
  <select id="countByExample" parameterType="pwc.taxtech.atms.vatEntitiy.CellDataExample" resultType="java.lang.Long">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
    select count(*) from CellData
    <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 CellData
    <set>
      <if test="record.ID != null">
        ID = #{record.ID,jdbcType=VARCHAR},
      </if>
      <if test="record.reportID != null">
        ReportID = #{record.reportID,jdbcType=VARCHAR},
      </if>
      <if test="record.cellTemplateID != null">
        CellTemplateID = #{record.cellTemplateID,jdbcType=VARCHAR},
      </if>
      <if test="record.data != null">
        Data = #{record.data,jdbcType=VARCHAR},
      </if>
      <if test="record.formulaExp != null">
        FormulaExp = #{record.formulaExp,jdbcType=VARCHAR},
      </if>
      <if test="record.creator != null">
        Creator = #{record.creator,jdbcType=VARCHAR},
      </if>
      <if test="record.createTime != null">
        CreateTime = #{record.createTime,jdbcType=TIMESTAMP},
      </if>
      <if test="record.updater != null">
        Updater = #{record.updater,jdbcType=VARCHAR},
      </if>
      <if test="record.updateTime != null">
        UpdateTime = #{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 CellData
    set ID = #{record.ID,jdbcType=VARCHAR},
      ReportID = #{record.reportID,jdbcType=VARCHAR},
      CellTemplateID = #{record.cellTemplateID,jdbcType=VARCHAR},
      Data = #{record.data,jdbcType=VARCHAR},
      FormulaExp = #{record.formulaExp,jdbcType=VARCHAR},
      Creator = #{record.creator,jdbcType=VARCHAR},
      CreateTime = #{record.createTime,jdbcType=TIMESTAMP},
      Updater = #{record.updater,jdbcType=VARCHAR},
      UpdateTime = #{record.updateTime,jdbcType=TIMESTAMP}
    <if test="_parameter != null">
      <include refid="Update_By_Example_Where_Clause" />
    </if>
  </update>
  <update id="updateByPrimaryKeySelective" parameterType="pwc.taxtech.atms.vatEntitiy.CellData">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
    update CellData
    <set>
      <if test="reportID != null">
        ReportID = #{reportID,jdbcType=VARCHAR},
      </if>
      <if test="cellTemplateID != null">
        CellTemplateID = #{cellTemplateID,jdbcType=VARCHAR},
      </if>
      <if test="data != null">
        Data = #{data,jdbcType=VARCHAR},
      </if>
      <if test="formulaExp != null">
        FormulaExp = #{formulaExp,jdbcType=VARCHAR},
      </if>
      <if test="creator != null">
        Creator = #{creator,jdbcType=VARCHAR},
      </if>
      <if test="createTime != null">
        CreateTime = #{createTime,jdbcType=TIMESTAMP},
      </if>
      <if test="updater != null">
        Updater = #{updater,jdbcType=VARCHAR},
      </if>
      <if test="updateTime != null">
        UpdateTime = #{updateTime,jdbcType=TIMESTAMP},
      </if>
    </set>
    where ID = #{ID,jdbcType=VARCHAR}
  </update>
  <update id="updateByPrimaryKey" parameterType="pwc.taxtech.atms.vatEntitiy.CellData">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
    update CellData
    set ReportID = #{reportID,jdbcType=VARCHAR},
      CellTemplateID = #{cellTemplateID,jdbcType=VARCHAR},
      Data = #{data,jdbcType=VARCHAR},
      FormulaExp = #{formulaExp,jdbcType=VARCHAR},
      Creator = #{creator,jdbcType=VARCHAR},
      CreateTime = #{createTime,jdbcType=TIMESTAMP},
      Updater = #{updater,jdbcType=VARCHAR},
      UpdateTime = #{updateTime,jdbcType=TIMESTAMP}
    where ID = #{ID,jdbcType=VARCHAR}
  </update>
  <select id="selectByExampleWithRowbounds" parameterType="pwc.taxtech.atms.vatEntitiy.CellDataExample" 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 CellData
    <if test="_parameter != null">
      <include refid="Example_Where_Clause" />
    </if>
    <if test="orderByClause != null">
      order by ${orderByClause}
    </if>
  </select>
</mapper>