浏览代码

Merge branch 'V1.1.5'

# Conflicts:
#	module-toutiao/src/main/java/cn/com/ctop/toutiao/modules/report/service/impl/BytedanceReportServiceImpl.java
syh 4 年之前
父节点
当前提交
e17258025b

+ 7 - 1
module-job-bytedance/src/main/java/cn/com/ctop/job/bytedance/handler/BytedanceDailyMaterialReportJob.java

@@ -2,6 +2,7 @@ package cn.com.ctop.job.bytedance.handler;
 
 import cn.com.ctop.common.module.entity.CtopOauthToken;
 import cn.com.ctop.common.module.service.ICtopOauthTokenService;
+import cn.com.ctop.toutiao.modules.report.mapper.BytedanceReportMaterialDailyMapper;
 import cn.com.ctop.toutiao.modules.report.service.IByteDanceVideoReportDailyService;
 import cn.com.ctop.toutiao.modules.report.service.IBytedanceReportService;
 import com.xxl.job.core.context.XxlJobHelper;
@@ -10,6 +11,7 @@ import org.jeecg.common.util.DateUtils;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Component;
 
+import javax.annotation.Resource;
 import java.util.Date;
 import java.util.List;
 import java.util.concurrent.CountDownLatch;
@@ -24,7 +26,8 @@ public class BytedanceDailyMaterialReportJob {
     private ICtopOauthTokenService tokenService;
     @Autowired
     private IBytedanceReportService bytedanceReportService;
-
+    @Resource
+    private BytedanceReportMaterialDailyMapper bytedanceReportMaterialDailyMapper;
     @XxlJob("bytedanceDailyMaterialReportJob")
     public void execute() throws Exception {
         Date getDate2 = DateUtils.addDay(new Date(), -2);
@@ -67,6 +70,9 @@ public class BytedanceDailyMaterialReportJob {
         } catch (InterruptedException e) {
             e.printStackTrace();
         }
+        bytedanceReportMaterialDailyMapper.updateImageReportCode();
+        bytedanceReportMaterialDailyMapper.updateImageReportProjectId();
+        bytedanceReportMaterialDailyMapper.updateImageReportProjectName();
         Long end = System.currentTimeMillis();
         XxlJobHelper.log("头条素材数据获取耗时:{}毫秒", end - start);
 

+ 0 - 3
module-toutiao/src/main/java/cn/com/ctop/toutiao/modules/report/service/impl/BytedanceReportServiceImpl.java

@@ -516,9 +516,6 @@ public class BytedanceReportServiceImpl implements IBytedanceReportService {
             retry.setType(1);
             bytedanceReportMaterialDailyMapper.replaceMaterialRetry(retry);
         }
-        bytedanceReportMaterialDailyMapper.updateImageReportCode();
-        bytedanceReportMaterialDailyMapper.updateImageReportProjectId();
-        bytedanceReportMaterialDailyMapper.updateImageReportProjectName();
         log.info("头条素材报表结束 当前accountId为:{}  {}~{}" , accountId, startDate,endDate);
         return code;
     }