魏超 5 年前
父节点
当前提交
5a1ad5192d

+ 2
- 2
src/main/java/com/huiju/estateagents/statistic/controller/ActivityStatisticController.java 查看文件

143
                                                    @RequestParam(value = "endDate", required = false) @DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME) LocalDate endDate,
143
                                                    @RequestParam(value = "endDate", required = false) @DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME) LocalDate endDate,
144
                                                    @RequestParam(value = "sharePersonType", required = false)String sharePersonType,
144
                                                    @RequestParam(value = "sharePersonType", required = false)String sharePersonType,
145
                                                    @RequestParam(value = "sharePersonName", required = false)  String sharePersonName,
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
                                                    @RequestParam(value = "activityId", required = false)String activityId,
147
                                                    @RequestParam(value = "activityId", required = false)String activityId,
148
                                                    @RequestParam(value = "activityType", required = false)String activityType,
148
                                                    @RequestParam(value = "activityType", required = false)String activityType,
149
                                                    @RequestParam(value = "sort", required = false)String sort,
149
                                                    @RequestParam(value = "sort", required = false)String sort,
150
                                                    @RequestParam(value = "colKey", required = false)String colKey,
150
                                                    @RequestParam(value = "colKey", required = false)String colKey,
151
                                                    @RequestParam(value = "buildingId", required = false)String buildingId,
151
                                                    @RequestParam(value = "buildingId", required = false)String buildingId,
152
                                                    HttpServletRequest request) {
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 查看文件

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