<?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.AccountRemapMapper">
  <resultMap id="BaseResultMap" type="pwc.taxtech.atms.vat.entity.AccountRemap">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
    <id column="REMAP_ID" jdbcType="VARCHAR" property="remapId" />
    <result column="PERIOD" jdbcType="DECIMAL" property="period" />
    <result column="ACCT_CODE" jdbcType="VARCHAR" property="acctCode" />
    <result column="CUSTOMER_CODE" jdbcType="VARCHAR" property="customerCode" />
    <result column="REMAP_DEBIT" jdbcType="DECIMAL" property="remapDebit" />
    <result column="REMAP_CREDIT" jdbcType="DECIMAL" property="remapCredit" />
    <result column="STD_CODE" jdbcType="VARCHAR" property="stdCode" />
    <result column="RE_MAPP_NAME" jdbcType="VARCHAR" property="reMappName" />
    <result column="RE_MAPP_REASON" jdbcType="VARCHAR" property="reMappReason" />
    <result column="RE_MAPP_TYPE_ID" jdbcType="DECIMAL" property="reMappTypeId" />
    <result column="CREATE_TIME" jdbcType="TIMESTAMP" property="createTime" />
    <result column="UPDATE_TIME" jdbcType="TIMESTAMP" property="updateTime" />
    <result column="CREATOR_ID" jdbcType="VARCHAR" property="creatorId" />
    <result column="REMAP_BATCH_ID" jdbcType="VARCHAR" property="remapBatchId" />
  </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.
    -->
    REMAP_ID, PERIOD, ACCT_CODE, CUSTOMER_CODE, REMAP_DEBIT, REMAP_CREDIT, STD_CODE, 
    RE_MAPP_NAME, RE_MAPP_REASON, RE_MAPP_TYPE_ID, CREATE_TIME, UPDATE_TIME, CREATOR_ID, 
    REMAP_BATCH_ID
  </sql>
  <select id="selectByExample" parameterType="pwc.taxtech.atms.vat.entity.AccountRemapExample" 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 ACCOUNT_REMAP
    <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 ACCOUNT_REMAP
    where REMAP_ID = #{remapId,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 ACCOUNT_REMAP
    where REMAP_ID = #{remapId,jdbcType=VARCHAR}
  </delete>
  <delete id="deleteByExample" parameterType="pwc.taxtech.atms.vat.entity.AccountRemapExample">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
    delete from ACCOUNT_REMAP
    <if test="_parameter != null">
      <include refid="Example_Where_Clause" />
    </if>
  </delete>
  <insert id="insert" parameterType="pwc.taxtech.atms.vat.entity.AccountRemap">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
    insert into ACCOUNT_REMAP (REMAP_ID, PERIOD, ACCT_CODE, 
      CUSTOMER_CODE, REMAP_DEBIT, REMAP_CREDIT, 
      STD_CODE, RE_MAPP_NAME, RE_MAPP_REASON, 
      RE_MAPP_TYPE_ID, CREATE_TIME, UPDATE_TIME, 
      CREATOR_ID, REMAP_BATCH_ID)
    values (#{remapId,jdbcType=VARCHAR}, #{period,jdbcType=DECIMAL}, #{acctCode,jdbcType=VARCHAR}, 
      #{customerCode,jdbcType=VARCHAR}, #{remapDebit,jdbcType=DECIMAL}, #{remapCredit,jdbcType=DECIMAL}, 
      #{stdCode,jdbcType=VARCHAR}, #{reMappName,jdbcType=VARCHAR}, #{reMappReason,jdbcType=VARCHAR}, 
      #{reMappTypeId,jdbcType=DECIMAL}, #{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP}, 
      #{creatorId,jdbcType=VARCHAR}, #{remapBatchId,jdbcType=VARCHAR})
  </insert>
  <insert id="insertSelective" parameterType="pwc.taxtech.atms.vat.entity.AccountRemap">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
    insert into ACCOUNT_REMAP
    <trim prefix="(" suffix=")" suffixOverrides=",">
      <if test="remapId != null">
        REMAP_ID,
      </if>
      <if test="period != null">
        PERIOD,
      </if>
      <if test="acctCode != null">
        ACCT_CODE,
      </if>
      <if test="customerCode != null">
        CUSTOMER_CODE,
      </if>
      <if test="remapDebit != null">
        REMAP_DEBIT,
      </if>
      <if test="remapCredit != null">
        REMAP_CREDIT,
      </if>
      <if test="stdCode != null">
        STD_CODE,
      </if>
      <if test="reMappName != null">
        RE_MAPP_NAME,
      </if>
      <if test="reMappReason != null">
        RE_MAPP_REASON,
      </if>
      <if test="reMappTypeId != null">
        RE_MAPP_TYPE_ID,
      </if>
      <if test="createTime != null">
        CREATE_TIME,
      </if>
      <if test="updateTime != null">
        UPDATE_TIME,
      </if>
      <if test="creatorId != null">
        CREATOR_ID,
      </if>
      <if test="remapBatchId != null">
        REMAP_BATCH_ID,
      </if>
    </trim>
    <trim prefix="values (" suffix=")" suffixOverrides=",">
      <if test="remapId != null">
        #{remapId,jdbcType=VARCHAR},
      </if>
      <if test="period != null">
        #{period,jdbcType=DECIMAL},
      </if>
      <if test="acctCode != null">
        #{acctCode,jdbcType=VARCHAR},
      </if>
      <if test="customerCode != null">
        #{customerCode,jdbcType=VARCHAR},
      </if>
      <if test="remapDebit != null">
        #{remapDebit,jdbcType=DECIMAL},
      </if>
      <if test="remapCredit != null">
        #{remapCredit,jdbcType=DECIMAL},
      </if>
      <if test="stdCode != null">
        #{stdCode,jdbcType=VARCHAR},
      </if>
      <if test="reMappName != null">
        #{reMappName,jdbcType=VARCHAR},
      </if>
      <if test="reMappReason != null">
        #{reMappReason,jdbcType=VARCHAR},
      </if>
      <if test="reMappTypeId != null">
        #{reMappTypeId,jdbcType=DECIMAL},
      </if>
      <if test="createTime != null">
        #{createTime,jdbcType=TIMESTAMP},
      </if>
      <if test="updateTime != null">
        #{updateTime,jdbcType=TIMESTAMP},
      </if>
      <if test="creatorId != null">
        #{creatorId,jdbcType=VARCHAR},
      </if>
      <if test="remapBatchId != null">
        #{remapBatchId,jdbcType=VARCHAR},
      </if>
    </trim>
  </insert>
  <select id="countByExample" parameterType="pwc.taxtech.atms.vat.entity.AccountRemapExample" resultType="java.lang.Long">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
    select count(*) from ACCOUNT_REMAP
    <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 ACCOUNT_REMAP
    <set>
      <if test="record.remapId != null">
        REMAP_ID = #{record.remapId,jdbcType=VARCHAR},
      </if>
      <if test="record.period != null">
        PERIOD = #{record.period,jdbcType=DECIMAL},
      </if>
      <if test="record.acctCode != null">
        ACCT_CODE = #{record.acctCode,jdbcType=VARCHAR},
      </if>
      <if test="record.customerCode != null">
        CUSTOMER_CODE = #{record.customerCode,jdbcType=VARCHAR},
      </if>
      <if test="record.remapDebit != null">
        REMAP_DEBIT = #{record.remapDebit,jdbcType=DECIMAL},
      </if>
      <if test="record.remapCredit != null">
        REMAP_CREDIT = #{record.remapCredit,jdbcType=DECIMAL},
      </if>
      <if test="record.stdCode != null">
        STD_CODE = #{record.stdCode,jdbcType=VARCHAR},
      </if>
      <if test="record.reMappName != null">
        RE_MAPP_NAME = #{record.reMappName,jdbcType=VARCHAR},
      </if>
      <if test="record.reMappReason != null">
        RE_MAPP_REASON = #{record.reMappReason,jdbcType=VARCHAR},
      </if>
      <if test="record.reMappTypeId != null">
        RE_MAPP_TYPE_ID = #{record.reMappTypeId,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.creatorId != null">
        CREATOR_ID = #{record.creatorId,jdbcType=VARCHAR},
      </if>
      <if test="record.remapBatchId != null">
        REMAP_BATCH_ID = #{record.remapBatchId,jdbcType=VARCHAR},
      </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 ACCOUNT_REMAP
    set REMAP_ID = #{record.remapId,jdbcType=VARCHAR},
      PERIOD = #{record.period,jdbcType=DECIMAL},
      ACCT_CODE = #{record.acctCode,jdbcType=VARCHAR},
      CUSTOMER_CODE = #{record.customerCode,jdbcType=VARCHAR},
      REMAP_DEBIT = #{record.remapDebit,jdbcType=DECIMAL},
      REMAP_CREDIT = #{record.remapCredit,jdbcType=DECIMAL},
      STD_CODE = #{record.stdCode,jdbcType=VARCHAR},
      RE_MAPP_NAME = #{record.reMappName,jdbcType=VARCHAR},
      RE_MAPP_REASON = #{record.reMappReason,jdbcType=VARCHAR},
      RE_MAPP_TYPE_ID = #{record.reMappTypeId,jdbcType=DECIMAL},
      CREATE_TIME = #{record.createTime,jdbcType=TIMESTAMP},
      UPDATE_TIME = #{record.updateTime,jdbcType=TIMESTAMP},
      CREATOR_ID = #{record.creatorId,jdbcType=VARCHAR},
      REMAP_BATCH_ID = #{record.remapBatchId,jdbcType=VARCHAR}
    <if test="_parameter != null">
      <include refid="Update_By_Example_Where_Clause" />
    </if>
  </update>
  <update id="updateByPrimaryKeySelective" parameterType="pwc.taxtech.atms.vat.entity.AccountRemap">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
    update ACCOUNT_REMAP
    <set>
      <if test="period != null">
        PERIOD = #{period,jdbcType=DECIMAL},
      </if>
      <if test="acctCode != null">
        ACCT_CODE = #{acctCode,jdbcType=VARCHAR},
      </if>
      <if test="customerCode != null">
        CUSTOMER_CODE = #{customerCode,jdbcType=VARCHAR},
      </if>
      <if test="remapDebit != null">
        REMAP_DEBIT = #{remapDebit,jdbcType=DECIMAL},
      </if>
      <if test="remapCredit != null">
        REMAP_CREDIT = #{remapCredit,jdbcType=DECIMAL},
      </if>
      <if test="stdCode != null">
        STD_CODE = #{stdCode,jdbcType=VARCHAR},
      </if>
      <if test="reMappName != null">
        RE_MAPP_NAME = #{reMappName,jdbcType=VARCHAR},
      </if>
      <if test="reMappReason != null">
        RE_MAPP_REASON = #{reMappReason,jdbcType=VARCHAR},
      </if>
      <if test="reMappTypeId != null">
        RE_MAPP_TYPE_ID = #{reMappTypeId,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="creatorId != null">
        CREATOR_ID = #{creatorId,jdbcType=VARCHAR},
      </if>
      <if test="remapBatchId != null">
        REMAP_BATCH_ID = #{remapBatchId,jdbcType=VARCHAR},
      </if>
    </set>
    where REMAP_ID = #{remapId,jdbcType=VARCHAR}
  </update>
  <update id="updateByPrimaryKey" parameterType="pwc.taxtech.atms.vat.entity.AccountRemap">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
    update ACCOUNT_REMAP
    set PERIOD = #{period,jdbcType=DECIMAL},
      ACCT_CODE = #{acctCode,jdbcType=VARCHAR},
      CUSTOMER_CODE = #{customerCode,jdbcType=VARCHAR},
      REMAP_DEBIT = #{remapDebit,jdbcType=DECIMAL},
      REMAP_CREDIT = #{remapCredit,jdbcType=DECIMAL},
      STD_CODE = #{stdCode,jdbcType=VARCHAR},
      RE_MAPP_NAME = #{reMappName,jdbcType=VARCHAR},
      RE_MAPP_REASON = #{reMappReason,jdbcType=VARCHAR},
      RE_MAPP_TYPE_ID = #{reMappTypeId,jdbcType=DECIMAL},
      CREATE_TIME = #{createTime,jdbcType=TIMESTAMP},
      UPDATE_TIME = #{updateTime,jdbcType=TIMESTAMP},
      CREATOR_ID = #{creatorId,jdbcType=VARCHAR},
      REMAP_BATCH_ID = #{remapBatchId,jdbcType=VARCHAR}
    where REMAP_ID = #{remapId,jdbcType=VARCHAR}
  </update>
  <select id="selectByExampleWithRowbounds" parameterType="pwc.taxtech.atms.vat.entity.AccountRemapExample" 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 ACCOUNT_REMAP
    <if test="_parameter != null">
      <include refid="Example_Where_Clause" />
    </if>
    <if test="orderByClause != null">
      order by ${orderByClause}
    </if>
  </select>
</mapper>