syh преди 5 години
родител
ревизия
a9e7ab3607

+ 7 - 7
jeecg-boot-module-system/src/main/java/org/jeecg/modules/ctop/service/impl/ByteDanceCreativeServiceImpl.java

@@ -95,15 +95,15 @@ public class ByteDanceCreativeServiceImpl extends ServiceImpl<ByteDanceCreativeM
         String verticalVideoId = null;
         JSONArray smallImageArray = null;
         JSONArray verticalImageArray = null;
+        //1:创建广告组
+        Map<String, Object> campaignResult = campaignTemplateService.campaignCreate(getAccountId, campaignTemplateId, getName);
+        Boolean createSuccess = (Boolean) campaignResult.get("success");
+        if (null == createSuccess || !createSuccess) {
+            return campaignResult;
+        }
+        Long campaignId = (Long) campaignResult.get("campaignId");
         if (null != iteratorNum && iteratorNum >= 1) {
             for (int i = 0; i < iteratorNum; i++) {
-                //1:创建广告组
-                Map<String, Object> campaignResult = campaignTemplateService.campaignCreate(getAccountId, campaignTemplateId, getName);
-                Boolean createSuccess = (Boolean) campaignResult.get("success");
-                if (null == createSuccess || !createSuccess) {
-                    return campaignResult;
-                }
-                Long campaignId = (Long) campaignResult.get("campaignId");
                 //2:创建广告计划
                 Map<String, Object> planResult = planTemplateService.planCreate(campaignId, getAccountId, deliveryRange, userorentationId, budgetId, deliverytargetId, getName, convertId + "");
                 Integer code = (Integer) planResult.get("code");

+ 1 - 1
jeecg-boot-module-system/src/main/java/org/jeecg/modules/ctop/service/impl/BytedanceAdvertisePlanTemplateServiceImpl.java

@@ -88,7 +88,7 @@ public class BytedanceAdvertisePlanTemplateServiceImpl extends ServiceImpl<Byted
         //广告预算
         data.put("budget", budgetTemplate.getBudgetPrice());//需要大于bid
         //转化出价(ocpm请填写 cpa_bid)
-        data.put("cpa_bid", budgetTemplate.getBudgetPrice());
+        data.put("cpa_bid", budgetTemplate.getConvertPrice());
         data.put("convert_id", convertId);
         //广告投放时间类型
         data.put("schedule_type", budgetTemplate.getFlowDateType());

+ 6 - 0
jeecg-boot-module-system/src/main/java/org/jeecg/modules/kuaishou/controller/KuaiShouController.java

@@ -13,6 +13,7 @@ import org.springframework.web.multipart.MultipartFile;
 
 import javax.servlet.http.HttpServletRequest;
 import java.io.IOException;
+import java.util.HashMap;
 import java.util.Map;
 
 @RestController
@@ -232,4 +233,9 @@ public class KuaiShouController {
 
     }
 
+    @RequestMapping("report")
+    public Map<String, Object> getReport() {
+        return new HashMap<>();
+    }
+
 }

+ 6 - 4
module-kuaishou/src/main/java/cn/com/ctop/kuaishou/modules/graphql/service/impl/KuaishouWebInterfaceServiceImpl.java

@@ -21,6 +21,7 @@ import org.openqa.selenium.chrome.ChromeOptions;
 import org.openqa.selenium.support.ui.ExpectedConditions;
 import org.openqa.selenium.support.ui.WebDriverWait;
 import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.beans.factory.annotation.Value;
 import org.springframework.stereotype.Service;
 
 import java.io.UnsupportedEncodingException;
@@ -186,10 +187,12 @@ public class KuaishouWebInterfaceServiceImpl implements IKuaishouWebInterfaceSer
         }
     }
 
+    @Value("${jeecg.path.chrome-driver}")
+    private String chromeDriver;
+
     @Override
     public void adkuaishouWebLogin(String phone, String password) {
-        System.getProperties().setProperty("webdriver.chrome.driver", "D:/chromedriver.exe");
-//        System.getProperties().setProperty("webdriver.chrome.driver", "/usr/bin/chromedriver");
+        System.getProperties().setProperty("webdriver.chrome.driver", chromeDriver);
         ChromeOptions chromeOptions = new ChromeOptions();
         WebDriver webDriver = new ChromeDriver(chromeOptions);
         try {
@@ -246,8 +249,7 @@ public class KuaishouWebInterfaceServiceImpl implements IKuaishouWebInterfaceSer
 
     @Override
     public void getVideoList(String uid) {
-//        System.getProperties().setProperty("webdriver.chrome.driver", "D:/chromedriver.exe");
-        System.getProperties().setProperty("webdriver.chrome.driver", "/usr/bin/chromedriver");
+        System.getProperties().setProperty("webdriver.chrome.driver", chromeDriver);
         ChromeOptions chromeOptions = new ChromeOptions();
         WebDriver webDriver = new ChromeDriver(chromeOptions);
         try {

+ 6 - 6
module-toutiao/src/main/java/cn/com/ctop/toutiao/test/Test.java

@@ -13,6 +13,7 @@ import org.openqa.selenium.Cookie;
 import org.openqa.selenium.WebDriver;
 import org.openqa.selenium.chrome.ChromeDriver;
 import org.openqa.selenium.chrome.ChromeOptions;
+import org.springframework.beans.factory.annotation.Value;
 import sun.misc.BASE64Decoder;
 
 import java.net.URLDecoder;
@@ -22,13 +23,12 @@ import java.util.regex.Matcher;
 import java.util.regex.Pattern;
 
 public class Test {
-    public static void main(String[] args){
-        test("https://ad.oceanengine.com/pages/login/index.html");
-    }
 
-    public static void test(String url){
-        System.getProperties().setProperty("webdriver.chrome.driver", "D:/chromedriver.exe");
-//        System.getProperties().setProperty("webdriver.chrome.driver", "/usr/bin/chromedriver");
+    @Value("${jeecg.path.chrome-driver}")
+    private String chromeDriver;
+
+    public void test(String url) {
+        System.getProperties().setProperty("webdriver.chrome.driver", chromeDriver);
         try {
             ChromeOptions chromeOptions = new ChromeOptions();
             WebDriver webDriver = new ChromeDriver(chromeOptions);