Ver Fonte

feat(bytedance): 新增全域投放项目与投放项目素材列表功能

- 新增getUniProjectList方法,支持按筛选条件分页获取全域投放项目列表
- 新增getOcProjectMaterial及重载方法,支持多类型素材分页获取投放项目素材
- 完善素材数据处理,解析playlet系列URL及base64解码获取media_id
- Controller新增接口支持全域项目列表和投放项目素材查询
- 代码格式及空格调整,增强代码可读性
- BytedanceReportRetryJob中改进重试任务提交逻辑,支持全域项目及素材重试
- 优化错误日志插入方法,支持按数据类型区分日志
- 修复部分空格格式、异常捕获及日志打印规范问题
hpk há 3 meses atrás
pai
commit
d7c9b54077

+ 19 - 7
job-bytedance/src/main/java/cn/com/ctop/job/bytedance/controller/BytedanceController.java

@@ -398,14 +398,26 @@ public class BytedanceController {
     }
 
 
-    @GetMapping("/uniProjectReport")
-    public void uniProjectReportDaily(String reportType, // uni_project_daily  uni_project_hour
-                                      @RequestParam(required = false) Long advertiserId,
-                                      String startDate,
-                                      String endDate) {
+    @GetMapping("/customReport")
+    public void customReport(String reportType, // uni_project_daily uni_project_hour  uni_project_hour
+                             Long advertiserId,
+                             String startDate,
+                             String endDate) {
         String accessToken = accountReportService.getTokenByAdvertiserId(advertiserId);
-        // 全域项目日报
-        customReportService.getCustomReport(reportType, advertiserId, accessToken, startDate, endDate, 0, null);
+        customReportService.getCustomReport(reportType, advertiserId, accessToken, startDate, endDate, 1, null);
     }
 
+    @GetMapping("/uniProjectList")
+    public void uniProjectList(Long advertiserId) {
+        cdpProjectService.getUniProjectList(advertiserId, null, null, null, null, null, 1);
+    }
+
+    @GetMapping("/uniOcProjectMaterial")
+    public void uniOcProjectMaterial(Long advertiserId, Long projectId,
+                                     @RequestParam(required = false) String materialType) {
+        materialType = Check.isNull(materialType) ? "OTHER" : materialType;
+        cdpProjectService.getOcProjectMaterial(materialType, advertiserId, projectId, null, 1);
+    }
+
+
 }

+ 4 - 0
job-bytedance/src/main/java/cn/com/ctop/job/bytedance/data/service/IBytedanceCdpProjectService.java

@@ -17,6 +17,10 @@ public interface IBytedanceCdpProjectService {
 
     void getProjectList(Long advertiserId, JSONArray ids,String type, String date, Long errorId, Integer isLog);
 
+    void getUniProjectList(Long advertiserId, JSONArray ids, String name, String statusFirst, String statusSecond, Long errorId, Integer isLog);
+
+    void getOcProjectMaterial(Long advertiserId, Long projectId, Long errorId, Integer isLog);
+    void getOcProjectMaterial(String materialType, Long advertiserId, Long projectId, Long errorId, Integer isLog);
     List<Long> queryAllAdverIdList(String type);
 
     List<Long> queryErrApps(String type);

+ 230 - 9
job-bytedance/src/main/java/cn/com/ctop/job/bytedance/data/service/impl/BytedanceCdpProjectServiceImpl.java

@@ -15,6 +15,7 @@ import lombok.extern.slf4j.Slf4j;
 import org.apache.commons.lang3.StringUtils;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
+
 import java.time.Instant;
 import java.util.*;
 
@@ -150,7 +151,7 @@ public class BytedanceCdpProjectServiceImpl implements IBytedanceCdpProjectServi
                     for (int i = 0; i < array.size(); i++) {
                         JSONObject jsonObject = array.getJSONObject(i);
                         Long projectId = jsonObject.getLong("project_id");
-                        if (projectId == null){
+                        if (projectId == null) {
                             insertErrorLog(isLog, advertiserId, "-", "-", "promotion_list", "bytedance_promotion_list字段缺失 " + results);
                             log.info("bytedance_promotion_list 检测到字段缺失,跳过入库:{}", jsonObject);
                             continue;
@@ -203,7 +204,7 @@ public class BytedanceCdpProjectServiceImpl implements IBytedanceCdpProjectServi
                 entity.put("app_id", miniProgramInfo.getString("app_id"));
                 entity.put("url", miniProgramInfo.getString("url"));
             }
-            if(!Check.isNull(playletSeriesUrlList)){
+            if (!Check.isNull(playletSeriesUrlList)) {
                 try {
                     JSONArray playletUrlArr = JSONObject.parseArray(playletSeriesUrlList);
                     String playletUrl = playletUrlArr.getString(0);
@@ -230,7 +231,7 @@ public class BytedanceCdpProjectServiceImpl implements IBytedanceCdpProjectServi
                             }
                         }
                     }
-                }catch (Exception e){
+                } catch (Exception e) {
                     log.error("广告({})playlet_series_url_list字段解析失败", entity.getString("promotion_id"));
                 }
             }
@@ -242,7 +243,6 @@ public class BytedanceCdpProjectServiceImpl implements IBytedanceCdpProjectServi
     }
 
 
