张延森 před 5 roky
rodič
revize
5f81e65095

+ 9
- 1
src/main/resources/mapper/TsConsultantKpiMapper.xml Zobrazit soubor

@@ -158,6 +158,10 @@
158 158
         INNER JOIN ta_person t ON t.person_id = e.person_id
159 159
         WHERE e.org_id = #{orgId}
160 160
         AND e.share_person = #{userId}
161
+        AND (
162
+            e.target_type IN ( 'building_share', 'dynamic_share', 'group_share', 'h5_share', 'help_share', 'house_share', 'live_share', 'news_share', 'poster' )
163
+            or ( e.target_type = 'share' and e.target_id = 'index' )
164
+        )
161 165
         AND e.create_date BETWEEN #{startDate} and #{endDate}
162 166
         <!-- building_id 字段数据不全
163 167
         <if test="buildingId != null and buildingId !=''">
@@ -318,13 +322,17 @@
318 322
         WHERE e.org_id = #{orgId}
319 323
             AND e.share_person = #{userId}
320 324
             AND e.create_date BETWEEN #{startDate} and #{endDate}
325
+            AND (
326
+                e.target_type IN ( 'building_share', 'dynamic_share', 'group_share', 'h5_share', 'help_share', 'house_share', 'live_share', 'news_share', 'poster' )
327
+                OR ( e.target_type = 'share' AND e.target_id = 'index' )
328
+            )
321 329
             <!-- building_id 字段数据不全
322 330
             <if test="buildingId != null and buildingId !=''">
323 331
                 AND e.building_id = #{buildingId}
324 332
             </if>
325 333
             -->
326 334
 <!--            AND t.`status` = 1-->
327
-        GROUP BY t.person_id, DATE_FORMAT(e.create_date, '%Y%m%d')
335
+        GROUP BY t.person_id
328 336
         ORDER BY e.create_date DESC
329 337
     </select>
330 338