TaxDocumentMapper.xml 27.2 KB
Newer Older
chase's avatar
chase committed
1 2 3 4 5 6 7 8 9 10
<?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"/>
chase's avatar
chase committed
11
        <result column="file_type_id" jdbcType="BIGINT" property="fileTypeId"/>
chase's avatar
chase committed
12 13 14
        <result column="file_type" jdbcType="VARCHAR" property="fileType"/>
        <result column="file_name" jdbcType="VARCHAR" property="fileName"/>
        <result column="business_line" jdbcType="VARCHAR" property="businessLine"/>
chase's avatar
chase committed
15
        <result column="company_id" jdbcType="VARCHAR" property="companyId"/>
chase's avatar
chase committed
16 17 18 19 20 21 22 23 24 25 26 27 28 29 30
        <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"/>
chase's avatar
chase committed
31
        <result column="file_upload_id" jdbcType="VARCHAR" property="fileUploadId"/>
chase's avatar
chase committed
32 33 34
        <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"/>
chase's avatar
chase committed
35
        <result column="own_time" jdbcType="INTEGER" property="ownTime"/>
chase's avatar
chase committed
36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112
        <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>
        </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,
chase's avatar
chase committed
113
        upload_time, storage_area, keeper_id, keeper, remark, file_original_name, file_upload_id, file_position_url,
chase's avatar
chase committed
114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151
        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>
chase's avatar
chase committed
152

chase's avatar
chase committed
153 154 155 156
    <update id="batchDelete">
        UPDATE tax_document
        SET
        enable = 'F'
chase's avatar
chase committed
157 158 159 160
        WHERE id IN
        <foreach collection="list" item="id" separator="," open="(" close=")">
            #{id}
        </foreach>
chase's avatar
chase committed
161 162
        AND enable = 'T'
    </update>
chase's avatar
chase committed
163

chase's avatar
chase committed
164 165 166 167 168 169 170 171 172 173
    <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>
chase's avatar
chase committed
174
    <insert id="insert" keyProperty="id" useGeneratedKeys="true">
chase's avatar
chase committed
175 176 177 178 179 180 181 182 183 184
        <!--
          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,
chase's avatar
chase committed
185
        keeper, remark, file_original_name, file_upload_id, file_position_url,
chase's avatar
chase committed
186
        year_redundancy,audit_status,physical_index_number,own_time)
chase's avatar
chase committed
187
        values (#{id,jdbcType=BIGINT}, #{fileAttr,jdbcType=VARCHAR}, #{fileTypeId,jdbcType=BIGINT},
chase's avatar
chase committed
188
        #{fileType,jdbcType=VARCHAR}, #{fileName,jdbcType=VARCHAR}, #{businessLine,jdbcType=VARCHAR},
chase's avatar
chase committed
189
        #{companyId,jdbcType=VARCHAR}, #{companyName,jdbcType=VARCHAR}, #{taxType,jdbcType=VARCHAR},
chase's avatar
chase committed
190 191 192
        #{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},
chase's avatar
chase committed
193 194
        #{keeper,jdbcType=VARCHAR}, #{remark,jdbcType=VARCHAR}, #{fileOriginalName,jdbcType=VARCHAR},
        #{fileUploadId,jdbcType=VARCHAR}, #{filePositionUrl,jdbcType=VARCHAR},
chase's avatar
chase committed
195
        #{yearRedundancy,jdbcType=INTEGER},#{auditStatus,jdbcType=INTEGER},#{physicalIndexNumber,jdbcType=VARCHAR},
chase's avatar
chase committed
196
        #{ownTime,jdbcType=INTEGER})
chase's avatar
chase committed
197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290
    </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>
chase's avatar
chase committed
291 292
            <if test="companyId != null and companyId != ''">
                #{companyId,jdbcType=VARCHAR},
chase's avatar
chase committed
293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364
            </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">
chase's avatar
chase committed
365
                file_type_id = #{record.fileTypeId,jdbcType=BIGINT},
chase's avatar
chase committed
366 367 368 369 370 371 372 373 374 375 376
            </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">
chase's avatar
chase committed
377
                company_id = #{record.companyId,jdbcType=VARCHAR},
chase's avatar
chase committed
378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436
            </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},
chase's avatar
chase committed
437
        file_type_id = #{record.fileTypeId,jdbcType=BIGINT},
chase's avatar
chase committed
438 439 440
        file_type = #{record.fileType,jdbcType=VARCHAR},
        file_name = #{record.fileName,jdbcType=VARCHAR},
        business_line = #{record.businessLine,jdbcType=VARCHAR},
chase's avatar
chase committed
441
        company_id = #{record.companyId,jdbcType=VARCHAR},
chase's avatar
chase committed
442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458
        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},
chase's avatar
chase committed
459
        own_time = #{record.ownTime,jdbcType=INTEGER}
chase's avatar
chase committed
460 461 462 463 464 465 466 467 468 469 470 471 472 473 474
        <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">
chase's avatar
chase committed
475
                file_type_id = #{fileTypeId,jdbcType=BIGINT},
chase's avatar
chase committed
476 477 478 479 480 481 482 483 484 485 486
            </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">
chase's avatar
chase committed
487
                company_id = #{companyId,jdbcType=VARCHAR},
chase's avatar
chase committed
488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547
            </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">
chase's avatar
chase committed
548
                file_type_id = #{fileTypeId,jdbcType=BIGINT},
chase's avatar
chase committed
549 550 551 552 553 554 555 556 557 558
            </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>
chase's avatar
chase committed
559 560
            <if test="null != companyId and '' != companyId">
                company_id = #{companyId,jdbcType=VARCHAR},
chase's avatar
chase committed
561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591
            </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>
chase's avatar
chase committed
592 593 594
            <if test="null != fileUploadId">
                file_upload_id = #{fileUploadId,jdbcType=VARCHAR},
            </if>
chase's avatar
chase committed
595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610
            <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">
chase's avatar
chase committed
611
                own_time = #{ownTime,jdbcType=INTEGER},
chase's avatar
chase committed
612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642
            </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>