Kaynağa Gözat

Merge branch 'master' of codeup.aliyun.com:60c06368dbbed34fe0f0c263/job/hr_job-bytedance into pingkang

huangpingkang 1 yıl önce
ebeveyn
işleme
774c7b33d4

+ 2 - 2
job-bytedance/src/main/java/cn/com/ctop/job/bytedance/data/mapper/xml/BytedanceProductUpdateMapper.xml

@@ -29,14 +29,14 @@
         FROM deepthink.bytedance_product_main_advertiser t1
         left join deepthink.bytedance_advertiser_list t2 on t1.advertiser_id=t2.advertiser_id
         left join deepthink.bytedance_auth_list t3 on t2.admin_advertiser_id=t3.admin_advertiser_id
-        where t1.`type`=2 and t1.`_status`=0 and platform_type=1 and tb1.mini_instance_id is not null
+        where t1.`type`=2 and t1.`_status`=0 and platform_type=1 and t1.mini_instance_id is not null
     </select>
     <select id="getIAAPlatformList" resultType="com.alibaba.fastjson.JSONObject">
         select t1.*, t3.access_token
         FROM deepthink.bytedance_product_main_advertiser t1
         left join deepthink.bytedance_advertiser_list t2 on t1.advertiser_id=t2.advertiser_id
         left join deepthink.bytedance_auth_list t3 on t2.admin_advertiser_id=t3.admin_advertiser_id
-        where t1.`type`=1 and t1.`_status`=0 and platform_type=1 and tb1.mini_instance_id is not null
+        where t1.`type`=1 and t1.`_status`=0 and platform_type=1 and t1.mini_instance_id is not null
     </select>
     <select id="getIAPVideoList" resultType="com.alibaba.fastjson.JSONObject">
         select third.album_id, third.platform_type, detail.platform_config, video.id as video_id, detail.id as video_detail_id, video.name as name, video.cover_img as img,ifnull(category.name, '其他') as 'theme', video.play_platform,

+ 1 - 1
job-bytedance/src/main/java/cn/com/ctop/job/bytedance/data/mapper/xml/PromoteLinkRefreshMapper.xml

@@ -30,7 +30,7 @@
         left join thirtpart.ly_applet tb6
         on tb2.app_id = tb6.app_id
         left join thirtpart.ly_third_videos tb7
-        on tb3.movie_id = tb7.video_id
+        on tb3.movie_id = tb7.video_id and platform=2
         where tb4.expire_time &lt;= ${expireTime}
     </select>
 </mapper>

+ 33 - 29
job-bytedance/src/main/java/cn/com/ctop/job/bytedance/data/mapper/xml/ReportsAdPushMapper.xml

@@ -46,6 +46,7 @@
     <select id="tmpPushData" resultType="java.util.Map">
         select
         <include refid="costAmount"/>,
+        <include refid="realCostAmount"/>,
         <include refid="payAmount"/>,
         <include refid="shareIaaAmount"/>,
         <include refid="realProfit"/>,
@@ -53,7 +54,7 @@
         FROM
             (select sum(cost_amount) as cost_amount, sum(real_cost_amount) as real_cost_amount, max(update_time) as update_time
              from application.media_ad_report_daily
-             where stat_date = ${date} and ma_appid in (select app_id from tidb.deepthink.mini_app_info where business_type in (1,3,8))
+             where stat_date = ${date} and ma_appid in (select app_id from tidb.deepthink.mini_app_info where business_type in (1,3,8,9,10,11))
             ) tb1,
             (select sum(pay_amount) as pay_amount,
                     sum(iaa_amount) as iaa_amount,
@@ -61,12 +62,13 @@
                     sum(share_pay_amount) as share_pay_amount,
                     sum(share_iaa_amount) as share_iaa_amount
              from application.user_data_report_daily
-             where stat_date = ${date} and ma_appid in (select app_id from tidb.deepthink.mini_app_info where business_type in (1,3,8))
+             where stat_date = ${date} and ma_appid in (select app_id from tidb.deepthink.mini_app_info where business_type in (1,3,8,9,10,11))
             ) tb2
     </select>
     <select id="adHourData" resultType="java.util.Map">
         select
         <include refid="costAmount"/>,
+        <include refid="realCostAmount"/>,
         <include refid="payAmount"/>,
         <include refid="shareIaaAmount"/>,
         <include refid="realProfit"/>,
