Просмотр исходного кода

Merge remote-tracking branch 'origin/master'

yumeng 1 год назад
Родитель
Сommit
cfaeebe390

+ 10 - 6
job-adq/src/main/java/cn/com/ctop/job/adq/data/service/impl/AdqAssetReportServiceImpl.java

@@ -64,10 +64,13 @@ public class AdqAssetReportServiceImpl implements IAdqAssetReportService {
                                 report.setStatTimeDay(Integer.valueOf(dataJson.getString("date").replace("-", "")));
                                 report.setStatTimeDay(Integer.valueOf(dataJson.getString("date").replace("-", "")));
                                 dailies.add(report);
                                 dailies.add(report);
 
 
-                                String marketingTargetType = report.getMarketingTargetType();
-                                Set<String> orDefault = assetIdsMap.getOrDefault(marketingTargetType, new HashSet<>());
-                                orDefault.add(report.getMarketingAssetId().toString());
-                                assetIdsMap.put(marketingTargetType, orDefault);
+                                Long marketingAssetId = report.getMarketingAssetId();
+                                if (!Check.isNull(marketingAssetId)) {
+                                    String marketingTargetType = report.getMarketingTargetType();
+                                    Set<String> orDefault = assetIdsMap.getOrDefault(marketingTargetType, new HashSet<>());
+                                    orDefault.add(marketingAssetId.toString());
+                                    assetIdsMap.put(marketingTargetType, orDefault);
+                                }
                             }
                             }
                         }
                         }
                     }
                     }
@@ -90,7 +93,7 @@ public class AdqAssetReportServiceImpl implements IAdqAssetReportService {
             if (page < totalPage) {
             if (page < totalPage) {
                 getAdqAssetDailyReport(advertiserId, accessToken, startDate, endDate, page + 1, isLog, errId, isSend);
                 getAdqAssetDailyReport(advertiserId, accessToken, startDate, endDate, page + 1, isLog, errId, isSend);
             } else {
             } else {
-                log.error("请求产品日报完成,account_id:{},日期:{}{}", advertiserId, startDate, endDate);
+                log.info("请求产品日报完成,account_id:{},日期:{}~{}", advertiserId, startDate, endDate);
                 if (errId != null) {
                 if (errId != null) {
                     adqErrorLogMapper.deleteInfoByErrorId(errId);
                     adqErrorLogMapper.deleteInfoByErrorId(errId);
                 }
                 }
@@ -124,6 +127,7 @@ public class AdqAssetReportServiceImpl implements IAdqAssetReportService {
         try {
         try {
             int page = 1;
             int page = 1;
             int totalPage = 1;
             int totalPage = 1;
+            type = "MARKETING_TARGET_TYPE_SHORT_DRAMA";
             while (page <= totalPage) {
             while (page <= totalPage) {
                 Map<String, Object> paramsMap = new HashMap<>();
                 Map<String, Object> paramsMap = new HashMap<>();
                 paramsMap.put("account_id", advertiserId);
                 paramsMap.put("account_id", advertiserId);
@@ -208,7 +212,7 @@ public class AdqAssetReportServiceImpl implements IAdqAssetReportService {
                 }
                 }
 
 
                 if (page == totalPage) {
                 if (page == totalPage) {
-                    log.error("请求产品信息列表完成,account_id:{}, assetIds:{} ", advertiserId, assetIds);
+                    log.info("请求产品信息列表完成,account_id:{}, assetIds:{} ", advertiserId, assetIds);
                     if (errId != null) {
                     if (errId != null) {
                         adqErrorLogMapper.deleteInfoByErrorId(errId);
                         adqErrorLogMapper.deleteInfoByErrorId(errId);
                     }
                     }