Explorar o código

添加素材类型(真人制作)清洗定时任务;
清理无用的数据清洗代码

songyh %!s(int64=3) %!d(string=hai) anos
pai
achega
0e488d8372

+ 6 - 0
module-common/src/main/java/cn/com/ctop/common/module/utils/CtopAdConstant.java

@@ -87,4 +87,10 @@ public class CtopAdConstant {
 
     public static final String COMMON_ORDER_TYPE_ASC = "asc";
     public static final String COMMON_ORDER_TYPE_DESC = "desc";
+
+    /**
+     * 视频类型
+     */
+    public static final String VIDEO_TYPR_ZR = "真人";
+    public static final String VIDEO_TYPR_ZZ = "制作";
 }

+ 32 - 12
module-job-kuaishou/src/main/java/cn/com/ctop/job/kuaishou/handler/KuaishouEtlVideoJob.java

@@ -22,6 +22,10 @@ public class KuaishouEtlVideoJob {
     @Autowired
     private IEtlKuaishouVideoInfoService videoEtlInfoService;
 
+    /**
+     * 快手爆款有效视频数据清洗
+     * @throws Exception
+     */
     @XxlJob("kuaishouEtlVideoJob")
     public void execute() throws Exception {
         Date startDate = DateUtils.addDay(new Date(), -2);
@@ -31,21 +35,19 @@ public class KuaishouEtlVideoJob {
         }
     }
 
-    @XxlJob("kuaishouEtlProjectVideoJob")
-    public void kuaishouEtlProjectVideoJob() throws Exception {
-        Date startDate = DateUtils.addDay(new Date(), -2);
-        for (int i = 0; i <= 2; i++) {
-            Date getDate = DateUtils.addDay(startDate, i);
-            kuaishouVideoEtlInfoService.etlKuaishouVideoInfoGroupByProjectId(getDate);
-        }
-    }
-
+    /**
+     * 快手视频基础信息表清洗
+     * @throws Exception
+     */
     @XxlJob("kuaishouEtlVideoBaseInfoJob")
     public void kuaishouEtlVideoBaseInfoJob() throws Exception {
         String statDate = DateUtils.getStartTime(DateUtils.addDay(new Date(), -1));
         videoGetService.etlVideoBaseInfoByStaDate(statDate);
     }
 
+    /**
+     * 清洗快手视频归属信息表
+     */
     @XxlJob("etlFinalKuaishouVideoInfo")
     public void etlKuaishouVideoInfo(){
         Date startDate = DateUtils.addDay(new Date(), -2);
@@ -53,22 +55,40 @@ public class KuaishouEtlVideoJob {
             videoEtlInfoService.etlKuaishouVideoInfo(DateUtils.formatDate(DateUtils.addDay(startDate,i)));
         }
     }
+
+    /**
+     * 快手清洗素材账户报表信息
+     */
     @XxlJob("etlKuaishouAccountMaterialReportInfo")
     public void etlKuaishouAccountMaterialReportInfo(){
-        Date startDate = new Date();
         for(int i=1;i<=2;i++){
             materialReportDailyService.etlKuaishouAccountMaterialReportInfo(DateUtils.formatDate(DateUtils.addDay(new Date(),-i)));
         }
     }
 
+    /**
+     * 清洗快手视频报表公司相关数据
+     */
     @XxlJob("etlKuaishouReportCompanyInfo")
     public void etlKuaishouReportCompanyInfo(){
-        Date date = DateUtils.addDay(new Date(),-1);
-        materialReportDailyService.etlKuaishouReportCompanyInfo(DateUtils.formatDate(date));
+        materialReportDailyService.etlKuaishouReportCompanyInfo();
     }
 
+    /**
+     * 清洗快手视频开始投放时间
+     */
     @XxlJob("etlKuaishouVideoReportStateDate")
     public void etlKuaishouVideoReportStateDate(){
         materialReportDailyService.etlKuaishouVideoReportStateDate();
     }
+
+    /**
+     * 清洗快手视频类型(真人/剪辑)
+     */
+    @XxlJob("etlKuaishouVideoType")
+    public void etlKuaishouVideoType(){
+        materialReportDailyService.etlKuaishouVideoType();
+    }
+
+
 }