@@ -75,13 +77,13 @@
         from
         (select sum(cost_amount) as cost_amount, sum(real_cost_amount) as real_cost_amount
         from application.media_ad_report_hourly
-        where stat_date = #{date} and `hour`= #{hour} and ma_appid in (select app_id from tidb.deepthink.mini_app_info where business_type in (1,3,8))
+        where stat_date = #{date} and `hour`= #{hour} and ma_appid in (select app_id from tidb.deepthink.mini_app_info where business_type in (1,3,8,9,10,11))
         ) tb1,
         (select sum(pay_amount) as pay_amount, sum(iaa_amount) as iaa_amount,
         sum(share_iaa_amount_3) as share_iaa_amount_3,
         sum(share_iaa_amount) as share_iaa_amount, sum(share_pay_amount) as share_pay_amount
         from application.user_data_report_hourly
-        where stat_date = #{date} and `hour`= #{hour} and ma_appid in (select app_id from tidb.deepthink.mini_app_info where business_type in (1,3,8))
+        where stat_date = #{date} and `hour`= #{hour} and ma_appid in (select app_id from tidb.deepthink.mini_app_info where business_type in (1,3,8,9,10,11))
         ) tb2
     </select>
     <select id="tmpTopMovie" resultType="java.util.Map">
@@ -94,8 +96,8 @@
         concat(round(if(ifnull(sum(iaa_real_cost_amount),0)=0, 0, sum(share_iaa_amount_3)/sum(iaa_real_cost_amount)*100), 2), '%') AS iaa_roi,
         concat(round(if(ifnull(sum(iap_real_cost_amount),0)=0, 0, sum(share_pay_amount)/sum(iap_real_cost_amount)*100), 2), '%') AS iap_roi
         from
-        (select product_id from application.media_product_report_daily where stat_date=${date} and ma_appid in (select app_id from tidb.deepthink.mini_app_info where business_type in (1,3,8))
-        union select movie_id from application.user_data_report_daily where stat_date=${date} and ma_appid in (select app_id from tidb.deepthink.mini_app_info where business_type in (1,3,8))
+        (select product_id from application.media_product_report_daily where stat_date=${date} and ma_appid in (select app_id from tidb.deepthink.mini_app_info where business_type in (1,3,8,9,10,11))
+        union select movie_id from application.user_data_report_daily where stat_date=${date} and ma_appid in (select app_id from tidb.deepthink.mini_app_info where business_type in (1,3,8,9,10,11))
         ) tb1
         left join
         (select product_id, sum(iaa_cost_amount) as iaa_cost_amount, sum(iaa_real_cost_amount) as iaa_real_cost_amount,
@@ -104,12 +106,12 @@
         sum(iaa_real_cost_amount)+sum(iap_real_cost_amount) as real_cost_amount
         from
         (select product_id, round(ifnull(sum(cost_amount),0),2) as iaa_cost_amount, sum(real_cost_amount) as iaa_real_cost_amount, 0 as iap_cost_amount, 0 as iap_real_cost_amount
-        from application.media_product_report_daily where stat_date=${date} and ma_appid in (select app_id from tidb.deepthink.mini_app_info where business_type in (1,3,8) and business_method='IAA')
+        from application.media_product_report_daily where stat_date=${date} and ma_appid in (select app_id from tidb.deepthink.mini_app_info where business_type in (1,3,8,9,10,11) and business_method='IAA')
         group by product_id
         union all
         select product_id, 0 as iaa_cost_amount, 0 as iaa_real_cost_amount,
         round(ifnull(sum(cost_amount),0),2) as cost_amount, sum(real_cost_amount) as real_cost_amount
-        from application.media_product_report_daily where stat_date=${date} and ma_appid in (select app_id from tidb.deepthink.mini_app_info where business_type in (1,3,8) and business_method='IAP')
+        from application.media_product_report_daily where stat_date=${date} and ma_appid in (select app_id from tidb.deepthink.mini_app_info where business_type in (1,3,8,9,10,11) and business_method='IAP')
         group by product_id) subt2
         group by product_id
         ) tb2 on tb1.product_id=tb2.product_id
@@ -119,7 +121,7 @@
         ifnull(sum(share_pay_amount), 0) as share_pay_amount,
         ifnull(sum(share_iaa_amount), 0) as share_iaa_amount,
         round(ifnull(sum(share_iaa_amount_3), 0),2) as share_iaa_amount_3
-        from application.user_data_report_daily where stat_date=${date} and ma_appid in (select app_id from tidb.deepthink.mini_app_info where business_type in (1,3,8))
+        from application.user_data_report_daily where stat_date=${date} and ma_appid in (select app_id from tidb.deepthink.mini_app_info where business_type in (1,3,8,9,10,11))
         group by movie_id
         ) tb3 on tb1.product_id=tb3.movie_id
         left join
