|
|
@@ -74,7 +74,7 @@ public class AdqMaterialReportServiceImpl implements IAdqMaterialReportService {
|
|
|
List<JSONObject> reports = new ArrayList<>();
|
|
|
if (Check.isNull(jsonObject)) {
|
|
|
log.error("请求素材日报失败,account_id:{},返回为空。", advertiserId);
|
|
|
- if (isLog == 1) {
|
|
|
+ if (isLog != null && isLog == 1) {
|
|
|
AdqErrorLog errorInfo = new AdqErrorLog();
|
|
|
errorInfo.setAdvertiserId(advertiserId);
|
|
|
errorInfo.setStartDate(startDate);
|
|
|
@@ -109,7 +109,7 @@ public class AdqMaterialReportServiceImpl implements IAdqMaterialReportService {
|
|
|
}
|
|
|
} else {
|
|
|
log.error("请求素材日报失败,account_id:{},返回信息:{}", advertiserId, jsonObject);
|
|
|
- if (isLog == 1) {
|
|
|
+ if (isLog != null && isLog == 1) {
|
|
|
AdqErrorLog errorInfo = new AdqErrorLog();
|
|
|
errorInfo.setAdvertiserId(advertiserId);
|
|
|
errorInfo.setStartDate(startDate);
|
|
|
@@ -127,7 +127,7 @@ public class AdqMaterialReportServiceImpl implements IAdqMaterialReportService {
|
|
|
if (page < totalPage) {
|
|
|
getAdqMaterialDailyReport(advertiserId, accessToken, level, startDate, endDate, page + 1, isLog, errId, isSend);
|
|
|
} else {
|
|
|
- log.info("请求创意日报完成,account_id:{},开始日期:{},结束日期:{} totalPage:{}", advertiserId, startDate, endDate, totalPage);
|
|
|
+ log.info("请求素材日报完成,account_id:{},开始日期:{},结束日期:{} totalPage:{}", advertiserId, startDate, endDate, totalPage);
|
|
|
if (errId != null) {
|
|
|
adqErrorLogMapper.deleteInfoByErrorId(errId);
|
|
|
}
|
|
|
@@ -137,6 +137,20 @@ public class AdqMaterialReportServiceImpl implements IAdqMaterialReportService {
|
|
|
}
|
|
|
} catch (Exception e) {
|
|
|
e.printStackTrace();
|
|
|
+ if (isLog != null && isLog == 1) {
|
|
|
+ try {
|
|
|
+ AdqErrorLog errorInfo = new AdqErrorLog();
|
|
|
+ errorInfo.setAdvertiserId(advertiserId);
|
|
|
+ errorInfo.setStartDate(startDate);
|
|
|
+ errorInfo.setEndDate(endDate);
|
|
|
+ errorInfo.setDataDimension("material");
|
|
|
+ errorInfo.setDataType("daily");
|
|
|
+ errorInfo.setMsg(e.getMessage());
|
|
|
+ adqErrorLogMapper.replaceErrorInfo(errorInfo);
|
|
|
+ } catch (Exception ex) {
|
|
|
+ log.error("记录素材日报失败日志异常,account_id:{}", advertiserId, ex);
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
}
|