<?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.dao.CitDataImportLogMapper">
  <resultMap id="BaseResultMap" type="pwc.taxtech.atms.entity.CitDataImportLog">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
    <id column="id" jdbcType="BIGINT" property="id" />
    <result column="organization_id" jdbcType="VARCHAR" property="organizationId" />
    <result column="project_id" jdbcType="VARCHAR" property="projectId" />
    <result column="period" jdbcType="INTEGER" property="period" />
    <result column="taxpayer_id_num" jdbcType="VARCHAR" property="taxpayerIdNum" />
    <result column="type" jdbcType="TINYINT" property="type" />
    <result column="company_code" jdbcType="VARCHAR" property="companyCode" />
    <result column="company_name" jdbcType="VARCHAR" property="companyName" />
    <result column="file_type" jdbcType="VARCHAR" property="fileType" />
    <result column="period_year" jdbcType="INTEGER" property="periodYear" />
    <result column="tms_period_month" jdbcType="TINYINT" property="tmsPeriodMonth" />
    <result column="period_month" jdbcType="TINYINT" property="periodMonth" />
    <result column="period_status" jdbcType="VARCHAR" property="periodStatus" />
    <result column="operator" jdbcType="VARCHAR" property="operator" />
    <result column="operate_time" jdbcType="TIMESTAMP" property="operateTime" />
    <result column="import_result" jdbcType="BIT" property="importResult" />
    <result column="error_msg" jdbcType="VARCHAR" property="errorMsg" />
    <result column="record_size" jdbcType="INTEGER" property="recordSize" />
    <result column="display" jdbcType="BIT" property="display" />
    <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, organization_id, project_id, period, taxpayer_id_num, type, company_code, company_name, 
    file_type, period_year, tms_period_month, period_month, period_status, operator, 
    operate_time, import_result, error_msg, record_size, display, create_time, update_time
  </sql>
  <select id="selectByExample" parameterType="pwc.taxtech.atms.entity.CitDataImportLogExample" 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 cit_data_import_log
    <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 cit_data_import_log
    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 cit_data_import_log
    where id = #{id,jdbcType=BIGINT}
  </delete>
  <delete id="deleteByExample" parameterType="pwc.taxtech.atms.entity.CitDataImportLogExample">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
    delete from cit_data_import_log
    <if test="_parameter != null">
      <include refid="Example_Where_Clause" />
    </if>
  </delete>
  <insert id="insert" parameterType="pwc.taxtech.atms.entity.CitDataImportLog">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
    insert into cit_data_import_log (id, organization_id, project_id, 
      period, taxpayer_id_num, type, 
      company_code, company_name, file_type, 
      period_year, tms_period_month, period_month, 
      period_status, operator, operate_time, 
      import_result, error_msg, record_size, 
      display, create_time, update_time
      )
    values (#{id,jdbcType=BIGINT}, #{organizationId,jdbcType=VARCHAR}, #{projectId,jdbcType=VARCHAR}, 
      #{period,jdbcType=INTEGER}, #{taxpayerIdNum,jdbcType=VARCHAR}, #{type,jdbcType=TINYINT}, 
      #{companyCode,jdbcType=VARCHAR}, #{companyName,jdbcType=VARCHAR}, #{fileType,jdbcType=VARCHAR}, 
      #{periodYear,jdbcType=INTEGER}, #{tmsPeriodMonth,jdbcType=TINYINT}, #{periodMonth,jdbcType=TINYINT}, 
      #{periodStatus,jdbcType=VARCHAR}, #{operator,jdbcType=VARCHAR}, #{operateTime,jdbcType=TIMESTAMP}, 
      #{importResult,jdbcType=BIT}, #{errorMsg,jdbcType=VARCHAR}, #{recordSize,jdbcType=INTEGER}, 
      #{display,jdbcType=BIT}, #{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP}
      )
  </insert>
  <insert id="insertSelective" parameterType="pwc.taxtech.atms.entity.CitDataImportLog">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
    insert into cit_data_import_log
    <trim prefix="(" suffix=")" suffixOverrides=",">
      <if test="id != null">
        id,
      </if>
      <if test="organizationId != null">
        organization_id,
      </if>
      <if test="projectId != null">
        project_id,
      </if>
      <if test="period != null">
        period,
      </if>
      <if test="taxpayerIdNum != null">
        taxpayer_id_num,
      </if>
      <if test="type != null">
        type,
      </if>
      <if test="companyCode != null">
        company_code,
      </if>
      <if test="companyName != null">
        company_name,
      </if>
      <if test="fileType != null">
        file_type,
      </if>
      <if test="periodYear != null">
        period_year,
      </if>
      <if test="tmsPeriodMonth != null">
        tms_period_month,
      </if>
      <if test="periodMonth != null">
        period_month,
      </if>
      <if test="periodStatus != null">
        period_status,
      </if>
      <if test="operator != null">
        operator,
      </if>
      <if test="operateTime != null">
        operate_time,
      </if>
      <if test="importResult != null">
        import_result,
      </if>
      <if test="errorMsg != null">
        error_msg,
      </if>
      <if test="recordSize != null">
        record_size,
      </if>
      <if test="display != null">
        display,
      </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=BIGINT},
      </if>
      <if test="organizationId != null">
        #{organizationId,jdbcType=VARCHAR},
      </if>
      <if test="projectId != null">
        #{projectId,jdbcType=VARCHAR},
      </if>
      <if test="period != null">
        #{period,jdbcType=INTEGER},
      </if>
      <if test="taxpayerIdNum != null">
        #{taxpayerIdNum,jdbcType=VARCHAR},
      </if>
      <if test="type != null">
        #{type,jdbcType=TINYINT},
      </if>
      <if test="companyCode != null">
        #{companyCode,jdbcType=VARCHAR},
      </if>
      <if test="companyName != null">
        #{companyName,jdbcType=VARCHAR},
      </if>
      <if test="fileType != null">
        #{fileType,jdbcType=VARCHAR},
      </if>
      <if test="periodYear != null">
        #{periodYear,jdbcType=INTEGER},
      </if>
      <if test="tmsPeriodMonth != null">
        #{tmsPeriodMonth,jdbcType=TINYINT},
      </if>
      <if test="periodMonth != null">
        #{periodMonth,jdbcType=TINYINT},
      </if>
      <if test="periodStatus != null">
        #{periodStatus,jdbcType=VARCHAR},
      </if>
      <if test="operator != null">
        #{operator,jdbcType=VARCHAR},
      </if>
      <if test="operateTime != null">
        #{operateTime,jdbcType=TIMESTAMP},
      </if>
      <if test="importResult != null">
        #{importResult,jdbcType=BIT},
      </if>
      <if test="errorMsg != null">
        #{errorMsg,jdbcType=VARCHAR},
      </if>
      <if test="recordSize != null">
        #{recordSize,jdbcType=INTEGER},
      </if>
      <if test="display != null">
        #{display,jdbcType=BIT},
      </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.entity.CitDataImportLogExample" resultType="java.lang.Long">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
    select count(*) from cit_data_import_log
    <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 cit_data_import_log
    <set>
      <if test="record.id != null">
        id = #{record.id,jdbcType=BIGINT},
      </if>
      <if test="record.organizationId != null">
        organization_id = #{record.organizationId,jdbcType=VARCHAR},
      </if>
      <if test="record.projectId != null">
        project_id = #{record.projectId,jdbcType=VARCHAR},
      </if>
      <if test="record.period != null">
        period = #{record.period,jdbcType=INTEGER},
      </if>
      <if test="record.taxpayerIdNum != null">
        taxpayer_id_num = #{record.taxpayerIdNum,jdbcType=VARCHAR},
      </if>
      <if test="record.type != null">
        type = #{record.type,jdbcType=TINYINT},
      </if>
      <if test="record.companyCode != null">
        company_code = #{record.companyCode,jdbcType=VARCHAR},
      </if>
      <if test="record.companyName != null">
        company_name = #{record.companyName,jdbcType=VARCHAR},
      </if>
      <if test="record.fileType != null">
        file_type = #{record.fileType,jdbcType=VARCHAR},
      </if>
      <if test="record.periodYear != null">
        period_year = #{record.periodYear,jdbcType=INTEGER},
      </if>
      <if test="record.tmsPeriodMonth != null">
        tms_period_month = #{record.tmsPeriodMonth,jdbcType=TINYINT},
      </if>
      <if test="record.periodMonth != null">
        period_month = #{record.periodMonth,jdbcType=TINYINT},
      </if>
      <if test="record.periodStatus != null">
        period_status = #{record.periodStatus,jdbcType=VARCHAR},
      </if>
      <if test="record.operator != null">
        operator = #{record.operator,jdbcType=VARCHAR},
      </if>
      <if test="record.operateTime != null">
        operate_time = #{record.operateTime,jdbcType=TIMESTAMP},
      </if>
      <if test="record.importResult != null">
        import_result = #{record.importResult,jdbcType=BIT},
      </if>
      <if test="record.errorMsg != null">
        error_msg = #{record.errorMsg,jdbcType=VARCHAR},
      </if>
      <if test="record.recordSize != null">
        record_size = #{record.recordSize,jdbcType=INTEGER},
      </if>
      <if test="record.display != null">
        display = #{record.display,jdbcType=BIT},
      </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 cit_data_import_log
    set id = #{record.id,jdbcType=BIGINT},
      organization_id = #{record.organizationId,jdbcType=VARCHAR},
      project_id = #{record.projectId,jdbcType=VARCHAR},
      period = #{record.period,jdbcType=INTEGER},
      taxpayer_id_num = #{record.taxpayerIdNum,jdbcType=VARCHAR},
      type = #{record.type,jdbcType=TINYINT},
      company_code = #{record.companyCode,jdbcType=VARCHAR},
      company_name = #{record.companyName,jdbcType=VARCHAR},
      file_type = #{record.fileType,jdbcType=VARCHAR},
      period_year = #{record.periodYear,jdbcType=INTEGER},
      tms_period_month = #{record.tmsPeriodMonth,jdbcType=TINYINT},
      period_month = #{record.periodMonth,jdbcType=TINYINT},
      period_status = #{record.periodStatus,jdbcType=VARCHAR},
      operator = #{record.operator,jdbcType=VARCHAR},
      operate_time = #{record.operateTime,jdbcType=TIMESTAMP},
      import_result = #{record.importResult,jdbcType=BIT},
      error_msg = #{record.errorMsg,jdbcType=VARCHAR},
      record_size = #{record.recordSize,jdbcType=INTEGER},
      display = #{record.display,jdbcType=BIT},
      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.entity.CitDataImportLog">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
    update cit_data_import_log
    <set>
      <if test="organizationId != null">
        organization_id = #{organizationId,jdbcType=VARCHAR},
      </if>
      <if test="projectId != null">
        project_id = #{projectId,jdbcType=VARCHAR},
      </if>
      <if test="period != null">
        period = #{period,jdbcType=INTEGER},
      </if>
      <if test="taxpayerIdNum != null">
        taxpayer_id_num = #{taxpayerIdNum,jdbcType=VARCHAR},
      </if>
      <if test="type != null">
        type = #{type,jdbcType=TINYINT},
      </if>
      <if test="companyCode != null">
        company_code = #{companyCode,jdbcType=VARCHAR},
      </if>
      <if test="companyName != null">
        company_name = #{companyName,jdbcType=VARCHAR},
      </if>
      <if test="fileType != null">
        file_type = #{fileType,jdbcType=VARCHAR},
      </if>
      <if test="periodYear != null">
        period_year = #{periodYear,jdbcType=INTEGER},
      </if>
      <if test="tmsPeriodMonth != null">
        tms_period_month = #{tmsPeriodMonth,jdbcType=TINYINT},
      </if>
      <if test="periodMonth != null">
        period_month = #{periodMonth,jdbcType=TINYINT},
      </if>
      <if test="periodStatus != null">
        period_status = #{periodStatus,jdbcType=VARCHAR},
      </if>
      <if test="operator != null">
        operator = #{operator,jdbcType=VARCHAR},
      </if>
      <if test="operateTime != null">
        operate_time = #{operateTime,jdbcType=TIMESTAMP},
      </if>
      <if test="importResult != null">
        import_result = #{importResult,jdbcType=BIT},
      </if>
      <if test="errorMsg != null">
        error_msg = #{errorMsg,jdbcType=VARCHAR},
      </if>
      <if test="recordSize != null">
        record_size = #{recordSize,jdbcType=INTEGER},
      </if>
      <if test="display != null">
        display = #{display,jdbcType=BIT},
      </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=BIGINT}
  </update>
  <update id="updateByPrimaryKey" parameterType="pwc.taxtech.atms.entity.CitDataImportLog">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
    update cit_data_import_log
    set organization_id = #{organizationId,jdbcType=VARCHAR},
      project_id = #{projectId,jdbcType=VARCHAR},
      period = #{period,jdbcType=INTEGER},
      taxpayer_id_num = #{taxpayerIdNum,jdbcType=VARCHAR},
      type = #{type,jdbcType=TINYINT},
      company_code = #{companyCode,jdbcType=VARCHAR},
      company_name = #{companyName,jdbcType=VARCHAR},
      file_type = #{fileType,jdbcType=VARCHAR},
      period_year = #{periodYear,jdbcType=INTEGER},
      tms_period_month = #{tmsPeriodMonth,jdbcType=TINYINT},
      period_month = #{periodMonth,jdbcType=TINYINT},
      period_status = #{periodStatus,jdbcType=VARCHAR},
      operator = #{operator,jdbcType=VARCHAR},
      operate_time = #{operateTime,jdbcType=TIMESTAMP},
      import_result = #{importResult,jdbcType=BIT},
      error_msg = #{errorMsg,jdbcType=VARCHAR},
      record_size = #{recordSize,jdbcType=INTEGER},
      display = #{display,jdbcType=BIT},
      create_time = #{createTime,jdbcType=TIMESTAMP},
      update_time = #{updateTime,jdbcType=TIMESTAMP}
    where id = #{id,jdbcType=BIGINT}
  </update>
  <select id="selectByExampleWithRowbounds" parameterType="pwc.taxtech.atms.entity.CitDataImportLogExample" 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 cit_data_import_log
    <if test="_parameter != null">
      <include refid="Example_Where_Clause" />
    </if>
    <if test="orderByClause != null">
      order by ${orderByClause}
    </if>
  </select>
</mapper>