@@ -134,6 +136,7 @@
     <select id="adDailyData" resultType="java.util.Map">
         select
         <include refid="costAmount"/>,
+        <include refid="realCostAmount"/>,
         <include refid="payAmount"/>,
         <include refid="shareIaaAmount"/>,
         <include refid="realProfit"/>,
@@ -143,13 +146,13 @@
         from
         (select sum(cost_amount) as cost_amount, sum(real_cost_amount) as real_cost_amount, max(update_time) as update_time
         from application.media_ad_report_daily
-        where stat_date = #{date} and ma_appid in (select app_id from tidb.deepthink.mini_app_info where business_type in (1,3,8))
+        where stat_date = #{date} and ma_appid in (select app_id from tidb.deepthink.mini_app_info where business_type in (1,3,8,9,10,11))
         ) tb1,
         (select sum(pay_amount) as pay_amount, sum(iaa_amount) as iaa_amount,
         sum(share_iaa_amount) as share_iaa_amount, sum(share_pay_amount) as share_pay_amount,
         sum(share_iaa_amount_3) as share_iaa_amount_3
         from application.user_data_report_daily
-        where stat_date = #{date} and ma_appid in (select app_id from tidb.deepthink.mini_app_info where business_type in (1,3,8))
+        where stat_date = #{date} and ma_appid in (select app_id from tidb.deepthink.mini_app_info where business_type in (1,3,8,9,10,11))
         ) tb2
     </select>
 
@@ -165,8 +168,8 @@
         concat(round(if(ifnull(sum(iap_real_cost_amount),0)=0, 0, sum(share_pay_amount)/sum(iap_real_cost_amount)*100), 2), '%') AS iap_roi,
         round(ifnull(sum(hour_cost_amount), 0), 2) as hour_cost_amount
         from
-        (select product_id from application.media_product_report_daily where stat_date=${date} and ma_appid in (select app_id from tidb.deepthink.mini_app_info where business_type in (1,3,8))
-        union select movie_id from application.user_data_report_daily where stat_date=${date} and ma_appid in (select app_id from tidb.deepthink.mini_app_info where business_type in (1,3,8))) tb1
+        (select product_id from application.media_product_report_daily where stat_date=${date} and ma_appid in (select app_id from tidb.deepthink.mini_app_info where business_type in (1,3,8,9,10,11))
+        union select movie_id from application.user_data_report_daily where stat_date=${date} and ma_appid in (select app_id from tidb.deepthink.mini_app_info where business_type in (1,3,8,9,10,11))) tb1
         left join
         (
         select product_id, sum(iaa_cost_amount) as iaa_cost_amount, sum(iaa_real_cost_amount) as iaa_real_cost_amount,
@@ -175,11 +178,11 @@
         sum(iaa_real_cost_amount)+sum(iap_real_cost_amount) as real_cost_amount
         from
         (select product_id, round(ifnull(sum(cost_amount),0),2) as iaa_cost_amount, sum(real_cost_amount) as iaa_real_cost_amount, 0 as iap_cost_amount, 0 as iap_real_cost_amount
-        from application.media_product_report_daily where stat_date=${date} and ma_appid in (select app_id from tidb.deepthink.mini_app_info where business_type in (1,3,8) and business_method='IAA')
+        from application.media_product_report_daily where stat_date=${date} and ma_appid in (select app_id from tidb.deepthink.mini_app_info where business_type in (1,3,8,9,10,11) and business_method='IAA')
         group by product_id
         union all
         select product_id, 0 as iaa_cost_amount, 0 as iaa_real_cost_amount,round(ifnull(sum(cost_amount),0),2) as cost_amount, sum(real_cost_amount) as real_cost_amount
-        from application.media_product_report_daily where stat_date=${date} and ma_appid in (select app_id from tidb.deepthink.mini_app_info where business_type in (1,3,8) and business_method='IAP')
+        from application.media_product_report_daily where stat_date=${date} and ma_appid in (select app_id from tidb.deepthink.mini_app_info where business_type in (1,3,8,9,10,11) and business_method='IAP')
         group by product_id) subt2
         group by product_id
         ) tb2 on tb1.product_id=tb2.product_id
