zhaotx 1 год назад
Родитель
Сommit
4f87797f16

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

@@ -7,10 +7,12 @@ import java.util.List;
 
 public interface BytedanceProductUpdateMapper {
 
+    List<JSONObject> getIAPPlatformInitList();
     List<JSONObject> getIAPPlatformList();
     List<JSONObject> getIAPVideoList();
     List<JSONObject> getIAPProductTypeEnums();
 
+    List<JSONObject> getIAAPlatformInitList();
     List<JSONObject> getIAAPlatformList();
     List<JSONObject> getIAAVideoList();
     List<JSONObject> getIAAProductTypeEnums();

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

@@ -31,6 +31,13 @@
         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 t1.mini_instance_id is not null
     </select>
+    <select id="getIAPPlatformInitList" 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`=2 and t1.`_status`=0 and platform_type=1
+    </select>
     <select id="getIAAPlatformList" resultType="com.alibaba.fastjson.JSONObject">
         select t1.*, t3.access_token
         FROM deepthink.bytedance_product_main_advertiser t1
@@ -38,6 +45,13 @@
         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 t1.mini_instance_id is not null
     </select>
+    <select id="getIAAPlatformInitList" 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
+    </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,
         '天津星链视界信息技术有限公司' as copyright_owner, '其他' as playlet_gender, video.update_sort as playlet_num, '2' as playlet_duration,
@@ -53,7 +67,7 @@
         LEFT JOIN thirtpart.ly_video_category category ON video.category_id = category.id
         LEFT JOIN (select video_id, min(sort) as sort, max(pay_amount/100.0) as maxpay, min(pay_amount/100.0) as minpay from thirtpart.ly_video_details where is_pay=1 group by video_id) payinfo ON video.id = payinfo.video_id
         where (video.is_free = 1 or (payinfo.sort is not null and maxpay>0))
-        and video.source=1 and video.created_at > unix_timestamp(date_sub(now(), interval 7 day))
+        and video.source=1 and video.created_at > 1743436800
     </select>
     <select id="getIAAVideoList" 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,
@@ -67,7 +81,7 @@
         LEFT JOIN (select * from thirtpart.ly_videos where play_platform like '%2%') video ON third.video_id = video.id
         LEFT JOIN thirtpart.ly_video_category category ON video.category_id = category.id
         LEFT JOIN (select video_id, max(sort) as sort from thirtpart.ly_video_details where is_pay=0 group by video_id) payinfo ON video.id = payinfo.video_id
-        where video.is_free = 0 and video_source=1
+        where video.is_free = 0 and video.source=1 and video.created_at > 1743436800
     </select>
     <select id="getIAPProductTypeEnums" resultType="com.alibaba.fastjson.JSONObject">
         select first_type_name, first_type_id, second_type_name, second_type_id, third_type_name, third_type_id

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

@@ -101,8 +101,8 @@ public class BytedanceProductUpdateServiceImpl implements IBytedanceProductUpdat
      */
     @Override
     public void initNew(){
-        List<JSONObject> iapPlatformList = bytedanceProductUpdateMapper.getIAPPlatformList();
-        List<JSONObject> iaaPlatformList = bytedanceProductUpdateMapper.getIAAPlatformList();
+        List<JSONObject> iapPlatformList = bytedanceProductUpdateMapper.getIAPPlatformInitList();
+        List<JSONObject> iaaPlatformList = bytedanceProductUpdateMapper.getIAAPlatformInitList();
         initNew(iaaPlatformList);
 //        initNew(iapPlatformList);
         authMovieResource();