|
@@ -37,7 +37,7 @@ public class ETLReportBytedanceVideoServiceImpl extends ServiceImpl<ETLReportByt
|
|
return baseReportBytedanceVideoDailyService.list(queryWrapper);
|
|
return baseReportBytedanceVideoDailyService.list(queryWrapper);
|
|
}
|
|
}
|
|
|
|
|
|
- @Override
|
|
|
|
|
|
+/* @Override
|
|
public void cleanETL(String statDate) {
|
|
public void cleanETL(String statDate) {
|
|
List<BaseReportBytedanceVideoDaily> source = listByStatDate(statDate);
|
|
List<BaseReportBytedanceVideoDaily> source = listByStatDate(statDate);
|
|
if(source.isEmpty()){
|
|
if(source.isEmpty()){
|
|
@@ -62,7 +62,8 @@ public class ETLReportBytedanceVideoServiceImpl extends ServiceImpl<ETLReportByt
|
|
if(null!=materialVideo&&!materialVideo.isEmpty()) {
|
|
if(null!=materialVideo&&!materialVideo.isEmpty()) {
|
|
temp.setUrl(materialVideo.getString("url"));
|
|
temp.setUrl(materialVideo.getString("url"));
|
|
temp.setCoverUrl(materialVideo.getString("coverUrl"));
|
|
temp.setCoverUrl(materialVideo.getString("coverUrl"));
|
|
- temp.setMaterialCreateTime(materialVideo.getDate("creteTime").toString());
|
|
|
|
|
|
+ temp.setMaterialName(materialVideo.getString("materialName"));
|
|
|
|
+ temp.setMaterialCreateTime(materialVideo.getDate("createTime").toString());
|
|
}
|
|
}
|
|
if(null!=accountDetail&&!accountDetail.isEmpty()){
|
|
if(null!=accountDetail&&!accountDetail.isEmpty()){
|
|
temp.setAccountName(accountDetail.getString("accountName"));
|
|
temp.setAccountName(accountDetail.getString("accountName"));
|
|
@@ -83,13 +84,22 @@ public class ETLReportBytedanceVideoServiceImpl extends ServiceImpl<ETLReportByt
|
|
}
|
|
}
|
|
batch.add(temp);
|
|
batch.add(temp);
|
|
}
|
|
}
|
|
|
|
+ this.saveBatch(batch);
|
|
});
|
|
});
|
|
- boolean result = this.saveBatch(batch);
|
|
|
|
- if(result){
|
|
|
|
- XxlJobHelper.log("头条数据报表清洗成功,数据条数:{}",batch.size());
|
|
|
|
- }else {
|
|
|
|
- XxlJobHelper.log("头条数据报表清洗入库失败请重试,数据条数:{}",batch.size());
|
|
|
|
|
|
+ }*/
|
|
|
|
+
|
|
|
|
+ @Override
|
|
|
|
+ public void cleanETL(String statDate) {
|
|
|
|
+ List<ETLReportBytedanceVideo> etlReportBytedanceVideos = etlReportBytedanceVideoMapper.queryETLData(statDate);
|
|
|
|
+ if(etlReportBytedanceVideos.isEmpty()){
|
|
|
|
+ log.warn("{},头条etl报表清洗异常,base数据源为空",statDate);
|
|
|
|
+ return;
|
|
}
|
|
}
|
|
|
|
+ boolean result = this.saveBatch(etlReportBytedanceVideos);
|
|
|
|
+ if(result)
|
|
|
|
+ log.info("{},头条etl报表清洗完成,数量:{}",statDate,etlReportBytedanceVideos.size());
|
|
|
|
+ else
|
|
|
|
+ log.error("{},头条etl报表清洗失败,请重试",statDate);
|
|
}
|
|
}
|
|
|
|
|
|
}
|
|
}
|