@@ -188,7 +191,7 @@
         sum(share_iaa_amount_3) as share_iaa_amount_3,
         ifnull(sum(share_iaa_amount), 0) as share_iaa_amount,
         ifnull(sum(share_pay_amount), 0) as share_pay_amount
-        from application.user_data_report_daily where stat_date=${date} and ma_appid in (select app_id from tidb.deepthink.mini_app_info where business_type in (1,3,8))
+        from application.user_data_report_daily where stat_date=${date} and ma_appid in (select app_id from tidb.deepthink.mini_app_info where business_type in (1,3,8,9,10,11))
         group by movie_id
         ) tb3 on tb1.product_id=tb3.movie_id
         left join
@@ -196,7 +199,7 @@
         ) tb4 on tb1.product_id=tb4.moive_id
         left join
         (select product_id, ifnull(sum(cost_amount), 0) as hour_cost_amount from application.media_product_report_hourly
-        where stat_date=${date} and `hour`=${hour}  and ma_appid in (select app_id from tidb.deepthink.mini_app_info where business_type in (1,3,8))
+        where stat_date=${date} and `hour`=${hour}  and ma_appid in (select app_id from tidb.deepthink.mini_app_info where business_type in (1,3,8,9,10,11))
         group by product_id) tb5 on tb1.product_id=tb5.product_id
         where 1=1 and tb1.product_id != '-9999'
         group by tb4.standard_movie_name
@@ -220,11 +223,11 @@
         sum(iaa_real_cost_amount)+sum(iap_real_cost_amount) as real_cost_amount
         FROM
         (select advertiser_id, round(ifnull(sum(cost_amount),0),2) as iaa_cost_amount, sum(real_cost_amount) as iaa_real_cost_amount, 0 as iap_cost_amount, 0 as iap_real_cost_amount
-        from application.media_ad_report_daily where stat_date=${date} and ma_appid in (select app_id from tidb.deepthink.mini_app_info where business_type in (1,3,8) and business_method='IAA')
+        from application.media_ad_report_daily where stat_date=${date} and ma_appid in (select app_id from tidb.deepthink.mini_app_info where business_type in (1,3,8,9,10,11) and business_method='IAA')
         group by advertiser_id
         UNION ALL
         select advertiser_id, 0 as iaa_cost_amount, 0 as iaa_real_cost_amount,round(ifnull(sum(cost_amount),0),2) as iap_cost_amount, sum(real_cost_amount) as iap_real_cost_amount
-        from application.media_ad_report_daily where stat_date=${date} and ma_appid in (select app_id from tidb.deepthink.mini_app_info where business_type in (1,3,8) and business_method='IAP')
+        from application.media_ad_report_daily where stat_date=${date} and ma_appid in (select app_id from tidb.deepthink.mini_app_info where business_type in (1,3,8,9,10,11) and business_method='IAP')
         group by advertiser_id)subtb2
         group by advertiser_id
         ) tb2
@@ -233,7 +236,7 @@
         round(ifnull(sum(share_iaa_amount_3), 0),2) as share_iaa_amount_3,
         sum(share_iaa_amount) as share_iaa_amount,
         sum(share_pay_amount) as share_pay_amount
-        from application.user_data_report_daily where stat_date=${date}  and ma_appid in (select app_id from tidb.deepthink.mini_app_info where business_type in (1,3,8))
+        from application.user_data_report_daily where stat_date=${date}  and ma_appid in (select app_id from tidb.deepthink.mini_app_info where business_type in (1,3,8,9,10,11))
         group by advertiser_id) tb3
         on tb1.advertiser_id = tb3.advertiser_id
         left join (select user_id, nick_name, phonenumber, dept_id from tidb.deepthink.sys_user) tb4
