Quellcode durchsuchen

Merge branch 'test' of https://gitee.com/hcst/adsp-boot into test2

xuzuoyun vor 5 Jahren
Ursprung
Commit
245e2c8aad

+ 17 - 11
jeecg-boot-module-system/src/main/java/org/jeecg/modules/ctop/job/KuaishouHourlyReportLoadJob.java

@@ -39,24 +39,30 @@ public class KuaishouHourlyReportLoadJob implements Job {
             log.info("定时获取头条数据异常:为获取到可用的token");
             return;
         }
-        tokens.forEach(token -> {
-            //1:获取全量广告计划数据
-            kuaishouInterfaceService.getCampaignList(token);
-            //1:获取全量广告组数据
-            kuaishouInterfaceService.getGroupList(token);
-            //1:获取全量创意数据
-            kuaishouInterfaceService.getCreativeList(token);
-            //2:获取全量视频素材数据
-            kuaishouInterfaceService.getVideoList(token);
-        });
-        log.info("物料数据同步完成");
+//        tokens.forEach(token -> {
+//            //1:获取全量广告计划数据
+//            kuaishouInterfaceService.getCampaignList(token);
+//            //1:获取全量广告组数据
+//            kuaishouInterfaceService.getGroupList(token);
+//            //1:获取全量创意数据
+//            kuaishouInterfaceService.getCreativeList(token);
+//            //2:获取全量视频素材数据
+//            kuaishouInterfaceService.getVideoList(token);
+//        });
+//        log.info("物料数据同步完成");
 
         for (CtopOauthToken token : tokens) {
             kuaishouInterfaceService.getAdvertiserReportHourly(token, getDate, getDate);
+        }
+        for (CtopOauthToken token : tokens) {
             //2:获取广告计划信息数据
             kuaishouInterfaceService.getAdvertiserCampaignReportHourly(token, getDate, getDate);
+        }
+        for (CtopOauthToken token : tokens) {
             //3:获取广告组信息数据
             kuaishouInterfaceService.getAdvertiserGroupReportHourly(token, getDate, getDate);
+        }
+        for (CtopOauthToken token : tokens) {
             //4: 获取广告创意信息数据
             kuaishouInterfaceService.getAdvertiserCreativeReportHourly(token, getDate, getDate);
         }

+ 2 - 3
module-kuaishou/src/main/java/cn/com/ctop/kuaishou/modules/batch/service/impl/KuaishouInterfaceServiceImpl.java

@@ -232,7 +232,6 @@ public class KuaishouInterfaceServiceImpl implements IKuaishouInterfaceService {
             log.info("快手视频列表信息为空=》accountId:{}", token.getAccountId());
             return;
         }
-        System.out.println(details.toJSONString());
         for (int i = 0; i < details.size(); i++) {
             var detailJson = details.getJSONObject(i);
             var kuaiShouVideoGet = JSONObject.toJavaObject(detailJson, KuaiShouVideoGet.class);
@@ -805,8 +804,8 @@ public class KuaishouInterfaceServiceImpl implements IKuaishouInterfaceService {
             var creative = JSONObject.toJavaObject(detailJson, KuaishouReportHourlyCreative.class);
             creative.setAccountId(token.getAccountId());
             creative.setId("" + creative.getAccountId() + creative.getCreativeId() + creative.getStatDate() + creative.getStatHour());
-            KuaishouReportHourlyCreativeStatistic statistic = setHourlyStatistic(creative, token);
-            hourlyCreativeStatisticService.saveOrUpdate(statistic);
+//            KuaishouReportHourlyCreativeStatistic statistic = setHourlyStatistic(creative, token);
+//            hourlyCreativeStatisticService.saveOrUpdate(statistic);
             hourlyCreativeService.saveOrUpdate(creative);
         }
         getAdvertiserCreativeReportHourlyByPage(token, startDate, endDate, page + 1);

+ 3 - 3
module-report/src/main/java/cn/com/ctop/bytedance/service/impl/MaterialReportServiceImpl.java

@@ -38,12 +38,12 @@ public class MaterialReportServiceImpl implements IMaterialReportService {
         List<JSONObject> marketJsonList = new ArrayList<>();
         try {
             if (Check.isNull(json)) {
-                return null;
+                return marketJsonList;
             }
 
             String userId = json.getString("userId");
             if (Check.isNull(userId)) {
-                return null;
+                return marketJsonList;
             }
             String roleCode = materialReportMapper.getRoleCodeByUserId(userId);
             String nowDate = DateUtils.getNowDate("yyyy-MM-dd");
@@ -56,7 +56,7 @@ public class MaterialReportServiceImpl implements IMaterialReportService {
             if (type == 1) { // 今天分时数据
                 Integer maxHour = materialReportMapper.selectMaxHourByDate(nowDate);
                 if (Check.isNull(maxHour) || maxHour == 0) {
-                    return null;
+                    return marketJsonList;
                 }
                 Integer statHour = maxHour - 1;
                 paramsMap.put("startDate", nowDate);