Kaynağa Gözat

数据修改

yumeng 5 yıl önce
ebeveyn
işleme
afae9c6dbc

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

@@ -26,8 +26,6 @@ import java.util.ArrayList;
 import java.util.HashMap;
 import java.util.List;
 import java.util.Map;
-import java.util.concurrent.ExecutorService;
-import java.util.concurrent.Executors;
 
 /**
  * 快手历史数据任务记录
@@ -43,8 +41,6 @@ public class KuaiShouHistoryReportTaskServiceImpl extends ServiceImpl<KuaiShouHi
     private String downloadPath;
     static List<Integer> historyTypeList;
     static List<Integer> dailyTypeList;
-    static ExecutorService executorService = Executors.newFixedThreadPool(3);
-
     @Autowired
     private ICtopOauthTokenService ctopOauthTokenService;
     @Autowired
@@ -85,7 +81,6 @@ public class KuaiShouHistoryReportTaskServiceImpl extends ServiceImpl<KuaiShouHi
                 for (int i = 0; i < dailyTypeList.size(); i++) {
                     Integer type = dailyTypeList.get(i);
                     String taskName = accountId + "_" + type + "_" + System.currentTimeMillis();
-                    log.info("任务名称:{}", taskName);
                     param.put("task_name", taskName);
                     taskParams.put("view_type", type);
                     param.put("task_params", taskParams);
@@ -115,13 +110,12 @@ public class KuaiShouHistoryReportTaskServiceImpl extends ServiceImpl<KuaiShouHi
                 for (int i = 0; i < historyTypeList.size(); i++) {
                     Integer type = historyTypeList.get(i);
                     String taskName = accountId + "_" + type + "_" + System.currentTimeMillis();
-                    log.info("任务名称:{}", taskName);
                     param.put("task_name", taskName);
                     taskParams.put("view_type", type);
                     param.put("task_params", taskParams);
                     String result = HttpUtils.kuaiShouhttpPostRequest(url, param.toJSONString(), headers);
                     JSONObject resultJson = JSONObject.parseObject(result);
-                    System.err.println(resultJson);
+                    log.info("请求状态返回数据:{}", resultJson);
                     if (!Check.isNull(resultJson)) {
                         Integer code = resultJson.getInteger("code");
                         if (code == 0) {
@@ -172,7 +166,7 @@ public class KuaiShouHistoryReportTaskServiceImpl extends ServiceImpl<KuaiShouHi
                     param.put("task_ids", taskIds);
                     String result = HttpUtils.kuaiShouhttpPostRequest(url, param.toJSONString(), headers);
                     JSONObject resultJson = JSONObject.parseObject(result);
-                    System.err.println(resultJson);
+                    log.info("请求状态返回数据:{}", resultJson);
                     if (!Check.isNull(resultJson)) {
                         Integer code = resultJson.getInteger("code");
                         if (code == 0) {

+ 0 - 1
module-kuaishou/src/main/java/cn/com/ctop/kuaishou/modules/report/mapper/KuaishouReportDailyCampaignMapper.java

@@ -1,6 +1,5 @@
 package cn.com.ctop.kuaishou.modules.report.mapper;
 
-import cn.com.ctop.kuaishou.modules.report.entity.KuaishouReportDailyAccount;
 import cn.com.ctop.kuaishou.modules.report.entity.KuaishouReportDailyCampaign;
 import com.baomidou.mybatisplus.core.mapper.BaseMapper;
 import org.apache.ibatis.annotations.Param;

+ 1 - 1
module-kuaishou/src/main/java/cn/com/ctop/kuaishou/modules/report/mapper/xml/KuaishouReportDailyAccountMapper.xml

@@ -3,7 +3,7 @@
 <mapper namespace="cn.com.ctop.kuaishou.modules.report.mapper.KuaishouReportDailyAccountMapper">
     <insert id="loadAccountDailyReport">
 		LOAD DATA local INFILE  #{localPath}
-		INTO TABLE ctop_kuaishou_report_daily_account_new CHARACTER SET utf8
+		replace TABLE ctop_kuaishou_report_daily_account_new CHARACTER SET utf8
 		FIELDS TERMINATED BY ',' enclosed by '"' LINES TERMINATED BY '\n'
 		IGNORE 1 LINES
 		(@ad_scene,

+ 1 - 1
module-kuaishou/src/main/java/cn/com/ctop/kuaishou/modules/report/mapper/xml/KuaishouReportDailyCampaignMapper.xml

@@ -5,7 +5,7 @@
 
     <insert id="loadCampaignDailyReport">
 		LOAD DATA local INFILE  #{localPath}
-		INTO TABLE ctop_kuaishou_report_daily_campaign_new CHARACTER SET utf8
+		replace TABLE ctop_kuaishou_report_daily_campaign_new CHARACTER SET utf8
 		FIELDS TERMINATED BY ',' enclosed by '"' LINES TERMINATED BY '\n'
 		IGNORE 1 LINES
 		(campaign_id,

+ 1 - 1
module-kuaishou/src/main/java/cn/com/ctop/kuaishou/modules/report/mapper/xml/KuaishouReportDailyCreativeMapper.xml

@@ -5,7 +5,7 @@
 
     <insert id="loadCreativeDailyReport">
 		LOAD DATA local INFILE  #{localPath}
-		INTO TABLE ctop_kuaishou_report_daily_creative_new CHARACTER SET utf8
+		replace TABLE ctop_kuaishou_report_daily_creative_new CHARACTER SET utf8
 		FIELDS TERMINATED BY ',' enclosed by '"' LINES TERMINATED BY '\n'
 		IGNORE 1 LINES
 		(

+ 1 - 1
module-kuaishou/src/main/java/cn/com/ctop/kuaishou/modules/report/mapper/xml/KuaishouReportDailyGroupMapper.xml

@@ -4,7 +4,7 @@
 
     <insert id="loadGroupDailyReport">
 		LOAD DATA local INFILE  #{localPath}
-		INTO TABLE ctop_kuaishou_report_daily_group_new CHARACTER SET utf8
+		replace TABLE ctop_kuaishou_report_daily_group_new CHARACTER SET utf8
 		FIELDS TERMINATED BY ',' enclosed by '"' LINES TERMINATED BY '\n'
 		IGNORE 1 LINES
 		(