@@ -256,13 +259,13 @@
         left join
         (select advertiser_id, sum(cost_amount) as cost_amount, sum(real_cost_amount) as real_cost_amount, max(update_time) as update_time
         from application.media_ad_report_daily
-        where stat_date = #{date} and ma_appid in (select app_id from tidb.deepthink.mini_app_info where business_type in (1,3,8))
+        where stat_date = #{date} and ma_appid in (select app_id from tidb.deepthink.mini_app_info where business_type in (1,3,8,9,10,11))
         group by advertiser_id) tb2 on tb1.advertiser_id = tb2.advertiser_id
         left join
         (select advertiser_id, sum(pay_amount) as pay_amount, sum(iaa_amount) as iaa_amount,
         sum(share_iaa_amount) as share_iaa_amount, sum(share_pay_amount) as share_pay_amount
         from application.user_data_report_daily
-        where stat_date = #{date} and ma_appid in (select app_id from tidb.deepthink.mini_app_info where business_type in (1,3,8))
+        where stat_date = #{date} and ma_appid in (select app_id from tidb.deepthink.mini_app_info where business_type in (1,3,8,9,10,11))
         group by advertiser_id) tb3 on tb1.advertiser_id = tb3.advertiser_id
         left join (select user_id, nick_name, phonenumber, dept_id from tidb.deepthink.sys_user) tb4
         on tb1.user_id=tb4.user_id
@@ -280,13 +283,13 @@
         left join
         (select advertiser_id, sum(cost_amount) as cost_amount, sum(real_cost_amount) as real_cost_amount, max(update_time) as update_time
         from application.media_ad_report_hourly
-        where stat_date = #{date} and `hour`= #{hour} and ma_appid in (select app_id from tidb.deepthink.mini_app_info where business_type in (1,3,8))
+        where stat_date = #{date} and `hour`= #{hour} and ma_appid in (select app_id from tidb.deepthink.mini_app_info where business_type in (1,3,8,9,10,11))
         group by advertiser_id) tb2 on tb1.advertiser_id = tb2.advertiser_id
         left join
         (select advertiser_id, sum(pay_amount) as pay_amount, sum(iaa_amount) as iaa_amount,
         sum(share_iaa_amount) as share_iaa_amount, sum(share_pay_amount) as share_pay_amount
         from application.user_data_report_hourly
-        where stat_date = #{date} and `hour`= #{hour} and ma_appid in (select app_id from tidb.deepthink.mini_app_info where business_type in (1,3,8))
+        where stat_date = #{date} and `hour`= #{hour} and ma_appid in (select app_id from tidb.deepthink.mini_app_info where business_type in (1,3,8,9,10,11))
         group by advertiser_id) tb3 on tb1.advertiser_id = tb3.advertiser_id
         left join (select user_id, nick_name, phonenumber from tidb.deepthink.sys_user) tb4
         on tb1.user_id=tb4.user_id
@@ -303,11 +306,11 @@
         from
         (select cast(advertiser_id as char) advertiser_id, user_id from tidb.deepthink.advertiser_bind_info) tb1
         left join (select advertiser_id, sum(cost_amount) as cost_amount, sum(real_cost_amount) as real_cost_amount
-        from application.media_ad_report_daily where stat_date=#{date}  and ma_appid in (select app_id from tidb.deepthink.mini_app_info where business_type in (1,3,8))
+        from application.media_ad_report_daily where stat_date=#{date}  and ma_appid in (select app_id from tidb.deepthink.mini_app_info where business_type in (1,3,8,9,10,11))
         group by advertiser_id) tb2
         on tb1.advertiser_id = tb2.advertiser_id
         left join (select advertiser_id, sum(cost_amount) as cost_amount_hour
-        from application.media_ad_report_hourly where stat_date=#{date} and `hour`= ${hour}  and ma_appid in (select app_id from tidb.deepthink.mini_app_info where business_type in (1,3,8))
+        from application.media_ad_report_hourly where stat_date=#{date} and `hour`= ${hour}  and ma_appid in (select app_id from tidb.deepthink.mini_app_info where business_type in (1,3,8,9,10,11))
         group by advertiser_id) tb3
         on tb1.advertiser_id = tb3.advertiser_id
         left join (select user_id, nick_name, phonenumber, dept_id from tidb.deepthink.sys_user) tb4
@@ -398,11 +401,11 @@
         sum(iaa_real_cost_amount)+sum(iap_real_cost_amount) as real_cost_amount
         FROM
         (select advertiser_id, round(ifnull(sum(cost_amount),0),2) as iaa_cost_amount, sum(real_cost_amount) as iaa_real_cost_amount, 0 as iap_cost_amount, 0 as iap_real_cost_amount
-        from application.media_ad_report_daily where stat_date=${date} and ma_appid in (select app_id from tidb.deepthink.mini_app_info where business_type in (1,3,8) and business_method='IAA')
+        from application.media_ad_report_daily where stat_date=${date} and ma_appid in (select app_id from tidb.deepthink.mini_app_info where business_type in (1,3,8,9,10,11) and business_method='IAA')
         group by advertiser_id
         UNION ALL
         select advertiser_id, 0 as iaa_cost_amount, 0 as iaa_real_cost_amount,round(ifnull(sum(cost_amount),0),2) as cost_amount, sum(real_cost_amount) as real_cost_amount
-        from application.media_ad_report_daily where stat_date=${date} and ma_appid in (select app_id from tidb.deepthink.mini_app_info where business_type in (1,3,8) and business_method='IAP')
+        from application.media_ad_report_daily where stat_date=${date} and ma_appid in (select app_id from tidb.deepthink.mini_app_info where business_type in (1,3,8,9,10,11) and business_method='IAP')
         group by advertiser_id)subtb2
         group by advertiser_id
         ) tb2
