Browse Source

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

xuzuoyun 5 years ago
parent
commit
9cb973a82e

+ 1 - 1
jeecg-boot-module-system/src/main/java/org/jeecg/modules/ctop/job/KuaishouCampaignGroupJob.java

@@ -39,7 +39,7 @@ public class KuaishouCampaignGroupJob implements Job {
                         public void run() {
                         public void run() {
                             try {
                             try {
                                 //1:获取全量广告计划数据
                                 //1:获取全量广告计划数据
-                                kuaishouInterfaceService.getCampaignList(token, null, null);
+                             //   kuaishouInterfaceService.getCampaignList(token, null, null);
                                 //1:获取全量广告组数据
                                 //1:获取全量广告组数据
                                 kuaishouInterfaceService.getGroupList(token, null, null);
                                 kuaishouInterfaceService.getGroupList(token, null, null);
                             } catch (Exception e) {
                             } catch (Exception e) {

+ 1 - 1
jeecg-boot-module-system/src/main/java/org/jeecg/modules/ctop/job/KuaishouCreativeLoadJob.java

@@ -42,7 +42,7 @@ public class KuaishouCreativeLoadJob implements Job {
                 Date endDate = new Date();
                 Date endDate = new Date();
                 //1:查询当日数据
                 //1:查询当日数据
                 List<CtopOauthToken> tokens = tokenService.getTokenListByType(CtopAdConstant.PLATFORM_TYPE_KUAISHOU);
                 List<CtopOauthToken> tokens = tokenService.getTokenListByType(CtopAdConstant.PLATFORM_TYPE_KUAISHOU);
-                executorService = Executors.newFixedThreadPool(5);
+                executorService = Executors.newFixedThreadPool(3);
                 tokens.forEach(token -> {
                 tokens.forEach(token -> {
                     executorService.submit(new Runnable() {
                     executorService.submit(new Runnable() {
                         @Override
                         @Override

+ 1 - 1
jeecg-boot-module-system/src/main/java/org/jeecg/modules/ctop/job/KuaishouHourlyAccountReportLoadJob.java

@@ -51,7 +51,7 @@ public class KuaishouHourlyAccountReportLoadJob implements Job {
                     log.info("定时获取快手数据异常:未获取到可用的token");
                     log.info("定时获取快手数据异常:未获取到可用的token");
                     return;
                     return;
                 }
                 }
-                executorService = Executors.newFixedThreadPool(7);
+                executorService = Executors.newFixedThreadPool(4);
                 countDownLatch = new CountDownLatch(tokens.size());
                 countDownLatch = new CountDownLatch(tokens.size());
                 Date finalGetDate = getDate;
                 Date finalGetDate = getDate;
                 tokens.forEach(token -> {
                 tokens.forEach(token -> {

+ 4 - 1
jeecg-boot-module-system/src/main/java/org/jeecg/modules/ctop/job/OceanengineJob.java

@@ -27,6 +27,7 @@ import org.quartz.Job;
 import org.quartz.JobExecutionContext;
 import org.quartz.JobExecutionContext;
 import org.quartz.JobExecutionException;
 import org.quartz.JobExecutionException;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.beans.factory.annotation.Value;
 
 
 import javax.imageio.ImageIO;
 import javax.imageio.ImageIO;
 import java.awt.*;
 import java.awt.*;
@@ -38,6 +39,8 @@ import java.util.List;
 import java.util.*;
 import java.util.*;
 
 
 public class OceanengineJob implements Job {
 public class OceanengineJob implements Job {
+    @Value("${jeecg.path.chrome-driver}")
+    private String chromeDriver;
     @Autowired
     @Autowired
     private IDouyinHotService douyinHotService;
     private IDouyinHotService douyinHotService;
     @Autowired
     @Autowired
@@ -261,7 +264,7 @@ public class OceanengineJob implements Job {
 
 
     private void login(String account,String password){
     private void login(String account,String password){
         String url = "https://cc.oceanengine.com/login";
         String url = "https://cc.oceanengine.com/login";
-        System.getProperties().setProperty("webdriver.chrome.driver", "D:/chromedriver.exe");
+        System.getProperties().setProperty("webdriver.chrome.driver", chromeDriver);
         ChromeOptions chromeOptions = new ChromeOptions();
         ChromeOptions chromeOptions = new ChromeOptions();
         chromeOptions.addArguments("--headless");
         chromeOptions.addArguments("--headless");
         chromeOptions.addArguments("--no-sandbox");
         chromeOptions.addArguments("--no-sandbox");

+ 2 - 1
module-common/src/main/java/cn/com/ctop/common/module/utils/HttpUtils.java

@@ -212,7 +212,8 @@ public class HttpUtils {
             if (param != null && param.size() > 0) {
             if (param != null && param.size() > 0) {
                 httppost.setEntity(new StringEntity(new Gson().toJson(param), Charset.forName("UTF-8")));
                 httppost.setEntity(new StringEntity(new Gson().toJson(param), Charset.forName("UTF-8")));
             }
             }
-
+            RequestConfig requestConfig =  RequestConfig.custom().setSocketTimeout(120 * 1000).setConnectTimeout(120 * 1000).build();
+                httppost.setConfig(requestConfig);
             HttpEntity respentity;
             HttpEntity respentity;
 
 
             HttpResponse response = httpClient.execute(httppost);
             HttpResponse response = httpClient.execute(httppost);

+ 5 - 0
pom.xml

@@ -393,6 +393,11 @@
             <artifactId>javacv-platform</artifactId>
             <artifactId>javacv-platform</artifactId>
             <version>1.4.2</version>
             <version>1.4.2</version>
         </dependency>
         </dependency>
+        <!--<dependency>
+            <groupId>org.bytedeco</groupId>
+            <artifactId>javacv-platform</artifactId>
+            <version>1.4.2</version>
+        </dependency>-->
     </dependencies>
     </dependencies>
 
 
     <dependencyManagement>
     <dependencyManagement>