|
@@ -17,10 +17,7 @@ import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.stereotype.Service;
|
|
import org.springframework.stereotype.Service;
|
|
|
|
|
|
|
|
import java.time.Instant;
|
|
import java.time.Instant;
|
|
|
-import java.util.ArrayList;
|
|
|
|
|
-import java.util.HashMap;
|
|
|
|
|
-import java.util.List;
|
|
|
|
|
-import java.util.Map;
|
|
|
|
|
|
|
+import java.util.*;
|
|
|
|
|
|
|
|
@Service
|
|
@Service
|
|
|
@Slf4j
|
|
@Slf4j
|
|
@@ -58,7 +55,7 @@ public class AdqCreativeCreativeReportServiceImpl implements IAdqCreativeReportS
|
|
|
paramsMap.put("fields", fieldsList);
|
|
paramsMap.put("fields", fieldsList);
|
|
|
List<AdqCreativeReportHour> hourList = new ArrayList<>();
|
|
List<AdqCreativeReportHour> hourList = new ArrayList<>();
|
|
|
String s = HttpUtils.httpGet("https://api.e.qq.com/v3.0/hourly_reports/get", paramsMap, null);
|
|
String s = HttpUtils.httpGet("https://api.e.qq.com/v3.0/hourly_reports/get", paramsMap, null);
|
|
|
- // System.err.println(s);
|
|
|
|
|
|
|
+ // System.err.println(s);
|
|
|
JSONObject jsonObject = JSONObject.parseObject(s);
|
|
JSONObject jsonObject = JSONObject.parseObject(s);
|
|
|
if (!Check.isNull(jsonObject)) {
|
|
if (!Check.isNull(jsonObject)) {
|
|
|
Integer code = jsonObject.getInteger("code");
|
|
Integer code = jsonObject.getInteger("code");
|
|
@@ -187,7 +184,7 @@ public class AdqCreativeCreativeReportServiceImpl implements IAdqCreativeReportS
|
|
|
if (dailies.size() >= 1000) {
|
|
if (dailies.size() >= 1000) {
|
|
|
getAdqCreativeDaily(advertiserId, accessToken, startDate, endDate, page + 1, isLog);
|
|
getAdqCreativeDaily(advertiserId, accessToken, startDate, endDate, page + 1, isLog);
|
|
|
} else {
|
|
} else {
|
|
|
- log.error("请求创意日报完成,account_id:{},日期:{}", advertiserId, startDate);
|
|
|
|
|
|
|
+ log.info("请求创意日报完成,account_id:{},开始日期:{},结束日期:{}", advertiserId, startDate, endDate);
|
|
|
}
|
|
}
|
|
|
} catch (Exception e) {
|
|
} catch (Exception e) {
|
|
|
e.printStackTrace();
|
|
e.printStackTrace();
|
|
@@ -198,4 +195,9 @@ public class AdqCreativeCreativeReportServiceImpl implements IAdqCreativeReportS
|
|
|
public List<JSONObject> getErrorLogs() {
|
|
public List<JSONObject> getErrorLogs() {
|
|
|
return adqErrorLogMapper.getErrorLogs();
|
|
return adqErrorLogMapper.getErrorLogs();
|
|
|
}
|
|
}
|
|
|
|
|
+
|
|
|
|
|
+ @Override
|
|
|
|
|
+ public List<JSONObject> getAccountListByDate(Integer startDate, Integer endDate) {
|
|
|
|
|
+ return adqErrorLogMapper.getAccountListByDate(startDate, endDate);
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|