<?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.analysis.dao.AnalysisEmployeeNumMapper">
  <resultMap id="BaseResultMap" type="pwc.taxtech.atms.analysis.entity.AnalysisEmployeeNum">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
    <id column="id" jdbcType="BIGINT" property="id" />
    <result column="seq_no" jdbcType="VARCHAR" property="seqNo" />
    <result column="full_time_amount" jdbcType="DECIMAL" property="fullTimeAmount" />
    <result column="intern_amount" jdbcType="DECIMAL" property="internAmount" />
    <result column="vendor_amount" jdbcType="DECIMAL" property="vendorAmount" />
    <result column="total_amount" jdbcType="DECIMAL" property="totalAmount" />
    <result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
    <result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
    <result column="organization_id" jdbcType="VARCHAR" property="organizationId" />
    <result column="company_name" jdbcType="VARCHAR" property="companyName" />
    <result column="period" jdbcType="INTEGER" property="period" />
  </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, seq_no, full_time_amount, intern_amount, vendor_amount, total_amount, create_time, 
    update_time, organization_id, company_name, period
  </sql>
  <select id="selectByExample" parameterType="pwc.taxtech.atms.analysis.entity.AnalysisEmployeeNumExample" 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 analysis_employee_num
    <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">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
    select 
    <include refid="Base_Column_List" />
    from analysis_employee_num
    where id = #{id,jdbcType=BIGINT}
  </select>
  <delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
    delete from analysis_employee_num
    where id = #{id,jdbcType=BIGINT}
  </delete>
  <delete id="deleteByExample" parameterType="pwc.taxtech.atms.analysis.entity.AnalysisEmployeeNumExample">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
    delete from analysis_employee_num
    <if test="_parameter != null">
      <include refid="Example_Where_Clause" />
    </if>
  </delete>
  <insert id="insert" parameterType="pwc.taxtech.atms.analysis.entity.AnalysisEmployeeNum">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
    insert into analysis_employee_num (id, seq_no, full_time_amount, 
      intern_amount, vendor_amount, total_amount, 
      create_time, update_time, organization_id, 
      company_name, period)
    values (#{id,jdbcType=BIGINT}, #{seqNo,jdbcType=VARCHAR}, #{fullTimeAmount,jdbcType=DECIMAL}, 
      #{internAmount,jdbcType=DECIMAL}, #{vendorAmount,jdbcType=DECIMAL}, #{totalAmount,jdbcType=DECIMAL}, 
      #{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP}, #{organizationId,jdbcType=VARCHAR}, 
      #{companyName,jdbcType=VARCHAR}, #{period,jdbcType=INTEGER})
  </insert>
  <insert id="insertSelective" parameterType="pwc.taxtech.atms.analysis.entity.AnalysisEmployeeNum">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
    insert into analysis_employee_num
    <trim prefix="(" suffix=")" suffixOverrides=",">
      <if test="id != null">
        id,
      </if>
      <if test="seqNo != null">
        seq_no,
      </if>
      <if test="fullTimeAmount != null">
        full_time_amount,
      </if>
      <if test="internAmount != null">
        intern_amount,
      </if>
      <if test="vendorAmount != null">
        vendor_amount,
      </if>
      <if test="totalAmount != null">
        total_amount,
      </if>
      <if test="createTime != null">
        create_time,
      </if>
      <if test="updateTime != null">
        update_time,
      </if>
      <if test="organizationId != null">
        organization_id,
      </if>
      <if test="companyName != null">
        company_name,
      </if>
      <if test="period != null">
        period,
      </if>
    </trim>
    <trim prefix="values (" suffix=")" suffixOverrides=",">
      <if test="id != null">
        #{id,jdbcType=BIGINT},
      </if>
      <if test="seqNo != null">
        #{seqNo,jdbcType=VARCHAR},
      </if>
      <if test="fullTimeAmount != null">
        #{fullTimeAmount,jdbcType=DECIMAL},
      </if>
      <if test="internAmount != null">
        #{internAmount,jdbcType=DECIMAL},
      </if>
      <if test="vendorAmount != null">
        #{vendorAmount,jdbcType=DECIMAL},
      </if>
      <if test="totalAmount != null">
        #{totalAmount,jdbcType=DECIMAL},
      </if>
      <if test="createTime != null">
        #{createTime,jdbcType=TIMESTAMP},
      </if>
      <if test="updateTime != null">
        #{updateTime,jdbcType=TIMESTAMP},
      </if>
      <if test="organizationId != null">
        #{organizationId,jdbcType=VARCHAR},
      </if>
      <if test="companyName != null">
        #{companyName,jdbcType=VARCHAR},
      </if>
      <if test="period != null">
        #{period,jdbcType=INTEGER},
      </if>
    </trim>
  </insert>
  <select id="countByExample" parameterType="pwc.taxtech.atms.analysis.entity.AnalysisEmployeeNumExample" resultType="java.lang.Long">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
    select count(*) from analysis_employee_num
    <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 analysis_employee_num
    <set>
      <if test="record.id != null">
        id = #{record.id,jdbcType=BIGINT},
      </if>
      <if test="record.seqNo != null">
        seq_no = #{record.seqNo,jdbcType=VARCHAR},
      </if>
      <if test="record.fullTimeAmount != null">
        full_time_amount = #{record.fullTimeAmount,jdbcType=DECIMAL},
      </if>
      <if test="record.internAmount != null">
        intern_amount = #{record.internAmount,jdbcType=DECIMAL},
      </if>
      <if test="record.vendorAmount != null">
        vendor_amount = #{record.vendorAmount,jdbcType=DECIMAL},
      </if>
      <if test="record.totalAmount != null">
        total_amount = #{record.totalAmount,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>
      <if test="record.organizationId != null">
        organization_id = #{record.organizationId,jdbcType=VARCHAR},
      </if>
      <if test="record.companyName != null">
        company_name = #{record.companyName,jdbcType=VARCHAR},
      </if>
      <if test="record.period != null">
        period = #{record.period,jdbcType=INTEGER},
      </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 analysis_employee_num
    set id = #{record.id,jdbcType=BIGINT},
      seq_no = #{record.seqNo,jdbcType=VARCHAR},
      full_time_amount = #{record.fullTimeAmount,jdbcType=DECIMAL},
      intern_amount = #{record.internAmount,jdbcType=DECIMAL},
      vendor_amount = #{record.vendorAmount,jdbcType=DECIMAL},
      total_amount = #{record.totalAmount,jdbcType=DECIMAL},
      create_time = #{record.createTime,jdbcType=TIMESTAMP},
      update_time = #{record.updateTime,jdbcType=TIMESTAMP},
      organization_id = #{record.organizationId,jdbcType=VARCHAR},
      company_name = #{record.companyName,jdbcType=VARCHAR},
      period = #{record.period,jdbcType=INTEGER}
    <if test="_parameter != null">
      <include refid="Update_By_Example_Where_Clause" />
    </if>
  </update>
  <update id="updateByPrimaryKeySelective" parameterType="pwc.taxtech.atms.analysis.entity.AnalysisEmployeeNum">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
    update analysis_employee_num
    <set>
      <if test="seqNo != null">
        seq_no = #{seqNo,jdbcType=VARCHAR},
      </if>
      <if test="fullTimeAmount != null">
        full_time_amount = #{fullTimeAmount,jdbcType=DECIMAL},
      </if>
      <if test="internAmount != null">
        intern_amount = #{internAmount,jdbcType=DECIMAL},
      </if>
      <if test="vendorAmount != null">
        vendor_amount = #{vendorAmount,jdbcType=DECIMAL},
      </if>
      <if test="totalAmount != null">
        total_amount = #{totalAmount,jdbcType=DECIMAL},
      </if>
      <if test="createTime != null">
        create_time = #{createTime,jdbcType=TIMESTAMP},
      </if>
      <if test="updateTime != null">
        update_time = #{updateTime,jdbcType=TIMESTAMP},
      </if>
      <if test="organizationId != null">
        organization_id = #{organizationId,jdbcType=VARCHAR},
      </if>
      <if test="companyName != null">
        company_name = #{companyName,jdbcType=VARCHAR},
      </if>
      <if test="period != null">
        period = #{period,jdbcType=INTEGER},
      </if>
    </set>
    where id = #{id,jdbcType=BIGINT}
  </update>
  <update id="updateByPrimaryKey" parameterType="pwc.taxtech.atms.analysis.entity.AnalysisEmployeeNum">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
    update analysis_employee_num
    set seq_no = #{seqNo,jdbcType=VARCHAR},
      full_time_amount = #{fullTimeAmount,jdbcType=DECIMAL},
      intern_amount = #{internAmount,jdbcType=DECIMAL},
      vendor_amount = #{vendorAmount,jdbcType=DECIMAL},
      total_amount = #{totalAmount,jdbcType=DECIMAL},
      create_time = #{createTime,jdbcType=TIMESTAMP},
      update_time = #{updateTime,jdbcType=TIMESTAMP},
      organization_id = #{organizationId,jdbcType=VARCHAR},
      company_name = #{companyName,jdbcType=VARCHAR},
      period = #{period,jdbcType=INTEGER}
    where id = #{id,jdbcType=BIGINT}
  </update>
  <select id="selectByExampleWithRowbounds" parameterType="pwc.taxtech.atms.analysis.entity.AnalysisEmployeeNumExample" 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 analysis_employee_num
    <if test="_parameter != null">
      <include refid="Example_Where_Clause" />
    </if>
    <if test="orderByClause != null">
      order by ${orderByClause}
    </if>
  </select>
</mapper>