CreditPublicityMapper.xml 52 KB
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 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 113 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 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 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 291 292 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 365 366 367 368 369 370 371 372 373 374 375 376 377 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 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 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 548 549 550 551 552 553 554 555 556 557 558 559 560 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 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 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 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811
<?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="com.credit.cy.business.mapper.CreditPublicityMapper">
    
    <resultMap type="CreditPublicity" id="EitPublicityResult">
        <result property="pubId"    column="pub_id"    />
        <result property="pubType"    column="pub_type"    />
        <result property="counterpartName"    column="counterpart_name"    />
        <result property="counterpartType"    column="counterpart_type"    />
        <result property="creditCode"    column="credit_code"    />
        <result property="registerCode"    column="register_code"    />
        <result property="orgCode"    column="org_code"    />
        <result property="taxCode"    column="tax_code"    />
        <result property="sectorCode"    column="sector_code"    />
        <result property="societyCode"    column="society_code"    />
        <result property="delegate"    column="delegate"    />
        <result property="delegateCardType"    column="delegate_card_type"    />
        <result property="delegateCardCode"    column="delegate_card_code"    />
        <result property="certificateType"    column="certificate_type"    />
        <result property="certificateCode"    column="certificate_code"    />
        <result property="decisionSequence"    column="decision_sequence"    />
        <result property="permissionTitle"    column="permission_title"    />
        <result property="offendType"    column="offend_type"    />
        <result property="offendTruth"    column="offend_truth"    />
        <result property="punishReason"    column="punish_reason"    />
        <result property="punishMoney"    column="punish_money"    />
        <result property="punishEarnMoney"    column="punish_earn_money"    />
        <result property="punishCertificateCode"    column="punish_certificate_code"    />
        <result property="decisionType"    column="decision_type"    />
        <result property="permissionName"    column="permission_name"    />
        <result property="permissionCode"    column="permission_code"    />
        <result property="decisionContent"    column="decision_content"    />
        <result property="decisionTime"    column="decision_time"    />
        <result property="decisionTimeStart"    column="decision_time_start"    />
        <result property="decisionTimeEnd"    column="decision_time_end"    />
        <result property="decisionDept"    column="decision_dept"    />
        <result property="decisionCreditCode"    column="decision_credit_code"    />
        <result property="decisionStatus"    column="decision_status"    />
        <result property="dataSource"    column="data_source"    />
        <result property="sourceCreditCode"    column="source_credit_code"    />
        <result property="remark"    column="remark"    />
        <result property="reportDate"    column="report_date"    />
        <result property="reportDept"    column="report_dept"    />
        <result property="delFlag"    column="del_flag"    />
        <result property="createBy"    column="create_by"    />
        <result property="createTime"    column="create_time"    />
        <result property="updateBy"    column="update_by"    />
        <result property="updateTime"    column="update_time"    />
        <result property="catalogId" column="catalog_id"/>
        <result property="checkStatus" column="check_status"/>
        <result property="partOrgPub" column="part_org_pub" />
        <result property="entityId" column="entity_id" />
        <result property="pubStatus" column="pub_status"/>
        <result property="recoverStatus"    column="recover_status"    />
        <result property="publishTime"    column="publish_time"    />
        <result property="uploadStatus" column="upload_status" />
        <result property="uploadTime"    column="upload_time"    />
        <result property="recoverType" column="recover_type" />
        <result property="sequenceDes" column="sequence_des" />
        <result property="checkMsg"    column="check_msg"    />
        <result property="inputType"    column="input_type"    />
        <result property="inputSequence"    column="input_sequence"    />
        <result property="dataRef"    column="data_ref"    />
        <result property="wsh"    column="wsh"    />
        <result property="ztUpload"    column="zt_upload"    />
        <result property="webUpload"    column="web_upload"    />
        <result property="webTime"    column="web_time"    />
    </resultMap>

    <sql id="selectEitPublicityVo">
        select pub_id, pub_type, counterpart_name, counterpart_type, credit_code, register_code, org_code, tax_code, sector_code, society_code, delegate,
               delegate_card_type, delegate_card_code, certificate_type, certificate_code, decision_sequence, permission_title, offend_type, offend_truth,
               punish_reason, punish_money, punish_earn_money, punish_certificate_code, decision_type, permission_name, permission_code,
               decision_content, decision_time, decision_time_start, decision_time_end, decision_dept, decision_credit_code, decision_status,
               data_source, source_credit_code, remark, report_date, report_dept, del_flag, create_by, create_time, update_by, update_time,catalog_id,
               check_status,part_org_pub,entity_id,pub_status,recover_status, publish_time,upload_status,upload_time,recover_type,sequence_des,check_msg,input_type, input_sequence,data_ref,zt_upload,web_upload,web_time from credit_publicity
    </sql>

    <sql id="selectSimplePublicityVo">
        select pub_id, pub_type, counterpart_name, counterpart_type, credit_code, decision_sequence, offend_type, offend_truth,
               decision_type, decision_time, decision_time_end, decision_dept, decision_credit_code, decision_status,
               report_date, report_dept,create_time, catalog_id, check_status, entity_id,part_org_pub,pub_status,recover_status, publish_time,upload_status,upload_time,recover_type,sequence_des,input_type, input_sequence,data_ref,zt_upload,web_upload,web_time   from credit_publicity
    </sql>

    <sql id="selectReportPublicityVo">
        select pub_id, pub_type, counterpart_name, counterpart_type, credit_code, decision_sequence,
               decision_type, decision_time, decision_dept, decision_status,
               report_date, report_dept, catalog_id, pub_status, recover_status, publish_time,upload_status,upload_time, sequence_des, input_type, input_sequence,zt_upload,web_upload,web_time   from credit_publicity
    </sql>

    <sql id="selectSimplePubDatePublicityVo">
        select pub_id, pub_type, counterpart_name, counterpart_type, credit_code,
               decision_time, decision_time_start, decision_time_end, decision_status,
               report_date, report_dept, del_flag, catalog_id, check_status,part_org_pub,entity_id,pub_status,recover_status, publish_time,upload_status,upload_time,recover_type,zt_upload,web_upload,web_time  from credit_publicity
    </sql>

    <select id="selectEitPublicityList" parameterType="CreditPublicity" resultMap="EitPublicityResult">
        <include refid="selectEitPublicityVo"/>
        <where>
            <if test="pubType != null  and pubType != ''"> and pub_type = #{pubType}</if>
            <if test="creditCode != null  and creditCode != ''"> and credit_code = #{creditCode}</if>
            <if test="counterpartName != null  and counterpartName != ''"> and counterpart_name like concat('%', #{counterpartName}, '%')</if>
            <if test="counterpartType != null  and counterpartType != ''"> and counterpart_type = #{counterpartType}</if>
            <if test="decisionSequence != null  and decisionSequence != ''"> and decision_sequence = #{decisionSequence}</if>
            <if test="decisionType != null  and decisionType != ''"> and decision_type = #{decisionType}</if>
            <if test="decisionTime != null "> and decision_time = #{decisionTime}</if>
            <if test="reportDate != null  and reportDate != ''"> and report_date = #{reportDate}</if>
            <if test="reportDept != null  and reportDept != ''"> and report_dept = #{reportDept}</if>
            <if test="checkStatus != null  "> and check_status =#{checkStatus}</if>
            <if test="pubStatus != null "> and pub_status = #{pubStatus}</if>
            <if test="recoverStatus != null "> and recover_status = #{recoverStatus}</if>
            <if test="uploadStatus != null  and uploadStatus != ''"> and upload_status = #{uploadStatus}</if>
            <if test="sequenceDes != null  and sequenceDes != ''"> and sequence_des = #{sequenceDes}</if>
            <if test="null != delFlag and delFlag != ''"> and del_flag = #{delFlag}</if>
            <if test="partOrgPub!=null and partOrgPub!=''"> and part_org_pub= #{partOrgPub}</if>
            <if test="inputSequence!=null and inputSequence!=''"> and input_sequence= #{inputSequence}</if>
        </where>
    </select>
    
    <select id="selectEitPublicityByPubId" parameterType="Long" resultMap="EitPublicityResult">
        <include refid="selectEitPublicityVo"/>
        where pub_id = #{pubId} and del_flag = '0'
    </select>

    <select id="selectPublicityByUniqueKey" parameterType="com.credit.cy.business.model.query.CreditPublicityExistQuery" resultMap="EitPublicityResult">
        <include refid="selectEitPublicityVo"/>
        <where>
            <if test="pubType != null  and pubType != ''"> and pub_type = #{pubType}</if>
            <if test="certificateCode != null and certificateCode != ''"> and certificate_code = #{certificateCode}</if>
            <if test="creditCode != null and creditCode != ''"> and credit_code = #{creditCode}</if>
            <if test="counterpartName != null and counterpartName != ''"> and counterpart_name = #{counterpartName}</if>
            <if test="decisionSequence != null and decisionSequence != ''"> and decision_sequence = #{decisionSequence}</if>
            <if test="decisionCreditCode != null and decisionCreditCode != ''"> and decision_credit_code = #{decisionCreditCode}</if>
            <if test="checkStatusList != null "> and check_status in
                <foreach item="checkStatus" collection="checkStatusList" open="(" separator="," close=")">
                    #{checkStatus}
                </foreach>
            </if>
            <if test="uploadStatusList != null "> and upload_status in
                <foreach item="uploadStatus" collection="uploadStatusList" open="(" separator="," close=")">
                    #{uploadStatus}
                </foreach>
            </if>
            <if test="null != delFlag and delFlag != ''"> and del_flag = #{delFlag}</if>
            <if test="partOrgPub!=null and partOrgPub!=''"> and part_org_pub= #{partOrgPub}</if>
        </where>
    </select>

    <select id="queryPublicityList" parameterType="com.credit.cy.business.model.query.CreditPublicityQuery" resultMap="EitPublicityResult">
        <include refid="selectEitPublicityVo"/>
        <where>
            <if test="counterpartName != null and counterpartName!=''">and counterpart_name like concat('%',#{counterpartName}, '%')</if>
            <if test="null!=createTimeBegin">
                AND create_time >= #{createTimeBegin}
            </if>
            <if test="null!=createTimeEnd">
                AND create_time <![CDATA[<=]]> #{createTimeEnd}
            </if>
            <if test="null!=reportDateBegin">
                AND report_date >= #{reportDateBegin}
            </if>
            <if test="null!=reportDateEnd">
                AND report_date <![CDATA[<=]]> #{reportDateEnd}
            </if>
            <if test="null!=decisionTimeBegin">
                AND decision_time >= #{decisionTimeBegin}
            </if>
            <if test="null!=decisionTimeEnd">
                AND decision_time <![CDATA[<=]]> #{decisionTimeEnd}
            </if>
            <if test="pubType != null  "> and pub_type =#{pubType}</if>
            <if test="checkStatus != null  "> and check_status = #{checkStatus}</if>
            <if test="checkStatusList != null "> and check_status in
                <foreach item="checkStatus" collection="checkStatusList" open="(" separator="," close=")">
                    #{checkStatus}
                </foreach>
            </if>
            <if test="decisionSequence != null"> and decision_sequence like concat('%',#{decisionSequence}, '%')</if>
            <if test="reportDept != null  and reportDept != ''"> and report_dept = #{reportDept}</if>
            <if test="null != delFlag and delFlag != ''"> and del_flag = #{delFlag}</if>
            <if test="uploadStatus != null  and uploadStatus != ''"> and upload_status = #{uploadStatus}</if>
            <if test="partOrgPub!=null and partOrgPub!=''"> and part_org_pub= #{partOrgPub}</if>
        </where>
    </select>

    <select id="querySimplePublicityList" parameterType="com.credit.cy.business.model.query.CreditPublicityQuery" resultMap="EitPublicityResult">
        <include refid="selectSimplePublicityVo"/>
        <where>
            <if test="counterpartName != null and counterpartName!=''">and counterpart_name like concat('%',#{counterpartName}, '%')</if>
            <if test="decisionDept != null and decisionDept != ''">and decision_dept like concat('%',#{decisionDept}, '%')</if>
            <if test="null!=createTimeBegin">
                AND create_time >= #{createTimeBegin}
            </if>
            <if test="null!=createTimeEnd">
                AND create_time <![CDATA[<=]]> #{createTimeEnd}
            </if>
            <if test="null!=reportDateBegin">
                AND report_date >= #{reportDateBegin}
            </if>
            <if test="null!=reportDateEnd">
                AND report_date <![CDATA[<=]]> #{reportDateEnd}
            </if>
            <if test="null!=decisionTimeBegin">
                AND decision_time >= #{decisionTimeBegin}
            </if>
            <if test="null!=decisionTimeEnd">
                AND decision_time <![CDATA[<=]]> #{decisionTimeEnd}
            </if>

            <if test="null!=uploadTimeBegin">
                AND upload_time >= #{uploadTimeBegin}
            </if>
            <if test="null!=uploadTimeEnd">
                AND upload_time <![CDATA[<=]]> #{uploadTimeEnd}
            </if>
            <if test="pubType != null  "> and pub_type =#{pubType}</if>
            <if test="checkStatus != null  "> and check_status = #{checkStatus}</if>
            <if test="checkStatusList != null "> and check_status in
                <foreach item="checkStatus" collection="checkStatusList" open="(" separator="," close=")">
                    #{checkStatus}
                </foreach>
            </if>
            <if test="decisionSequence != null"> and decision_sequence like concat('%',#{decisionSequence}, '%')</if>
            <if test="reportDept != null  and reportDept != ''"> and report_dept = #{reportDept}</if>
            <if test="null != delFlag and delFlag != ''"> and del_flag = #{delFlag}</if>
            <if test="uploadStatus != null  and uploadStatus != ''"> and upload_status = #{uploadStatus}</if>
            <if test="partOrgPub!=null and partOrgPub!=''"> and part_org_pub= #{partOrgPub}</if>
        </where>
    </select>

    <select id="queryPublicityListByBs" parameterType="com.credit.cy.business.model.query.CreditPublicityQuery" resultMap="EitPublicityResult">
        <include refid="selectSimplePublicityVo"/>
        <where>
            upload_status!='init'
            <if test="counterpartName != null">and counterpart_name like concat('%',#{counterpartName}, '%')</if>
            <if test="decisionDept != null and decisionDept != ''">and decision_dept like concat('%',#{decisionDept}, '%')</if>
            <if test="null!=createTimeBegin">
                AND create_time >= #{createTimeBegin}
            </if>
            <if test="null!=createTimeEnd">
                AND create_time <![CDATA[<=]]> #{createTimeEnd}
            </if>
            <if test="null!=reportDateBegin">
                AND report_date >= #{reportDateBegin}
            </if>
            <if test="null!=reportDateEnd">
                AND report_date <![CDATA[<=]]> #{reportDateEnd}
            </if>
            <if test="null!=decisionTimeBegin">
                AND decision_time >= #{decisionTimeBegin}
            </if>
            <if test="null!=decisionTimeEnd">
                AND decision_time <![CDATA[<=]]> #{decisionTimeEnd}
            </if>
            <if test="pubType != null  "> and pub_type =#{pubType}</if>
            <if test="decisionSequence != null"> and decision_sequence like concat('%',#{decisionSequence}, '%')</if>
            <if test="reportDept != null  and reportDept != ''"> and report_dept = #{reportDept}</if>
            <if test="null != delFlag and delFlag != ''"> and del_flag = #{delFlag}</if>
            <if test="uploadStatus != null  and uploadStatus != ''"> and upload_status = #{uploadStatus}</if>
        </where>
        order by create_time
    </select>



    <insert id="insertEitPublicity" parameterType="CreditPublicity" useGeneratedKeys="true" keyProperty="pubId">
        insert into credit_publicity
        <trim prefix="(" suffix=")" suffixOverrides=",">
            <if test="pubType != null and pubType != ''">pub_type,</if>
            <if test="counterpartName != null and counterpartName != ''">counterpart_name,</if>
            <if test="counterpartType != null and counterpartType != ''">counterpart_type,</if>
            <if test="creditCode != null">credit_code,</if>
            <if test="registerCode != null">register_code,</if>
            <if test="orgCode != null">org_code,</if>
            <if test="taxCode != null">tax_code,</if>
            <if test="sectorCode != null">sector_code,</if>
            <if test="societyCode != null">society_code,</if>
            <if test="delegate != null">delegate,</if>
            <if test="delegateCardType != null">delegate_card_type,</if>
            <if test="delegateCardCode != null">delegate_card_code,</if>
            <if test="certificateType != null">certificate_type,</if>
            <if test="certificateCode != null">certificate_code,</if>
            <if test="decisionSequence != null">decision_sequence,</if>
            <if test="permissionTitle != null">permission_title,</if>
            <if test="offendType != null">offend_type,</if>
            <if test="offendTruth != null">offend_truth,</if>
            <if test="punishReason != null">punish_reason,</if>
            <if test="punishMoney != null">punish_money,</if>
            <if test="punishEarnMoney != null">punish_earn_money,</if>
            <if test="punishCertificateCode != null">punish_certificate_code,</if>
            <if test="decisionType != null and decisionType != ''">decision_type,</if>
            <if test="permissionName != null">permission_name,</if>
            <if test="permissionCode != null">permission_code,</if>
            <if test="decisionContent != null and decisionContent != ''">decision_content,</if>
            <if test="decisionTime != null">decision_time,</if>
            <if test="decisionTimeStart != null">decision_time_start,</if>
            <if test="decisionTimeEnd != null">decision_time_end,</if>
            <if test="decisionDept != null and decisionDept != ''">decision_dept,</if>
            <if test="decisionCreditCode != null and decisionCreditCode != ''">decision_credit_code,</if>
            <if test="decisionStatus != null and decisionStatus != ''">decision_status,</if>
            <if test="dataSource != null and dataSource != ''">data_source,</if>
            <if test="sourceCreditCode != null and sourceCreditCode != ''">source_credit_code,</if>
            <if test="remark != null">remark,</if>
            <if test="reportDate != null ">report_date,</if>
            <if test="reportDept != null and reportDept != ''">report_dept,</if>
            <if test="delFlag != null">del_flag,</if>
            <if test="createBy != null">create_by,</if>
            <if test="createTime != null">create_time,</if>
            <if test="updateBy != null">update_by,</if>
            <if test="updateTime != null">update_time,</if>
            <if test="catalogId != null">catalog_id,</if>
            <if test="checkStatus != null">check_status,</if>
            <if test="partOrgPub != null and partOrgPub != ''">part_org_pub,</if>
            <if test="entityId != null ">entity_id,</if>
            <if test="pubStatus != null ">pub_status,</if>
            <if test="recoverStatus != null">recover_status,</if>
            <if test="publishTime != null">publish_time,</if>
            <if test="uploadStatus != null  and uploadStatus != ''"> upload_status,</if>
            <if test="uploadTime != null">upload_time,</if>
            <if test="recoverType != null  and recoverType != ''"> recover_type,</if>
            <if test="sequenceDes != null  and sequenceDes != ''"> sequence_des,</if>
            <if test="checkMsg != null and checkMsg != ''">check_msg,</if>
            <if test="inputType != null and inputType != ''">input_type,</if>
            <if test="inputSequence != null">input_sequence,</if>
            <if test="dataRef != null">data_ref,</if>
            <if test="ztUpload != null and ztUpload!=''">zt_upload,</if>
            <if test="webUpload != null and webUpload!=''">web_upload,</if>
            <if test="webTime != null">web_time,</if>
         </trim>
        <trim prefix="values (" suffix=")" suffixOverrides=",">
            <if test="pubType != null and pubType != ''">#{pubType},</if>
            <if test="counterpartName != null and counterpartName != ''">#{counterpartName},</if>
            <if test="counterpartType != null and counterpartType != ''">#{counterpartType},</if>
            <if test="creditCode != null">#{creditCode},</if>
            <if test="registerCode != null">#{registerCode},</if>
            <if test="orgCode != null">#{orgCode},</if>
            <if test="taxCode != null">#{taxCode},</if>
            <if test="sectorCode != null">#{sectorCode},</if>
            <if test="societyCode != null">#{societyCode},</if>
            <if test="delegate != null">#{delegate},</if>
            <if test="delegateCardType != null">#{delegateCardType},</if>
            <if test="delegateCardCode != null">#{delegateCardCode},</if>
            <if test="certificateType != null">#{certificateType},</if>
            <if test="certificateCode != null">#{certificateCode},</if>
            <if test="decisionSequence != null">#{decisionSequence},</if>
            <if test="permissionTitle != null">#{permissionTitle},</if>
            <if test="offendType != null">#{offendType},</if>
            <if test="offendTruth != null">#{offendTruth},</if>
            <if test="punishReason != null">#{punishReason},</if>
            <if test="punishMoney != null">#{punishMoney},</if>
            <if test="punishEarnMoney != null">#{punishEarnMoney},</if>
            <if test="punishCertificateCode != null">#{punishCertificateCode},</if>
            <if test="decisionType != null and decisionType != ''">#{decisionType},</if>
            <if test="permissionName != null">#{permissionName},</if>
            <if test="permissionCode != null">#{permissionCode},</if>
            <if test="decisionContent != null and decisionContent != ''">#{decisionContent},</if>
            <if test="decisionTime != null">#{decisionTime},</if>
            <if test="decisionTimeStart != null">#{decisionTimeStart},</if>
            <if test="decisionTimeEnd != null">#{decisionTimeEnd},</if>
            <if test="decisionDept != null and decisionDept != ''">#{decisionDept},</if>
            <if test="decisionCreditCode != null and decisionCreditCode != ''">#{decisionCreditCode},</if>
            <if test="decisionStatus != null and decisionStatus != ''">#{decisionStatus},</if>
            <if test="dataSource != null and dataSource != ''">#{dataSource},</if>
            <if test="sourceCreditCode != null and sourceCreditCode != ''">#{sourceCreditCode},</if>
            <if test="remark != null">#{remark},</if>
            <if test="reportDate != null ">#{reportDate},</if>
            <if test="reportDept != null ">#{reportDept},</if>
            <if test="delFlag != null">#{delFlag},</if>
            <if test="createBy != null">#{createBy},</if>
            <if test="createTime != null">#{createTime},</if>
            <if test="updateBy != null">#{updateBy},</if>
            <if test="updateTime != null">#{updateTime},</if>
            <if test="catalogId != null">#{catalogId},</if>
            <if test="checkStatus != null">#{checkStatus},</if>
            <if test="partOrgPub != null and partOrgPub != ''">#{partOrgPub},</if>
            <if test="entityId != null ">#{entityId},</if>
            <if test="pubStatus != null ">#{pubStatus},</if>
            <if test="recoverStatus != null">#{recoverStatus},</if>
            <if test="publishTime != null">#{publishTime},</if>
            <if test="uploadStatus != null  and uploadStatus != ''">  #{uploadStatus},</if>
            <if test="uploadTime != null">#{uploadTime},</if>
            <if test="recoverType != null  and recoverType != ''">  #{recoverType},</if>
            <if test="sequenceDes != null  and sequenceDes != ''">  #{sequenceDes},</if>
            <if test="checkMsg != null and checkMsg != ''">#{checkMsg},</if>
            <if test="inputType != null and inputType != ''">#{inputType},</if>
            <if test="inputSequence != null">#{inputSequence},</if>
            <if test="dataRef != null">#{dataRef},</if>
            <if test="ztUpload != null and ztUpload!=''">#{ztUpload},</if>
            <if test="webUpload != null and webUpload!=''">#{webUpload},</if>
            <if test="webTime != null">#{webTime},</if>
         </trim>
    </insert>

    <update id="updateEitPublicity" parameterType="CreditPublicity">
        update credit_publicity
        <trim prefix="SET" suffixOverrides=",">
            <if test="pubType != null and pubType != ''">pub_type = #{pubType},</if>
            <if test="counterpartName != null and counterpartName != ''">counterpart_name = #{counterpartName},</if>
            <if test="counterpartType != null and counterpartType != ''">counterpart_type = #{counterpartType},</if>
            <if test="creditCode != null">credit_code = #{creditCode},</if>
            <if test="registerCode != null">register_code = #{registerCode},</if>
            <if test="orgCode != null">org_code = #{orgCode},</if>
            <if test="taxCode != null">tax_code = #{taxCode},</if>
            <if test="sectorCode != null">sector_code = #{sectorCode},</if>
            <if test="societyCode != null">society_code = #{societyCode},</if>
            <if test="delegate != null">delegate = #{delegate},</if>
            <if test="delegateCardType != null">delegate_card_type = #{delegateCardType},</if>
            <if test="delegateCardCode != null">delegate_card_code = #{delegateCardCode},</if>
            <if test="certificateType != null">certificate_type = #{certificateType},</if>
            <if test="certificateCode != null">certificate_code = #{certificateCode},</if>
            <if test="decisionSequence != null">decision_sequence = #{decisionSequence},</if>
            <if test="permissionTitle != null">permission_title = #{permissionTitle},</if>
            <if test="offendType != null">offend_type = #{offendType},</if>
            <if test="offendTruth != null">offend_truth = #{offendTruth},</if>
            <if test="punishReason != null">punish_reason = #{punishReason},</if>
            <if test="punishMoney != null">punish_money = #{punishMoney},</if>
            <if test="punishEarnMoney != null">punish_earn_money = #{punishEarnMoney},</if>
            <if test="punishCertificateCode != null">punish_certificate_code = #{punishCertificateCode},</if>
            <if test="decisionType != null and decisionType != ''">decision_type = #{decisionType},</if>
            <if test="permissionName != null">permission_name = #{permissionName},</if>
            <if test="permissionCode != null">permission_code = #{permissionCode},</if>
            <if test="decisionContent != null and decisionContent != ''">decision_content = #{decisionContent},</if>
            <if test="decisionTime != null">decision_time = #{decisionTime},</if>
            <if test="decisionTimeStart != null">decision_time_start = #{decisionTimeStart},</if>
            <if test="decisionTimeEnd != null">decision_time_end = #{decisionTimeEnd},</if>
            <if test="decisionDept != null and decisionDept != ''">decision_dept = #{decisionDept},</if>
            <if test="decisionCreditCode != null and decisionCreditCode != ''">decision_credit_code = #{decisionCreditCode},</if>
            <if test="decisionStatus != null and decisionStatus != ''">decision_status = #{decisionStatus},</if>
            <if test="dataSource != null and dataSource != ''">data_source = #{dataSource},</if>
            <if test="sourceCreditCode != null and sourceCreditCode != ''">source_credit_code = #{sourceCreditCode},</if>
            <if test="remark != null">remark = #{remark},</if>
            <if test="reportDate != null">report_date = #{reportDate},</if>
            <if test="reportDept != null and reportDept != ''">report_dept = #{reportDept},</if>
            <if test="delFlag != null">del_flag = #{delFlag},</if>
            <if test="createBy != null">create_by = #{createBy},</if>
            <if test="createTime != null">create_time = #{createTime},</if>
            <if test="updateBy != null">update_by = #{updateBy},</if>
            <if test="updateTime != null">update_time = #{updateTime},</if>
            <if test="checkStatus != null">check_status=#{checkStatus},</if>
            <if test="partOrgPub != null and partOrgPub != ''">part_org_pub=#{partOrgPub},</if>
            <if test="entityId != null ">entity_id=#{entityId},</if>
            <if test="pubStatus != null ">pub_status=#{pubStatus},</if>
            <if test="recoverStatus != null">recover_status = #{recoverStatus},</if>
            <!--<if test="publishTime != null">publish_time = #{publishTime},</if>-->
            publish_time = #{publishTime},
            <if test="uploadStatus != null  and uploadStatus != ''"> upload_status = #{uploadStatus},</if>
            <if test="uploadTime != null">upload_time = #{uploadTime},</if>
            <if test="recoverType != null  and recoverType != ''">  recover_type = #{recoverType},</if>
            <if test="sequenceDes != null  and sequenceDes != ''">  sequence_des = #{sequenceDes},</if>
            <if test="checkMsg != null and checkMsg != ''">check_msg = #{checkMsg},</if>
            <if test="inputType != null and inputType != ''">input_type = #{inputType},</if>
            <if test="inputSequence != null">input_sequence = #{inputSequence},</if>
            <if test="ztUpload != null and ztUpload!=''">zt_upload=#{ztUpload},</if>
            <if test="webUpload != null and webUpload!=''">web_upload=#{webUpload},</if>
            <if test="webTime != null">web_time=#{webTime},</if>
        </trim>
        where pub_id = #{pubId}
    </update>

    <delete id="deleteEitPublicityByPubId" parameterType="Long">
        delete from credit_publicity where pub_id = #{pubId}
    </delete>

    <delete id="deleteEitPublicityByPubIds" parameterType="String">
        delete from credit_publicity where pub_id in 
        <foreach item="pubId" collection="array" open="(" separator="," close=")">
            #{pubId}
        </foreach>
    </delete>

    <select id="selectSimplePublicityList" parameterType="com.credit.cy.business.model.query.CreditPublicityQuery" resultMap="EitPublicityResult">
        <include refid="selectSimplePublicityVo"/>
        <where>
            <if test="pubType != null  and pubType != ''"> and pub_type = #{pubType}</if>
            <if test="creditCode != null  and creditCode != ''"> and credit_code = #{creditCode}</if>
            <if test="counterpartName != null  and counterpartName != ''"> and counterpart_name like concat('%', #{counterpartName}, '%')</if>
            <if test="counterpartTypeList != null "> and counterpart_type in
                <foreach item="counterpartType" collection="counterpartTypeList" open="(" separator="," close=")">
                    #{counterpartType}
                </foreach>
            </if>
            <if test="decisionSequence != null  and decisionSequence != ''"> and decision_sequence like concat('%',#{decisionSequence}, '%')</if>
            <if test="reportDept != null  and reportDept != ''"> and report_dept = #{reportDept}</if>
            <if test="checkStatus != null  "> and check_status = #{checkStatus}</if>
            <if test="pubStatus != null "> and pub_status = #{pubStatus}</if>
            <if test="recoverStatus != null "> and recover_status = #{recoverStatus}</if>
            <if test="null != delFlag and delFlag != ''"> and del_flag = #{delFlag}</if>
            <if test="partOrgPub!=null and partOrgPub!=''"> and part_org_pub= #{partOrgPub}</if>
        </where>
    </select>

    <select id="countNum" resultType="java.lang.Long" parameterType="com.credit.cy.business.model.query.CreditPublicityQuery" >
        select count(*) from credit_publicity
        <where>
            <if test="counterpartName != null">and counterpart_name like concat('%', #{counterpartName}, '%')</if>
            <if test="null!=createTimeBegin">
                AND create_time >= #{createTimeBegin}
            </if>
            <if test="null!=createTimeEnd">
                AND create_time <![CDATA[<=]]> #{createTimeEnd}
            </if>
            <if test="null!=reportDateBegin">
                AND report_date >= #{reportDateBegin}
            </if>
            <if test="null!=reportDateEnd">
                AND report_date <![CDATA[<=]]> #{reportDateEnd}
            </if>
            <if test="null!=decisionTimeBegin">
                AND decision_time >= #{decisionTimeBegin}
            </if>
            <if test="null!=decisionTimeEnd">
                AND decision_time <![CDATA[<=]]> #{decisionTimeEnd}
            </if>
            <if test="reportDept != null  and reportDept != ''"> and report_dept = #{reportDept}</if>
            <if test="pubType != null  "> and pub_type =#{pubType}</if>
            <if test="checkStatus != null  "> and check_status =#{checkStatus}</if>
            <if test="decisionSequence != null"> and decision_sequence = #{decisionSequence}</if>
            <if test="uploadStatus != null  and uploadStatus != ''"> and upload_status = #{uploadStatus}</if>
            <if test="null != delFlag and delFlag != ''"> and del_flag = #{delFlag}</if>
            <if test="partOrgPub!=null and partOrgPub!=''"> and part_org_pub= #{partOrgPub}</if>
        </where>
    </select>

    <select id="selectExistsPublicityList" parameterType="CreditPublicity" resultMap="EitPublicityResult">
        <include refid="selectSimplePublicityVo"/>
        <where>
            <if test="pubType != null  and pubType != ''"> and pub_type = #{pubType}</if>
            <if test="creditCode != null  and creditCode != ''"> and credit_code = #{creditCode}</if>
            <if test="counterpartName != null  and counterpartName != ''"> and counterpart_name = #{counterpartName}</if>
            <if test="counterpartType != null  and counterpartType != ''"> and counterpart_type = #{counterpartType}</if>
            <if test="decisionSequence != null  and decisionSequence != ''"> and decision_sequence = #{decisionSequence}</if>
            <if test="decisionType != null  and decisionType != ''"> and decision_type = #{decisionType}</if>
            <if test="pubStatus != null "> and pub_status = #{pubStatus}</if>
            <if test="recoverStatus != null "> and recover_status = #{recoverStatus}</if>
            <if test="uploadStatus != null  and uploadStatus != ''"> and upload_status = #{uploadStatus}</if>
            <if test="sequenceDes != null  and sequenceDes != ''"> and sequence_des = #{sequenceDes}</if>
            <if test="null != delFlag and delFlag != ''"> and del_flag = #{delFlag}</if>
            <if test="partOrgPub!=null and partOrgPub!=''"> and part_org_pub= #{partOrgPub}</if>
            <if test="inputSequence!=null and inputSequence!=''"> and input_sequence= #{inputSequence}</if>
        </where>
    </select>

    <select id="selectPublicityListByIdList" parameterType="Long" resultMap="EitPublicityResult">
        <include refid="selectSimplePublicityVo"/>
        where pub_id in
        <foreach item="pubId" collection="list" open="(" separator="," close=")">
            #{pubId}
        </foreach>
        and del_flag = '0'
    </select>

    <select id="selectCount" parameterType="com.credit.cy.business.model.query.WorkCountQuery" resultType="java.lang.Long">
        select count(1) from credit_publicity
        <where>
            <if test="reportType != null  and reportType != ''"> and pub_type = #{reportType}</if>
            <if test="reportDept != null  and reportDept != ''"> and report_dept = #{reportDept}</if>
            <if test="null!=reportStartDate"> and report_date >= #{reportStartDate}</if>
            <if test="null!=reportEndDate"> AND report_date <![CDATA[<=]]> #{reportEndDate}</if>
            <if test="null != delFlag and delFlag != ''"> and del_flag = #{delFlag}</if>
            <if test="partOrgPub!=null and partOrgPub!=''"> and part_org_pub= #{partOrgPub}</if>
        </where>
    </select>

    <select id="selectDeptCount" parameterType="com.credit.cy.business.model.query.WorkCountQuery" resultType="java.lang.Long">
        select count(distinct report_dept) from credit_publicity
        <where>
            <if test="reportDept != null  and reportDept != ''"> and report_dept = #{reportDept}</if>
            <if test="null!=reportStartDate"> and report_date >= #{reportStartDate}</if>
            <if test="null!=reportEndDate"> AND report_date <![CDATA[<=]]> #{reportEndDate}</if>
            <if test="null != delFlag and delFlag != ''"> and del_flag = #{delFlag}</if>
            <if test="partOrgPub!=null and partOrgPub!=''"> and part_org_pub= #{partOrgPub}</if>
        </where>
    </select>

    <update id="modifyEitPublicity" parameterType="CreditPublicity">
        update credit_publicity
        <trim prefix="SET" suffixOverrides=",">
            <if test="delFlag != null">del_flag = #{delFlag},</if>
            <if test="updateBy != null">update_by = #{updateBy},</if>
            <if test="updateTime != null">update_time = #{updateTime},</if>
            <if test="partOrgPub != null and partOrgPub != ''">part_org_pub = #{partOrgPub},</if>
            <!--<if test="publishTime != null">publish_time = #{publishTime},</if>-->
            publish_time = #{publishTime},
            <if test="uploadStatus != null  and uploadStatus != ''"> upload_status = #{uploadStatus},</if>
            <if test="uploadTime != null">upload_time = #{uploadTime},</if>
            <if test="pubStatus != null ">pub_status=#{pubStatus},</if>
            <if test="recoverStatus != null">recover_status = #{recoverStatus},</if>
            <if test="recoverType != null  and recoverType != ''">  recover_type = #{recoverType},</if>
            <if test="sequenceDes != null  and sequenceDes != ''">  sequence_des = #{sequenceDes},</if>
        </trim>
        where pub_id = #{pubId}
    </update>

    <select id="selectOldestPublicity" parameterType="com.credit.cy.business.model.query.CreditPublicityQuery" resultMap="EitPublicityResult">
        <include refid="selectSimplePublicityVo"/>
        <where>
            <if test="uploadStatus != null  and uploadStatus != ''"> AND upload_status = #{uploadStatus}</if>
            <if test="checkStatus != null"> AND check_status = #{checkStatus}</if>
            <if test="pubStatus != null "> AND pub_status = #{pubStatus}</if>
            <if test="null != reportDateBegin"> AND create_time >= #{reportDateBegin}</if>
            <if test="null != reportDateEnd"> AND create_time <![CDATA[<=]]> #{reportDateEnd}</if>
            <if test="null != decisionTimeEnd"> AND decision_time_end <![CDATA[<=]]> #{decisionTimeEnd}</if>
            <if test="null != delFlag and delFlag != ''"> AND del_flag = #{delFlag}</if>
            <if test="partOrgPub!=null and partOrgPub!=''"> and part_org_pub= #{partOrgPub}</if>
        </where>
        order by pub_id asc limit 1
    </select>

    <select id="queryPagePublicityList" parameterType="com.credit.cy.business.model.query.CreditPublicityQuery" resultMap="EitPublicityResult">
        <include refid="selectEitPublicityVo"/>
        <where>
            <if test="null != pubId"> and pub_id >= #{pubId}</if>
            <if test="uploadStatus != null  and uploadStatus != ''"> and upload_status = #{uploadStatus}</if>
            <if test="checkStatus != null"> and check_status =#{checkStatus}</if>
            <if test="null!=reportDateBegin"> and create_time >= #{reportDateBegin}</if>
            <if test="null!=reportDateEnd"> AND create_time <![CDATA[<=]]> #{reportDateEnd}</if>
            <if test="null != delFlag and delFlag != ''"> and del_flag = #{delFlag}</if>
            <if test="partOrgPub!=null and partOrgPub!=''"> and part_org_pub= #{partOrgPub}</if>
        </where>
        order by pub_id asc limit #{pageSize}
    </select>

    <update id="falseDelete" parameterType="Long">
        update credit_publicity set del_flag = '1' where pub_id = #{pubId}
    </update>

    <update id="rollbackDelete" parameterType="Long">
        update credit_publicity set del_flag = '0' where pub_id = #{pubId}
    </update>

    <select id="selectReportDeptList" parameterType="com.credit.cy.business.model.query.WorkCountQuery" resultType="java.lang.String">
        select distinct report_dept from credit_publicity
        <where>
            <if test="uploadStatusList != null"> and upload_status in
                <foreach item="uploadStatus" collection="uploadStatusList" open="(" separator="," close=")">
                    #{uploadStatus}
                </foreach>
            </if>
            <if test="checkStatusList != null"> and check_status in
                <foreach item="checkStatus" collection="checkStatusList" open="(" separator="," close=")">
                    #{checkStatus}
                </foreach>
            </if>
            <if test="null!=reportStartDate"> and report_date >= #{reportStartDate}</if>
            <if test="null!=reportEndDate"> AND report_date <![CDATA[<=]]> #{reportEndDate}</if>
            <if test="null != delFlag and delFlag != ''"> and del_flag = #{delFlag}</if>
            <if test="partOrgPub!=null and partOrgPub!=''"> and part_org_pub= #{partOrgPub}</if>
        </where>
    </select>

    <select id="selectReportPublicity" parameterType="com.credit.cy.business.model.query.WorkCountQuery" resultMap="EitPublicityResult">
        <include refid="selectReportPublicityVo"/>
        <where>
            <if test="reportDept != null  and reportDept != ''"> and report_dept = #{reportDept}</if>
            <if test="uploadStatusList != null"> and upload_status in
                <foreach item="uploadStatus" collection="uploadStatusList" open="(" separator="," close=")">
                    #{uploadStatus}
                </foreach>
            </if>
            <if test="checkStatusList != null"> and check_status in
                <foreach item="checkStatus" collection="checkStatusList" open="(" separator="," close=")">
                    #{checkStatus}
                </foreach>
            </if>
            <if test="null!=reportStartDate"> and report_date >= #{reportStartDate}</if>
            <if test="null!=reportEndDate"> AND report_date <![CDATA[<=]]> #{reportEndDate}</if>
            <if test="null != delFlag and delFlag != ''"> and del_flag = #{delFlag}</if>
            <if test="partOrgPub!=null and partOrgPub!=''"> and part_org_pub= #{partOrgPub}</if>
        </where>
        order by pub_id asc
    </select>

    <update id="batchDeleteByPubIdList" parameterType="Long">
        delete from credit_publicity where pub_id in
        <foreach item="pubId" collection="list" open="(" separator="," close=")">
            #{pubId}
        </foreach>
    </update>

    <update id="batchRollbackDelete" parameterType="Long">
        update credit_publicity set del_flag = '0' where pub_id in
        <foreach item="pubId" collection="list" open="(" separator="," close=")">
            #{pubId}
        </foreach>
    </update>

    <select id="selectPushPublicity" parameterType="com.credit.cy.business.model.query.CreditPublicityQuery" resultMap="EitPublicityResult">
        <include refid="selectEitPublicityVo"/>
        <where>
            1=1
            <if test="uploadStatus != null  and uploadStatus != ''"> and upload_status = #{uploadStatus}</if>
            <if test="checkStatus != null"> and check_status =#{checkStatus}</if>
            <if test="null!=createTimeBegin"> and create_time >= #{createTimeBegin}</if>
            <if test="null!=createTimeEnd"> AND create_time <![CDATA[<=]]> #{createTimeEnd}</if>
            <if test="null != delFlag and delFlag != ''"> and del_flag = #{delFlag}</if>
            <if test="partOrgPub!=null and partOrgPub!=''"> and part_org_pub= #{partOrgPub}</if>
        </where>
        and source_credit_code!='11110000400606570J'  order by create_time asc
    </select>

    <select id="selectPubStatusPublicityPage" parameterType="com.credit.cy.business.model.query.CreditPublicityQuery" resultMap="EitPublicityResult">
        <include refid="selectSimplePubDatePublicityVo"/>
        <where>
            <if test="pubStatus != null "> AND pub_status = #{pubStatus}</if>
            <if test="null != decisionTimeBegin"> AND decision_time_end >= #{decisionTimeBegin}</if>
            <if test="null != decisionTimeEnd"> AND decision_time_end <![CDATA[<=]]> #{decisionTimeEnd}</if>
            <if test="null != delFlag and delFlag != ''"> AND del_flag = #{delFlag}</if>
            <if test="partOrgPub!=null and partOrgPub!=''"> and part_org_pub= #{partOrgPub}</if>
        </where>
        order by decision_time_end asc limit #{pageSize}
    </select>

    <select id="selectBySequence" parameterType="String" resultType="Integer">
        select count(pub_id) from credit_publicity where input_sequence=#{sequence}
    </select>


    <select id="queryByScreen" parameterType="String" resultMap="EitPublicityResult">
        SELECT REPLACE(REPLACE(decision_sequence,#{screenWsh},''),'号','')+0 AS wsh,c.* FROM `credit_publicity` c
        WHERE c.pub_type=#{type}  AND  c.report_dept=#{deptId}
        and c.decision_sequence LIKE  concat('%', #{screenWsh}, '%')
        and c.upload_status!='init' AND c.del_flag='0'
        and c.create_time BETWEEN DATE_SUB(CURDATE(), INTERVAL 20 DAY) AND CURDATE()
        ORDER BY wsh ASC
    </select>

    <select id="queryEitPublicityByPubId" parameterType="Long" resultMap="EitPublicityResult">
        <include refid="selectEitPublicityVo"/>
        where pub_id = #{pubId}
    </select>


    <update id="updateEitPublicityByPubId" parameterType="CreditPublicity">
        update credit_publicity
        <trim prefix="SET" suffixOverrides=",">
            <if test="pubType != null and pubType != ''">pub_type = #{pubType},</if>
            <if test="counterpartName != null and counterpartName != ''">counterpart_name = #{counterpartName},</if>
            <if test="counterpartType != null and counterpartType != ''">counterpart_type = #{counterpartType},</if>
            <if test="creditCode != null">credit_code = #{creditCode},</if>
            <if test="registerCode != null">register_code = #{registerCode},</if>
            <if test="orgCode != null">org_code = #{orgCode},</if>
            <if test="taxCode != null">tax_code = #{taxCode},</if>
            <if test="sectorCode != null">sector_code = #{sectorCode},</if>
            <if test="societyCode != null">society_code = #{societyCode},</if>
            <if test="delegate != null">delegate = #{delegate},</if>
            <if test="delegateCardType != null">delegate_card_type = #{delegateCardType},</if>
            <if test="delegateCardCode != null">delegate_card_code = #{delegateCardCode},</if>
            <if test="certificateType != null">certificate_type = #{certificateType},</if>
            <if test="certificateCode != null">certificate_code = #{certificateCode},</if>
            <if test="decisionSequence != null">decision_sequence = #{decisionSequence},</if>
            <if test="permissionTitle != null">permission_title = #{permissionTitle},</if>
            <if test="offendType != null">offend_type = #{offendType},</if>
            <if test="offendTruth != null">offend_truth = #{offendTruth},</if>
            <if test="punishReason != null">punish_reason = #{punishReason},</if>
            <if test="punishMoney != null">punish_money = #{punishMoney},</if>
            <if test="punishEarnMoney != null">punish_earn_money = #{punishEarnMoney},</if>
            <if test="punishCertificateCode != null">punish_certificate_code = #{punishCertificateCode},</if>
            <if test="decisionType != null and decisionType != ''">decision_type = #{decisionType},</if>
            <if test="permissionName != null">permission_name = #{permissionName},</if>
            <if test="permissionCode != null">permission_code = #{permissionCode},</if>
            <if test="decisionContent != null and decisionContent != ''">decision_content = #{decisionContent},</if>
            <if test="decisionTime != null">decision_time = #{decisionTime},</if>
            <if test="decisionTimeStart != null">decision_time_start = #{decisionTimeStart},</if>
            <if test="decisionTimeEnd != null">decision_time_end = #{decisionTimeEnd},</if>
            <if test="decisionDept != null and decisionDept != ''">decision_dept = #{decisionDept},</if>
            <if test="decisionCreditCode != null and decisionCreditCode != ''">decision_credit_code = #{decisionCreditCode},</if>
            <if test="decisionStatus != null and decisionStatus != ''">decision_status = #{decisionStatus},</if>
            <if test="dataSource != null and dataSource != ''">data_source = #{dataSource},</if>
            <if test="sourceCreditCode != null and sourceCreditCode != ''">source_credit_code = #{sourceCreditCode},</if>
            <if test="remark != null">remark = #{remark},</if>
            <if test="reportDate != null">report_date = #{reportDate},</if>
            <if test="reportDept != null and reportDept != ''">report_dept = #{reportDept},</if>
            <if test="delFlag != null">del_flag = #{delFlag},</if>
            <if test="createBy != null">create_by = #{createBy},</if>
            <if test="createTime != null">create_time = #{createTime},</if>
            <if test="updateBy != null">update_by = #{updateBy},</if>
            <if test="updateTime != null">update_time = #{updateTime},</if>
            <if test="checkStatus != null">check_status=#{checkStatus},</if>
            <if test="partOrgPub != null and partOrgPub != ''">part_org_pub=#{partOrgPub},</if>
            <if test="entityId != null ">entity_id=#{entityId},</if>
            <if test="pubStatus != null ">pub_status=#{pubStatus},</if>
            <if test="recoverStatus != null">recover_status = #{recoverStatus},</if>
            <if test="publishTime != null">publish_time = #{publishTime},</if>
            <if test="uploadStatus != null  and uploadStatus != ''"> upload_status = #{uploadStatus},</if>
            <if test="uploadTime != null">upload_time = #{uploadTime},</if>
            <if test="recoverType != null  and recoverType != ''">  recover_type = #{recoverType},</if>
            <if test="sequenceDes != null  and sequenceDes != ''">  sequence_des = #{sequenceDes},</if>
            <if test="checkMsg != null and checkMsg != ''">check_msg = #{checkMsg},</if>
            <if test="inputType != null and inputType != ''">input_type = #{inputType},</if>
            <if test="inputSequence != null">input_sequence = #{inputSequence},</if>
            <if test="ztUpload != null and ztUpload!=''">zt_upload=#{ztUpload},</if>
            <if test="webUpload != null and webUpload!=''">web_upload=#{webUpload},</if>
            <if test="webTime != null">web_time=#{webTime},</if>
        </trim>
        where pub_id = #{pubId}
    </update>

    <update id="updateEitPublicityBySequence" parameterType="String">
    update credit_publicity SET recover_status='1' where input_sequence=#{sequence}
    </update>

    <select id="selectCountByCode" parameterType="com.credit.cy.business.model.query.WorkCountQuery" resultType="java.lang.Integer">
        select count(1) from credit_publicity
        <where>
            pub_type = 'xzcf'
            <if test="creditCode != null">and credit_code = #{creditCode}</if>
        </where>
    </select>
</mapper>