<?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.TaxDocumentMapper">
    <resultMap id="BaseResultMap" type="pwc.taxtech.atms.entity.TaxDocument">
        <!--
          WARNING - @mbg.generated
          This element is automatically generated by MyBatis Generator, do not modify.
        -->
        <id column="id" jdbcType="BIGINT" property="id"/>
        <result column="file_attr" jdbcType="VARCHAR" property="fileAttr"/>
        <result column="file_type_id" jdbcType="BIGINT" property="fileTypeId"/>
        <result column="file_type" jdbcType="VARCHAR" property="fileType"/>
        <result column="file_name" jdbcType="VARCHAR" property="fileName"/>
        <result column="business_line" jdbcType="VARCHAR" property="businessLine"/>
        <result column="company_id" jdbcType="VARCHAR" property="companyId"/>
        <result column="company_name" jdbcType="VARCHAR" property="companyName"/>
        <result column="tax_type" jdbcType="VARCHAR" property="taxType"/>
        <result column="file_time" jdbcType="TIMESTAMP" property="fileTime"/>
        <result column="effective_time" jdbcType="TIMESTAMP" property="effectiveTime"/>
        <result column="creator_id" jdbcType="INTEGER" property="creatorId"/>
        <result column="creator" jdbcType="VARCHAR" property="creator"/>
        <result column="create_time" jdbcType="TIMESTAMP" property="createTime"/>
        <result column="update_time" jdbcType="TIMESTAMP" property="updateTime"/>
        <result column="upload_time" jdbcType="TIMESTAMP" property="uploadTime"/>
        <result column="storage_area" jdbcType="VARCHAR" property="storageArea"/>
        <result column="keeper_id" jdbcType="INTEGER" property="keeperId"/>
        <result column="keeper" jdbcType="VARCHAR" property="keeper"/>
        <result column="remark" jdbcType="VARCHAR" property="remark"/>
        <result column="file_original_name" jdbcType="VARCHAR" property="fileOriginalName"/>
        <result column="file_position_url" jdbcType="VARCHAR" property="filePositionUrl"/>
        <result column="file_upload_id" jdbcType="VARCHAR" property="fileUploadId"/>
        <result column="year_redundancy" jdbcType="INTEGER" property="yearRedundancy"/>
        <result column="audit_status" jdbcType="INTEGER" property="auditStatus"/>
        <result column="physical_index_number" jdbcType="VARCHAR" property="physicalIndexNumber"/>
        <result column="own_time" jdbcType="INTEGER" property="ownTime"/>
        <result column="enable" jdbcType="VARCHAR" property="enable"/>
    </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>
            and enable = 'T'
        </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, file_attr, file_type_id, file_type, file_name, business_line, company_id, company_name,
        tax_type, file_time, effective_time, creator_id, creator, create_time, update_time,
        upload_time, storage_area, keeper_id, keeper, remark, file_original_name, file_upload_id, file_position_url,
        year_redundancy,audit_status,physical_index_number,own_time,enable
    </sql>
    <select id="selectByExample" parameterType="pwc.taxtech.atms.entity.TaxDocumentExample" 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 tax_document
        <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 tax_document
        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 tax_document
        where id = #{id,jdbcType=BIGINT}
    </delete>

    <delete id="batchDelete">
        DELETE FROM tax_document
        WHERE id IN
        <foreach collection="list" item="id" separator="," open="(" close=")">
            #{id}
        </foreach>
    </delete>

    <delete id="deleteByExample" parameterType="pwc.taxtech.atms.entity.TaxDocumentExample">
        <!--
          WARNING - @mbg.generated
          This element is automatically generated by MyBatis Generator, do not modify.
        -->
        delete from tax_document
        <if test="_parameter != null">
            <include refid="Example_Where_Clause"/>
        </if>
    </delete>
    <insert id="insert" keyProperty="id" useGeneratedKeys="true">
        <!--
          WARNING - @mbg.generated
          This element is automatically generated by MyBatis Generator, do not modify.
        -->
        insert into tax_document (id, file_attr, file_type_id,
        file_type, file_name, business_line,
        company_id, company_name, tax_type,
        file_time, effective_time, creator_id,
        creator, create_time, update_time,
        upload_time, storage_area, keeper_id,
        keeper, remark, file_original_name, file_upload_id, file_position_url,
        year_redundancy,audit_status,physical_index_number,own_time)
        values (#{id,jdbcType=BIGINT}, #{fileAttr,jdbcType=VARCHAR}, #{fileTypeId,jdbcType=BIGINT},
        #{fileType,jdbcType=VARCHAR}, #{fileName,jdbcType=VARCHAR}, #{businessLine,jdbcType=VARCHAR},
        #{companyId,jdbcType=VARCHAR}, #{companyName,jdbcType=VARCHAR}, #{taxType,jdbcType=VARCHAR},
        #{fileTime,jdbcType=TIMESTAMP}, #{effectiveTime,jdbcType=TIMESTAMP}, #{creatorId,jdbcType=INTEGER},
        #{creator,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP},
        #{uploadTime,jdbcType=TIMESTAMP}, #{storageArea,jdbcType=VARCHAR}, #{keeperId,jdbcType=INTEGER},
        #{keeper,jdbcType=VARCHAR}, #{remark,jdbcType=VARCHAR}, #{fileOriginalName,jdbcType=VARCHAR},
        #{fileUploadId,jdbcType=VARCHAR}, #{filePositionUrl,jdbcType=VARCHAR},
        #{yearRedundancy,jdbcType=INTEGER},#{auditStatus,jdbcType=INTEGER},#{physicalIndexNumber,jdbcType=VARCHAR},
        #{ownTime,jdbcType=INTEGER})
    </insert>
    <insert id="insertSelective" parameterType="pwc.taxtech.atms.entity.TaxDocument">
        <!--
          WARNING - @mbg.generated
          This element is automatically generated by MyBatis Generator, do not modify.
        -->
        insert into tax_document
        <trim prefix="(" suffix=")" suffixOverrides=",">
            <if test="id != null">
                id,
            </if>
            <if test="fileAttr != null">
                file_attr,
            </if>
            <if test="fileTypeId != null">
                file_type_id,
            </if>
            <if test="fileType != null">
                file_type,
            </if>
            <if test="fileName != null">
                file_name,
            </if>
            <if test="businessLine != null">
                business_line,
            </if>
            <if test="companyId != null">
                company_id,
            </if>
            <if test="companyName != null">
                company_name,
            </if>
            <if test="taxType != null">
                tax_type,
            </if>
            <if test="fileTime != null">
                file_time,
            </if>
            <if test="effectiveTime != null">
                effective_time,
            </if>
            <if test="creatorId != null">
                creator_id,
            </if>
            <if test="creator != null">
                creator,
            </if>
            <if test="createTime != null">
                create_time,
            </if>
            <if test="updateTime != null">
                update_time,
            </if>
            <if test="uploadTime != null">
                upload_time,
            </if>
            <if test="storageArea != null">
                storage_area,
            </if>
            <if test="keeperId != null">
                keeper_id,
            </if>
            <if test="keeper != null">
                keeper,
            </if>
            <if test="remark != null">
                remark,
            </if>
            <if test="filePositionUrl != null">
                file_position_url,
            </if>
            <if test="yearRedundancy != null">
                year_redundancy,
            </if>
        </trim>
        <trim prefix="values (" suffix=")" suffixOverrides=",">
            <if test="id != null">
                #{id,jdbcType=BIGINT},
            </if>
            <if test="fileAttr != null">
                #{fileAttr,jdbcType=VARCHAR},
            </if>
            <if test="fileTypeId != null">
                #{fileTypeId,jdbcType=INTEGER},
            </if>
            <if test="fileType != null">
                #{fileType,jdbcType=VARCHAR},
            </if>
            <if test="fileName != null">
                #{fileName,jdbcType=VARCHAR},
            </if>
            <if test="businessLine != null">
                #{businessLine,jdbcType=VARCHAR},
            </if>
            <if test="companyId != null and companyId != ''">
                #{companyId,jdbcType=VARCHAR},
            </if>
            <if test="companyName != null">
                #{companyName,jdbcType=VARCHAR},
            </if>
            <if test="taxType != null">
                #{taxType,jdbcType=VARCHAR},
            </if>
            <if test="fileTime != null">
                #{fileTime,jdbcType=TIMESTAMP},
            </if>
            <if test="effectiveTime != null">
                #{effectiveTime,jdbcType=TIMESTAMP},
            </if>
            <if test="creatorId != null">
                #{creatorId,jdbcType=INTEGER},
            </if>
            <if test="creator != null">
                #{creator,jdbcType=VARCHAR},
            </if>
            <if test="createTime != null">
                #{createTime,jdbcType=TIMESTAMP},
            </if>
            <if test="updateTime != null">
                #{updateTime,jdbcType=TIMESTAMP},
            </if>
            <if test="uploadTime != null">
                #{uploadTime,jdbcType=TIMESTAMP},
            </if>
            <if test="storageArea != null">
                #{storageArea,jdbcType=VARCHAR},
            </if>
            <if test="keeperId != null">
                #{keeperId,jdbcType=INTEGER},
            </if>
            <if test="keeper != null">
                #{keeper,jdbcType=VARCHAR},
            </if>
            <if test="remark != null">
                #{remark,jdbcType=VARCHAR},
            </if>
            <if test="filePositionUrl != null">
                #{filePositionUrl,jdbcType=VARCHAR},
            </if>
            <if test="yearRedundancy != null">
                #{yearRedundancy,jdbcType=INTEGER},
            </if>
        </trim>
    </insert>
    <select id="countByExample" parameterType="pwc.taxtech.atms.entity.TaxDocumentExample" resultType="java.lang.Long">
        <!--
          WARNING - @mbg.generated
          This element is automatically generated by MyBatis Generator, do not modify.
        -->
        select count(*) from tax_document
        <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 tax_document
        <set>
            <if test="record.id != null">
                id = #{record.id,jdbcType=BIGINT},
            </if>
            <if test="record.fileAttr != null">
                file_attr = #{record.fileAttr,jdbcType=VARCHAR},
            </if>
            <if test="record.fileTypeId != null">
                file_type_id = #{record.fileTypeId,jdbcType=BIGINT},
            </if>
            <if test="record.fileType != null">
                file_type = #{record.fileType,jdbcType=VARCHAR},
            </if>
            <if test="record.fileName != null">
                file_name = #{record.fileName,jdbcType=VARCHAR},
            </if>
            <if test="record.businessLine != null">
                business_line = #{record.businessLine,jdbcType=VARCHAR},
            </if>
            <if test="record.companyId != null">
                company_id = #{record.companyId,jdbcType=VARCHAR},
            </if>
            <if test="record.companyName != null">
                company_name = #{record.companyName,jdbcType=VARCHAR},
            </if>
            <if test="record.taxType != null">
                tax_type = #{record.taxType,jdbcType=VARCHAR},
            </if>
            <if test="record.fileTime != null">
                file_time = #{record.fileTime,jdbcType=TIMESTAMP},
            </if>
            <if test="record.effectiveTime != null">
                effective_time = #{record.effectiveTime,jdbcType=TIMESTAMP},
            </if>
            <if test="record.creatorId != null">
                creator_id = #{record.creatorId,jdbcType=INTEGER},
            </if>
            <if test="record.creator != null">
                creator = #{record.creator,jdbcType=VARCHAR},
            </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.uploadTime != null">
                upload_time = #{record.uploadTime,jdbcType=TIMESTAMP},
            </if>
            <if test="record.storageArea != null">
                storage_area = #{record.storageArea,jdbcType=VARCHAR},
            </if>
            <if test="record.keeperId != null">
                keeper_id = #{record.keeperId,jdbcType=INTEGER},
            </if>
            <if test="record.keeper != null">
                keeper = #{record.keeper,jdbcType=VARCHAR},
            </if>
            <if test="record.remark != null">
                remark = #{record.remark,jdbcType=VARCHAR},
            </if>
            <if test="record.filePositionUrl != null">
                file_position_url = #{record.filePositionUrl,jdbcType=VARCHAR},
            </if>
            <if test="record.yearRedundancy != null">
                year_redundancy = #{record.yearRedundancy,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 tax_document
        set id = #{record.id,jdbcType=BIGINT},
        file_attr = #{record.fileAttr,jdbcType=VARCHAR},
        file_type_id = #{record.fileTypeId,jdbcType=BIGINT},
        file_type = #{record.fileType,jdbcType=VARCHAR},
        file_name = #{record.fileName,jdbcType=VARCHAR},
        business_line = #{record.businessLine,jdbcType=VARCHAR},
        company_id = #{record.companyId,jdbcType=VARCHAR},
        company_name = #{record.companyName,jdbcType=VARCHAR},
        tax_type = #{record.taxType,jdbcType=VARCHAR},
        file_time = #{record.fileTime,jdbcType=TIMESTAMP},
        effective_time = #{record.effectiveTime,jdbcType=TIMESTAMP},
        creator_id = #{record.creatorId,jdbcType=INTEGER},
        creator = #{record.creator,jdbcType=VARCHAR},
        create_time = #{record.createTime,jdbcType=TIMESTAMP},
        update_time = #{record.updateTime,jdbcType=TIMESTAMP},
        upload_time = #{record.uploadTime,jdbcType=TIMESTAMP},
        storage_area = #{record.storageArea,jdbcType=VARCHAR},
        keeper_id = #{record.keeperId,jdbcType=INTEGER},
        keeper = #{record.keeper,jdbcType=VARCHAR},
        remark = #{record.remark,jdbcType=VARCHAR},
        file_position_url = #{record.filePositionUrl,jdbcType=VARCHAR},
        year_redundancy = #{record.yearRedundancy,jdbcType=INTEGER},
        audit_status = #{record.auditStatus,jdbcType=INTEGER},
        physical_index_number = #{record.physicalIndexNumber,jdbcType=VARCHAR},
        own_time = #{record.ownTime,jdbcType=INTEGER}
        <if test="_parameter != null">
            <include refid="Update_By_Example_Where_Clause"/>
        </if>
    </update>
    <update id="updateByPrimaryKeySelective" parameterType="pwc.taxtech.atms.entity.TaxDocument">
        <!--
          WARNING - @mbg.generated
          This element is automatically generated by MyBatis Generator, do not modify.
        -->
        update tax_document
        <set>
            <if test="fileAttr != null">
                file_attr = #{fileAttr,jdbcType=VARCHAR},
            </if>
            <if test="fileTypeId != null">
                file_type_id = #{fileTypeId,jdbcType=BIGINT},
            </if>
            <if test="fileType != null">
                file_type = #{fileType,jdbcType=VARCHAR},
            </if>
            <if test="fileName != null">
                file_name = #{fileName,jdbcType=VARCHAR},
            </if>
            <if test="businessLine != null">
                business_line = #{businessLine,jdbcType=VARCHAR},
            </if>
            <if test="companyId != null">
                company_id = #{companyId,jdbcType=VARCHAR},
            </if>
            <if test="companyName != null">
                company_name = #{companyName,jdbcType=VARCHAR},
            </if>
            <if test="taxType != null">
                tax_type = #{taxType,jdbcType=VARCHAR},
            </if>
            <if test="fileTime != null">
                file_time = #{fileTime,jdbcType=TIMESTAMP},
            </if>
            <if test="effectiveTime != null">
                effective_time = #{effectiveTime,jdbcType=TIMESTAMP},
            </if>
            <if test="creatorId != null">
                creator_id = #{creatorId,jdbcType=INTEGER},
            </if>
            <if test="creator != null">
                creator = #{creator,jdbcType=VARCHAR},
            </if>
            <if test="createTime != null">
                create_time = #{createTime,jdbcType=TIMESTAMP},
            </if>
            <if test="updateTime != null">
                update_time = #{updateTime,jdbcType=TIMESTAMP},
            </if>
            <if test="uploadTime != null">
                upload_time = #{uploadTime,jdbcType=TIMESTAMP},
            </if>
            <if test="storageArea != null">
                storage_area = #{storageArea,jdbcType=VARCHAR},
            </if>
            <if test="keeperId != null">
                keeper_id = #{keeperId,jdbcType=INTEGER},
            </if>
            <if test="keeper != null">
                keeper = #{keeper,jdbcType=VARCHAR},
            </if>
            <if test="remark != null">
                remark = #{remark,jdbcType=VARCHAR},
            </if>
            <if test="filePositionUrl != null">
                file_position_url = #{filePositionUrl,jdbcType=VARCHAR},
            </if>
            <if test="yearRedundancy != null">
                year_redundancy = #{yearRedundancy,jdbcType=INTEGER},
            </if>
        </set>
        where id = #{id,jdbcType=BIGINT}
    </update>
    <update id="updateByPrimaryKey" parameterType="pwc.taxtech.atms.entity.TaxDocument">
        <!--
          WARNING - @mbg.generated
          This element is automatically generated by MyBatis Generator, do not modify.
        -->
        update tax_document
        <set>
            <if test="null != fileAttr and '' != fileAttr">
                file_attr = #{fileAttr,jdbcType=VARCHAR},
            </if>
            <if test="null != fileTypeId">
                file_type_id = #{fileTypeId,jdbcType=BIGINT},
            </if>
            <if test="null != fileType and '' != fileType">
                file_type = #{fileType,jdbcType=VARCHAR},
            </if>
            <if test="null != fileName and '' != fileName">
                file_name = #{fileName,jdbcType=VARCHAR},
            </if>
            <if test="null != businessLine and '' != businessLine">
                business_line = #{businessLine,jdbcType=VARCHAR},
            </if>
            <if test="null != companyId and '' != companyId">
                company_id = #{companyId,jdbcType=VARCHAR},
            </if>
            <if test="null != companyName and '' != companyName">
                company_name = #{companyName,jdbcType=VARCHAR},
            </if>
            <if test="null != taxType and '' != taxType">
                tax_type = #{taxType,jdbcType=VARCHAR},
            </if>
            <if test="null != fileTime">
                file_time = #{fileTime,jdbcType=TIMESTAMP},
            </if>
            <if test="null != effectiveTime">
                effective_time = #{effectiveTime,jdbcType=TIMESTAMP},
            </if>
            <if test="null != updateTime">
                update_time = #{updateTime,jdbcType=TIMESTAMP},
            </if>
            <if test="null != uploadTime">
                upload_time = #{uploadTime,jdbcType=TIMESTAMP},
            </if>
            <if test="null != storageArea and '' != storageArea">
                storage_area = #{storageArea,jdbcType=VARCHAR},
            </if>
            <if test="null != keeperId">
                keeper_id = #{keeperId,jdbcType=INTEGER},
            </if>
            <if test="null != keeper and '' != keeper">
                keeper = #{keeper,jdbcType=VARCHAR},
            </if>
            <if test="null != remark and '' != remark">
                remark = #{remark,jdbcType=VARCHAR},
            </if>
            <if test="null != fileUploadId">
                file_upload_id = #{fileUploadId,jdbcType=VARCHAR},
            </if>
            <if test="null != filePositionUrl">
                file_position_url = #{filePositionUrl,jdbcType=VARCHAR},
            </if>
            <if test="null != fileOriginalName">
                file_original_name = #{fileOriginalName,jdbcType=VARCHAR},
            </if>
            <if test="null != yearRedundancy and '' != yearRedundancy">
                year_redundancy = #{yearRedundancy,jdbcType=INTEGER},
            </if>
            <!--<if test="null != auditStatus">-->
            <!--audit_status = #{auditStatus,jdbcType=INTEGER},-->
            <!--</if>-->
            <if test="null != physicalIndexNumber and '' != physicalIndexNumber">
                physical_index_number = #{physicalIndexNumber,jdbcType=VARCHAR},
            </if>
            <if test="null != ownTime">
                own_time = #{ownTime,jdbcType=INTEGER},
            </if>
        </set>
        where id = #{id,jdbcType=BIGINT}
    </update>
    <select id="selectByExampleWithRowbounds" parameterType="pwc.taxtech.atms.entity.TaxDocumentExample"
            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 tax_document
        <if test="_parameter != null">
            <include refid="Example_Where_Clause"/>
        </if>
        <if test="orderByClause != null">
            order by ${orderByClause}
        </if>
    </select>

    <update id="updateEnableToF">
        UPDATE tax_document
        SET
          enable = 'F'
        WHERE id = #{id} AND enable = 'T'
    </update>
</mapper>