魏超 5 lat temu
rodzic
commit
5a1ad5192d

+ 2
- 2
src/main/java/com/huiju/estateagents/statistic/controller/ActivityStatisticController.java Wyświetl plik

@@ -143,14 +143,14 @@ public class ActivityStatisticController extends BaseController {
143 143
                                                    @RequestParam(value = "endDate", required = false) @DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME) LocalDate endDate,
144 144
                                                    @RequestParam(value = "sharePersonType", required = false)String sharePersonType,
145 145
                                                    @RequestParam(value = "sharePersonName", required = false)  String sharePersonName,
146
-                                                   @RequestParam(value = "sharePhone", required = false)String sharePhone,
146
+                                                   @RequestParam(value = "sharePersonPhone", required = false)String sharePersonPhone,
147 147
                                                    @RequestParam(value = "activityId", required = false)String activityId,
148 148
                                                    @RequestParam(value = "activityType", required = false)String activityType,
149 149
                                                    @RequestParam(value = "sort", required = false)String sort,
150 150
                                                    @RequestParam(value = "colKey", required = false)String colKey,
151 151
                                                    @RequestParam(value = "buildingId", required = false)String buildingId,
152 152
                                                    HttpServletRequest request) {
153
-        return taActivityStaticService.selectActivitySharePersonNum(pageNum, pageSize, getOrgId(request), startDate, endDate, sharePersonType, sharePersonName, sharePhone, activityId, activityType, buildingId, sort, colKey, getTaPersonBuildingListByUserId(request), getUserId(request));
153
+        return taActivityStaticService.selectActivitySharePersonNum(pageNum, pageSize, getOrgId(request), startDate, endDate, sharePersonType, sharePersonName, sharePersonPhone, activityId, activityType, buildingId, sort, colKey, getTaPersonBuildingListByUserId(request), getUserId(request));
154 154
     }
155 155
 
156 156
     /**

+ 12
- 9
src/main/resources/mapper/statistic/TaActivityStaticMapper.xml Wyświetl plik

@@ -182,7 +182,7 @@
182 182
         sequence a
183 183
         <trim prefix="where">
184 184
             <if test="startDate != null or endDate != null">
185
-                a.rownum <![CDATA[ < ]]> datediff(#{endDate}, #{startDate})
185
+                a.rownum <![CDATA[ <= ]]> datediff(#{endDate}, #{startDate})
186 186
             </if>
187 187
         </trim>
188 188
         ) AS temp_date
@@ -260,7 +260,7 @@
260 260
         sequence a
261 261
         <trim prefix="where">
262 262
             <if test="startDate != null or endDate != null">
263
-                a.rownum <![CDATA[ < ]]> datediff(#{endDate}, #{startDate})
263
+                a.rownum <![CDATA[ <= ]]> datediff(#{endDate}, #{startDate})
264 264
             </if>
265 265
         </trim>
266 266
         ) AS temp_date
@@ -338,7 +338,7 @@
338 338
         sequence a
339 339
         <trim prefix="where">
340 340
             <if test="startDate != null or endDate != null">
341
-                a.rownum <![CDATA[ < ]]> datediff(#{endDate}, #{startDate})
341
+                a.rownum <![CDATA[ <= ]]> datediff(#{endDate}, #{startDate})
342 342
             </if>
343 343
         </trim>
344 344
         ) AS temp_date
@@ -394,7 +394,7 @@
394 394
         sequence a
395 395
         <trim prefix="where">
396 396
             <if test="startDate != null or endDate != null">
397
-                a.rownum <![CDATA[ < ]]> datediff(#{endDate}, #{startDate})
397
+                a.rownum <![CDATA[ <= ]]> datediff(#{endDate}, #{startDate})
398 398
             </if>
399 399
         </trim>
400 400
         ) AS temp_date
@@ -449,7 +449,7 @@
449 449
         sequence a
450 450
         <trim prefix="where">
451 451
             <if test="startDate != null or endDate != null">
452
-                a.rownum <![CDATA[ < ]]> datediff(#{endDate}, #{startDate})
452
+                a.rownum <![CDATA[ <= ]]> datediff(#{endDate}, #{startDate})
453 453
             </if>
454 454
         </trim>
455 455
         ) AS temp_date
@@ -511,7 +511,7 @@
511 511
         sequence a
512 512
         <trim prefix="where">
513 513
             <if test="startDate != null or endDate != null">
514
-                a.rownum <![CDATA[ < ]]> datediff(#{endDate}, #{startDate})
514
+                a.rownum <![CDATA[ <= ]]> datediff(#{endDate}, #{startDate})
515 515
             </if>
516 516
         </trim>
517 517
         ) AS temp_date
@@ -736,7 +736,7 @@
736 736
         sequence a
737 737
         <trim prefix="where">
738 738
             <if test="startDate != null or endDate != null">
739
-                a.rownum <![CDATA[ < ]]> datediff(#{endDate}, #{startDate})
739
+                a.rownum <![CDATA[ <= ]]> datediff(#{endDate}, #{startDate})
740 740
             </if>
741 741
         </trim>
742 742
         ) AS temp_date
@@ -1501,7 +1501,9 @@
1501 1501
             and t.target_type = concat(REPLACE(#{activityType}, 'activity', 'dynamic'), '_share')
1502 1502
         </if>
1503 1503
         and t.target_type in ('dynamic_share','h5_share','help_share','live_share', 'group_share')
1504
-        and t.org_id = #{orgId} group by t.share_person ) t
1504
+        and t.org_id = #{orgId}
1505
+<!--        group by t.share_person -->
1506
+        ) t
1505 1507
         left join ta_person a on t.share_person = a.person_id
1506 1508
         left join ta_person b on t.share_person = b.user_id
1507 1509
         ) as visitPersonNum on visitPersonNum.person_id = person.person_id
@@ -1677,7 +1679,8 @@
1677 1679
             and t.be_share = #{activityId}
1678 1680
         </if>
1679 1681
         <if test="activityType != null and activityType != ''">
1680
-            and t.tagert_type = #{activityType}
1682
+            and (case when #{activityType} = 'live' then t.tagert_type in ('liveApp', 'livePost') else t.tagert_type = #{activityType}
1683
+            end)
1681 1684
         </if>
1682 1685
         <if test="buildingId != null and buildingId != ''">
1683 1686
             and (