Sfoglia il codice sorgente

cps IAA、IAP消耗数据清洗

ZHAOXIAN 1 anno fa
parent
commit
48c415f91c

+ 4 - 4
job-bytedance/src/main/java/cn/com/ctop/job/bytedance/data/mapper/xml/CPSReportMapper.xml

@@ -130,7 +130,7 @@
                  LEFT JOIN
              (SELECT t.date, t.link_id, COUNT(DISTINCT t.uid) as 'active_users'
               FROM thirtpart.ly_user_login_record t
-              where date = 20250601
+              where date = #{nowDate}
                 AND link_id
                   >0
               GROUP BY link_id) t ON tt.id = t.link_id
@@ -143,7 +143,7 @@
                              2),0.00) 'new_iaa_amount', count(distinct uid) 'iaa_users', sum(1) 'iaa_counts', IFNULL(ROUND(sum(cost / 100000), 2),0.00) 'iaa_amount'
               FROM media_api.bytedance_webhook_ma_ecpm t
                        LEFT JOIN thirtpart.ly_link t0 ON t.link_id = t0.id
-              where t.stat_date = 20250601
+              where t.stat_date = #{nowDate}
                 AND official_account_id = 146
               GROUP BY t.link_id
               ORDER BY t.link_id) t0 ON tt.id = t0.link_id
@@ -153,7 +153,7 @@
                                    count(DISTINCT t.uid) AS 'new_users'
                             FROM thirtpart.ly_user_activation_info t
                                      LEFT JOIN thirtpart.ly_link t0 ON t.link_id = t0.id
-                            WHERE DATE_FORMAT(t.activation_time, '%Y%m%d') = 20250601
+                            WHERE DATE_FORMAT(t.activation_time, '%Y%m%d') = #{nowDate}
                             GROUP BY t0.id) t1 ON tt.id = t1.id
                  LEFT JOIN
              (SELECT link_id,
@@ -168,7 +168,7 @@
                      pay_counts,
                      order_counts
               FROM thirtpart.cps_link_data_report
-              WHERE stat_date = 20250601) t3 ON t3.link_id = tt.id
+              WHERE stat_date = #{nowDate}) t3 ON t3.link_id = tt.id
         WHERE t0.iaa_amount is not null
         GROUP BY tt.id
     </insert>