广州市综治平台后端
xusd
2025-06-07 36306491396230522fa20585c2621a7fc899849a
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
<?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">
<!-- 
 * @title: 纠纷信息表
 * @description: 自定义sql,请自行实现业务逻辑
 * @company: hugeinfo
 * @author: liyj
 * @time:2024-10-21 08:46:39
 * @version 1.0.0
-->
<mapper namespace="cn.huge.module.bycase.dao.mapper.CaseInfoMapper">
    <!-- 结果集 -->
    <resultMap id="dataResult" type="cn.huge.module.bycase.domain.po.CaseInfo">
            <result property="id" column="id"/>
            <result property="caseTitle" column="case_title"/>
            <result property="caseNo" column="case_no"/>
            <result property="serieStatus" column="serie_status"/>
            <result property="serieNo" column="serie_no"/>
            <result property="mediateNo" column="mediate_no"/>
            <result property="mediateBookNo" column="mediate_book_no"/>
            <result property="mediType" column="medi_type"/>
            <result property="mediTypeName" column="medi_type_name"/>
            <result property="caseType" column="case_type"/>
            <result property="caseTypeName" column="case_type_name"/>
            <result property="inputCaseType" column="input_case_type"/>
            <result property="source" column="source"/>
            <result property="sourceName" column="source_name"/>
            <result property="canal" column="canal"/>
            <result property="canalName" column="canal_name"/>
            <result property="peopleNum" column="people_num"/>
            <result property="amount" column="amount"/>
            <result property="crowd" column="crowd"/>
            <result property="crowdName" column="crowd_name"/>
            <result property="occurTime" column="occur_time"/>
            <result property="prov" column="prov"/>
            <result property="provName" column="prov_name"/>
            <result property="city" column="city"/>
            <result property="cityName" column="city_name"/>
            <result property="area" column="area"/>
            <result property="areaName" column="area_name"/>
            <result property="road" column="road"/>
            <result property="roadName" column="road_name"/>
            <result property="village" column="village"/>
            <result property="villageName" column="village_name"/>
            <result property="addr" column="addr"/>
            <result property="caseDes" column="case_des"/>
            <result property="caseClaim" column="case_claim"/>
            <result property="plaintiffs" column="plaintiffs"/>
            <result property="pagents" column="pagents"/>
            <result property="defendants" column="defendants"/>
            <result property="dagents" column="dagents"/>
            <result property="wantUnitId" column="want_unit_id"/>
            <result property="wantUnitName" column="want_unit_name"/>
            <result property="wantUserId" column="want_user_id"/>
            <result property="wantUserName" column="want_user_name"/>
            <result property="inputUnitId" column="input_unit_id"/>
            <result property="inputUnitName" column="input_unit_name"/>
            <result property="inputUserId" column="input_user_id"/>
            <result property="inputUserName" column="input_user_name"/>
            <result property="inputWay" column="input_way"/>
            <result property="acceptTime" column="accept_time"/>
            <result property="auditObjId" column="audit_obj_id"/>
            <result property="auditObjName" column="audit_obj_name"/>
            <result property="auditResult" column="audit_result"/>
            <result property="auditResultName" column="audit_result_name"/>
            <result property="auditTime" column="audit_time"/>
            <result property="errorCause" column="error_cause"/>
            <result property="errorCauseName" column="error_cause_name"/>
            <result property="auditContent" column="audit_content"/>
            <result property="signStatus" column="sign_status"/>
            <result property="process" column="process"/>
            <result property="processName" column="process_name"/>
            <result property="mediateUnitId" column="mediate_unit_id"/>
            <result property="mediateUnitName" column="mediate_unit_name"/>
            <result property="mediateDeptId" column="mediate_dept_id"/>
            <result property="mediateDeptName" column="mediate_dept_name"/>
            <result property="mediateDeptType" column="mediate_dept_type"/>
            <result property="mediatorId" column="mediator_id"/>
            <result property="mediator" column="mediator"/>
            <result property="mediatorMobile" column="mediator_mobile"/>
            <result property="mediStartTime" column="medi_start_time"/>
            <result property="mediEndTime" column="medi_end_time"/>
            <result property="mediResult" column="medi_result"/>
            <result property="mediResultName" column="medi_result_name"/>
            <result property="agreeContent" column="agree_content"/>
            <result property="mediContent" column="medi_content"/>
            <result property="mediFalse" column="medi_false"/>
            <result property="mediFalseName" column="medi_false_name"/>
            <result property="mediFalseContent" column="medi_false_content"/>
            <result property="civilStatus" column="civil_status"/>
            <result property="civilNo" column="civil_no"/>
            <result property="courtId" column="court_id"/>
            <result property="courtName" column="court_name"/>
            <result property="judicApply" column="judic_apply"/>
            <result property="judicApplyName" column="judic_apply_name"/>
            <result property="judicInfoId" column="judic_info_id"/>
            <result property="judicResult" column="judic_result"/>
            <result property="judicResultName" column="judic_result_name"/>
            <result property="fileStatus" column="file_status"/>
            <result property="fileStatusName" column="file_status_name"/>
            <result property="fileUserId" column="file_user_id"/>
            <result property="fileUserName" column="file_user_name"/>
            <result property="fileTime" column="file_time"/>
            <result property="fileYear" column="file_year"/>
            <result property="fileBookName" column="file_book_name"/>
            <result property="fileBookNo" column="file_book_no"/>
            <result property="fileNo" column="file_no"/>
            <result property="fileLimitYear" column="file_limit_year"/>
            <result property="fileAddr" column="file_addr"/>
            <result property="fileContent" column="file_content"/>
            <result property="fulfilSitu" column="fulfil_situ"/>
            <result property="fulfilSituName" column="fulfil_situ_name"/>
            <result property="visitStatus" column="visit_status"/>
            <result property="visitContent" column="visit_content"/>
            <result property="partyJoy" column="party_joy"/>
            <result property="deleteStatus" column="delete_status"/>
            <result property="custId" column="cust_id"/>
            <result property="createTime" column="create_time"/>
            <result property="updateTime" column="update_time"/>
    </resultMap>
    <!-- 表 -->
    <sql id='table-name'>dyh_case_info</sql>
    <!-- 字段 -->
    <sql id="column-part">
        id,
        case_title,
        case_no,
        serie_status,
        serie_no,
        mediate_no,
        mediate_book_no,
        medi_type,
        medi_type_name,
        case_type,
        case_type_name,
        input_case_type,
        source,
        source_name,
        canal,
        canal_name,
        people_num,
        amount,
        crowd,
        crowd_name,
        occur_time,
        prov,
        prov_name,
        city,
        city_name,
        area,
        area_name,
        road,
        road_name,
        village,
        village_name,
        addr,
        case_des,
        case_claim,
        plaintiffs,
        pagents,
        defendants,
        dagents,
        want_unit_id,
        want_unit_name,
        want_user_id,
        want_user_name,
        input_unit_id,
        input_unit_name,
        input_user_id,
        input_user_name,
        input_way,
        accept_time,
        audit_obj_id,
        audit_obj_name,
        audit_result,
        audit_result_name,
        audit_time,
        error_cause,
        error_cause_name,
        audit_content,
        sign_status,
        process,
        process_name,
        mediate_unit_id,
        mediate_unit_name,
        mediate_dept_id,
        mediate_dept_name,
        mediate_dept_type,
        mediator_id,
        mediator,
        mediator_mobile,
        medi_start_time,
        medi_end_time,
        medi_result,
        medi_result_name,
        agree_content,
        medi_content,
        medi_false,
        medi_false_name,
        medi_false_content,
        civil_status,
        civil_no,
        court_id,
        court_name,
        judic_apply,
        judic_apply_name,
        judic_info_id,
        judic_result,
        judic_result_name,
        file_status,
        file_status_name,
        file_user_id,
        file_user_name,
        file_time,
        file_year,
        file_book_name,
        file_book_no,
        file_no,
        file_limit_year,
        file_addr,
        file_content,
        fulfil_situ,
        fulfil_situ_name,
        visit_status,
        visit_content,
        party_joy,
        delete_status,
        cust_id,
        create_time,
        update_time
    </sql>
    <!-- 更新实体字段 -->
    <sql id="set-part">
            <if test="entity.caseTitle != null">case_title = #{entity.caseTitle},</if>
            <if test="entity.caseNo != null">case_no = #{entity.caseNo},</if>
            <if test="entity.serieStatus != null">serie_status = #{entity.serieStatus},</if>
            <if test="entity.serieNo != null">serie_no = #{entity.serieNo},</if>
            <if test="entity.mediateNo != null">mediate_no = #{entity.mediateNo},</if>
            <if test="entity.mediateBookNo != null">mediate_book_no = #{entity.mediateBookNo},</if>
            <if test="entity.mediType != null">medi_type = #{entity.mediType},</if>
            <if test="entity.mediTypeName != null">medi_type_name = #{entity.mediTypeName},</if>
            <if test="entity.caseType != null">case_type = #{entity.caseType},</if>
            <if test="entity.caseTypeName != null">case_type_name = #{entity.caseTypeName},</if>
            <if test="entity.inputCaseType != null">input_case_type = #{entity.inputCaseType},</if>
            <if test="entity.source != null">source = #{entity.source},</if>
            <if test="entity.sourceName != null">source_name = #{entity.sourceName},</if>
            <if test="entity.canal != null">canal = #{entity.canal},</if>
            <if test="entity.canalName != null">canal_name = #{entity.canalName},</if>
            <if test="entity.peopleNum != null">people_num = #{entity.peopleNum},</if>
            <if test="entity.amount != null">amount = #{entity.amount},</if>
            <if test="entity.crowd != null">crowd = #{entity.crowd},</if>
            <if test="entity.crowdName != null">crowd_name = #{entity.crowdName},</if>
            <if test="entity.occurTime != null">occur_time = #{entity.occurTime},</if>
            <if test="entity.prov != null">prov = #{entity.prov},</if>
            <if test="entity.provName != null">prov_name = #{entity.provName},</if>
            <if test="entity.city != null">city = #{entity.city},</if>
            <if test="entity.cityName != null">city_name = #{entity.cityName},</if>
            <if test="entity.area != null">area = #{entity.area},</if>
            <if test="entity.areaName != null">area_name = #{entity.areaName},</if>
            <if test="entity.road != null">road = #{entity.road},</if>
            <if test="entity.roadName != null">road_name = #{entity.roadName},</if>
            <if test="entity.village != null">village = #{entity.village},</if>
            <if test="entity.villageName != null">village_name = #{entity.villageName},</if>
            <if test="entity.addr != null">addr = #{entity.addr},</if>
            <if test="entity.caseDes != null">case_des = #{entity.caseDes},</if>
            <if test="entity.caseClaim != null">case_claim = #{entity.caseClaim},</if>
            <if test="entity.plaintiffs != null">plaintiffs = #{entity.plaintiffs},</if>
            <if test="entity.pagents != null">pagents = #{entity.pagents},</if>
            <if test="entity.defendants != null">defendants = #{entity.defendants},</if>
            <if test="entity.dagents != null">dagents = #{entity.dagents},</if>
            <if test="entity.wantUnitId != null">want_unit_id = #{entity.wantUnitId},</if>
            <if test="entity.wantUnitName != null">want_unit_name = #{entity.wantUnitName},</if>
            <if test="entity.wantUserId != null">want_user_id = #{entity.wantUserId},</if>
            <if test="entity.wantUserName != null">want_user_name = #{entity.wantUserName},</if>
            <if test="entity.inputUnitId != null">input_unit_id = #{entity.inputUnitId},</if>
            <if test="entity.inputUnitName != null">input_unit_name = #{entity.inputUnitName},</if>
            <if test="entity.inputUserId != null">input_user_id = #{entity.inputUserId},</if>
            <if test="entity.inputUserName != null">input_user_name = #{entity.inputUserName},</if>
            <if test="entity.inputWay != null">input_way = #{entity.inputWay},</if>
            <if test="entity.acceptTime != null">accept_time = #{entity.acceptTime},</if>
            <if test="entity.auditObjId != null">audit_obj_id = #{entity.auditObjId},</if>
            <if test="entity.auditObjName != null">audit_obj_name = #{entity.auditObjName},</if>
            <if test="entity.auditResult != null">audit_result = #{entity.auditResult},</if>
            <if test="entity.auditResultName != null">audit_result_name = #{entity.auditResultName},</if>
            <if test="entity.auditTime != null">audit_time = #{entity.auditTime},</if>
            <if test="entity.errorCause != null">error_cause = #{entity.errorCause},</if>
            <if test="entity.errorCauseName != null">error_cause_name = #{entity.errorCauseName},</if>
            <if test="entity.auditContent != null">audit_content = #{entity.auditContent},</if>
            <if test="entity.signStatus != null">sign_status = #{entity.signStatus},</if>
            <if test="entity.process != null">process = #{entity.process},</if>
            <if test="entity.processName != null">process_name = #{entity.processName},</if>
            <if test="entity.mediateUnitId != null">mediate_unit_id = #{entity.mediateUnitId},</if>
            <if test="entity.mediateUnitName != null">mediate_unit_name = #{entity.mediateUnitName},</if>
            <if test="entity.mediateDeptId != null">mediate_dept_id = #{entity.mediateDeptId},</if>
            <if test="entity.mediateDeptName != null">mediate_dept_name = #{entity.mediateDeptName},</if>
            <if test="entity.mediateDeptType != null">mediate_dept_type = #{entity.mediateDeptType},</if>
            <if test="entity.mediatorId != null">mediator_id = #{entity.mediatorId},</if>
            <if test="entity.mediator != null">mediator = #{entity.mediator},</if>
            <if test="entity.mediatorMobile != null">mediator_mobile = #{entity.mediatorMobile},</if>
            <if test="entity.mediStartTime != null">medi_start_time = #{entity.mediStartTime},</if>
            <if test="entity.mediEndTime != null">medi_end_time = #{entity.mediEndTime},</if>
            <if test="entity.mediResult != null">medi_result = #{entity.mediResult},</if>
            <if test="entity.mediResultName != null">medi_result_name = #{entity.mediResultName},</if>
            <if test="entity.agreeContent != null">agree_content = #{entity.agreeContent},</if>
            <if test="entity.mediContent != null">medi_content = #{entity.mediContent},</if>
            <if test="entity.mediFalse != null">medi_false = #{entity.mediFalse},</if>
            <if test="entity.mediFalseName != null">medi_false_name = #{entity.mediFalseName},</if>
            <if test="entity.mediFalseContent != null">medi_false_content = #{entity.mediFalseContent},</if>
            <if test="entity.civilStatus != null">civil_status = #{entity.civilStatus},</if>
            <if test="entity.civilNo != null">civil_no = #{entity.civilNo},</if>
            <if test="entity.courtId != null">court_id = #{entity.courtId},</if>
            <if test="entity.courtName != null">court_name = #{entity.courtName},</if>
            <if test="entity.judicApply != null">judic_apply = #{entity.judicApply},</if>
            <if test="entity.judicApplyName != null">judic_apply_name = #{entity.judicApplyName},</if>
            <if test="entity.judicInfoId != null">judic_info_id = #{entity.judicInfoId},</if>
            <if test="entity.judicResult != null">judic_result = #{entity.judicResult},</if>
            <if test="entity.judicResultName != null">judic_result_name = #{entity.judicResultName},</if>
            <if test="entity.fileStatus != null">file_status = #{entity.fileStatus},</if>
            <if test="entity.fileStatusName != null">file_status_name = #{entity.fileStatusName},</if>
            <if test="entity.fileUserId != null">file_user_id = #{entity.fileUserId},</if>
            <if test="entity.fileUserName != null">file_user_name = #{entity.fileUserName},</if>
            <if test="entity.fileTime != null">file_time = #{entity.fileTime},</if>
            <if test="entity.fileYear != null">file_year = #{entity.fileYear},</if>
            <if test="entity.fileBookName != null">file_book_name = #{entity.fileBookName},</if>
            <if test="entity.fileBookNo != null">file_book_no = #{entity.fileBookNo},</if>
            <if test="entity.fileNo != null">file_no = #{entity.fileNo},</if>
            <if test="entity.fileLimitYear != null">file_limit_year = #{entity.fileLimitYear},</if>
            <if test="entity.fileAddr != null">file_addr = #{entity.fileAddr},</if>
            <if test="entity.fileContent != null">file_content = #{entity.fileContent},</if>
            <if test="entity.fulfilSitu != null">fulfil_situ = #{entity.fulfilSitu},</if>
            <if test="entity.fulfilSituName != null">fulfil_situ_name = #{entity.fulfilSituName},</if>
            <if test="entity.visitStatus != null">visit_status = #{entity.visitStatus},</if>
            <if test="entity.visitContent != null">visit_content = #{entity.visitContent},</if>
            <if test="entity.partyJoy != null">party_joy = #{entity.partyJoy},</if>
            <if test="entity.deleteStatus != null">delete_status = #{entity.deleteStatus},</if>
            <if test="entity.custId != null">cust_id = #{entity.custId},</if>
            <if test="entity.createTime != null">create_time = #{entity.createTime},</if>
            <if test="entity.updateTime != null">update_time = #{entity.updateTime}</if>
    </sql>
    <!-- 条件 -->
    <sql id="where-part">
        <if test="terms != null">
            <where>
                <if test="terms.id != null and terms.id !=''">
                    and id = #{terms.id}
                </if>
                <if test="terms.caseTitle != null and terms.caseTitle !=''">
                    and case_title = #{terms.caseTitle}
                </if>
                <if test="terms.caseNo != null and terms.caseNo !=''">
                    and case_no = #{terms.caseNo}
                </if>
                <if test="terms.serieStatus != null and terms.serieStatus !=''">
                    and serie_status = #{terms.serieStatus}
                </if>
                <if test="terms.serieNo != null and terms.serieNo !=''">
                    and serie_no = #{terms.serieNo}
                </if>
                <if test="terms.mediateNo != null and terms.mediateNo !=''">
                    and mediate_no = #{terms.mediateNo}
                </if>
                <if test="terms.mediateBookNo != null and terms.mediateBookNo !=''">
                    and mediate_book_no = #{terms.mediateBookNo}
                </if>
                <if test="terms.mediType != null and terms.mediType !=''">
                    and medi_type = #{terms.mediType}
                </if>
                <if test="terms.mediTypeName != null and terms.mediTypeName !=''">
                    and medi_type_name = #{terms.mediTypeName}
                </if>
                <if test="terms.caseType != null and terms.caseType !=''">
                    and case_type = #{terms.caseType}
                </if>
                <if test="terms.caseTypeName != null and terms.caseTypeName !=''">
                    and case_type_name = #{terms.caseTypeName}
                </if>
                <if test="terms.inputCaseType != null and terms.inputCaseType !=''">
                    and input_case_type = #{terms.inputCaseType}
                </if>
                <if test="terms.source != null and terms.source !=''">
                    and source = #{terms.source}
                </if>
                <if test="terms.sourceName != null and terms.sourceName !=''">
                    and source_name = #{terms.sourceName}
                </if>
                <if test="terms.canal != null and terms.canal !=''">
                    and canal = #{terms.canal}
                </if>
                <if test="terms.canalName != null and terms.canalName !=''">
                    and canal_name = #{terms.canalName}
                </if>
                <if test="terms.peopleNum != null and terms.peopleNum !=''">
                    and people_num = #{terms.peopleNum}
                </if>
                <if test="terms.amount != null and terms.amount !=''">
                    and amount = #{terms.amount}
                </if>
                <if test="terms.crowd != null and terms.crowd !=''">
                    and crowd = #{terms.crowd}
                </if>
                <if test="terms.crowdName != null and terms.crowdName !=''">
                    and crowd_name = #{terms.crowdName}
                </if>
                <if test="terms.occurTime != null and terms.occurTime !=''">
                    and occur_time = #{terms.occurTime}
                </if>
                <if test="terms.prov != null and terms.prov !=''">
                    and prov = #{terms.prov}
                </if>
                <if test="terms.provName != null and terms.provName !=''">
                    and prov_name = #{terms.provName}
                </if>
                <if test="terms.city != null and terms.city !=''">
                    and city = #{terms.city}
                </if>
                <if test="terms.cityName != null and terms.cityName !=''">
                    and city_name = #{terms.cityName}
                </if>
                <if test="terms.area != null and terms.area !=''">
                    and area = #{terms.area}
                </if>
                <if test="terms.areaName != null and terms.areaName !=''">
                    and area_name = #{terms.areaName}
                </if>
                <if test="terms.road != null and terms.road !=''">
                    and road = #{terms.road}
                </if>
                <if test="terms.roadName != null and terms.roadName !=''">
                    and road_name = #{terms.roadName}
                </if>
                <if test="terms.village != null and terms.village !=''">
                    and village = #{terms.village}
                </if>
                <if test="terms.villageName != null and terms.villageName !=''">
                    and village_name = #{terms.villageName}
                </if>
                <if test="terms.addr != null and terms.addr !=''">
                    and addr = #{terms.addr}
                </if>
                <if test="terms.caseDes != null and terms.caseDes !=''">
                    and case_des = #{terms.caseDes}
                </if>
                <if test="terms.caseClaim != null and terms.caseClaim !=''">
                    and case_claim = #{terms.caseClaim}
                </if>
                <if test="terms.plaintiffs != null and terms.plaintiffs !=''">
                    and plaintiffs = #{terms.plaintiffs}
                </if>
                <if test="terms.pagents != null and terms.pagents !=''">
                    and pagents = #{terms.pagents}
                </if>
                <if test="terms.defendants != null and terms.defendants !=''">
                    and defendants = #{terms.defendants}
                </if>
                <if test="terms.dagents != null and terms.dagents !=''">
                    and dagents = #{terms.dagents}
                </if>
                <if test="terms.wantUnitId != null and terms.wantUnitId !=''">
                    and want_unit_id = #{terms.wantUnitId}
                </if>
                <if test="terms.wantUnitName != null and terms.wantUnitName !=''">
                    and want_unit_name = #{terms.wantUnitName}
                </if>
                <if test="terms.wantUserId != null and terms.wantUserId !=''">
                    and want_user_id = #{terms.wantUserId}
                </if>
                <if test="terms.wantUserName != null and terms.wantUserName !=''">
                    and want_user_name = #{terms.wantUserName}
                </if>
                <if test="terms.inputUnitId != null and terms.inputUnitId !=''">
                    and input_unit_id = #{terms.inputUnitId}
                </if>
                <if test="terms.inputUnitName != null and terms.inputUnitName !=''">
                    and input_unit_name = #{terms.inputUnitName}
                </if>
                <if test="terms.inputUserId != null and terms.inputUserId !=''">
                    and input_user_id = #{terms.inputUserId}
                </if>
                <if test="terms.inputUserName != null and terms.inputUserName !=''">
                    and input_user_name = #{terms.inputUserName}
                </if>
                <if test="terms.inputWay != null and terms.inputWay !=''">
                    and input_way = #{terms.inputWay}
                </if>
                <if test="terms.acceptTime != null and terms.acceptTime !=''">
                    and accept_time = #{terms.acceptTime}
                </if>
                <if test="terms.auditObjId != null and terms.auditObjId !=''">
                    and audit_obj_id = #{terms.auditObjId}
                </if>
                <if test="terms.auditObjName != null and terms.auditObjName !=''">
                    and audit_obj_name = #{terms.auditObjName}
                </if>
                <if test="terms.auditResult != null and terms.auditResult !=''">
                    and audit_result = #{terms.auditResult}
                </if>
                <if test="terms.auditResultName != null and terms.auditResultName !=''">
                    and audit_result_name = #{terms.auditResultName}
                </if>
                <if test="terms.auditTime != null and terms.auditTime !=''">
                    and audit_time = #{terms.auditTime}
                </if>
                <if test="terms.errorCause != null and terms.errorCause !=''">
                    and error_cause = #{terms.errorCause}
                </if>
                <if test="terms.errorCauseName != null and terms.errorCauseName !=''">
                    and error_cause_name = #{terms.errorCauseName}
                </if>
                <if test="terms.auditContent != null and terms.auditContent !=''">
                    and audit_content = #{terms.auditContent}
                </if>
                <if test="terms.signStatus != null and terms.signStatus !=''">
                    and sign_status = #{terms.signStatus}
                </if>
                <if test="terms.process != null and terms.process !=''">
                    and process = #{terms.process}
                </if>
                <if test="terms.processName != null and terms.processName !=''">
                    and process_name = #{terms.processName}
                </if>
                <if test="terms.mediateUnitId != null and terms.mediateUnitId !=''">
                    and mediate_unit_id = #{terms.mediateUnitId}
                </if>
                <if test="terms.mediateUnitName != null and terms.mediateUnitName !=''">
                    and mediate_unit_name = #{terms.mediateUnitName}
                </if>
                <if test="terms.mediateDeptId != null and terms.mediateDeptId !=''">
                    and mediate_dept_id = #{terms.mediateDeptId}
                </if>
                <if test="terms.mediateDeptName != null and terms.mediateDeptName !=''">
                    and mediate_dept_name = #{terms.mediateDeptName}
                </if>
                <if test="terms.mediateDeptType != null and terms.mediateDeptType !=''">
                    and mediate_dept_type = #{terms.mediateDeptType}
                </if>
                <if test="terms.mediatorId != null and terms.mediatorId !=''">
                    and mediator_id = #{terms.mediatorId}
                </if>
                <if test="terms.mediator != null and terms.mediator !=''">
                    and mediator = #{terms.mediator}
                </if>
                <if test="terms.mediatorMobile != null and terms.mediatorMobile !=''">
                    and mediator_mobile = #{terms.mediatorMobile}
                </if>
                <if test="terms.mediStartTime != null and terms.mediStartTime !=''">
                    and medi_start_time = #{terms.mediStartTime}
                </if>
                <if test="terms.mediEndTime != null and terms.mediEndTime !=''">
                    and medi_end_time = #{terms.mediEndTime}
                </if>
                <if test="terms.mediResult != null and terms.mediResult !=''">
                    and medi_result = #{terms.mediResult}
                </if>
                <if test="terms.mediResultName != null and terms.mediResultName !=''">
                    and medi_result_name = #{terms.mediResultName}
                </if>
                <if test="terms.agreeContent != null and terms.agreeContent !=''">
                    and agree_content = #{terms.agreeContent}
                </if>
                <if test="terms.mediContent != null and terms.mediContent !=''">
                    and medi_content = #{terms.mediContent}
                </if>
                <if test="terms.mediFalse != null and terms.mediFalse !=''">
                    and medi_false = #{terms.mediFalse}
                </if>
                <if test="terms.mediFalseName != null and terms.mediFalseName !=''">
                    and medi_false_name = #{terms.mediFalseName}
                </if>
                <if test="terms.mediFalseContent != null and terms.mediFalseContent !=''">
                    and medi_false_content = #{terms.mediFalseContent}
                </if>
                <if test="terms.civilStatus != null and terms.civilStatus !=''">
                    and civil_status = #{terms.civilStatus}
                </if>
                <if test="terms.civilNo != null and terms.civilNo !=''">
                    and civil_no = #{terms.civilNo}
                </if>
                <if test="terms.courtId != null and terms.courtId !=''">
                    and court_id = #{terms.courtId}
                </if>
                <if test="terms.courtName != null and terms.courtName !=''">
                    and court_name = #{terms.courtName}
                </if>
                <if test="terms.judicApply != null and terms.judicApply !=''">
                    and judic_apply = #{terms.judicApply}
                </if>
                <if test="terms.judicApplyName != null and terms.judicApplyName !=''">
                    and judic_apply_name = #{terms.judicApplyName}
                </if>
                <if test="terms.judicInfoId != null and terms.judicInfoId !=''">
                    and judic_info_id = #{terms.judicInfoId}
                </if>
                <if test="terms.judicResult != null and terms.judicResult !=''">
                    and judic_result = #{terms.judicResult}
                </if>
                <if test="terms.judicResultName != null and terms.judicResultName !=''">
                    and judic_result_name = #{terms.judicResultName}
                </if>
                <if test="terms.fileStatus != null and terms.fileStatus !=''">
                    and file_status = #{terms.fileStatus}
                </if>
                <if test="terms.fileStatusName != null and terms.fileStatusName !=''">
                    and file_status_name = #{terms.fileStatusName}
                </if>
                <if test="terms.fileUserId != null and terms.fileUserId !=''">
                    and file_user_id = #{terms.fileUserId}
                </if>
                <if test="terms.fileUserName != null and terms.fileUserName !=''">
                    and file_user_name = #{terms.fileUserName}
                </if>
                <if test="terms.fileTime != null and terms.fileTime !=''">
                    and file_time = #{terms.fileTime}
                </if>
                <if test="terms.fileYear != null and terms.fileYear !=''">
                    and file_year = #{terms.fileYear}
                </if>
                <if test="terms.fileBookName != null and terms.fileBookName !=''">
                    and file_book_name = #{terms.fileBookName}
                </if>
                <if test="terms.fileBookNo != null and terms.fileBookNo !=''">
                    and file_book_no = #{terms.fileBookNo}
                </if>
                <if test="terms.fileNo != null and terms.fileNo !=''">
                    and file_no = #{terms.fileNo}
                </if>
                <if test="terms.fileLimitYear != null and terms.fileLimitYear !=''">
                    and file_limit_year = #{terms.fileLimitYear}
                </if>
                <if test="terms.fileAddr != null and terms.fileAddr !=''">
                    and file_addr = #{terms.fileAddr}
                </if>
                <if test="terms.fileContent != null and terms.fileContent !=''">
                    and file_content = #{terms.fileContent}
                </if>
                <if test="terms.fulfilSitu != null and terms.fulfilSitu !=''">
                    and fulfil_situ = #{terms.fulfilSitu}
                </if>
                <if test="terms.fulfilSituName != null and terms.fulfilSituName !=''">
                    and fulfil_situ_name = #{terms.fulfilSituName}
                </if>
                <if test="terms.visitStatus != null and terms.visitStatus !=''">
                    and visit_status = #{terms.visitStatus}
                </if>
                <if test="terms.visitContent != null and terms.visitContent !=''">
                    and visit_content = #{terms.visitContent}
                </if>
                <if test="terms.partyJoy != null and terms.partyJoy !=''">
                    and party_joy = #{terms.partyJoy}
                </if>
                <if test="terms.deleteStatus = null and terms.deleteStatus =''">
                    and delete_status = '1'
                </if>
                <if test="terms.deleteStatus != null and terms.deleteStatus !=''">
                    and delete_status = #{terms.deleteStatus}
                </if>
                <if test="terms.custId != null and terms.custId !=''">
                    and cust_id = #{terms.custId}
                </if>
                <if test="terms.createTime != null and terms.createTime !=''">
                    and DATE_FORMAT(create_time,'%Y-%m-%d') = #{terms.createTime}
                </if>
                <if test="terms.createStart != null and terms.createStart !='' and terms.createEnd != null and terms.createEnd !=''">
                    and (DATE_FORMAT(create_time,'%Y-%m-%d') <![CDATA[ >= ]]> #{terms.createStart}
                        and DATE_FORMAT(create_time,'%Y-%m-%d') <![CDATA[ <= ]]> #{terms.createEnd})
                </if>
                <if test="terms.updateTime != null and terms.updateTime !=''">
                    and DATE_FORMAT(update_time,'%Y-%m-%d') = #{terms.updateTime}
                </if>
                <if test="terms.updateStart != null and terms.updateStart !='' and terms.updateEnd != null and terms.updateEnd !=''">
                    and (DATE_FORMAT(update_time,'%Y-%m-%d') <![CDATA[ >= ]]> #{terms.updateStart}
                        and DATE_FORMAT(update_time,'%Y-%m-%d') <![CDATA[ <= ]]> #{terms.updateEnd})
                </if>
                <if test="terms.endProcess != null and terms.endProcess !=''">
                    and process in ('22_00006-4', '22_00006-5', '22_00006-6', '22_00006-7')
                    AND mediate_unit_id = '5e69e30ea66a4827a71eb3e3cc9ebb90'
                    and canal != '22_00001-2'
                </if>
                <if test="terms.todoProcess != null and terms.todoProcess !=''">
                    and process in ('22_00006-1', '22_00006-2', '22_00006-3')
                    AND mediate_unit_id = '5e69e30ea66a4827a71eb3e3cc9ebb90'
                    and canal != '22_00001-2'
                </if>
            </where>
        </if>
    </sql>
    <!-- 更新对象 -->
    <update id="updateCaseInfo">
        update
        <include refid="table-name"/>
        <set>
            <include refid="set-part"/>
        </set>
        <where>
            id = #{entity.id}
        </where>
    </update>
    <!-- 条件更新对象 -->
    <update id="updateCaseInfoTerms">
        update
        <include refid="table-name"/>
        <set>
            <include refid="set-part"/>
        </set>
        <include refid="where-part"/>
    </update>
    <!--  根据编号物理删除  -->
    <delete id="deleteCaseInfo">
        delete from
        <include refid="table-name" />
        where id = #{id}
    </delete>
    <!--  根据条件查询  -->
    <select id="listTerms" resultMap="dataResult">
        select
        <include refid="column-part"/>
        from
        <include refid="table-name" />
        <include refid="where-part"/>
    </select>
    <!--  根据条件统计  -->
    <select id="countTerms" resultType="java.lang.Long">
        select
        COUNT(1)
        from
        <include refid="table-name" />
        <include refid="where-part"/>
    </select>
    <!--  根据条件分页查询  -->
    <select id="pageTerms" resultMap="dataResult">
        SELECT
        <include refid="column-part"/>
        FROM
        <include refid="table-name" />
        <include refid="where-part"/>
        <if test="page.sort != null">
            <foreach collection="page.sort" item="s" index="index" separator="," open="order by ">
                isnull(${s.property}), ${s.property} ${s.direction}
            </foreach>
        </if>
        <if test="page.sort == null">
            order by isnull(create_time), create_time desc
        </if>
        limit #{page.offset}, #{page.size}
    </select>
 
</mapper>