|
@@ -2,6 +2,7 @@ package cn.com.ctop.job.bytedance.data.service.impl;
|
|
|
|
|
|
|
|
import cn.com.ctop.job.bytedance.data.entity.BytedanceErrorLog;
|
|
import cn.com.ctop.job.bytedance.data.entity.BytedanceErrorLog;
|
|
|
import cn.com.ctop.job.bytedance.data.mapper.BytedancePromoterReportMapper;
|
|
import cn.com.ctop.job.bytedance.data.mapper.BytedancePromoterReportMapper;
|
|
|
|
|
+import cn.com.ctop.job.bytedance.data.mapper.BytedanceRefreshTokenMapper;
|
|
|
import cn.com.ctop.job.bytedance.data.service.IBytedanceMaterialReportService;
|
|
import cn.com.ctop.job.bytedance.data.service.IBytedanceMaterialReportService;
|
|
|
import cn.com.ctop.job.bytedance.data.utils.AlertUtils;
|
|
import cn.com.ctop.job.bytedance.data.utils.AlertUtils;
|
|
|
import cn.com.ctop.job.bytedance.data.utils.Check;
|
|
import cn.com.ctop.job.bytedance.data.utils.Check;
|
|
@@ -29,11 +30,14 @@ public class BytedanceMaterialReportServiceImpl implements IBytedanceMaterialRep
|
|
|
@Autowired
|
|
@Autowired
|
|
|
private DorisMultiTableStreamLoadManager dorisLoadManager;
|
|
private DorisMultiTableStreamLoadManager dorisLoadManager;
|
|
|
@Autowired
|
|
@Autowired
|
|
|
|
|
+ private BytedanceRefreshTokenMapper tokenMapper;
|
|
|
|
|
+ @Autowired
|
|
|
private RedisTemplate redisTemplate_db2;
|
|
private RedisTemplate redisTemplate_db2;
|
|
|
|
|
|
|
|
@Override
|
|
@Override
|
|
|
public void getBytedanceMaterialDailyReport(Long advertiserId, String accessToken, String startDate, String endDate, Integer page, Long errorId, Integer isLog, Integer isSend, int retry) {
|
|
public void getBytedanceMaterialDailyReport(Long advertiserId, String accessToken, String startDate, String endDate, Integer page, Long errorId, Integer isLog, Integer isSend, int retry) {
|
|
|
try {
|
|
try {
|
|
|
|
|
+ accessToken = tokenMapper.onlyGetToken(advertiserId);
|
|
|
String url = "https://api.oceanengine.com/open_api/v3.0/report/custom/get/";
|
|
String url = "https://api.oceanengine.com/open_api/v3.0/report/custom/get/";
|
|
|
Map<String, Object> paramsMap = new HashMap<>();
|
|
Map<String, Object> paramsMap = new HashMap<>();
|
|
|
paramsMap.put("advertiser_id", advertiserId);
|
|
paramsMap.put("advertiser_id", advertiserId);
|
|
@@ -138,6 +142,7 @@ public class BytedanceMaterialReportServiceImpl implements IBytedanceMaterialRep
|
|
|
|
|
|
|
|
public void getBytedanceMaterialVideo(Long advertiserId, Set<Long> materialIds, String accessToken, String startTime, String endTime, Integer page, Long errorId, Integer isLog, Integer isSend, int retry) {
|
|
public void getBytedanceMaterialVideo(Long advertiserId, Set<Long> materialIds, String accessToken, String startTime, String endTime, Integer page, Long errorId, Integer isLog, Integer isSend, int retry) {
|
|
|
try {
|
|
try {
|
|
|
|
|
+ accessToken = tokenMapper.onlyGetToken(advertiserId);
|
|
|
String url = "https://api.oceanengine.com/open_api/2/file/video/get/";
|
|
String url = "https://api.oceanengine.com/open_api/2/file/video/get/";
|
|
|
Map<String, Object> paramsMap = new HashMap<>();
|
|
Map<String, Object> paramsMap = new HashMap<>();
|
|
|
paramsMap.put("advertiser_id", advertiserId);
|
|
paramsMap.put("advertiser_id", advertiserId);
|