|
@@ -2,6 +2,7 @@ package cn.com.ctop.job.kuaishou.handler;
|
|
|
|
|
|
import cn.com.ctop.common.module.entity.CtopOauthToken;
|
|
import cn.com.ctop.common.module.entity.CtopOauthToken;
|
|
import cn.com.ctop.common.module.service.ICtopOauthTokenService;
|
|
import cn.com.ctop.common.module.service.ICtopOauthTokenService;
|
|
|
|
+import cn.com.ctop.common.module.utils.HttpUtils2;
|
|
import cn.com.ctop.kuaishou.modules.batch.service.IKuaishouInterfaceService2;
|
|
import cn.com.ctop.kuaishou.modules.batch.service.IKuaishouInterfaceService2;
|
|
import com.xxl.job.core.context.XxlJobHelper;
|
|
import com.xxl.job.core.context.XxlJobHelper;
|
|
import com.xxl.job.core.handler.annotation.XxlJob;
|
|
import com.xxl.job.core.handler.annotation.XxlJob;
|
|
@@ -10,7 +11,9 @@ import org.springframework.beans.factory.annotation.Autowired;
|
|
import org.springframework.stereotype.Component;
|
|
import org.springframework.stereotype.Component;
|
|
|
|
|
|
import java.util.Date;
|
|
import java.util.Date;
|
|
|
|
+import java.util.HashMap;
|
|
import java.util.List;
|
|
import java.util.List;
|
|
|
|
+import java.util.Map;
|
|
import java.util.concurrent.ExecutorService;
|
|
import java.util.concurrent.ExecutorService;
|
|
import java.util.concurrent.Executors;
|
|
import java.util.concurrent.Executors;
|
|
|
|
|
|
@@ -38,7 +41,7 @@ public class KuaishouOperationRecordJob {
|
|
XxlJobHelper.handleFail();
|
|
XxlJobHelper.handleFail();
|
|
return ;
|
|
return ;
|
|
}
|
|
}
|
|
- tokens.forEach(token -> {
|
|
|
|
|
|
+ /* tokens.forEach(token -> {
|
|
executorService.submit(new Runnable() {
|
|
executorService.submit(new Runnable() {
|
|
@Override
|
|
@Override
|
|
public void run() {
|
|
public void run() {
|
|
@@ -51,7 +54,24 @@ public class KuaishouOperationRecordJob {
|
|
kuaishouInterfaceService2.getOperationRecord(token.getAccountId(),token.getAccessToken(),7, date, date);
|
|
kuaishouInterfaceService2.getOperationRecord(token.getAccountId(),token.getAccessToken(),7, date, date);
|
|
}
|
|
}
|
|
});
|
|
});
|
|
|
|
+ });*/
|
|
|
|
+
|
|
|
|
+ String url = "http://gateway.tjyourong.com.cn/jeecg-boot/test/getOperationRecord";
|
|
|
|
+
|
|
|
|
+ tokens.forEach(token -> {
|
|
|
|
+ Map<String, Object> requestMap = new HashMap<>();
|
|
|
|
+ requestMap.put("accountId", token.getId());
|
|
|
|
+ requestMap.put("operationTarget", 1); //账户
|
|
|
|
+ requestMap.put("startDate", date);
|
|
|
|
+ requestMap.put("endDate", date);
|
|
|
|
+ HttpUtils2.httpGet(url, requestMap, null);
|
|
|
|
+ requestMap.put("operationTarget", 2); //计划
|
|
|
|
+ HttpUtils2.httpGet(url, requestMap, null);
|
|
|
|
+ requestMap.put("operationTarget", 3); //组,别的不要了,煜一说的
|
|
|
|
+ HttpUtils2.httpGet(url, requestMap, null);
|
|
});
|
|
});
|
|
|
|
+
|
|
|
|
+
|
|
}
|
|
}
|
|
|
|
|
|
}
|
|
}
|