+ 24 - 22
module-kuaishou/src/main/java/cn/com/ctop/kuaishou/modules/report/entity/EtlKuaishouAccountMaterialReportDaily.java

@@ -1,6 +1,7 @@
 package cn.com.ctop.kuaishou.modules.report.entity;
 
 import java.io.Serializable;
+import java.math.BigDecimal;
 import java.util.Date;
 import com.baomidou.mybatisplus.annotation.IdType;
 import com.baomidou.mybatisplus.annotation.TableId;
@@ -31,6 +32,7 @@ public class EtlKuaishouAccountMaterialReportDaily {
 	/**id*/
 	@TableId(type = IdType.AUTO)
 	private Long id;
+	private Long photoId;
 	/**账户ID*/
 	private Long accountId;
 	/**channelType*/
@@ -52,51 +54,51 @@ public class EtlKuaishouAccountMaterialReportDaily {
 	/**素材类型*/
 	private String materialType;
 	/**花费(元)*/
-	private java.math.BigDecimal charge;
+	private BigDecimal charge;
 	/**曝光数*/
-	private Integer photoShow;
+	private Long photoShow;
 	/**素材曝光数*/
-	private Integer aclick;
+	private Long aclick;
 	/**行为数*/
-	private Integer bclick;
+	private Long bclick;
 	/**应用下载数据-安卓下载开始数*/
-	private Integer downloadStarted;
+	private Long downloadStarted;
 	/**应用下载数据-安卓下载完成数*/
-	private Integer downloadCompleted;
+	private Long downloadCompleted;
 	/**应用下载数据-激活数*/
-	private Integer activation;
+	private Long activation;
 	/**提交按钮点击数*/
-	private Integer submit;
+	private Long submit;
 	/**日期*/
 	private Date statDate;
 	/**封面点击数*/
-	private Integer photoClick;
+	private Long photoClick;
 	/**应用下载数据-首日付费次数*/
-	private Integer eventPayFirstDay;
+	private Long eventPayFirstDay;
 	/**应用下载数据-首日付费金额*/
-	private java.math.BigDecimal eventPayPurchaseAmountFirstDay;
+	private BigDecimal eventPayPurchaseAmountFirstDay;
 	/**应用下载数据-付费次数*/
-	private Integer eventPay;
+	private Long eventPay;
 	/**应用下载数据-付费金额*/
-	private java.math.BigDecimal eventPayPurchaseAmount;
+	private BigDecimal eventPayPurchaseAmount;
 	/**应用下载数据-注册数*/
-	private Integer eventRegister;
+	private Long eventRegister;
 	/**应用下载数据-完件数*/
-	private Integer eventJinJianApp;
+	private Long eventJinJianApp;
 	/**应用下载数据-授信数*/
-	private Integer eventCreditGrantApp;
+	private Long eventCreditGrantApp;
 	/**应用下载数据-付款成功数*/
-	private Integer eventOrderPaid;
+	private Long eventOrderPaid;
 	/**应用下载数据-付款成功金额*/
-	private java.math.BigDecimal eventOrderPaidPurchaseAmount;
+	private BigDecimal eventOrderPaidPurchaseAmount;
 	/**落地页数据-落地页完件数*/
-	private Integer eventJinJianLandingPage;
+	private Long eventJinJianLandingPage;
 	/**落地页数据-落地页授信数*/
-	private Integer eventCreditGrantLandingPage;
+	private Long eventCreditGrantLandingPage;
 	/**应用下载数据-次留数(仅支持分日查询)*/
-	private Integer eventNextDayStay;
+	private Long eventNextDayStay;
 	/**落地页数据-表单提交数*/
-	private Integer formCount;
+	private Long formCount;
 	/**3s播放数*/
 	@TableField(value = "play_3s_count")
 	private Long play3sCount;

+ 8 - 2
module-kuaishou/src/main/java/cn/com/ctop/kuaishou/modules/report/mapper/EtlKuaishouAccountMaterialReportDailyMapper.java

@@ -22,9 +22,15 @@ public interface EtlKuaishouAccountMaterialReportDailyMapper extends BaseMapper<
 
     void replace(@Param(value = "report")EtlKuaishouAccountMaterialReportDaily report);
 
-    void etlKuaishouReportCompanyInfo(@Param(value = "formatDate") String formatDate);
-
     void etlKuaishouVideoReportStateDate();
 
     void etlKuaishouVideoCompanyInfo();
+
+    void etlKuaishouVideoTypeZz(@Param(value = "videoType") String videoType);
+
+    void etlKuaishouVideoTypeZr(@Param(value = "videoType")String videoType);
+
+    void etlBytedanceVideoTypeZr(@Param(value = "videoType")String videoType);
+
+    void etlBytedanceVideoTypeZz(@Param(value = "videoType")String videoType);
 }

+ 34 - 17
module-kuaishou/src/main/java/cn/com/ctop/kuaishou/modules/report/mapper/xml/EtlKuaishouAccountMaterialReportDailyMapper.xml

@@ -144,6 +144,7 @@
     </insert>
     <insert id="replace">
     replace into ctop_etl_kuaishou_account_material_report_daily(
+        photo_id,photo_url,cover_url
         company_id ,
         company_name ,
         project_id ,
@@ -176,6 +177,9 @@
         play_3s_count)
         values
         (
+    #{report.photoId},
+    #{report.photoUrl},
+    #{report.coverUrl},
             #{report.companyId},
             #{report.companyName},
             #{report.projectId},
@@ -208,17 +212,12 @@
             #{report.play3sCount}
         )
     </insert>
-    <update id="etlKuaishouReportCompanyInfo">
-        update ctop_etl_kuaishou_account_material_report_daily a left join ctop_user_allocation cua on a.account_id = cua.account_id
-            left join user_company uc on cua.user_id = uc.user_id
-            set a.company_name = uc.company_name
-        where a.company_name is null
-          and uc.company_name is not null
-          and a.stat_date = #{formatDate}
-    </update>
     <update id="etlKuaishouVideoReportStateDate">
         UPDATE ctop_etl_kuaishou_video_info info
-            LEFT JOIN ( SELECT min( stat_date ) AS minDate, signature FROM ctop_kuaishou_report_daily_material GROUP BY signature ) a ON a.signature = info.video_code
+            LEFT JOIN ( select video_code,min(report.stat_date) as minDate from ctop_kuaishou_report_daily_material report left join ctop_kuaishou_video_get ckvg on report.account_id = ckvg.account_id
+            and report.photo_id = ckvg.photo_id
+            left join ctop_etl_kuaishou_video_info cekvi on ckvg.signature = cekvi.video_code
+            where cekvi.state_date is null group by video_code ) a ON a.video_code = info.video_code
             SET info.state_date = a.minDate
         WHERE
             a.minDate IS NOT NULL
@@ -229,17 +228,34 @@
             set video.company_name = uc.company_name
         where video.clip_id is not null
             and uc.company_name is not null
-            and video.company_name is null
+            and (video.company_name is null or video.company_name = '')
+    </update>
+    <update id="etlKuaishouVideoTypeZz">
+        update ctop_material_tag_info cmti left join ctop_etl_kuaishou_video_info cbvei on cmti.code = cbvei.video_code
+            set cbvei.video_type = #{videoType} where cmti.tag_code like 'Z01%' and cbvei.video_type is null
+    </update>
+    <update id="etlKuaishouVideoTypeZr">
+        update ctop_material_tag_info cmti left join ctop_etl_kuaishou_video_info cbvei on cmti.code = cbvei.video_code
+            set cbvei.video_type = #{videoType} where cmti.tag_code like 'Z02%' and cbvei.video_type is null
+    </update>
+    <update id="etlBytedanceVideoTypeZr">
+        update ctop_material_tag_info cmti left join ctop_bytedance_video_etl_info cbvei on cmti.code = cbvei.video_code
+            set cbvei.video_type = #{videoType} where cmti.tag_code like 'Z01%' and cbvei.video_type is null
+    </update>
+    <update id="etlBytedanceVideoTypeZz">
+        update ctop_material_tag_info cmti left join ctop_bytedance_video_etl_info cbvei on cmti.code = cbvei.video_code
+            set cbvei.video_type = #{videoType} where cmti.tag_code like 'Z02%' and cbvei.video_type is null
     </update>
     <select id="etlKuaishouAccountMaterialReportDailyList"
             resultType="cn.com.ctop.kuaishou.modules.report.entity.EtlKuaishouAccountMaterialReportDaily">
     select
+    m.photo_id,m.photo_url,m.cover_url,
     c.company_id ,
     c.company_name ,
     u.project_id ,
     p.project_name,
     m.account_id,
-    video.signature,
+    case when m.signature is not null then m.signature else video.signature end as signature,
     sum(m.charge)as charge ,
     sum(m.photo_show)as photo_show ,
     sum(m.aclick)as aclick ,
@@ -248,7 +264,7 @@
     sum(m.download_completed)as download_completed,
     sum(m.activation)as activation ,
     sum(m.submit)as submit,
-    date_format(m.stat_date,'%Y-%m-%d')as stat_date,
+    m.stat_date,
     sum(m.photo_click)as photo_click,
     sum(m.event_pay_first_day)as event_pay_first_day,
     sum(m.event_pay_purchase_amount_first_day)as event_pay_purchase_amount_first_day,
@@ -264,13 +280,14 @@
     sum(m.event_next_day_stay)as event_next_day_stay,
     sum(m.form_count)as form_count,
      round(sum(m.play_3s_ratio*m.photo_show))as play_3s_count
-    from ctop_kuaishou_report_daily_material m left join ctop_user_allocation u on u.account_id = m.account_id
-    left  join ctop_kuaishou_video_get video on video.account_id = m.account_id and m.photo_id = video.photo_id
-left join ctop_project p on p.id = u.project_id
-left join user_company c on c.user_id = u.account_id
+    from ctop_kuaishou_report_daily_material m
+        left join ctop_user_allocation u on u.account_id = m.account_id
+        left  join ctop_kuaishou_video_get video on video.account_id = m.account_id and m.photo_id = video.photo_id
+        left join ctop_project p on p.id = u.project_id
+        left join user_company c on c.user_id = u.account_id
 where 1=1
 and m.stat_date = #{date} and m.account_id = #{accountId}
-group by m.account_id,m.signature
+group by m.account_id,m.photo_id
     </select>
 
 

+ 4 - 3
module-kuaishou/src/main/java/cn/com/ctop/kuaishou/modules/report/service/IEtlKuaishouAccountMaterialReportDailyService.java

@@ -11,11 +11,12 @@ import com.baomidou.mybatisplus.extension.service.IService;
  */
 public interface IEtlKuaishouAccountMaterialReportDailyService extends IService<EtlKuaishouAccountMaterialReportDaily> {
 
-    void etlKuaishouAccountMaterialReportDailyData(String date);
-
     void etlKuaishouAccountMaterialReportInfo(String formatDate);
 
-    void etlKuaishouReportCompanyInfo(String formatDate);
+    void etlKuaishouReportCompanyInfo();
 
     void etlKuaishouVideoReportStateDate();
+
+    void etlKuaishouVideoType();
+
 }

+ 0 - 2
module-kuaishou/src/main/java/cn/com/ctop/kuaishou/modules/report/service/IKuaishouVideoEtlInfoService.java

@@ -17,8 +17,6 @@ import java.util.Date;
 public interface IKuaishouVideoEtlInfoService extends IService<KuaishouVideoEtlInfo> {
     void etlKuaishouVideoInfo(Date date);
 
-    void etlKuaishouVideoInfoGroupByProjectId(Date date);
-
     KuaishouVideoEtlInfo getBySignature(String signature);
 
     Result<Object> queryPageList(JSONObject request) throws ParseException;

+ 10 - 24
module-kuaishou/src/main/java/cn/com/ctop/kuaishou/modules/report/service/impl/EtlKuaishouAccountMaterialReportDailyServiceImpl.java

@@ -2,6 +2,7 @@ package cn.com.ctop.kuaishou.modules.report.service.impl;
 
 import cn.com.ctop.common.module.entity.CtopOauthToken;
 import cn.com.ctop.common.module.service.ICtopOauthTokenService;
+import cn.com.ctop.common.module.utils.CtopAdConstant;
 import cn.com.ctop.kuaishou.modules.report.entity.EtlKuaishouAccountMaterialReportDaily;
 import cn.com.ctop.kuaishou.modules.report.mapper.EtlKuaishouAccountMaterialReportDailyMapper;
 import cn.com.ctop.kuaishou.modules.report.service.IEtlKuaishouAccountMaterialReportDailyService;
@@ -29,29 +30,7 @@ public class EtlKuaishouAccountMaterialReportDailyServiceImpl extends ServiceImp
     private EtlKuaishouAccountMaterialReportDailyMapper etlKuaishouAccountMaterialReportDailyMapper;
     @Autowired
     private ICtopOauthTokenService tokenService;
-    static ExecutorService executorService = Executors.newFixedThreadPool(10);
     static ExecutorService etlExecutorService = Executors.newFixedThreadPool(10);
-    @Override
-    public void etlKuaishouAccountMaterialReportDailyData(String date){
-        List<CtopOauthToken> tokens = tokenService.selectKuaiShouToken();
-        CountDownLatch countDownLatch = new CountDownLatch(tokens.size());
-        tokens.forEach(token -> executorService.submit(()->{
-            try {
-                List<EtlKuaishouAccountMaterialReportDaily> getList = etlKuaishouAccountMaterialReportDailyMapper.etlKuaishouAccountMaterialReportDailyList(date,token.getAccountId());
-                etlKuaishouAccountMaterialReportDailyMapper.replaceBatch(getList);
-            }catch (Exception e){
-                e.printStackTrace();
-            }finally {
-                countDownLatch.countDown();
-            }
-        }));
-        try {
-            countDownLatch.await();
-        } catch (InterruptedException e) {
-            e.printStackTrace();
-        }
-        log.info("{}数据获取完成",date);
-    }
 
     @Override
     public void etlKuaishouAccountMaterialReportInfo(String formatDate) {
@@ -78,8 +57,7 @@ public class EtlKuaishouAccountMaterialReportDailyServiceImpl extends ServiceImp
     }
 
     @Override
-    public void etlKuaishouReportCompanyInfo(String formatDate) {
-        etlKuaishouAccountMaterialReportDailyMapper.etlKuaishouReportCompanyInfo(formatDate);
+    public void etlKuaishouReportCompanyInfo() {
         etlKuaishouAccountMaterialReportDailyMapper.etlKuaishouVideoCompanyInfo();
     }
 
@@ -87,4 +65,12 @@ public class EtlKuaishouAccountMaterialReportDailyServiceImpl extends ServiceImp
     public void etlKuaishouVideoReportStateDate() {
         etlKuaishouAccountMaterialReportDailyMapper.etlKuaishouVideoReportStateDate();
     }
+
+    @Override
+    public void etlKuaishouVideoType() {
+        etlKuaishouAccountMaterialReportDailyMapper.etlKuaishouVideoTypeZr(CtopAdConstant.VIDEO_TYPR_ZR);
+        etlKuaishouAccountMaterialReportDailyMapper.etlKuaishouVideoTypeZz(CtopAdConstant.VIDEO_TYPR_ZZ);
+        etlKuaishouAccountMaterialReportDailyMapper.etlBytedanceVideoTypeZr(CtopAdConstant.VIDEO_TYPR_ZR);
+        etlKuaishouAccountMaterialReportDailyMapper.etlBytedanceVideoTypeZz(CtopAdConstant.VIDEO_TYPR_ZZ);
+    }
 }

+ 0 - 1
module-kuaishou/src/main/java/cn/com/ctop/kuaishou/modules/report/service/impl/KuaishouReportDailyImageServiceImpl.java

@@ -71,7 +71,6 @@ public class KuaishouReportDailyImageServiceImpl extends ServiceImpl<KuaishouRep
                 detailJSON.put("photo_show", detailJSON.getInteger("show"));
                 KuaishouReportDailyImage kuaishouReportDailyImage = JSONObject.toJavaObject(detailJSON,KuaishouReportDailyImage.class);
                 kuaishouReportDailyImage.setAccountId(accountId);
-
                 imageReports.add(kuaishouReportDailyImage);
             }
         });

