<?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.AnalysisDriverNumMapper">
  <resultMap id="BaseResultMap" type="pwc.taxtech.atms.analysis.entity.AnalysisDriverNum">
    <!--
      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="join_in_amount" jdbcType="DECIMAL" property="joinInAmount" />
    <result column="self_support_amount" jdbcType="DECIMAL" property="selfSupportAmount" />
    <result column="direct_sale_amount" jdbcType="DECIMAL" property="directSaleAmount" />
    <result column="right_public_amount" jdbcType="DECIMAL" property="rightPublicAmount" />
    <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, join_in_amount, self_support_amount, direct_sale_amount, right_public_amount, 
    create_time, update_time, organization_id, company_name, period
  </sql>
  <select id="selectByExample" parameterType="pwc.taxtech.atms.analysis.entity.AnalysisDriverNumExample" 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_driver_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_driver_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_driver_num
    where id = #{id,jdbcType=BIGINT}
  </delete>
  <delete id="deleteByExample" parameterType="pwc.taxtech.atms.analysis.entity.AnalysisDriverNumExample">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
    delete from analysis_driver_num
    <if test="_parameter != null">
      <include refid="Example_Where_Clause" />
    </if>
  </delete>
  <insert id="insert" parameterType="pwc.taxtech.atms.analysis.entity.AnalysisDriverNum">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
    insert into analysis_driver_num (id, seq_no, join_in_amount, 
      self_support_amount, direct_sale_amount, right_public_amount, 
      create_time, update_time, organization_id, 
      company_name, period)
    values (#{id,jdbcType=BIGINT}, #{seqNo,jdbcType=VARCHAR}, #{joinInAmount,jdbcType=DECIMAL}, 
      #{selfSupportAmount,jdbcType=DECIMAL}, #{directSaleAmount,jdbcType=DECIMAL}, #{rightPublicAmount,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.AnalysisDriverNum">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
    insert into analysis_driver_num
    <trim prefix="(" suffix=")" suffixOverrides=",">
      <if test="id != null">
        id,
      </if>
      <if test="seqNo != null">
        seq_no,
      </if>
      <if test="joinInAmount != null">
        join_in_amount,
      </if>
      <if test="selfSupportAmount != null">
        self_support_amount,
      </if>
      <if test="directSaleAmount != null">
        direct_sale_amount,
      </if>
      <if test="rightPublicAmount != null">
        right_public_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="joinInAmount != null">
        #{joinInAmount,jdbcType=DECIMAL},
      </if>
      <if test="selfSupportAmount != null">
        #{selfSupportAmount,jdbcType=DECIMAL},
      </if>
      <if test="directSaleAmount != null">
        #{directSaleAmount,jdbcType=DECIMAL},
      </if>
      <if test="rightPublicAmount != null">
        #{rightPublicAmount,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.AnalysisDriverNumExample" resultType="java.lang.Long">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
    select count(*) from analysis_driver_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_driver_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.joinInAmount != null">
        join_in_amount = #{record.joinInAmount,jdbcType=DECIMAL},
      </if>
      <if test="record.selfSupportAmount != null">
        self_support_amount = #{record.selfSupportAmount,jdbcType=DECIMAL},
      </if>
      <if test="record.directSaleAmount != null">
        direct_sale_amount = #{record.directSaleAmount,jdbcType=DECIMAL},
      </if>
      <if test="record.rightPublicAmount != null">
        right_public_amount = #{record.rightPublicAmount,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_driver_num
    set id = #{record.id,jdbcType=BIGINT},
      seq_no = #{record.seqNo,jdbcType=VARCHAR},
      join_in_amount = #{record.joinInAmount,jdbcType=DECIMAL},
      self_support_amount = #{record.selfSupportAmount,jdbcType=DECIMAL},
      direct_sale_amount = #{record.directSaleAmount,jdbcType=DECIMAL},
      right_public_amount = #{record.rightPublicAmount,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.AnalysisDriverNum">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
    update analysis_driver_num
    <set>
      <if test="seqNo != null">
        seq_no = #{seqNo,jdbcType=VARCHAR},
      </if>
      <if test="joinInAmount != null">
        join_in_amount = #{joinInAmount,jdbcType=DECIMAL},
      </if>
      <if test="selfSupportAmount != null">
        self_support_amount = #{selfSupportAmount,jdbcType=DECIMAL},
      </if>
      <if test="directSaleAmount != null">
        direct_sale_amount = #{directSaleAmount,jdbcType=DECIMAL},
      </if>
      <if test="rightPublicAmount != null">
        right_public_amount = #{rightPublicAmount,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.AnalysisDriverNum">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
    update analysis_driver_num
    set seq_no = #{seqNo,jdbcType=VARCHAR},
      join_in_amount = #{joinInAmount,jdbcType=DECIMAL},
      self_support_amount = #{selfSupportAmount,jdbcType=DECIMAL},
      direct_sale_amount = #{directSaleAmount,jdbcType=DECIMAL},
      right_public_amount = #{rightPublicAmount,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.AnalysisDriverNumExample" 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_driver_num
    <if test="_parameter != null">
      <include refid="Example_Where_Clause" />
    </if>
    <if test="orderByClause != null">
      order by ${orderByClause}
    </if>
  </select>
</mapper>