|
@@ -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) {
|
|
@@ -152,6 +146,7 @@ public class KuaiShouHistoryReportTaskServiceImpl extends ServiceImpl<KuaiShouHi
|
|
|
*/
|
|
|
@Override
|
|
|
public void getTaskList() {
|
|
|
+ log.info("开始历史数据文件检查下载");
|
|
|
QueryWrapper<KuaiShouHistoryReportTask> taskQueryWrapper = new QueryWrapper<>();
|
|
|
taskQueryWrapper.eq("task_status", 0);
|
|
|
taskQueryWrapper.orderByDesc("create_time");
|
|
@@ -171,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) {
|
|
@@ -246,8 +241,8 @@ public class KuaiShouHistoryReportTaskServiceImpl extends ServiceImpl<KuaiShouHi
|
|
|
|
|
|
private void getDailyTypeList() {
|
|
|
dailyTypeList = new ArrayList<>();
|
|
|
- dailyTypeList.add(2);
|
|
|
- dailyTypeList.add(3);
|
|
|
+ /* dailyTypeList.add(2);
|
|
|
+ dailyTypeList.add(3);*/
|
|
|
dailyTypeList.add(4);
|
|
|
}
|
|
|
|