@@ -411,7 +414,7 @@
         round(ifnull(sum(share_iaa_amount_3), 0),2) as share_iaa_amount_3,
         ifnull(sum(share_iaa_amount), 0) as share_iaa_amount,
         sum(share_pay_amount) as share_pay_amount
-        from application.user_data_report_daily where stat_date=${date} and ma_appid in (select app_id from tidb.deepthink.mini_app_info where business_type in (1,3,8))
+        from application.user_data_report_daily where stat_date=${date} and ma_appid in (select app_id from tidb.deepthink.mini_app_info where business_type in (1,3,8,9,10,11))
         group by advertiser_id) tb3
         on tb1.advertiser_id = tb3.advertiser_id
         left join (select user_id, nick_name, phonenumber, dept_id from tidb.deepthink.sys_user) tb4
@@ -454,6 +457,7 @@
     <select id="allBusinessPushData" resultType="java.util.Map">
         select
         <include refid="costAmount"/>,
+        <include refid="realCostAmount"/>,
         <include refid="payAmount"/>,
         <include refid="iaaAmount"/>,
         <include refid="shareIaaAmount"/>,

+ 4 - 1
job-bytedance/src/main/java/cn/com/ctop/job/bytedance/data/service/impl/AdminAdvertiserListServiceImpl.java

@@ -14,12 +14,14 @@ import org.springframework.stereotype.Service;
 import java.util.*;
 import java.util.concurrent.*;
 import java.util.stream.Collectors;