-
     @Override
     public void getProjectList(Long advertiserId, JSONArray ids, String type, String date, Long errorId, Integer isLog) {
         this.getProjectListVo(advertiserId, ids, type, date, 1, 1, errorId, isLog);
@@ -329,6 +329,92 @@ public class BytedanceCdpProjectServiceImpl implements IBytedanceCdpProjectServi
     }
 
     @Override
+    public void getUniProjectList(Long advertiserId, JSONArray ids, String name, String statusFirst, String statusSecond, Long errorId, Integer isLog) {
+        this.getUniProjectListVo(advertiserId, ids, name, statusFirst, statusSecond, 1, 1, errorId, isLog);
+    }
+
+    private void getUniProjectListVo(Long advertiserId, JSONArray ids, String name, String statusFirst, String statusSecond, Integer page, int count, Long errorId, Integer isLog) {
+        try {
+            boolean nextPage = false;
+            JSONObject authConfig = tokenMapper.getAuthConfig(advertiserId);
+            if (Check.isNull(authConfig)) {
+                log.error("账户({})查询token失败", advertiserId);
+                return;
+            }
+            String accessToken = authConfig.getString("access_token");
+            String devAppId = authConfig.getString("app_id");
+            Map<String, Object> params = new HashMap<>();
+            params.put("advertiser_id", advertiserId);
+            JSONObject filtering = new JSONObject();
+            if (!Check.isNull(ids)) {
+                filtering.put("project_id", ids);
+            }
+            if (StringUtils.isNotBlank(name)) {
+                filtering.put("name", name);
+            }
+            if (StringUtils.isNotBlank(statusFirst)) {
+                filtering.put("status_first", statusFirst);
+            }
+            if (StringUtils.isNotBlank(statusSecond)) {
+                filtering.put("status_second", statusSecond);
+            }
+            params.put("filtering", filtering);
+            params.put("page", page);
+            params.put("page_size", 100);//最大100
+            String url = "https://api.oceanengine.com/open_api/v3.0/uni_project_list/get/";
+            String results = null;
+            if (rateLimitUtil.acquire(devAppId, url)) {
+                results = HttpUtils.httpGet(url, params, HttpUtils.postMHeaders(accessToken));
+            }
+            JSONObject obj = JSONObject.parseObject(results);
+            if (!Check.isNull(obj)) {
+                Integer code = obj.getInteger("code");
+                if (code == 0) {
+                    JSONObject data = obj.getJSONObject("data");
+                    Integer totalPage = data.getJSONObject("page_info").getInteger("total_page");
+                    if (totalPage != 0 && totalPage > data.getJSONObject("page_info").getInteger("page")) {
+                        nextPage = true;
+                    }
+                    JSONArray array = data.getJSONArray("list");
+                    for (int i = 0; i < array.size(); i++) {
+                        JSONObject jsonObject = array.getJSONObject(i);
+                        Long projectId = jsonObject.getLong("project_id");
+                        if (projectId == null) {
+                            insertErrorLog(isLog, advertiserId, "-", "-", "uni_project_list", "bytedance_uni_project_list字段缺失 " + results);
+                            log.info("bytedance_uni_project_list 检测到字段缺失,跳过入库:{}", jsonObject);
+                            continue;
+                        }
+                        jsonObject.put("advertiser_id", advertiserId);
+                        dorisLoadManager.add("media_api", "bytedance_uni_project_list", jsonObject);
+                    }
+                    log.info("---账户({})全域投放项目列表第{}页更新成功", advertiserId, page);
+                } else {
+                    if (count <= 5 && code != 40110) {
+                        Thread.sleep(800);
+                        getUniProjectListVo(advertiserId, ids, name, statusFirst, statusSecond, page, count + 1, errorId, isLog);
+                    } else {
+                        insertErrorLog(isLog, advertiserId, "-", "-", "uni_project_list", results);
+                        log.error("获取全域投放项目列表失败(url:{}),入参:{}\n结果:{}", url, JSONObject.toJSONString(params), obj);
+                    }
+                    return;
+                }
+            } else {
+                insertErrorLog(isLog, advertiserId, "-", "-", "uni_project_list", results);
+                log.error("获取全域投放项目列表失败(url:{}),入参:{}\n结果:{}", url, JSONObject.toJSONString(params), obj);
+                return;
+            }
+            if (nextPage) {
+                getUniProjectListVo(advertiserId, ids, name, statusFirst, statusSecond, page + 1, 1, errorId, isLog);
+            } else if (errorId != null) {
+                promoterReportMapper.deleteInfoByErrorId(errorId);
+            }
+        } catch (Exception e) {
+            e.printStackTrace();
+            log.error(e.getMessage());
+        }
+    }
+
+    @Override
     public void getByteAppInfo(Long advertiserId) {
         this.getByteAppInfoVo(advertiserId, "CREATE_ONLY", 1, 1);
         this.getByteAppInfoVo(advertiserId, "SHARE_ONLY", 1, 1);
@@ -357,7 +443,7 @@ public class BytedanceCdpProjectServiceImpl implements IBytedanceCdpProjectServi
             //获取微信小程序列表
             String url = "https://api.oceanengine.com/open_api/v3.0/tools/micro_app/list/";
             JSONObject obj = null;
-            if(rateLimitUtil.acquire(devAppId, url)) {
+            if (rateLimitUtil.acquire(devAppId, url)) {
                 obj = Okhttp3Utils.bytedanceGetRequest(accessToken, url, params);
             }
             if (!Check.isNull(obj)) {
@@ -382,7 +468,7 @@ public class BytedanceCdpProjectServiceImpl implements IBytedanceCdpProjectServi
                         bytedanceCdpProjectMapper.insertErrorAdvertiserId(advertiserId, "tt");
                     }
                 }
-            }else {
+            } else {
                 log.error("账户({})获取抖小列表失败,入参:{}\n结果:{}", advertiserId, JSONObject.toJSONString(params), obj);
                 bytedanceCdpProjectMapper.insertErrorAdvertiserId(advertiserId, "tt");
                 return;
@@ -425,7 +511,7 @@ public class BytedanceCdpProjectServiceImpl implements IBytedanceCdpProjectServi
             //获取微信小程序列表
             String url = "https://api.oceanengine.com/open_api/v3.0/tools/asset_link/list/";
             JSONObject obj = null;
-            if(rateLimitUtil.acquire(devAppId, url)) {
+            if (rateLimitUtil.acquire(devAppId, url)) {
                 obj = Okhttp3Utils.bytedanceGetRequest(accessToken, url, params);
             }
             if (!Check.isNull(obj)) {
@@ -499,7 +585,7 @@ public class BytedanceCdpProjectServiceImpl implements IBytedanceCdpProjectServi
             //获取微信小程序列表
             String url = "https://api.oceanengine.com/open_api/v3.0/tools/wechat_applet/list/";
             JSONObject obj = null;
-            if(rateLimitUtil.acquire(devAppId, url)) {
+            if (rateLimitUtil.acquire(devAppId, url)) {
                 obj = Okhttp3Utils.bytedanceGetRequest(accessToken, url, params);
             }
             if (!Check.isNull(obj)) {
@@ -884,7 +970,142 @@ public class BytedanceCdpProjectServiceImpl implements IBytedanceCdpProjectServi
         }
     }
 
+    @Override
+    public void getOcProjectMaterial(Long advertiserId, Long projectId, Long errorId, Integer isLog) {
+        String[] materialTypes = {"VIDEO", "TITLE", "IMAGE", "CAROUSEL", "TRIAL_PLAY_MATERIAL", "INSTANT_PLAY_MATERIAL", "MINI_PROGRAM_INFO", "OTHER"};
+        for (String materialType : materialTypes) {
+            this.getOcProjectMaterialVo(advertiserId, projectId, materialType, 1, 1, errorId, isLog);
+        }
+    }
+
+    @Override
+    public void getOcProjectMaterial(String materialType, Long advertiserId, Long projectId, Long errorId, Integer isLog) {
+        this.getOcProjectMaterialVo(advertiserId, projectId, materialType, 1, 1, errorId, isLog);
+    }
+
+    private void getOcProjectMaterialVo(Long advertiserId, Long projectId, String materialType, Integer page, int count, Long errorId, Integer isLog) {
+        try {
+            boolean hasNextPage = false;
+            JSONObject authConfig = tokenMapper.getAuthConfig(advertiserId);
+            if (Check.isNull(authConfig)) {
+                log.error("账户({})查询token失败", advertiserId);
+                return;
+            }
+            String accessToken = authConfig.getString("access_token");
+            String devAppId = authConfig.getString("app_id");
+            Map<String, Object> params = new HashMap<>();
+            params.put("advertiser_id", advertiserId);
+            params.put("project_id", projectId);
+            JSONObject filtering = new JSONObject();
+            filtering.put("material_type", materialType);
+            params.put("filtering", filtering);
+            // page/page_size 仅 VIDEO/IMAGE/CAROUSEL/TRIAL_PLAY_MATERIAL 时支持传入
+            if ("VIDEO".equals(materialType) || "IMAGE".equals(materialType) || "CAROUSEL".equals(materialType) || "TRIAL_PLAY_MATERIAL".equals(materialType)) {
+                params.put("page", page);
+                if ("VIDEO".equals(materialType)) {
+                    params.put("page_size", 100);
+                }
+            }
+            String url = "https://api.oceanengine.com/open_api/v3.0/oc_project/material/get/";
+            String results = null;
+            if (rateLimitUtil.acquire(devAppId, url)) {
+                results = HttpUtils.httpGet(url, params, HttpUtils.postMHeaders(accessToken));
+            }
+            JSONObject obj = JSONObject.parseObject(results);
+            if (!Check.isNull(obj)) {
+                Integer code = obj.getInteger("code");
+                if (code == 0) {
+                    JSONObject data = obj.getJSONObject("data");
+                    if (!Check.isNull(data)) {
+                        JSONObject pageInfo = data.getJSONObject("page_info");
+                        if (!Check.isNull(pageInfo)) {
+                            Integer totalPage = pageInfo.getInteger("total_page");
+                            if (totalPage != null && totalPage != 0 && totalPage > pageInfo.getInteger("page")) {
+                                hasNextPage = true;
+                            }
+                        }
+                        processMaterialResponse(data, advertiserId, projectId, materialType);
+                        log.info("---账户({})项目({})素材类型({})第{}页获取成功", advertiserId, projectId, materialType, page);
+                    }
+                } else {
+                    if (count <= 5 && code != 40110) {
+                        Thread.sleep(800);
+                        getOcProjectMaterialVo(advertiserId, projectId, materialType, page, count + 1, errorId, isLog);
+                    } else {
+                        insertErrorLog(isLog, advertiserId, "-", "-", "uni_project_material",
+                                new JSONObject()
+                                        .fluentPut("material_type", materialType)
+                                        .fluentPut("results", results)
+                                        .fluentPut("project_id", projectId).toJSONString());
+                        log.error("获取投放项目下素材失败(url:{}),入参:{}\n结果:{}", url, JSONObject.toJSONString(params), obj);
+                    }
+                    return;
+                }
+            } else {
+                insertErrorLog(isLog, advertiserId, "-", "-", "uni_project_material", new JSONObject()
+                        .fluentPut("material_type", materialType)
+                        .fluentPut("results", results)
+                        .fluentPut("project_id", projectId).toJSONString());
+                log.error("获取投放项目下素材失败(url:{}),入参:{}\n结果:{}", url, JSONObject.toJSONString(params), obj);
+                return;
+            }
+            if (hasNextPage) {
+                getOcProjectMaterialVo(advertiserId, projectId, materialType, page + 1, 1, errorId, isLog);
+            } else if (errorId != null) {
+                promoterReportMapper.deleteInfoByErrorId(errorId);
+            }
+        } catch (Exception e) {
+            e.printStackTrace();
+            log.error(e.getMessage());
+        }
+    }
+
+    private void processMaterialResponse(JSONObject data, Long advertiserId, Long projectId, String materialType) {
+        data.put("advertiser_id", advertiserId);
+        data.put("project_id", projectId);
+        if (materialType.equals("OTHER")) {
+            JSONArray playletSeriesUrlInfo = data.getJSONArray("playlet_series_url_info");
+            if (!Check.isNull(playletSeriesUrlInfo)) {
+                for (int i = 0; i < playletSeriesUrlInfo.size(); i++) {
+                    JSONObject item = playletSeriesUrlInfo.getJSONObject(i);
+                    // 获取 playlet_series_url_type
+                    String playletSeriesUrlType = item.getString("playlet_series_url_type");
+                    if (StringUtils.isNotBlank(playletSeriesUrlType)) {
+                        // 解析 advertise_param 并 base64 解码,获取 media_id
+                        String playletSeriesUrl = item.getString("playlet_series_url");
+                        if (StringUtils.isNotBlank(playletSeriesUrl)) {
+                            String playletId = HttpUtils.extractQueryParam(playletSeriesUrl, "playlet_id");
+                            data.put(playletSeriesUrlType.toLowerCase() + "_playlet_id", playletId);
+                            String advertiseParam = HttpUtils.extractQueryParam(playletSeriesUrl, "advertise_param");
+                            if (StringUtils.isNotBlank(advertiseParam)) {
+                                try {
+                                    String decodedParam = new String(Base64.getDecoder().decode(advertiseParam), "UTF-8");
+                                    JSONObject advertiseObj = JSONObject.parseObject(decodedParam);
+                                    if (!Check.isNull(advertiseObj)) {
+                                        Long mediaId = advertiseObj.getLong("media_id");
+                                        if (mediaId != null) {
+                                            data.put(playletSeriesUrlType.toLowerCase() + "_account_mid", mediaId);
+                                        }
+                                    }
+                                } catch (Exception e) {
+                                    log.error("账户({})项目({})advertise_param base64解码失败: {}", advertiserId, projectId, advertiseParam);
+                                }
+                            }
+                        }
+                    }
+
+                }
+            }
+            dorisLoadManager.add("media_api", "bytedance_oc_project_material_other", data);
+        }
+    }
+
+
     private void insertErrorLog(Integer isLog, Long advertiserId, String startDate, String endDate, String dataDimension, String msg) {
+        insertErrorLog(isLog, advertiserId, startDate, endDate, dataDimension, msg, "daily");
+    }
+
+    private void insertErrorLog(Integer isLog, Long advertiserId, String startDate, String endDate, String dataDimension, String msg, String dataType) {
         if (isLog != null && 1 == isLog) {
             BytedanceErrorLog errorInfo = new BytedanceErrorLog();
             errorInfo.setAdvertiserId(advertiserId);
@@ -892,7 +1113,7 @@ public class BytedanceCdpProjectServiceImpl implements IBytedanceCdpProjectServi
             errorInfo.setEndDate(endDate);
             errorInfo.setMsg(msg);
             errorInfo.setDataDimension(dataDimension);
-            errorInfo.setDataType("daily");
+            errorInfo.setDataType(dataType);
             promoterReportMapper.replaceErrorInfo(errorInfo);
         }
     }

+ 32 - 34
job-bytedance/src/main/java/cn/com/ctop/job/bytedance/handler/BytedanceReportRetryJob.java

@@ -84,8 +84,7 @@ public class BytedanceReportRetryJob {
     public void retryReport() throws Exception {
         List<JSONObject> accountList = promoterReportService.getAccountList();
         if (!Check.isNull(accountList)) {
-            for (int i = 0; i < accountList.size(); i++) {
-                JSONObject jsonObject = accountList.get(i);
+            for (JSONObject jsonObject : accountList) {
                 Long id = jsonObject.getLong("id");
                 Long advertiserId = jsonObject.getLong("advertiserId");
                 String startDate = jsonObject.getString("startDate");
@@ -96,13 +95,31 @@ public class BytedanceReportRetryJob {
                 Integer isSend = jsonObject.getInteger("isSend");
                 String msg = jsonObject.getString("msg");
                 promoterReportMapper.updateStatusByErrorId(id);
+                if (Check.isNull(accessToken)) {
+                    continue;
+                }
                 if ("custom".equals(dataDimension)) {
                     dailyPromoterRetrExecutorService.submit(new Runnable() {
                         @Override
                         public void run() {
-                            if (!Check.isNull(accessToken)) {
-                                customReportService.getCustomReport(dataType, advertiserId, accessToken, startDate, endDate, 0, id);
-                            }
+                            customReportService.getCustomReport(dataType, advertiserId, accessToken, startDate, endDate, 0, id);
+                        }
+                    });
+                } else if ("uni_project_list".equals(dataDimension)) {
+                    dailyPromoterRetrExecutorService.submit(new Runnable() {
+                        @Override
+                        public void run() {
+                            cdpProjectService.getUniProjectList(advertiserId, null, null, null, null, id, 0);
+                        }
+                    });
+                } else if ("uni_project_material".equals(dataDimension)) {
+                    JSONObject msgObject = JSONObject.parseObject(msg);
+                    String materialType = msgObject.getString("material_type");
+                    Long projectId = msgObject.getLong("project_id");
+                    dailyPromoterRetrExecutorService.submit(new Runnable() {
+                        @Override
+                        public void run() {
+                            cdpProjectService.getOcProjectMaterial(materialType, advertiserId, projectId, id, 0);
                         }
                     });
                 } else if ("promoter".equals(dataDimension)) {
@@ -110,9 +127,7 @@ public class BytedanceReportRetryJob {
                         hourPromoterRetrExecutorService.submit(new Runnable() {
                             @Override
                             public void run() {
-                                if (!Check.isNull(accessToken)) {
-                                    promoterReportService.getBytedanceRetryPromoterHourReport(id, advertiserId, accessToken, startDate, endDate, 1, isSend);
-                                }
+                                promoterReportService.getBytedanceRetryPromoterHourReport(id, advertiserId, accessToken, startDate, endDate, 1, isSend);
                             }
                         });
                     }
@@ -120,10 +135,7 @@ public class BytedanceReportRetryJob {
                         dailyPromoterRetrExecutorService.submit(new Runnable() {
                             @Override
                             public void run() {
-                                if (!Check.isNull(accessToken)) {
-                                    promoterReportService.getBytedancePromoterRetryDailyReport(id, advertiserId, accessToken, startDate, endDate, 1, isSend);
-
-                                }
+                                promoterReportService.getBytedancePromoterRetryDailyReport(id, advertiserId, accessToken, startDate, endDate, 1, isSend);
                             }
                         });
                     }
@@ -131,9 +143,7 @@ public class BytedanceReportRetryJob {
                     productDailyRetrExecutor.submit(new Runnable() {
                         @Override
                         public void run() {
-                            if (!Check.isNull(accessToken)) {
-                                productReportService.getBytedanceProductDailyReport(advertiserId, accessToken, startDate, endDate, 1, id, null, isSend);
-                            }
+                            productReportService.getBytedanceProductDailyReport(advertiserId, accessToken, startDate, endDate, 1, id, null, isSend);
                         }
                     });
                 } else if ("account".equals(dataDimension)) {
@@ -141,9 +151,7 @@ public class BytedanceReportRetryJob {
                         hourAccountRetrExecutorService.submit(new Runnable() {
                             @Override
                             public void run() {
-                                if (!Check.isNull(accessToken)) {
-                                    accountReportService.getBytedanceRetryAccountHourReport(id, advertiserId, accessToken, startDate, endDate, 1, isSend);
-                                }
+                                accountReportService.getBytedanceRetryAccountHourReport(id, advertiserId, accessToken, startDate, endDate, 1, isSend);
                             }
                         });
                     }
@@ -152,9 +160,7 @@ public class BytedanceReportRetryJob {
                         dailyAccountRetrExecutorService.submit(new Runnable() {
                             @Override
                             public void run() {
-                                if (!Check.isNull(accessToken)) {
-                                    accountReportService.getBytedanceRetryAccountDailyReport(id, advertiserId, accessToken, startDate, endDate, 1, isSend);
-                                }
+                                accountReportService.getBytedanceRetryAccountDailyReport(id, advertiserId, accessToken, startDate, endDate, 1, isSend);
                             }
                         });
                     }
@@ -170,9 +176,7 @@ public class BytedanceReportRetryJob {
                     materialRetrExecutor.submit(new Runnable() {
                         @Override
                         public void run() {
-                            if (!Check.isNull(accessToken)) {
-                                bytedanceMaterialReportService.getBytedanceMaterialDailyReport(advertiserId, startDate, endDate, 1, id, null, isSend, 1);
-                            }
+                            bytedanceMaterialReportService.getBytedanceMaterialDailyReport(advertiserId, startDate, endDate, 1, id, null, isSend, 1);
                         }
                     });
                 } else if ("material_video_get".equals(dataDimension)) {
@@ -184,28 +188,22 @@ public class BytedanceReportRetryJob {
                     materialRetrExecutor.submit(new Runnable() {
                         @Override
                         public void run() {
-                            if (!Check.isNull(accessToken)) {
-                                bytedanceMaterialReportService.getBytedanceMaterialVideo(advertiserId, materialIds, startDate, endDate, 1, id, null, isSend, 1);
-                            }
+                            bytedanceMaterialReportService.getBytedanceMaterialVideo(advertiserId, materialIds, startDate, endDate, 1, id, null, isSend, 1);
                         }
                     });
                 } else if ("promotion_list".equals(dataDimension)) {
                     productDailyRetrExecutor.submit(new Runnable() {
                         @Override
                         public void run() {
-                            if (!Check.isNull(accessToken)) {
-                                cdpProjectService.getPromotionList(advertiserId, null, null, id, null);
-                            }
+                            cdpProjectService.getPromotionList(advertiserId, null, null, id, null);
                         }
                     });
                 } else if ("project_list".equals(dataDimension)) {
                     productDailyRetrExecutor.submit(new Runnable() {
                         @Override
                         public void run() {
-                            if (!Check.isNull(accessToken)) {
-                                cdpProjectService.getProjectList(advertiserId, null, null, null, id, null);
-                                cdpProjectService.getProjectList(advertiserId, null, "del", null, id, null);
-                            }
+                            cdpProjectService.getProjectList(advertiserId, null, null, null, id, null);
+                            cdpProjectService.getProjectList(advertiserId, null, "del", null, id, null);
                         }
                     });
                 }