+ 12 - 160
module-kuaishou/src/main/java/cn/com/ctop/kuaishou/modules/report/service/impl/KuaishouVideoEtlInfoServiceImpl.java

@@ -39,6 +39,8 @@ import java.util.concurrent.Executors;
 @Slf4j
 @Service
 public class KuaishouVideoEtlInfoServiceImpl extends ServiceImpl<KuaishouVideoEtlInfoMapper, KuaishouVideoEtlInfo> implements IKuaishouVideoEtlInfoService {
+    @Autowired
+    private IMaterialAscriptionService materialAscriptionService;
     @Resource
     private KuaishouVideoEtlInfoMapper kuaishouVideoEtlInfoMapper;
     @Autowired
@@ -69,9 +71,9 @@ public class KuaishouVideoEtlInfoServiceImpl extends ServiceImpl<KuaishouVideoEt
                             etlInfo = new KuaishouVideoEtlInfo(nowData);
                             BigDecimal totalCost = etlInfo.getTotalCost();
                             JSONObject ascription = materialAscriptionService.getDetailByCode(signature);
-                            String planId = null;
+                            String clipId = null;
                             if (null != ascription) {
-                                planId = ascription.getString("planId");
+                                String planId = ascription.getString("planId");
                                 if (null != planId && !planId.trim().equals("")) {
                                     etlInfo.setPlanId(planId);
                                 }
@@ -79,7 +81,7 @@ public class KuaishouVideoEtlInfoServiceImpl extends ServiceImpl<KuaishouVideoEt
                                 if (null != planName && !planName.trim().equals("")) {
                                     etlInfo.setPlanName(planName);
                                 }
-                                String clipId = ascription.getString("clipId");
+                                clipId = ascription.getString("clipId");
                                 if (null != clipId && !clipId.trim().equals("")) {
                                     etlInfo.setClipId(clipId);
                                 }
@@ -96,8 +98,8 @@ public class KuaishouVideoEtlInfoServiceImpl extends ServiceImpl<KuaishouVideoEt
                                     etlInfo.setShotName(shotName);
                                 }
                             }
