Browse Source

人群报表视图数据-改成多账号查询的

zhaoxian 4 năm trước cách đây
mục cha
commit
ecb0d41043

+ 5 - 0
module-kuaishou/src/main/java/cn/com/ctop/kuaishou/modules/report/entity/KuaishouAudienceReportDailyAccount.java

@@ -29,4 +29,9 @@ public class KuaishouAudienceReportDailyAccount extends KuaishouAudienceReportDa
 
     @TableField(exist = false)
     private List<String> busTypes;
+
+    @TableField(exist = false)
+    private List<Long> accountIds;
+
+
 }

+ 25 - 10
module-kuaishou/src/main/java/cn/com/ctop/kuaishou/modules/report/mapper/xml/KuaishouAudienceReportDailyAccountMapper.xml

@@ -17,8 +17,11 @@
         IFNULL(ROUND(SUM(event_next_day_stay)/SUM(activation)*100,2),0) as eventNextDayStayRatio
         FROM ctop_kuaishou_audience_report_daily_account
         where 1=1
-        <if test="accountId != null">
-            and account_id = #{accountId}
+        <if test="accountIds != null and accountIds.size() > 0">
+            and account_id in
+            <foreach collection="accountIds" item="item" index="index" open="(" separator="," close=")">
+                #{item}
+            </foreach>
         </if>
         <if test="startTime != null">
             AND stat_date &gt;= #{startTime}
@@ -86,8 +89,11 @@
         IFNULL(ROUND(SUM(bclick)/SUM(aclick)*100,2),0) as actionRatio
         FROM ctop_kuaishou_audience_report_daily_account
         where 1=1
-        <if test="accountId != null">
-            and account_id = #{accountId}
+        <if test="accountIds != null and accountIds.size() > 0">
+            and account_id in
+            <foreach collection="accountIds" item="item" index="index" open="(" separator="," close=")">
+                #{item}
+            </foreach>
         </if>
         <if test="startTime != null">
             AND stat_date &gt;= #{startTime}
@@ -138,8 +144,11 @@
         <if test="busTypes !=null and busTypes.size() == 9 ">
             AND business_interest_tags != '其他'
         </if>
-        <if test="accountId != null">
-            and account_id = #{accountId}
+        <if test="accountIds != null and accountIds.size() > 0">
+            and account_id in
+            <foreach collection="accountIds" item="item" index="index" open="(" separator="," close=")">
+                #{item}
+            </foreach>
         </if>
         <if test="startTime != null">
             AND stat_date &gt;= #{startTime}
@@ -177,8 +186,11 @@
             SUM(bclick) as bclick
             FROM ctop_kuaishou_audience_report_daily_account t
             where 1=1
-            <if test="accountId != null">
-                and account_id = #{accountId}
+            <if test="accountIds != null and accountIds.size() > 0">
+                and account_id in
+                <foreach collection="accountIds" item="item" index="index" open="(" separator="," close=")">
+                    #{item}
+                </foreach>
             </if>
             <if test="startTime != null">
                 AND stat_date &gt;= #{startTime}
@@ -205,8 +217,11 @@
         FROM ctop_kuaishou_audience_report_daily_account
         where audience_type = 'businessInterestTags'
         AND business_interest_tags != '其他'
-        <if test="accountId != null">
-            and account_id = #{accountId}
+        <if test="accountIds != null and accountIds.size() > 0">
+            and account_id in
+            <foreach collection="accountIds" item="item" index="index" open="(" separator="," close=")">
+                #{item}
+            </foreach>
         </if>
         <if test="startTime != null">
             AND stat_date &gt;= #{startTime}