+
 @Service
 @Slf4j
 public class AdminAdvertiserListServiceImpl implements IAdminAdvertiserListService {
 
     @Autowired
     private AdminAdvertiserListMapper adminAdvertiserListMapper;
+
     @Override
     public JSONObject bytedanceAdvertiserThreadPool(Integer totalPage, Integer pageSize, Long adminAdvertiserId, Long ccAccountId, String accessToken) {
         ExecutorService executor = Executors.newFixedThreadPool(5);
@@ -136,7 +138,7 @@ public class AdminAdvertiserListServiceImpl implements IAdminAdvertiserListServi
     }
 
 
-    private List<String> getBytedanceAccountList(Long adminAdvertiserId, Long ccAccountId, String accessToken, Integer page, Integer pageSize, Integer requestCount) {
+    private List<String> getBytedanceAccountList(Long adminAdvertiserId, Long ccAccountId, String accessToken, Integer page, Integer pageSize, Integer requestCount) throws InterruptedException {
         try {
             Thread.sleep(100);
         } catch (InterruptedException e) {
@@ -176,6 +178,7 @@ public class AdminAdvertiserListServiceImpl implements IAdminAdvertiserListServi
             }
         } else {
             log.error("请求字节账户列表失败,进入重试任务,当前请求次数:{}", requestCount);
+            Thread.sleep(1000);
             getBytedanceAccountList(adminAdvertiserId, ccAccountId, accessToken, page, pageSize, requestCount + 1);
         }
         if (!Check.isNull(advertiserLists)) {

+ 2 - 2
job-bytedance/src/main/java/cn/com/ctop/job/bytedance/data/service/impl/BytedanceProductUpdateServiceImpl.java

@@ -35,10 +35,10 @@ public class BytedanceProductUpdateServiceImpl implements IBytedanceProductUpdat
     public void run() throws Exception {
         Set<String> errors = new HashSet<>();
         log.info("付费商品库更新中...");
-//        iapProductUpdate(errors);
+        iapProductUpdate(errors);
         log.info("付费商品库更新完成");
         log.info("免费商品库更新中...");
-        iaaProductUpdate(errors);
+//        iaaProductUpdate(errors);
         log.info("免费商品库更新完成");
         if (!Check.isNull(errors)){
             List<String> info = new ArrayList<>();

+ 2 - 1
job-bytedance/src/main/java/cn/com/ctop/job/bytedance/data/service/impl/DateReportsPushServiceImpl.java

@@ -33,7 +33,7 @@ public class DateReportsPushServiceImpl implements IDateReportsPushService {
     @Autowired
     ReportsAdPushMapper reportsPushMapper;
 
-    private static final String TEMPLATE_VERSION = "1.0.12";
+    private static final String TEMPLATE_VERSION = "1.0.13";
     private static final String TEMPLATE_ID = "AAqRhJzMBoO0E";
 
     /**
@@ -115,6 +115,7 @@ public class DateReportsPushServiceImpl implements IDateReportsPushService {
         String updateTime = reportsPushMapper.updateTime(todayLong);
         List<Pair<String, String>> columns = Arrays.asList(
                 new Pair<>("cost_amount", "消耗金额"),
+                new Pair<>("real_cost_amount", "折后消耗"),
                 new Pair<>("end_amount", "结算金额"),
                 new Pair<>("pay_amount", "充值金额"),
                 new Pair<>("share_iaa_amount", "广告预估收入"),

+ 6 - 5
job-bytedance/src/main/java/cn/com/ctop/job/bytedance/data/service/impl/ReportsAdPushServiceImpl.java

@@ -30,7 +30,7 @@ public class ReportsAdPushServiceImpl implements IReportsAdPushService {
     public static final String APP_KEY = "OUlg7WTa6UWZItfTmJw2JdQvhVI4VcRj";
 
     public static final String TEMPLATE_ID = "AAqBGlVblKabY";
-    public static final String TEMPLATE_VERSION = "1.0.12";
+    public static final String TEMPLATE_VERSION = "1.0.13";
     @Autowired
     ReportsAdPushMapper reportsPushMapper;
 
@@ -56,10 +56,10 @@ public class ReportsAdPushServiceImpl implements IReportsAdPushService {
     public void test() {
         List<String> userIds = Arrays.asList(
                 "44fbaed6" //zhaotx
-//                ,"ebeeced9" //yumeng
-//                ,"58e7a98a"  //xsq
-//                ,"2ga9669f" //angaoqi
-//                ,"43gb7fbc" //huangpingkang
+                ,"ebeeced9" //yumeng
+                ,"58e7a98a"  //xsq
+                ,"2ga9669f" //angaoqi
+                ,"43gb7fbc" //huangpingkang
         );
         send(userIds);
     }
@@ -88,6 +88,7 @@ public class ReportsAdPushServiceImpl implements IReportsAdPushService {
 
         List<Pair<String, String>> columns = Arrays.asList(
                 new Pair<>("cost_amount", "消耗金额"),
+                new Pair<>("real_cost_amount", "折后消耗"),
                 new Pair<>("end_amount", "结算金额"),
                 new Pair<>("pay_amount", "充值金额"),
                 new Pair<>("share_iaa_amount", "广告预估收入"),

+ 2 - 1
job-bytedance/src/main/java/cn/com/ctop/job/bytedance/data/service/impl/ReportsByBusinessPushServiceImpl.java

@@ -35,7 +35,7 @@ public class ReportsByBusinessPushServiceImpl implements IReportsByBusinessPushS
     @Autowired
     ReportsAdPushMapper reportsPushMapper;
 
-    private static final String TEMPLATE_VERSION = "1.0.2";
+    private static final String TEMPLATE_VERSION = "1.0.3";
     private static final String TEMPLATE_ID = "AAq4oeDXECopo";
 
 
@@ -103,6 +103,7 @@ public class ReportsByBusinessPushServiceImpl implements IReportsByBusinessPushS
         String updateTime = String.valueOf(todayData.get("update_time"));
         List<Pair<String, String>> columns = Arrays.asList(
                 new Pair<>("cost_amount", "消耗金额"),
+                new Pair<>("real_cost_amount", "折后消耗"),
                 new Pair<>("end_amount", "结算金额"),
                 new Pair<>("pay_amount", "充值金额"),
                 new Pair<>("iaa_amount", "广告预估收入"),

+ 0 - 1
job-bytedance/src/main/java/cn/com/ctop/job/bytedance/data/service/impl/TotalRankPushServiceImpl.java

@@ -163,7 +163,6 @@ public class TotalRankPushServiceImpl implements ITotalRankPushService {
 
     private void sendToFeishu(String token, String content, String receive_id) {
 
-        System.out.println(content);
         JSONObject request = new JSONObject();
         request.put("receive_id", receive_id);
         request.put("msg_type", "interactive");

+ 1 - 0
job-bytedance/src/main/java/cn/com/ctop/job/bytedance/handler/AdminAdvertiserListJob.java

@@ -45,6 +45,7 @@ public class AdminAdvertiserListJob {
                 JSONObject totalJson = adminAdvertiserListService.getBytedanceAccountListTotal(advertiserId, advertiserId, accessToken, 1, pageSize);
                 if (!Check.isNull(totalJson)) {
                     Integer totalPage = totalJson.getInteger("totalPage");
+                    log.info("管家账户ID:{},账户总数:{}", advertiserId, totalPage);
                     if (totalPage != 0) {
                         JSONObject result = adminAdvertiserListService.bytedanceAdvertiserThreadPool(totalPage, pageSize, advertiserId, advertiserId, accessToken);
                         log.info("字节多线程获取账户返回结果:{}", result);

+ 7 - 3
job-bytedance/src/main/java/cn/com/ctop/job/bytedance/handler/BytedanceCdpProjectJob.java

@@ -44,9 +44,13 @@ public class BytedanceCdpProjectJob {
         if (!Check.isNull(ids)) {
             log.info("总数:{}", ids.size());
 //            ids.forEach(id -> allService.submit(() -> cdpProjectService.getProjectList(id, null, null, null)));
-            ids.forEach(id -> createiveAppsExecutorService.submit(() -> cdpProjectService.getAdqCreatives(id, "2025-07-09", "2025-07-09")));
-
+//            ids.forEach(id -> createiveAppsExecutorService.submit(() -> cdpProjectService.getAdqCreatives(id, "2025-07-09", "2025-07-09")));
 
+            List<String> days = DateUtils.getDays("2025-06-01", "2025-07-22");
+            for (String day : days) {
+                ids.forEach(id -> projectExecutorService.submit(() -> cdpProjectService.getProjectList(id, null, null, day)));
+                ids.forEach(id -> promExecutorService.submit(() -> cdpProjectService.getpromotionList(id, null, day)));
+            }
         }
     }
 
@@ -167,7 +171,7 @@ public class BytedanceCdpProjectJob {
                 for (JSONObject iid : iids) {
                     Long pageId = iid.getLong("page_id");
                     Long advertiserId = iid.getLong("advertiser_id");
-                    pageAppsExecutorService.submit(() -> cdpProjectService.getAdqWechatPages(advertiserId,pageId));
+                    pageAppsExecutorService.submit(() -> cdpProjectService.getAdqWechatPages(advertiserId, pageId));
                 }
             }
         } catch (Exception e) {

+ 17 - 17
job-bytedance/src/main/java/cn/com/ctop/job/bytedance/handler/PromoteLinkRefreshJob.java

@@ -59,23 +59,23 @@ public class PromoteLinkRefreshJob {
             failMessages.add(failMessage);
         }
 
-        StringBuilder errorMsg = new StringBuilder();
-        for (Future<String> future : failMessages) {
-            try {
-                String msg = future.get();
-                if (!Check.isNull(msg)) {
-                    errorMsg.append(msg).append("\n");
-                }
-            } catch (Exception e) {
-                log.error("获取刷新链接结果时发生异常: " + e.getMessage(), e);
-            }
-        }
-        if (errorMsg.length() > 0) {
-            errorMsg.insert(0, "**批量刷新推广链任务报错**\n");
-            FeishuRobotUtil.sendTextToWebhook(errorMsg.toString(), HOOK_URL);
-        } else {
-            log.info("批量刷新推广链接任务完成,无错误信息。");
-        }
+//        StringBuilder errorMsg = new StringBuilder();
+//        for (Future<String> future : failMessages) {
+//            try {
+//                String msg = future.get();
+//                if (!Check.isNull(msg)) {
+//                    errorMsg.append(msg).append("\n");
+//                }
+//            } catch (Exception e) {
+//                log.error("获取刷新链接结果时发生异常: " + e.getMessage(), e);
+//            }
+//        }
+//        if (errorMsg.length() > 0) {
+//            errorMsg.insert(0, "**批量刷新推广链任务报错**\n");
+//            FeishuRobotUtil.sendTextToWebhook(errorMsg.toString(), HOOK_URL);
+//        } else {
+//            log.info("批量刷新推广链接任务完成,无错误信息。");
+//        }
     }