魏超 5 年之前
父節點
當前提交
ff7f732b9a
共有 1 個文件被更改,包括 4 次插入2 次删除
  1. 4
    2
      src/main/resources/mapper/statistic/TaActivityStaticMapper.xml

+ 4
- 2
src/main/resources/mapper/statistic/TaActivityStaticMapper.xml 查看文件

990
             'activity', 'group','h5','help','liveApp','livePost')
990
             'activity', 'group','h5','help','liveApp','livePost')
991
             and a.org_id = #{orgId}
991
             and a.org_id = #{orgId}
992
             <if test="targetType != null and targetType != ''">
992
             <if test="targetType != null and targetType != ''">
993
-                and a.tagert_type = #{targetType}
993
+                and (case when #{targetType} = 'live' then a.tagert_type in ('liveApp', 'livePost') else a.tagert_type = #{targetType}
994
+                end)
994
             </if>
995
             </if>
995
             <if test="startDate != null ">
996
             <if test="startDate != null ">
996
                 and a.create_date &gt;= DATE_FORMAT(#{startDate}, '%Y-%m-%d %H:%i:%S' )
997
                 and a.create_date &gt;= DATE_FORMAT(#{startDate}, '%Y-%m-%d %H:%i:%S' )
1010
         From ta_share_count a where a.tagert_type in ( 'activity', 'group','h5','help','liveApp','livePost')
1011
         From ta_share_count a where a.tagert_type in ( 'activity', 'group','h5','help','liveApp','livePost')
1011
         and a.org_id = #{orgId}
1012
         and a.org_id = #{orgId}
1012
         <if test="targetType != null and targetType != ''">
1013
         <if test="targetType != null and targetType != ''">
1013
-            and a.tagert_type = #{targetType}
1014
+            and (case when #{targetType} = 'live' then a.tagert_type in ('liveApp', 'livePost') else a.tagert_type = #{targetType}
1015
+            end)
1014
         </if>
1016
         </if>
1015
         <if test="startDate != null ">
1017
         <if test="startDate != null ">
1016
             and a.create_date &gt;= DATE_FORMAT(#{startDate}, '%Y-%m-%d %H:%i:%S' )
1018
             and a.create_date &gt;= DATE_FORMAT(#{startDate}, '%Y-%m-%d %H:%i:%S' )