魏超 5 years ago
parent
commit
b57402f0f1
1 changed files with 0 additions and 48 deletions
  1. 0
    48
      src/main/resources/mapper/statistic/TaActivityStaticMapper.xml

+ 0
- 48
src/main/resources/mapper/statistic/TaActivityStaticMapper.xml View File

31
         <if test="startDate == null or endDate == null ">
31
         <if test="startDate == null or endDate == null ">
32
             AND t.create_date BETWEEN DATE_SUB(now(),INTERVAL 7 DAY) and now()
32
             AND t.create_date BETWEEN DATE_SUB(now(),INTERVAL 7 DAY) and now()
33
         </if>
33
         </if>
34
-        <if test="userId != null and userId != ''">
35
-            and (d.create_user = #{userId} or c.create_user = #{userId})
36
-        </if>
37
         <if test="taPersonBuildings != null and taPersonBuildings.size > 0">
34
         <if test="taPersonBuildings != null and taPersonBuildings.size > 0">
38
             AND
35
             AND
39
             (a.building_id in
36
             (a.building_id in
87
         <if test="startDate == null or endDate == null ">
84
         <if test="startDate == null or endDate == null ">
88
             AND t.create_date BETWEEN DATE_SUB(now(),INTERVAL 7 DAY) and now()
85
             AND t.create_date BETWEEN DATE_SUB(now(),INTERVAL 7 DAY) and now()
89
         </if>
86
         </if>
90
-        <if test="userId != null and userId != ''">
91
-            and (d.create_user = #{userId} or c.create_user = #{userId})
92
-        </if>
93
         <if test="taPersonBuildings != null and taPersonBuildings.size > 0">
87
         <if test="taPersonBuildings != null and taPersonBuildings.size > 0">
94
             AND
88
             AND
95
             (a.building_id in
89
             (a.building_id in
210
         <if test="startDate == null or endDate == null ">
204
         <if test="startDate == null or endDate == null ">
211
             AND t.create_date BETWEEN DATE_SUB(now(),INTERVAL 7 DAY) and now()
205
             AND t.create_date BETWEEN DATE_SUB(now(),INTERVAL 7 DAY) and now()
212
         </if>
206
         </if>
213
-        <if test="userId != null and userId != ''">
214
-            and (d.create_user = #{userId} or c.create_user = #{userId})
215
-        </if>
216
         <if test="taPersonBuildings != null and taPersonBuildings.size > 0">
207
         <if test="taPersonBuildings != null and taPersonBuildings.size > 0">
217
             AND
208
             AND
218
             (a.building_id in
209
             (a.building_id in
291
         <if test="startDate == null or endDate == null ">
282
         <if test="startDate == null or endDate == null ">
292
             AND t.create_date BETWEEN DATE_SUB(now(),INTERVAL 7 DAY) and now()
283
             AND t.create_date BETWEEN DATE_SUB(now(),INTERVAL 7 DAY) and now()
293
         </if>
284
         </if>
294
-        <if test="userId != null and userId != ''">
295
-            and (d.create_user = #{userId} or c.create_user = #{userId})
296
-        </if>
297
         <if test="taPersonBuildings != null and taPersonBuildings.size > 0">
285
         <if test="taPersonBuildings != null and taPersonBuildings.size > 0">
298
             AND
286
             AND
299
             (a.building_id in
287
             (a.building_id in
527
         <if test="startDate == null or endDate == null ">
515
         <if test="startDate == null or endDate == null ">
528
             AND t.create_date BETWEEN DATE_SUB(now(),INTERVAL 7 DAY) and now()
516
             AND t.create_date BETWEEN DATE_SUB(now(),INTERVAL 7 DAY) and now()
529
         </if>
517
         </if>
530
-        <if test="userId != null and userId != ''">
531
-            and (d.create_user = #{userId} or c.create_user = #{userId})
532
-        </if>
533
         <if test="taPersonBuildings != null and taPersonBuildings.size > 0">
518
         <if test="taPersonBuildings != null and taPersonBuildings.size > 0">
534
             AND
519
             AND
535
             (a.building_id in
520
             (a.building_id in
582
         <if test="startDate == null or endDate == null ">
567
         <if test="startDate == null or endDate == null ">
583
             AND t.create_date BETWEEN DATE_SUB(now(),INTERVAL 7 DAY) and now()
568
             AND t.create_date BETWEEN DATE_SUB(now(),INTERVAL 7 DAY) and now()
584
         </if>
569
         </if>
585
-        <if test="userId != null and userId != ''">
586
-            and (d.create_user = #{userId} or c.create_user = #{userId})
587
-        </if>
588
         <if test="taPersonBuildings != null and taPersonBuildings.size > 0">
570
         <if test="taPersonBuildings != null and taPersonBuildings.size > 0">
589
             AND
571
             AND
590
             (a.building_id in
572
             (a.building_id in
746
         <if test="startDate == null or endDate == null ">
728
         <if test="startDate == null or endDate == null ">
747
             AND t.create_date BETWEEN DATE_SUB(now(),INTERVAL 7 DAY) and now()
729
             AND t.create_date BETWEEN DATE_SUB(now(),INTERVAL 7 DAY) and now()
748
         </if>
730
         </if>
749
-        <if test="userId != null and userId != ''">
750
-            and (d.create_user = #{userId} or c.create_user = #{userId})
751
-        </if>
752
         <if test="taPersonBuildings != null and taPersonBuildings.size > 0">
731
         <if test="taPersonBuildings != null and taPersonBuildings.size > 0">
753
             AND
732
             AND
754
             (a.building_id in
733
             (a.building_id in
801
         <if test="startDate == null or endDate == null ">
780
         <if test="startDate == null or endDate == null ">
802
             AND t.create_date BETWEEN DATE_SUB(now(),INTERVAL 7 DAY) and now()
781
             AND t.create_date BETWEEN DATE_SUB(now(),INTERVAL 7 DAY) and now()
803
         </if>
782
         </if>
804
-        <if test="userId != null and userId != ''">
805
-            and (d.create_user = #{userId} or c.create_user = #{userId})
806
-        </if>
807
         <if test="taPersonBuildings != null and taPersonBuildings.size > 0">
783
         <if test="taPersonBuildings != null and taPersonBuildings.size > 0">
808
             AND
784
             AND
809
             (a.building_id in
785
             (a.building_id in
990
                 #{taPersonBuildings.buildingId}
966
                 #{taPersonBuildings.buildingId}
991
             </foreach>
967
             </foreach>
992
         </if>
968
         </if>
993
-        <if test="userId != null and userId != ''">
994
-            and d.create_user = #{userId}
995
-        </if>
996
         union all
969
         union all
997
         select e.live_activity_id as activityId, e.live_activity_title as activityName, "live" as activityType From
970
         select e.live_activity_id as activityId, e.live_activity_title as activityName, "live" as activityType From
998
         ta_live_activity e
971
         ta_live_activity e
1009
                 #{taPersonBuildings.buildingId}
982
                 #{taPersonBuildings.buildingId}
1010
             </foreach>
983
             </foreach>
1011
         </if>
984
         </if>
1012
-        <if test="userId != null and userId != ''">
1013
-            and e.create_user = #{userId}
1014
-        </if>
1015
         ) as activity
985
         ) as activity
1016
 
986
 
1017
         left join (
987
         left join (
1211
                 #{taPersonBuildings.buildingId}
1181
                 #{taPersonBuildings.buildingId}
1212
             </foreach>
1182
             </foreach>
1213
         </if>
1183
         </if>
1214
-        <if test="userId != null and userId != ''">
1215
-            and d.create_user = #{userId}
1216
-        </if>
1217
         union all
1184
         union all
1218
         select e.live_activity_id as activityId, e.live_activity_title as activityName, "live" as activityType From
1185
         select e.live_activity_id as activityId, e.live_activity_title as activityName, "live" as activityType From
1219
         ta_live_activity e
1186
         ta_live_activity e
1230
                 #{taPersonBuildings.buildingId}
1197
                 #{taPersonBuildings.buildingId}
1231
             </foreach>
1198
             </foreach>
1232
         </if>
1199
         </if>
1233
-        <if test="userId != null and userId != ''">
1234
-            and e.create_user = #{userId}
1235
-        </if>
1236
         ) as activity
1200
         ) as activity
1237
 
1201
 
1238
         left join (
1202
         left join (
1369
             or e.building_id = #{buildingId}
1333
             or e.building_id = #{buildingId}
1370
             )
1334
             )
1371
         </if>
1335
         </if>
1372
-        <if test="userId != null and userId != ''">
1373
-            and (d.create_user = #{userId} or c.create_user = #{userId})
1374
-        </if>
1375
         <if test="taPersonBuildings != null and taPersonBuildings.size > 0">
1336
         <if test="taPersonBuildings != null and taPersonBuildings.size > 0">
1376
             AND
1337
             AND
1377
             (a.building_id in
1338
             (a.building_id in
1514
         <if test="sharePhone != null and sharePhone != ''">
1475
         <if test="sharePhone != null and sharePhone != ''">
1515
             and f.phone like CONCAT('%',#{sharePhone}, '%')
1476
             and f.phone like CONCAT('%',#{sharePhone}, '%')
1516
         </if>
1477
         </if>
1517
-        <if test="userId != null and userId != ''">
1518
-            and (d.create_user = #{userId} or c.create_user = #{userId})
1519
-        </if>
1520
         <if test="taPersonBuildings != null and taPersonBuildings.size > 0">
1478
         <if test="taPersonBuildings != null and taPersonBuildings.size > 0">
1521
             AND
1479
             AND
1522
             (a.building_id in
1480
             (a.building_id in
1641
             or e.building_id = #{buildingId}
1599
             or e.building_id = #{buildingId}
1642
             )
1600
             )
1643
         </if>
1601
         </if>
1644
-        <if test="userId != null and userId != ''">
1645
-            and (d.create_user = #{userId} or c.create_user = #{userId})
1646
-        </if>
1647
         <if test="taPersonBuildings != null and taPersonBuildings.size > 0">
1602
         <if test="taPersonBuildings != null and taPersonBuildings.size > 0">
1648
             AND
1603
             AND
1649
             (a.building_id in
1604
             (a.building_id in
1736
             or e.building_id = #{buildingId}
1691
             or e.building_id = #{buildingId}
1737
             )
1692
             )
1738
         </if>
1693
         </if>
1739
-        <if test="userId != null and userId != ''">
1740
-            and (d.create_user = #{userId} or c.create_user = #{userId})
1741
-        </if>
1742
         <if test="taPersonBuildings != null and taPersonBuildings.size > 0">
1694
         <if test="taPersonBuildings != null and taPersonBuildings.size > 0">
1743
             AND
1695
             AND
1744
             (a.building_id in
1696
             (a.building_id in