-                            if (null != planId) {
-                                String companyName = kuaishouVideoEtlInfoMapper.getCompanyNameByUserId(planId);
+                            if (null != clipId) {
+                                String companyName = kuaishouVideoEtlInfoMapper.getCompanyNameByUserId(clipId);
                                 if (null != companyName && !companyName.trim().equals("")) {
                                     etlInfo.setCompanyName(companyName);
                                 }
@@ -128,9 +130,9 @@ public class KuaishouVideoEtlInfoServiceImpl extends ServiceImpl<KuaishouVideoEt
                             this.save(etlInfo);
                         } else {
                             JSONObject ascription = materialAscriptionService.getDetailByCode(signature);
-                            String planId = null;
+                            String clipId = null;
                             if (null != ascription) {
-                                planId = ascription.getString("planId");
+                                String planId = ascription.getString("planId");
                                 if (null != planId && !planId.trim().equals("")) {
                                     etlInfo.setPlanId(planId);
                                 }
@@ -138,7 +140,7 @@ public class KuaishouVideoEtlInfoServiceImpl extends ServiceImpl<KuaishouVideoEt
                                 if (null != planName && !planName.trim().equals("")) {
                                     etlInfo.setPlanName(planName);
                                 }
-                                String clipId = ascription.getString("clipId");
+                                clipId = ascription.getString("clipId");
                                 if (null != clipId && !clipId.trim().equals("")) {
                                     etlInfo.setClipId(clipId);
                                 }
@@ -155,8 +157,8 @@ public class KuaishouVideoEtlInfoServiceImpl extends ServiceImpl<KuaishouVideoEt
                                     etlInfo.setShotName(shotName);
                                 }
                             }
-                            if (null != planId) {
-                                String companyName = kuaishouVideoEtlInfoMapper.getCompanyNameByUserId(planId);
+                            if (null != clipId) {
+                                String companyName = kuaishouVideoEtlInfoMapper.getCompanyNameByUserId(clipId);
                                 if (null != companyName && !companyName.trim().equals("")) {
                                     etlInfo.setCompanyName(companyName);
                                 }
@@ -212,156 +214,6 @@ public class KuaishouVideoEtlInfoServiceImpl extends ServiceImpl<KuaishouVideoEt
         }
     }
 
-    @Autowired
-    private IKuaishouProjectVideoEtlInfoService kuaishouProjectVideoEtlInfoService;
-
-    @Override
-    public void etlKuaishouVideoInfoGroupByProjectId(Date getDate) {
-        String date = DateUtils.formatDate(getDate);
-        //1:查询单当日视频信息--以项目汇总
-        List<KuaiShouReportDailyMaterial> materials = dailyMaterialService.getSignatureByDateGroupByProjectId(date);
-        if (null != materials && !materials.isEmpty()) {
-            CountDownLatch countDownLatch = new CountDownLatch(materials.size());
-            materials.forEach(material -> {
-                executorService.submit(() -> {
-                    try {
-                        if (null == material.getSignature() || material.getSignature().trim().equals("")) {
-                            return;
-                        }
-                        if (null == material.getProjectId() || material.getProjectId() == 0) {
-                            return;
-                        }
-
-                        String signature = material.getSignature();
-                        Long projectId = material.getProjectId();
-                        KuaishouProjectVideoEtlInfo etlInfo = kuaishouProjectVideoEtlInfoService.getByProjectVideoEtlInfoByParams(signature, projectId);
-                        KuaiShouReportDailyMaterial nowData = dailyMaterialService.getEtlDataByParams(signature, date, projectId);
-                        String minDate = nowData.getStatDate();
-                        Integer days = DateUtils.getdaysOfTwoDate(minDate, date);
-                        if (null == etlInfo) {
-                            //第一次查询的数据
-                            etlInfo = new KuaishouProjectVideoEtlInfo(nowData, projectId);
-                            JSONObject ascription = materialAscriptionService.getDetailByCode(signature);
-                            String planId = null;
-                            if (null != ascription) {
-                                planId = ascription.getString("planId");
-                                if (null != planId && !planId.trim().equals("")) {
-                                    etlInfo.setPlanId(planId);
-                                }
-                                String planName = ascription.getString("planName");
-                                if (null != planName && !planName.trim().equals("")) {
-                                    etlInfo.setPlanName(planName);
-                                }
-                                String clipId = ascription.getString("clipId");
-                                if (null != clipId && !clipId.trim().equals("")) {
-                                    etlInfo.setClipId(clipId);
-                                }
-                                String clipName = ascription.getString("clipName");
-                                if (null != clipName && !clipName.trim().equals("")) {
-                                    etlInfo.setClipName(clipName);
-                                }
-                                String shotId = ascription.getString("shotId");
-                                if (null != shotId && !shotId.trim().equals("")) {
-                                    etlInfo.setShotId(shotId);
-                                }
-                                String shotName = ascription.getString("shotName");
-                                if (null != shotName && !shotName.trim().equals("")) {
-                                    etlInfo.setShotName(shotName);
-                                }
-                            }
-                            if (null != planId) {
-                                String companyName = kuaishouVideoEtlInfoMapper.getCompanyNameByUserId(planId);
-                                if (null != companyName && !companyName.trim().equals("")) {
-                                    etlInfo.setCompanyName(companyName);
-                                }
-                            }
-                            //计算投放总天数
-                            if (days <= 7) {
-                                etlInfo.setSingleWeekCost(nowData.getCharge());
-                            }
-                            if (days <= 14) {
-                                etlInfo.setTwoWeekCost(nowData.getCharge());
-                            }
-                            if (days <= 28) {
-                                etlInfo.setFourWeekCost(nowData.getCharge());
-                            }
-                            etlInfo.setCreateTime(new Date());
-                            etlInfo.setUpdateTime(new Date());
-                            kuaishouProjectVideoEtlInfoService.save(etlInfo);
-                        } else {
-                            JSONObject ascription = materialAscriptionService.getDetailByCode(signature);
-                            String planId = null;
-                            if (null != ascription) {
-                                planId = ascription.getString("planId");
-                                if (null != planId && !planId.trim().equals("")) {
-                                    etlInfo.setPlanId(planId);
-                                }
-                                String planName = ascription.getString("planName");
-                                if (null != planName && !planName.trim().equals("")) {
-                                    etlInfo.setPlanName(planName);
-                                }
-                                String clipId = ascription.getString("clipId");
-                                if (null != clipId && !clipId.trim().equals("")) {
-                                    etlInfo.setClipId(clipId);
-                                }
-                                String clipName = ascription.getString("clipName");
-                                if (null != clipName && !clipName.trim().equals("")) {
-                                    etlInfo.setClipName(clipName);
-                                }
-                                String shotId = ascription.getString("shotId");
-                                if (null != shotId && !shotId.trim().equals("")) {
-                                    etlInfo.setShotId(shotId);
-                                }
-                                String shotName = ascription.getString("shotName");
-                                if (null != shotName && !shotName.trim().equals("")) {
-                                    etlInfo.setShotName(shotName);
-                                }
-                            }
-                            if (null != planId) {
-                                String companyName = kuaishouVideoEtlInfoMapper.getCompanyNameByUserId(planId);
-                                if (null != companyName && !companyName.trim().equals("")) {
-                                    etlInfo.setCompanyName(companyName);
-                                }
-                            }
-                            //只需要更新汇总数据
-                            etlInfo.setTotalCost(nowData.getCharge());
-                            etlInfo.setAclick(nowData.getAclick());
-                            etlInfo.setBclick(nowData.getBclick());
-                            etlInfo.setPhotoClick(nowData.getPhotoClick());
-                            etlInfo.setPhotoShow(nowData.getPhotoShow());
-                            etlInfo.setUpdateTime(new Date());
-                            //计算投放总天数
-                            if (days <= 7) {
-                                etlInfo.setSingleWeekCost(nowData.getCharge());
-                            }
-                            if (days <= 14) {
-                                etlInfo.setTwoWeekCost(nowData.getCharge());
-                            }
-                            if (days <= 28) {
-                                etlInfo.setFourWeekCost(nowData.getCharge());
-                            }
-                            kuaishouProjectVideoEtlInfoService.updateById(etlInfo);
-                        }
-                    } catch (Exception e) {
-
-                    } finally {
-                        countDownLatch.countDown();
-                    }
-                });
-            });
-
-            try {
-                countDownLatch.await();
-            } catch (InterruptedException e) {
-                e.printStackTrace();
-            }
-            log.info("{}数据获取完成", date);
-        }
-    }
-
-    @Autowired
-    private IMaterialAscriptionService materialAscriptionService;
-
     @Override
     public KuaishouVideoEtlInfo getBySignature(String signature) {
         QueryWrapper<KuaishouVideoEtlInfo> queryWrapper = new QueryWrapper<>();