瀏覽代碼

修改代码

syh 5 年之前
父節點
當前提交
02e3f607fa

+ 5 - 2
jeecg-boot-module-system/src/main/java/org/jeecg/modules/ctop/controller/ByteDanceAdvertiserPostController.java

@@ -10,6 +10,7 @@ import cn.com.ctop.kuaishou.modules.batch.service.IKuaishouInterfaceService;
 import cn.com.ctop.toutiao.entity.ByteDanceCustomAudience;
 import cn.com.ctop.toutiao.entity.ByteDanceCustomAudience;
 import cn.com.ctop.toutiao.entity.ByteDanceUserOrientationTemplate;
 import cn.com.ctop.toutiao.entity.ByteDanceUserOrientationTemplate;
 import cn.com.ctop.toutiao.service.IByteDanceAdvertiserDataService;
 import cn.com.ctop.toutiao.service.IByteDanceAdvertiserDataService;
+import cn.com.ctop.toutiao.service.IByteDanceCreativeService;
 import cn.com.ctop.toutiao.service.IByteDanceCustomAudienceService;
 import cn.com.ctop.toutiao.service.IByteDanceCustomAudienceService;
 import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
 import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
 import com.baomidou.mybatisplus.core.metadata.IPage;
 import com.baomidou.mybatisplus.core.metadata.IPage;
@@ -41,6 +42,8 @@ public class ByteDanceAdvertiserPostController {
     @Autowired
     @Autowired
     private IByteDanceAdvertiserDataService advertiserDataService;
     private IByteDanceAdvertiserDataService advertiserDataService;
     @Autowired
     @Autowired
+    private IByteDanceCreativeService creativeService;
+    @Autowired
     private IFileInfoService fileInfoService;
     private IFileInfoService fileInfoService;
     @Autowired
     @Autowired
     private IByteDanceCustomAudienceService audienceService;
     private IByteDanceCustomAudienceService audienceService;
@@ -138,7 +141,7 @@ public class ByteDanceAdvertiserPostController {
      */
      */
     @RequestMapping("/advertiser/creative/get")
     @RequestMapping("/advertiser/creative/get")
     public Map<String, Object> getAdvertiserCreative(String accountId, String ids) {
     public Map<String, Object> getAdvertiserCreative(String accountId, String ids) {
-        return advertiserDataService.getAdvertiserCreative(accountId, ids, null);
+        return creativeService.getAdvertiserCreative(accountId, ids, null);
     }
     }
 
 
     /**
     /**
@@ -147,7 +150,7 @@ public class ByteDanceAdvertiserPostController {
      */
      */
     @RequestMapping("/advertiser/update/status/")
     @RequestMapping("/advertiser/update/status/")
     public Map<String, Object> advertiserCreativeUpdateStatus(String accountId, String creativeIds, String optStatus) {
     public Map<String, Object> advertiserCreativeUpdateStatus(String accountId, String creativeIds, String optStatus) {
-        return advertiserDataService.advertiserCreativeUpdateStatus(accountId, creativeIds, optStatus);
+        return creativeService.advertiserCreativeUpdateStatus(accountId, creativeIds, optStatus);
     }
     }
 
 
     /**
     /**

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

@@ -4,6 +4,7 @@ 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.CtopAdConstant;
 import cn.com.ctop.common.module.utils.CtopAdConstant;
 import cn.com.ctop.toutiao.service.IByteDanceAdvertiserDataService;
 import cn.com.ctop.toutiao.service.IByteDanceAdvertiserDataService;
+import cn.com.ctop.toutiao.service.IByteDanceCreativeService;
 import lombok.extern.slf4j.Slf4j;
 import lombok.extern.slf4j.Slf4j;
 import org.quartz.Job;
 import org.quartz.Job;
 import org.quartz.JobExecutionContext;
 import org.quartz.JobExecutionContext;
@@ -23,6 +24,8 @@ public class BytedanceMaterialsLoadJob implements Job {
     static ExecutorService executorService = null;
     static ExecutorService executorService = null;
     @Autowired
     @Autowired
     private IByteDanceAdvertiserDataService advertiserDataService;
     private IByteDanceAdvertiserDataService advertiserDataService;
+    @Autowired
+    private IByteDanceCreativeService creativeService;
 
 
     @Override
     @Override
     public void execute(JobExecutionContext jobExecutionContext) throws JobExecutionException {
     public void execute(JobExecutionContext jobExecutionContext) throws JobExecutionException {
@@ -42,7 +45,7 @@ public class BytedanceMaterialsLoadJob implements Job {
                         //1:获取当日广告计划数据
                         //1:获取当日广告计划数据
                         advertiserDataService.getAdvertiserPlan(token.getAccountId() + "", "", dateString);
                         advertiserDataService.getAdvertiserPlan(token.getAccountId() + "", "", dateString);
                         //1:获取全量创意数据
                         //1:获取全量创意数据
-                        advertiserDataService.getAdvertiserCreative(token.getAccountId() + "", "", dateString);
+                        creativeService.getAdvertiserCreative(token.getAccountId() + "", "", dateString);
                         //2:获取全量素材数据
                         //2:获取全量素材数据
                         advertiserDataService.getMaterialList(token);
                         advertiserDataService.getMaterialList(token);
                     } catch (Exception e) {
                     } catch (Exception e) {

+ 1 - 1
jeecg-boot-module-system/src/test/java/org/jeecg/SampleTest.java

@@ -16,7 +16,7 @@ public class SampleTest {
     private IAppiumTaskService taskService;
     private IAppiumTaskService taskService;
     @Test
     @Test
     public void testJob() {
     public void testJob() {
-        taskService.runTask(1, 1);
+        taskService.runTaskV2(1, 1);
     }
     }
 
 
 }
 }

+ 0 - 6
module-common/src/main/java/cn/com/ctop/common/module/service/impl/CtopOauthTokenServiceImpl.java

@@ -71,12 +71,6 @@ public class CtopOauthTokenServiceImpl extends ServiceImpl<CtopOauthTokenMapper,
         }
         }
         JSONObject data = resultObject.getJSONObject("data");
         JSONObject data = resultObject.getJSONObject("data");
         CtopOauthToken refreshToken = new CtopOauthToken(token, data);
         CtopOauthToken refreshToken = new CtopOauthToken(token, data);
-       /* cTopOauthTokenMapper.deleteById(token.getId());
-        cTopOauthTokenMapper.insert(refreshToken);
-        CtopOauthToken topOauthToken = new CtopOauthToken();
-        topOauthToken.setAccessToken(refreshToken.getAccessToken());
-        topOauthToken.setRefreshToken(refreshToken.getRefreshToken());*/
-
         QueryWrapper<CtopOauthToken> queryWrapper = new QueryWrapper<>();
         QueryWrapper<CtopOauthToken> queryWrapper = new QueryWrapper<>();
         queryWrapper.eq("account_id", accountId);
         queryWrapper.eq("account_id", accountId);
         queryWrapper.eq("media_id", 1);
         queryWrapper.eq("media_id", 1);

+ 2 - 0
module-crawler/src/main/java/cn/com/ctop/crawler/modules/appium/service/IAppiumTaskService.java

@@ -10,6 +10,8 @@ import com.baomidou.mybatisplus.extension.service.IService;
  * @version V1.0
  * @version V1.0
  */
  */
 public interface IAppiumTaskService extends IService<AppiumTask> {
 public interface IAppiumTaskService extends IService<AppiumTask> {
+    void runTaskV2(Integer taskId, Integer deviceId);
+
     /**
     /**
      * 执行任务
      * 执行任务
      *
      *

+ 21 - 1
module-crawler/src/main/java/cn/com/ctop/crawler/modules/appium/service/impl/AppiumTaskServiceImpl.java

@@ -38,6 +38,27 @@ public class AppiumTaskServiceImpl extends ServiceImpl<AppiumTaskMapper, AppiumT
     private AppiumTaskLogMapper appiumTaskLogMapper;
     private AppiumTaskLogMapper appiumTaskLogMapper;
 
 
     @Override
     @Override
+    public void runTaskV2(Integer taskId, Integer deviceId) {
+        //获取当前需要执行的任务信息
+        AppiumTask task = this.getById(taskId);
+        //获取手机设备信息
+        AppiumDevice appiumDevice = iAppiumDeviceService.getById(deviceId);
+        appiumDevice.setStatus(2);
+        iAppiumDeviceService.updateById(appiumDevice);
+
+        AppiumUtil appiumUtil = new AppiumUtil();
+        try {
+            AndroidDriver androidDriver = appiumUtil.initAndroidDriver(groupControlPath + ":" + groupControlPort + "/wd/hub", appiumDevice.getIp() + ":" + appiumDevice.getPort(), task.getAppPackage(), task.getAppActivity());
+            appiumUtil.runTaskV2(androidDriver);
+        } catch (Exception e) {
+            e.printStackTrace();
+            appiumDevice.setStatus(1);
+            iAppiumDeviceService.updateById(appiumDevice);
+        }
+    }
+
+
+    @Override
     public void runTask(Integer taskId, Integer deviceId) {
     public void runTask(Integer taskId, Integer deviceId) {
         //获取当前需要执行的任务信息
         //获取当前需要执行的任务信息
         AppiumTask task = this.getById(taskId);
         AppiumTask task = this.getById(taskId);
@@ -76,5 +97,4 @@ public class AppiumTaskServiceImpl extends ServiceImpl<AppiumTaskMapper, AppiumT
             iAppiumDeviceService.updateById(appiumDevice);
             iAppiumDeviceService.updateById(appiumDevice);
         }
         }
     }
     }
-
 }
 }

File diff suppressed because it is too large
+ 271 - 187
module-crawler/src/main/java/cn/com/ctop/crawler/modules/core/util/AppiumUtil.java


+ 461 - 524
module-crawler/src/main/java/cn/com/ctop/crawler/modules/test/AppiumTest.java

@@ -1,533 +1,470 @@
-package cn.com.ctop.crawler.modules.test;
-
-import com.google.gson.Gson;
-import io.appium.java_client.TouchAction;
-import io.appium.java_client.android.AndroidDriver;
-import io.appium.java_client.touch.WaitOptions;
-import io.appium.java_client.touch.offset.PointOption;
-import lombok.Data;
-import org.openqa.selenium.Point;
-import org.openqa.selenium.WebElement;
-import org.openqa.selenium.remote.DesiredCapabilities;
-
-import java.net.MalformedURLException;
-import java.net.URL;
-import java.time.Duration;
-import java.util.ArrayList;
-import java.util.List;
-
-@Data
-public class AppiumTest {
-    private Boolean isLoop = true;
-    private Duration duration = Duration.ofSeconds(1);
-
-    public void swipeToUp(AndroidDriver driver) {
-        int width = driver.manage().window().getSize().width;
-        int height = driver.manage().window().getSize().height;
-        TouchAction action1 = new TouchAction(driver).press(PointOption.point(width / 2, height * 3 / 4)).waitAction(WaitOptions.waitOptions(duration))
-                .moveTo(PointOption.point(width / 2, height / 4)).release();
-        action1.perform();
-    }
-
-
-    public void swipeToDown(AndroidDriver driver) {
-        int width = driver.manage().window().getSize().width;
-        int height = driver.manage().window().getSize().height;
-        TouchAction action2 = new TouchAction(driver).press(PointOption.point(width / 2, height / 4)).waitAction(WaitOptions.waitOptions(duration))
-                .moveTo(PointOption.point(width / 2, height * 3 / 4)).release();
-        action2.perform();
-    }
-
-    public void swipeToLeft(AndroidDriver driver) {
-        int width = driver.manage().window().getSize().width;
-        int height = driver.manage().window().getSize().height;
-        TouchAction action3 = new TouchAction(driver).press(PointOption.point(width * 3 / 4, height / 2)).waitAction(WaitOptions.waitOptions(duration))
-                .moveTo(PointOption.point(width / 4, height / 2)).release();
-        action3.perform();
-    }
-
-    public void tapPoint(AndroidDriver driver, Integer x, Integer y) {
-        TouchAction action = new TouchAction(driver).tap(PointOption.point(x, y)).release();
-        action.perform();
-    }
-
-
-    public void swipeToRight(AndroidDriver driver) {
-        int width = driver.manage().window().getSize().width;
-        int height = driver.manage().window().getSize().height;
-        TouchAction action4 = new TouchAction(driver).press(PointOption.point(width / 4, height / 2)).waitAction(WaitOptions.waitOptions(duration))
-                .moveTo(PointOption.point(width * 3 / 4, height / 2)).release();
-        action4.perform();
-    }
-
-    //    "http://39.106.184.70:4723/wd/hub"
-    public AndroidDriver initAndroidDriver(String serverUrl, String deviceName, String appPackage, String appActivity) throws Exception {
-        return new AndroidDriver(new URL(serverUrl), initCapabilities(deviceName, appPackage, appActivity));
-    }
-
-    public DesiredCapabilities initCapabilities(String deviceName, String appPackage, String appActivity) {
-        DesiredCapabilities desiredCapabilities = new DesiredCapabilities();
-        //指定测试设备的名称
-//        desiredCapabilities.setCapability("deviceName", "127.0.0.1:62001");
-//        desiredCapabilities.setCapability("deviceName", "183.131.157.66:10005");
-        desiredCapabilities.setCapability("deviceName", deviceName);
-        //添加操作系统配置
-        desiredCapabilities.setCapability("platformName", "Android");
-        //添加操作系统版本设置
-//        desiredCapabilities.setCapability("platformVersion", "4.4.2");
-        //指定想要测试应用的包名
-//        desiredCapabilities.setCapability("appPackage", "com.smile.gifmaker");
-        desiredCapabilities.setCapability("appPackage", appPackage);
-        desiredCapabilities.setCapability("noReset", true);
-        desiredCapabilities.setCapability("unicodeKeyboard", true);
-        desiredCapabilities.setCapability("resetKeyboard", true);
-        //指定想要测试应用的入口activity
-//        desiredCapabilities.setCapability("appActivity", "com.yxcorp.gifshow.HomeActivity");
-        desiredCapabilities.setCapability("appActivity", appActivity);
-        return desiredCapabilities;
-    }
-
-    public List<AppiumTask> initTask() {
-        List<AppiumTask> list = new ArrayList<>();
-        AppiumTask appiumTask1 = new AppiumTask();
-        appiumTask1.setFindType("class");
-        appiumTask1.setFindKey("android.widget.CheckedTextView");
-        appiumTask1.setClickType("element");
-        appiumTask1.setLoopType("noloop");
-        appiumTask1.setIsMust(true);
-        appiumTask1.setWaitTime(3000L);
-
-        AppiumTask appiumTask2 = new AppiumTask();
-        appiumTask2.setFindType("xpath");
-        appiumTask2.setFindKey("//android.view.View[@content-desc=\"发现\"]");
-        appiumTask2.setClickType("element");
-        appiumTask2.setLoopType("noloop");
-        appiumTask2.setIsMust(true);
-        appiumTask2.setWaitTime(3000L);
-
-        AppiumTask appiumTask3 = new AppiumTask();
-        appiumTask3.setFindType("id");
-        appiumTask3.setFindKey("com.smile.gifmaker:id/subject");
-        appiumTask3.setClickType("no");
-        appiumTask3.setLoopType("loop");
-        appiumTask3.setIsMust(true);
-        appiumTask3.setSwapType("up");
-
-        AppiumTask appiumTask31 = new AppiumTask();
-        appiumTask31.setFindType("loop");
-        appiumTask31.setClickType("point");
-        appiumTask31.setLoopType("noloop");
-        appiumTask31.setIsMust(false);
-        appiumTask31.setTextEqualType("eq");
-        appiumTask31.setTextEqualKey("广告");
-        appiumTask31.setOffsiteX(-100);
-        appiumTask31.setOffsiteY(-100);
-        appiumTask31.setWaitTime(2000L);
-
-//        AppiumTask appiumTask32 = new AppiumTask();
-//        appiumTask32.setFindType("loop");
-//        appiumTask32.setClickType("no");
-//        appiumTask32.setLoopType("noloop");
-//        appiumTask32.setIsMust(false);
-//        appiumTask32.setTextEqualType("neq");
-//        appiumTask32.setTextEqualKey("广告");
-//
-//        AppiumTask appiumTask321 = new AppiumTask();
-//        appiumTask321.setFindType("id");
-//        appiumTask321.setFindKey("com.smile.gifmaker:id/back_btn");
-//        appiumTask321.setClickType("element");
-//        appiumTask321.setLoopType("noloop");
-//        appiumTask321.setIsMust(false);
-
-        AppiumTask appiumTask311 = new AppiumTask();
-        appiumTask311.setFindType("loop");
-        appiumTask311.setClickType("no");
-        appiumTask311.setLoopType("noloop");
-        appiumTask311.setIsMust(true);
-        appiumTask311.setSwapType("up");
-
-        AppiumTask appiumTask312 = new AppiumTask();
-        appiumTask312.setFindType("id");
-        appiumTask312.setWaitTime(5000L);
-        appiumTask312.setFindKey("com.smile.gifmaker:id/ad_simplified_style_enhanced_ad_install_text");
-        appiumTask312.setClickType("element");
-        appiumTask312.setLoopType("noloop");
-        appiumTask312.setIsMust(false);
-
-
-        AppiumTask appiumTask3121 = new AppiumTask();
-        appiumTask3121.setFindType("id");
-        appiumTask3121.setFindKey("com.android.packageinstaller:id/ok_button");
-        appiumTask3121.setClickType("element");
-        appiumTask3121.setLoopType("noloop");
-        appiumTask3121.setIsMust(true);
-        appiumTask3121.setLoopRate(3000L);
-
-        AppiumTask appiumTask3122 = new AppiumTask();
-        appiumTask3122.setFindType("id");
-        appiumTask3122.setFindKey("com.android.packageinstaller:id/launch_button");
-        appiumTask3122.setClickType("element");
-        appiumTask3122.setLoopType("noloop");
-        appiumTask3122.setIsMust(true);
-        appiumTask3121.setLoopRate(3000L);
-
-        AppiumTask appiumTask3124 = new AppiumTask();
-        appiumTask3124.setFindType("id");
-        appiumTask3124.setFindKey("com.android.packageinstaller:id/permission_allow_button");
-        appiumTask3124.setClickType("element");
-        appiumTask3124.setLoopType("noloop");
-        appiumTask3124.setIsMust(false);
-        appiumTask3124.setWaitTime(3000L);
-
-        AppiumTask appiumTask3125 = new AppiumTask();
-        appiumTask3125.setFindType("id");
-        appiumTask3125.setFindKey("com.android.packageinstaller:id/permission_allow_button");
-        appiumTask3125.setClickType("element");
-        appiumTask3125.setLoopType("noloop");
-        appiumTask3125.setIsMust(false);
-        appiumTask3125.setWaitTime(3000L);
-
-        AppiumTask appiumTask3126 = new AppiumTask();
-        appiumTask3126.setFindType("id");
-        appiumTask3126.setFindKey("com.android.packageinstaller:id/permission_allow_button");
-        appiumTask3126.setClickType("element");
-        appiumTask3126.setLoopType("noloop");
-        appiumTask3126.setIsMust(false);
-        appiumTask3126.setWaitTime(3000L);
-
-        AppiumTask appiumTask3127 = new AppiumTask();
-        appiumTask3127.setFindType("id");
-        appiumTask3127.setFindKey("com.android.packageinstaller:id/permission_allow_button");
-        appiumTask3127.setClickType("element");
-        appiumTask3127.setLoopType("noloop");
-        appiumTask3127.setIsMust(false);
-        appiumTask3127.setWaitTime(3000L);
-        appiumTask3127.setIsClose(true);
-
-        List<AppiumTask> subList4 = new ArrayList<>();
-        subList4.add(appiumTask3121);
-        subList4.add(appiumTask3122);
-//        subList4.add(appiumTask3123);
-        subList4.add(appiumTask3124);
-        subList4.add(appiumTask3125);
-        subList4.add(appiumTask3126);
-        subList4.add(appiumTask3127);
-        appiumTask312.setSubTask(subList4);
-
-        List<AppiumTask> subList3 = new ArrayList<>();
-        subList3.add(appiumTask311);
-        subList3.add(appiumTask312);
-        appiumTask31.setSubTask(subList3);
-
-//        List<AppiumTask> subList2 = new ArrayList<>();
-//        subList2.add(appiumTask321);
-//        appiumTask32.setSubTask(subList2);
-
-        List<AppiumTask> subList1 = new ArrayList<>();
-        subList1.add(appiumTask31);
-//        subList1.add(appiumTask32);
-        appiumTask3.setSubTask(subList1);
-
-        list.add(appiumTask1);
-        list.add(appiumTask2);
-        list.add(appiumTask3);
-        return list;
-    }
-
-    public void t() {
-        try {
-//            AndroidDriver androidDriver = initAndroidDriver("http://39.106.184.70:4723/wd/hub","183.131.157.66:10005","com.smile.gifmaker","com.yxcorp.gifshow.HomeActivity");
-            AndroidDriver androidDriver = initAndroidDriver("http://39.106.184.70:4723/wd/hub", "183.131.157.66:10005", "com.smile.gifmaker", "com.yxcorp.gifshow.HomeActivity");
-
-            List<AppiumTask> list = initTask();
-            for (AppiumTask task : list) {
-                runTask(androidDriver, task, null);
-            }
-            androidDriver.quit();
-            System.out.println("task success");
-        } catch (Exception e) {
-            e.printStackTrace();
-        }
-
-
-    }
-
-    public void runTask(AndroidDriver androidDriver, AppiumTask appiumTask, WebElement loopElement) throws Exception {
-        if (appiumTask != null) {
-            System.out.println(new Gson().toJson(appiumTask));
-            if (appiumTask.getWaitTime() != null && appiumTask.getWaitTime() > 0) {
-                Thread.sleep(appiumTask.getWaitTime());
-            }
-            if (appiumTask.getLoopType() != null && "noloop".equals(appiumTask.getLoopType())) {
-                if (appiumTask.getFindType() != null) {
-                    WebElement element = null;
-                    if ("id".equals(appiumTask.getFindType())) {
-                        element = getElementById(androidDriver, appiumTask.getFindKey());
-                    } else if ("class".equals(appiumTask.getFindType())) {
-                        element = getElementByClass(androidDriver, appiumTask.getFindKey());
-                    } else if ("xpath".equals(appiumTask.getFindType())) {
-                        element = getElementByXpath(androidDriver, appiumTask.getFindKey());
-                    } else if ("loop".equals(appiumTask.getFindType())) {
-                        element = loopElement;
-                    }
-                    if (element != null) {
-                        if (appiumTask.getTextEqualType() != null) {
-                            if ("eq".equals(appiumTask.getTextEqualType())) {
-                                if (!element.getText().equals(appiumTask.getTextEqualKey())) {
-                                    return;
-                                }
-                            } else if ("neq".equals(appiumTask.getTextEqualType())) {
-                                if (element.getText() == null || element.getText().equals(appiumTask.getTextEqualKey())) {
-                                    return;
-                                }
-                            }
-                        }
-                        if (appiumTask.getClickType() != null) {
-                            if ("element".equals(appiumTask.getClickType())) {
-                                element.click();
-                            } else if ("point".equals(appiumTask.getClickType())) {
-                                Point point = element.getLocation();
-                                tapPoint(androidDriver, point.getX() + appiumTask.getOffsiteX(), point.getY() + appiumTask.getOffsiteY());
-                            }
-                        }
-                        List<AppiumTask> subTask = appiumTask.getSubTask();
-                        if (subTask != null && subTask.size() > 0) {
-                            for (AppiumTask task : subTask) {
-                                runTask(androidDriver, task, element);
-                            }
-                        }
-                    } else {
-                        if (appiumTask.getIsMust() != null && appiumTask.getIsMust() == true) {
-                            if (appiumTask.getLoopRate() != null && appiumTask.getLoopRate() > 0) {
-                                Thread.sleep(appiumTask.getLoopRate());
-                            }
-                            runTask(androidDriver, appiumTask, element);
-                            return;
-                        }
-                        if (appiumTask.getClickType() != null && "point".equals(appiumTask.getClickType())) {
-                            tapPoint(androidDriver, appiumTask.getOffsiteX(), appiumTask.getOffsiteY());
-                        }
-                    }
-                }
-                if (appiumTask.getSwapType() != null) {
-                    if ("up".equals(appiumTask.getSwapType())) {
-                        this.swipeToUp(androidDriver);
-                    } else if ("down".equals(appiumTask.getSwapType())) {
-                        this.swipeToDown(androidDriver);
-                    } else if ("left".equals(appiumTask.getSwapType())) {
-                        this.swipeToLeft(androidDriver);
-                    } else if ("right".equals(appiumTask.getSwapType())) {
-                        this.swipeToRight(androidDriver);
-                    }
-                }
-            } else if (appiumTask.getLoopType() != null && "loop".equals(appiumTask.getLoopType())) {
-                while (isLoop) {
-                    System.out.println("loop:" + isLoop);
-                    if (appiumTask.getFindType() != null) {
-                        List<WebElement> list = null;
-                        if ("id".equals(appiumTask.getFindType())) {
-                            list = androidDriver.findElementsById(appiumTask.getFindKey());
-                        } else if ("class".equals(appiumTask.getFindType())) {
-                            list = androidDriver.findElementsByClassName(appiumTask.getFindKey());
-                        } else if ("xpath".equals(appiumTask.getFindType())) {
-                            list = androidDriver.findElementsByXPath(appiumTask.getFindKey());
-                        }
-                        if (list != null && list.size() > 0) {
-                            for (WebElement element : list) {
-                                if (!isLoop) {
-                                    break;
-                                }
-                                if (appiumTask.getLoopRate() != null && appiumTask.getLoopRate() > 0) {
-                                    Thread.sleep(appiumTask.getLoopRate());
-                                }
-                                List<AppiumTask> subTask = appiumTask.getSubTask();
-                                if (subTask != null && subTask.size() > 0) {
-                                    for (AppiumTask task : subTask) {
-                                        runTask(androidDriver, task, element);
-                                    }
-                                }
-                            }
-                        }
-                    }
-                    if (appiumTask.getSwapType() != null) {
-                        if ("up".equals(appiumTask.getSwapType())) {
-                            this.swipeToUp(androidDriver);
-                        } else if ("down".equals(appiumTask.getSwapType())) {
-                            this.swipeToDown(androidDriver);
-                        } else if ("left".equals(appiumTask.getSwapType())) {
-                            this.swipeToLeft(androidDriver);
-                        } else if ("right".equals(appiumTask.getSwapType())) {
-                            this.swipeToRight(androidDriver);
-                        }
-                    }
-                }
-
-            }
-            if (appiumTask.getIsClose() != null && appiumTask.getIsClose()) {
-                this.isLoop = false;
-            }
-        }
-    }
-
-    public static void main(String[] args) throws MalformedURLException, InterruptedException {
-        // TODO Auto-generated method stub
-        //1.添加配置,创建DesiredCapabilities对象
-        AppiumTest appiumTest = new AppiumTest();
-        appiumTest.t();
-        //2.创建驱动...URL是appium的固定地址;指定appium通讯的地址,将相对应的配置传入到驱动里边
-
-//        com.longene.lglocation/.activity.MainActivity
-//        com.longene.setcardproperty/.MainActivity
-        //打开地图后点击同意继续
-//        androidDriver.findElementById("com.smile.gifmaker:id/button").click();
-        //点击进入地图
-        //加线程等待
-//        Thread.sleep(5000);
-//        while (true){
-//            try {
-//                AndroidDriver androidDriver = appiumTest.initAndroidDriver("http://39.106.184.70:4723/wd/hub","","","");
-//
-//                List<WebElement> list = androidDriver.findElementsByClassName("android.widget.CheckedTextView");
-//                if(list != null && list.size() > 0){
-//                    list.get(0).click();
-//                }
+//package cn.com.ctop.crawler.modules.test;
+//
+//import cn.com.ctop.crawler.modules.core.util.AppiumUtil;
+//import com.google.gson.Gson;
+//import io.appium.java_client.TouchAction;
+//import io.appium.java_client.android.AndroidDriver;
+//import io.appium.java_client.touch.WaitOptions;
+//import io.appium.java_client.touch.offset.PointOption;
+//import lombok.Data;
+//import org.openqa.selenium.Point;
+//import org.openqa.selenium.WebElement;
+//import org.openqa.selenium.remote.DesiredCapabilities;
+//
+//import java.net.MalformedURLException;
+//import java.net.URL;
+//import java.time.Duration;
+//import java.util.ArrayList;
+//import java.util.List;
+//
+//@Data
+//public class AppiumTest {
+//    private Boolean isLoop = true;
+//    private Duration duration = Duration.ofSeconds(1);
+//
+//
+//
+//    //    "http://39.106.184.70:4723/wd/hub"
+//    public AndroidDriver initAndroidDriver(String serverUrl, String deviceName, String appPackage, String appActivity) throws Exception {
+//        return new AndroidDriver(new URL(serverUrl), initCapabilities(deviceName, appPackage, appActivity));
+//    }
+//
+//    public DesiredCapabilities initCapabilities(String deviceName, String appPackage, String appActivity) {
+//        DesiredCapabilities desiredCapabilities = new DesiredCapabilities();
+//        //指定测试设备的名称
+////        desiredCapabilities.setCapability("deviceName", "127.0.0.1:62001");
+////        desiredCapabilities.setCapability("deviceName", "183.131.157.66:10005");
+//        desiredCapabilities.setCapability("deviceName", deviceName);
+//        //添加操作系统配置
+//        desiredCapabilities.setCapability("platformName", "Android");
+//        //添加操作系统版本设置
+////        desiredCapabilities.setCapability("platformVersion", "4.4.2");
+//        //指定想要测试应用的包名
+////        desiredCapabilities.setCapability("appPackage", "com.smile.gifmaker");
+//        desiredCapabilities.setCapability("appPackage", appPackage);
+//        desiredCapabilities.setCapability("noReset", true);
+//        desiredCapabilities.setCapability("unicodeKeyboard", true);
+//        desiredCapabilities.setCapability("resetKeyboard", true);
+//        //指定想要测试应用的入口activity
+////        desiredCapabilities.setCapability("appActivity", "com.yxcorp.gifshow.HomeActivity");
+//        desiredCapabilities.setCapability("appActivity", appActivity);
+//        return desiredCapabilities;
+//    }
+//
+//    public List<AppiumTask> initTask() {
+//        List<AppiumTask> list = new ArrayList<>();
+//        AppiumTask appiumTask1 = new AppiumTask();
+//        appiumTask1.setFindType("class");
+//        appiumTask1.setFindKey("android.widget.CheckedTextView");
+//        appiumTask1.setClickType("element");
+//        appiumTask1.setLoopType("noloop");
+//        appiumTask1.setIsMust(true);
+//        appiumTask1.setWaitTime(3000L);
+//
+//        AppiumTask appiumTask2 = new AppiumTask();
+//        appiumTask2.setFindType("xpath");
+//        appiumTask2.setFindKey("//android.view.View[@content-desc=\"发现\"]");
+//        appiumTask2.setClickType("element");
+//        appiumTask2.setLoopType("noloop");
+//        appiumTask2.setIsMust(true);
+//        appiumTask2.setWaitTime(3000L);
+//
+//        AppiumTask appiumTask3 = new AppiumTask();
+//        appiumTask3.setFindType("id");
+//        appiumTask3.setFindKey("com.smile.gifmaker:id/subject");
+//        appiumTask3.setClickType("no");
+//        appiumTask3.setLoopType("loop");
+//        appiumTask3.setIsMust(true);
+//        appiumTask3.setSwapType("up");
+//
+//        AppiumTask appiumTask31 = new AppiumTask();
+//        appiumTask31.setFindType("loop");
+//        appiumTask31.setClickType("point");
+//        appiumTask31.setLoopType("noloop");
+//        appiumTask31.setIsMust(false);
+//        appiumTask31.setTextEqualType("eq");
+//        appiumTask31.setTextEqualKey("广告");
+//        appiumTask31.setOffsiteX(-100);
+//        appiumTask31.setOffsiteY(-100);
+//        appiumTask31.setWaitTime(2000L);
+//
+////        AppiumTask appiumTask32 = new AppiumTask();
+////        appiumTask32.setFindType("loop");
+////        appiumTask32.setClickType("no");
+////        appiumTask32.setLoopType("noloop");
+////        appiumTask32.setIsMust(false);
+////        appiumTask32.setTextEqualType("neq");
+////        appiumTask32.setTextEqualKey("广告");
+////
+////        AppiumTask appiumTask321 = new AppiumTask();
+////        appiumTask321.setFindType("id");
+////        appiumTask321.setFindKey("com.smile.gifmaker:id/back_btn");
+////        appiumTask321.setClickType("element");
+////        appiumTask321.setLoopType("noloop");
+////        appiumTask321.setIsMust(false);
+//
+//        AppiumTask appiumTask311 = new AppiumTask();
+//        appiumTask311.setFindType("loop");
+//        appiumTask311.setClickType("no");
+//        appiumTask311.setLoopType("noloop");
+//        appiumTask311.setIsMust(true);
+//        appiumTask311.setSwapType("up");
+//
+//        AppiumTask appiumTask312 = new AppiumTask();
+//        appiumTask312.setFindType("id");
+//        appiumTask312.setWaitTime(5000L);
+//        appiumTask312.setFindKey("com.smile.gifmaker:id/ad_simplified_style_enhanced_ad_install_text");
+//        appiumTask312.setClickType("element");
+//        appiumTask312.setLoopType("noloop");
+//        appiumTask312.setIsMust(false);
+//
+//
+//        AppiumTask appiumTask3121 = new AppiumTask();
+//        appiumTask3121.setFindType("id");
+//        appiumTask3121.setFindKey("com.android.packageinstaller:id/ok_button");
+//        appiumTask3121.setClickType("element");
+//        appiumTask3121.setLoopType("noloop");
+//        appiumTask3121.setIsMust(true);
+//        appiumTask3121.setLoopRate(3000L);
+//
+//        AppiumTask appiumTask3122 = new AppiumTask();
+//        appiumTask3122.setFindType("id");
+//        appiumTask3122.setFindKey("com.android.packageinstaller:id/launch_button");
+//        appiumTask3122.setClickType("element");
+//        appiumTask3122.setLoopType("noloop");
+//        appiumTask3122.setIsMust(true);
+//        appiumTask3121.setLoopRate(3000L);
+//
+//        AppiumTask appiumTask3124 = new AppiumTask();
+//        appiumTask3124.setFindType("id");
+//        appiumTask3124.setFindKey("com.android.packageinstaller:id/permission_allow_button");
+//        appiumTask3124.setClickType("element");
+//        appiumTask3124.setLoopType("noloop");
+//        appiumTask3124.setIsMust(false);
+//        appiumTask3124.setWaitTime(3000L);
+//
+//        AppiumTask appiumTask3125 = new AppiumTask();
+//        appiumTask3125.setFindType("id");
+//        appiumTask3125.setFindKey("com.android.packageinstaller:id/permission_allow_button");
+//        appiumTask3125.setClickType("element");
+//        appiumTask3125.setLoopType("noloop");
+//        appiumTask3125.setIsMust(false);
+//        appiumTask3125.setWaitTime(3000L);
+//
+//        AppiumTask appiumTask3126 = new AppiumTask();
+//        appiumTask3126.setFindType("id");
+//        appiumTask3126.setFindKey("com.android.packageinstaller:id/permission_allow_button");
+//        appiumTask3126.setClickType("element");
+//        appiumTask3126.setLoopType("noloop");
+//        appiumTask3126.setIsMust(false);
+//        appiumTask3126.setWaitTime(3000L);
+//
+//        AppiumTask appiumTask3127 = new AppiumTask();
+//        appiumTask3127.setFindType("id");
+//        appiumTask3127.setFindKey("com.android.packageinstaller:id/permission_allow_button");
+//        appiumTask3127.setClickType("element");
+//        appiumTask3127.setLoopType("noloop");
+//        appiumTask3127.setIsMust(false);
+//        appiumTask3127.setWaitTime(3000L);
+//        appiumTask3127.setIsClose(true);
+//
+//        List<AppiumTask> subList4 = new ArrayList<>();
+//        subList4.add(appiumTask3121);
+//        subList4.add(appiumTask3122);
+////        subList4.add(appiumTask3123);
+//        subList4.add(appiumTask3124);
+//        subList4.add(appiumTask3125);
+//        subList4.add(appiumTask3126);
+//        subList4.add(appiumTask3127);
+//        appiumTask312.setSubTask(subList4);
+//
+//        List<AppiumTask> subList3 = new ArrayList<>();
+//        subList3.add(appiumTask311);
+//        subList3.add(appiumTask312);
+//        appiumTask31.setSubTask(subList3);
+//
+////        List<AppiumTask> subList2 = new ArrayList<>();
+////        subList2.add(appiumTask321);
+////        appiumTask32.setSubTask(subList2);
+//
+//        List<AppiumTask> subList1 = new ArrayList<>();
+//        subList1.add(appiumTask31);
+////        subList1.add(appiumTask32);
+//        appiumTask3.setSubTask(subList1);
+//
+//        list.add(appiumTask1);
+//        list.add(appiumTask2);
+//        list.add(appiumTask3);
+//        return list;
+//    }
+//
+//    public void t() {
+//        try {
+////            AndroidDriver androidDriver = initAndroidDriver("http://39.106.184.70:4723/wd/hub","183.131.157.66:10005","com.smile.gifmaker","com.yxcorp.gifshow.HomeActivity");
+//            AndroidDriver androidDriver = initAndroidDriver("http://39.106.184.70:4723/wd/hub", "183.131.157.66:10005", "com.smile.gifmaker", "com.yxcorp.gifshow.HomeActivity");
+//
+//            List<AppiumTask> list = initTask();
+//            for (AppiumTask task : list) {
+//                runTask(androidDriver, task, null);
+//            }
+//            androidDriver.quit();
+//            System.out.println("task success");
+//        } catch (Exception e) {
+//            e.printStackTrace();
+//        }
+//
 //
 //
-//                List<WebElement> list1 = androidDriver.findElementsByXPath("//android.view.View[@content-desc=\"发现\"]");
-//                if(list1 != null && list1.size() > 0){
-//                    list1.get(0).click();
+//    }
+//
+//    public void runTask(AndroidDriver androidDriver, AppiumTask appiumTask, WebElement loopElement) throws Exception {
+//        if (appiumTask != null) {
+//            System.out.println(new Gson().toJson(appiumTask));
+//            if (appiumTask.getWaitTime() != null && appiumTask.getWaitTime() > 0) {
+//                Thread.sleep(appiumTask.getWaitTime());
+//            }
+//            if (appiumTask.getLoopType() != null && "noloop".equals(appiumTask.getLoopType())) {
+//                if (appiumTask.getFindType() != null) {
+//                    WebElement element = null;
+//                    if ("id".equals(appiumTask.getFindType())) {
+//                        element = AppiumUtil.getElementById(androidDriver, appiumTask.getFindKey());
+//                    } else if ("class".equals(appiumTask.getFindType())) {
+//                        element = getElementByClass(androidDriver, appiumTask.getFindKey());
+//                    } else if ("xpath".equals(appiumTask.getFindType())) {
+//                        element = getElementByXpath(androidDriver, appiumTask.getFindKey());
+//                    } else if ("loop".equals(appiumTask.getFindType())) {
+//                        element = loopElement;
+//                    }
+//                    if (element != null) {
+//                        if (appiumTask.getTextEqualType() != null) {
+//                            if ("eq".equals(appiumTask.getTextEqualType())) {
+//                                if (!element.getText().equals(appiumTask.getTextEqualKey())) {
+//                                    return;
+//                                }
+//                            } else if ("neq".equals(appiumTask.getTextEqualType())) {
+//                                if (element.getText() == null || element.getText().equals(appiumTask.getTextEqualKey())) {
+//                                    return;
+//                                }
+//                            }
+//                        }
+//                        if (appiumTask.getClickType() != null) {
+//                            if ("element".equals(appiumTask.getClickType())) {
+//                                element.click();
+//                            } else if ("point".equals(appiumTask.getClickType())) {
+//                                Point point = element.getLocation();
+//                                tapPoint(androidDriver, point.getX() + appiumTask.getOffsiteX(), point.getY() + appiumTask.getOffsiteY());
+//                            }
+//                        }
+//                        List<AppiumTask> subTask = appiumTask.getSubTask();
+//                        if (subTask != null && subTask.size() > 0) {
+//                            for (AppiumTask task : subTask) {
+//                                runTask(androidDriver, task, element);
+//                            }
+//                        }
+//                    } else {
+//                        if (appiumTask.getIsMust() != null && appiumTask.getIsMust() == true) {
+//                            if (appiumTask.getLoopRate() != null && appiumTask.getLoopRate() > 0) {
+//                                Thread.sleep(appiumTask.getLoopRate());
+//                            }
+//                            runTask(androidDriver, appiumTask, element);
+//                            return;
+//                        }
+//                        if (appiumTask.getClickType() != null && "point".equals(appiumTask.getClickType())) {
+//                            tapPoint(androidDriver, appiumTask.getOffsiteX(), appiumTask.getOffsiteY());
+//                        }
+//                    }
 //                }
 //                }
-//                appiumTest.swipeToUp(androidDriver);
-//
-//                Thread.sleep(2000);
-//                List<WebElement> webElementList = androidDriver.findElementsById("com.smile.gifmaker:id/subject");
-//                if(webElementList != null && webElementList.size() > 0){
-//                    for(WebElement element : webElementList){
-//                        if(element.getText().equals("广告")){
-//                            Point point = element.getLocation();
-//                            appiumTest.tapPoint(androidDriver,point.getX()-100,point.getY()-100);
-////                            Thread.sleep(1000);
-////                            androidDriver.findElementById("com.smile.gifmaker:id/like_button").click();
-////                            Thread.sleep(1000);
-//                            appiumTest.swipeToUp(androidDriver);
-//                            Thread.sleep(5000);
-////                            String text = androidDriver.findElementById("com.smile.gifmaker:id/label").getText();
-////                            System.out.println(text);
-////                            String title = text.split(":")[1].trim();
-//
-////                            if(title.startsWith("超级有趣的小游戏")){
-////                                Thread.sleep(1000);
-////                                androidDriver.findElementById("com.smile.gifmaker:id/editor_holder_text").click();
-////                                Thread.sleep(1000);
-////                                androidDriver.findElementById("com.smile.gifmaker:id/editor").sendKeys("这个广告看着很吸引人!");
-////                                Thread.sleep(1000);
-////                                androidDriver.findElementById("com.smile.gifmaker:id/finish_button").click();
-//                                Thread.sleep(5000);
-//                                List<WebElement> webElement = androidDriver.findElementsById("com.smile.gifmaker:id/ad_simplified_style_enhanced_ad_install_text");
-//                                if (webElement != null && webElement.size() > 0){
-//                                    webElement.get(0).click();
-//                                    while (true){
-//                                    Thread.sleep(5000);
-//                                        List<WebElement> element1 = androidDriver.findElementsById("com.android.packageinstaller:id/ok_button");
-//                                        if(element1 != null && element1.size() > 0){
-//                                            System.out.println(element1.get(0).getText());
-//                                            element1.get(0).click();
-//                                            break;
-//                                        }
-//                                    }
-//                                    while (true){
-//                                        Thread.sleep(5000);
-//                                        List<WebElement> element1 = androidDriver.findElementsById("com.android.packageinstaller:id/launch_button");
-//                                        if(element1 != null && element1.size() > 0){
-//                                            System.out.println(element1.get(0).getText());
-//                                            element1.get(0).click();
-//                                            break;
-//                                        }
-//                                    }
-//                                    while (true){
-//                                        Thread.sleep(5000);
-//                                        List<WebElement> element1 = androidDriver.findElementsById("com.android.packageinstaller:id/permission_allow_button");
-//                                        if (element1 != null && element1.size() > 0){
-//                                            element1.get(0).click();
-//                                        }else {
-//                                            break;
-//                                        }
-//                                    }
-//                                    Thread.sleep(5000);
-//                                    List<WebElement> element1 = androidDriver.findElementsById("com.game.matrix_pixelpaint:id/nr");
-//                                    if(element1 != null && element1.size() > 0){
-//                                        element1.get(0).click();
-//                                    }
-//                                    for(int i = 0; i < 10;i++){
-//                                        Thread.sleep(2000);
-//                                        appiumTest.swipeToUp(androidDriver);
+//                if (appiumTask.getSwapType() != null) {
+//                    if ("up".equals(appiumTask.getSwapType())) {
+//                        this.swipeToUp(androidDriver);
+//                    } else if ("down".equals(appiumTask.getSwapType())) {
+//                        this.swipeToDown(androidDriver);
+//                    } else if ("left".equals(appiumTask.getSwapType())) {
+//                        this.swipeToLeft(androidDriver);
+//                    } else if ("right".equals(appiumTask.getSwapType())) {
+//                        this.swipeToRight(androidDriver);
+//                    }
+//                }
+//            } else if (appiumTask.getLoopType() != null && "loop".equals(appiumTask.getLoopType())) {
+//                while (isLoop) {
+//                    System.out.println("loop:" + isLoop);
+//                    if (appiumTask.getFindType() != null) {
+//                        List<WebElement> list = null;
+//                        if ("id".equals(appiumTask.getFindType())) {
+//                            list = androidDriver.findElementsById(appiumTask.getFindKey());
+//                        } else if ("class".equals(appiumTask.getFindType())) {
+//                            list = androidDriver.findElementsByClassName(appiumTask.getFindKey());
+//                        } else if ("xpath".equals(appiumTask.getFindType())) {
+//                            list = androidDriver.findElementsByXPath(appiumTask.getFindKey());
+//                        }
+//                        if (list != null && list.size() > 0) {
+//                            for (WebElement element : list) {
+//                                if (!isLoop) {
+//                                    break;
+//                                }
+//                                if (appiumTask.getLoopRate() != null && appiumTask.getLoopRate() > 0) {
+//                                    Thread.sleep(appiumTask.getLoopRate());
+//                                }
+//                                List<AppiumTask> subTask = appiumTask.getSubTask();
+//                                if (subTask != null && subTask.size() > 0) {
+//                                    for (AppiumTask task : subTask) {
+//                                        runTask(androidDriver, task, element);
 //                                    }
 //                                    }
-//                                    System.out.println("操作完成");
-//                                }else {
-//                                    androidDriver.findElementById("com.smile.gifmaker:id/back_btn").click();
 //                                }
 //                                }
-//                                //按钮  com.smile.gifmaker:id/ad_simplified_style_enhanced_ad_install_text
-//                                //转化  com.smile.gifmaker:id/ad_simplified_style_enhanced_app_name_text
-//                                //喜欢  com.smile.gifmaker:id/like_button
-//                                //举报  com.smile.gifmaker:id/inform_button
-//                                //分享  com.smile.gifmaker:id/forward_button
-//                                //头像  com.smile.gifmaker:id/avatar
-//                                //返回  com.smile.gifmaker:id/back_btn
-//                                //昵称标题 com.smile.gifmaker:id/label
-//                                //评论数 com.smile.gifmaker:id/more_comments
-//                                //点赞数 com.smile.gifmaker:id/number_like
-//                                //播放数 com.smile.gifmaker:id/number_review
-//                                //新增评论 com.smile.gifmaker:id/text_top
-//                                //评论内容 com.smile.gifmaker:id/editor
-//                                //评论提交 com.smile.gifmaker:id/finish_button
-//
-////                            }else {
-////                                System.out.println(title);
-////                                androidDriver.findElementById("com.smile.gifmaker:id/back_btn").click();
-////                            }
-//
-//
-////                            Thread.sleep(5000);
-////                            androidDriver.findElementById("com.smile.gifmaker:id/back_btn").click();
-////                            System.out.println("广告坐标为:"+point.getX()+","+point.getY());
+//                            }
+//                        }
+//                    }
+//                    if (appiumTask.getSwapType() != null) {
+//                        if ("up".equals(appiumTask.getSwapType())) {
+//                            this.swipeToUp(androidDriver);
+//                        } else if ("down".equals(appiumTask.getSwapType())) {
+//                            this.swipeToDown(androidDriver);
+//                        } else if ("left".equals(appiumTask.getSwapType())) {
+//                            this.swipeToLeft(androidDriver);
+//                        } else if ("right".equals(appiumTask.getSwapType())) {
+//                            this.swipeToRight(androidDriver);
 //                        }
 //                        }
 //                    }
 //                    }
 //                }
 //                }
-//            }catch (Exception e){
-//                e.printStackTrace();
-//            }
 //
 //
+//            }
+//            if (appiumTask.getIsClose() != null && appiumTask.getIsClose()) {
+//                this.isLoop = false;
+//            }
 //        }
 //        }
-
-//        androidDriver.findElementById("com.smile.gifmaker:id/player_cover").click();
-//        Thread.sleep(5000);
-//        //退出
-//        androidDriver.quit();
-    }
-
-    public WebElement getElementById(AndroidDriver androidDriver, String id) {
-        WebElement element = null;
-        List<WebElement> elements = androidDriver.findElementsById(id);
-        if (elements != null && elements.size() > 0) {
-            element = elements.get(0);
-        }
-        return element;
-    }
-
-    public WebElement getElementByClass(AndroidDriver androidDriver, String className) {
-        WebElement element = null;
-        List<WebElement> elements = androidDriver.findElementsByClassName(className);
-        if (elements != null && elements.size() > 0) {
-            element = elements.get(0);
-        }
-        return element;
-    }
-
-    public WebElement getElementByXpath(AndroidDriver androidDriver, String xpath) {
-        WebElement element = null;
-        List<WebElement> elements = androidDriver.findElementsByXPath(xpath);
-        if (elements != null && elements.size() > 0) {
-            element = elements.get(0);
-        }
-        return element;
-    }
-}
+//    }
+//
+//    public static void main(String[] args) throws MalformedURLException, InterruptedException {
+//        // TODO Auto-generated method stub
+//        //1.添加配置,创建DesiredCapabilities对象
+//        AppiumTest appiumTest = new AppiumTest();
+//        appiumTest.t();
+//        //2.创建驱动...URL是appium的固定地址;指定appium通讯的地址,将相对应的配置传入到驱动里边
+//
+////        com.longene.lglocation/.activity.MainActivity
+////        com.longene.setcardproperty/.MainActivity
+//        //打开地图后点击同意继续
+////        androidDriver.findElementById("com.smile.gifmaker:id/button").click();
+//        //点击进入地图
+//        //加线程等待
+////        Thread.sleep(5000);
+////        while (true){
+////            try {
+////                AndroidDriver androidDriver = appiumTest.initAndroidDriver("http://39.106.184.70:4723/wd/hub","","","");
+////
+////                List<WebElement> list = androidDriver.findElementsByClassName("android.widget.CheckedTextView");
+////                if(list != null && list.size() > 0){
+////                    list.get(0).click();
+////                }
+////
+////                List<WebElement> list1 = androidDriver.findElementsByXPath("//android.view.View[@content-desc=\"发现\"]");
+////                if(list1 != null && list1.size() > 0){
+////                    list1.get(0).click();
+////                }
+////                appiumTest.swipeToUp(androidDriver);
+////
+////                Thread.sleep(2000);
+////                List<WebElement> webElementList = androidDriver.findElementsById("com.smile.gifmaker:id/subject");
+////                if(webElementList != null && webElementList.size() > 0){
+////                    for(WebElement element : webElementList){
+////                        if(element.getText().equals("广告")){
+////                            Point point = element.getLocation();
+////                            appiumTest.tapPoint(androidDriver,point.getX()-100,point.getY()-100);
+//////                            Thread.sleep(1000);
+//////                            androidDriver.findElementById("com.smile.gifmaker:id/like_button").click();
+//////                            Thread.sleep(1000);
+////                            appiumTest.swipeToUp(androidDriver);
+////                            Thread.sleep(5000);
+//////                            String text = androidDriver.findElementById("com.smile.gifmaker:id/label").getText();
+//////                            System.out.println(text);
+//////                            String title = text.split(":")[1].trim();
+////
+//////                            if(title.startsWith("超级有趣的小游戏")){
+//////                                Thread.sleep(1000);
+//////                                androidDriver.findElementById("com.smile.gifmaker:id/editor_holder_text").click();
+//////                                Thread.sleep(1000);
+//////                                androidDriver.findElementById("com.smile.gifmaker:id/editor").sendKeys("这个广告看着很吸引人!");
+//////                                Thread.sleep(1000);
+//////                                androidDriver.findElementById("com.smile.gifmaker:id/finish_button").click();
+////                                Thread.sleep(5000);
+////                                List<WebElement> webElement = androidDriver.findElementsById("com.smile.gifmaker:id/ad_simplified_style_enhanced_ad_install_text");
+////                                if (webElement != null && webElement.size() > 0){
+////                                    webElement.get(0).click();
+////                                    while (true){
+////                                    Thread.sleep(5000);
+////                                        List<WebElement> element1 = androidDriver.findElementsById("com.android.packageinstaller:id/ok_button");
+////                                        if(element1 != null && element1.size() > 0){
+////                                            System.out.println(element1.get(0).getText());
+////                                            element1.get(0).click();
+////                                            break;
+////                                        }
+////                                    }
+////                                    while (true){
+////                                        Thread.sleep(5000);
+////                                        List<WebElement> element1 = androidDriver.findElementsById("com.android.packageinstaller:id/launch_button");
+////                                        if(element1 != null && element1.size() > 0){
+////                                            System.out.println(element1.get(0).getText());
+////                                            element1.get(0).click();
+////                                            break;
+////                                        }
+////                                    }
+////                                    while (true){
+////                                        Thread.sleep(5000);
+////                                        List<WebElement> element1 = androidDriver.findElementsById("com.android.packageinstaller:id/permission_allow_button");
+////                                        if (element1 != null && element1.size() > 0){
+////                                            element1.get(0).click();
+////                                        }else {
+////                                            break;
+////                                        }
+////                                    }
+////                                    Thread.sleep(5000);
+////                                    List<WebElement> element1 = androidDriver.findElementsById("com.game.matrix_pixelpaint:id/nr");
+////                                    if(element1 != null && element1.size() > 0){
+////                                        element1.get(0).click();
+////                                    }
+////                                    for(int i = 0; i < 10;i++){
+////                                        Thread.sleep(2000);
+////                                        appiumTest.swipeToUp(androidDriver);
+////                                    }
+////                                    System.out.println("操作完成");
+////                                }else {
+////                                    androidDriver.findElementById("com.smile.gifmaker:id/back_btn").click();
+////                                }
+////                                //按钮  com.smile.gifmaker:id/ad_simplified_style_enhanced_ad_install_text
+////                                //转化  com.smile.gifmaker:id/ad_simplified_style_enhanced_app_name_text
+////                                //喜欢  com.smile.gifmaker:id/like_button
+////                                //举报  com.smile.gifmaker:id/inform_button
+////                                //分享  com.smile.gifmaker:id/forward_button
+////                                //头像  com.smile.gifmaker:id/avatar
+////                                //返回  com.smile.gifmaker:id/back_btn
+////                                //昵称标题 com.smile.gifmaker:id/label
+////                                //评论数 com.smile.gifmaker:id/more_comments
+////                                //点赞数 com.smile.gifmaker:id/number_like
+////                                //播放数 com.smile.gifmaker:id/number_review
+////                                //新增评论 com.smile.gifmaker:id/text_top
+////                                //评论内容 com.smile.gifmaker:id/editor
+////                                //评论提交 com.smile.gifmaker:id/finish_button
+////
+//////                            }else {
+//////                                System.out.println(title);
+//////                                androidDriver.findElementById("com.smile.gifmaker:id/back_btn").click();
+//////                            }
+////
+////
+//////                            Thread.sleep(5000);
+//////                            androidDriver.findElementById("com.smile.gifmaker:id/back_btn").click();
+//////                            System.out.println("广告坐标为:"+point.getX()+","+point.getY());
+////                        }
+////                    }
+////                }
+////            }catch (Exception e){
+////                e.printStackTrace();
+////            }
+////
+////        }
+//
+////        androidDriver.findElementById("com.smile.gifmaker:id/player_cover").click();
+////        Thread.sleep(5000);
+////        //退出
+////        androidDriver.quit();
+//    }
+//}

+ 0 - 4
module-toutiao/src/main/java/cn/com/ctop/toutiao/service/IByteDanceAdvertiserDataService.java

@@ -18,8 +18,6 @@ public interface IByteDanceAdvertiserDataService {
 
 
     Map<String, Object> getAdvertiserBudget(String accountId);
     Map<String, Object> getAdvertiserBudget(String accountId);
 
 
-    Map<String, Object> getAdvertiserCreative(String accountId, String ids, String date);
-
     Map<String, Object> getAdvertiserCreativeMaterial(String accountId, String creativeIds);
     Map<String, Object> getAdvertiserCreativeMaterial(String accountId, String creativeIds);
 
 
     Map<String, Object> advertiserCampaignUpdateStatus(String accountId, String campaignIds, String optStatus);
     Map<String, Object> advertiserCampaignUpdateStatus(String accountId, String campaignIds, String optStatus);
@@ -32,8 +30,6 @@ public interface IByteDanceAdvertiserDataService {
 
 
     Map<String, Object> advertiserPlanUpdateBudget(String accountId, String adIds, String budgets);
     Map<String, Object> advertiserPlanUpdateBudget(String accountId, String adIds, String budgets);
 
 
-    Map<String, Object> advertiserCreativeUpdateStatus(String accountId, String ids, String optStatus);
-
     Map<String, Object> advertiserCustomAudienceSelect(String accountId);
     Map<String, Object> advertiserCustomAudienceSelect(String accountId);
 
 
     Map<String, Object> advertiserAdUpdate(String accountId, Long adId, ByteDanceUserOrientationTemplate template);
     Map<String, Object> advertiserAdUpdate(String accountId, Long adId, ByteDanceUserOrientationTemplate template);

+ 4 - 0
module-toutiao/src/main/java/cn/com/ctop/toutiao/service/IByteDanceCreativeService.java

@@ -19,4 +19,8 @@ public interface IByteDanceCreativeService extends IService<ByteDanceCreative> {
     Map<String, Object> insertBatch(JSONObject template);
     Map<String, Object> insertBatch(JSONObject template);
 
 
     JSONObject createCreative(JSONObject data, String token);
     JSONObject createCreative(JSONObject data, String token);
+
+    Map<String, Object> getAdvertiserCreative(String accountId, String ids, String date);
+
+    Map<String, Object> advertiserCreativeUpdateStatus(String accountId, String creativeIds, String optStatus);
 }
 }

+ 0 - 102
module-toutiao/src/main/java/cn/com/ctop/toutiao/service/impl/ByteDanceAdvertiserDataServiceImpl.java

@@ -29,8 +29,6 @@ public class ByteDanceAdvertiserDataServiceImpl implements IByteDanceAdvertiserD
     @Autowired
     @Autowired
     private IByteDanceCreativeMaterialService creativeMaterialService;
     private IByteDanceCreativeMaterialService creativeMaterialService;
     @Autowired
     @Autowired
-    private IByteDanceCreativeService creativeService;
-    @Autowired
     private IByteDanceAdvertiserBudgetService advertiserBudgetService;
     private IByteDanceAdvertiserBudgetService advertiserBudgetService;
     @Autowired
     @Autowired
     private IByteDanceCampaignService campaignService;
     private IByteDanceCampaignService campaignService;
@@ -189,15 +187,6 @@ public class ByteDanceAdvertiserDataServiceImpl implements IByteDanceAdvertiserD
     }
     }
 
 
     @Override
     @Override
-    public Map<String, Object> getAdvertiserCreative(String accountId, String ids, String date) {
-        Map<String, Object> resultMap = new HashMap<>();
-        getAdvertiserCreativeByPageNumber(accountId, 1, ids, date);
-        resultMap.put("code", 0);
-        resultMap.put("message", "获取广告主广告创意信息完成");
-        return resultMap;
-    }
-
-    @Override
     public Map<String, Object> getAdvertiserCreativeMaterial(String accountId, String creativeIds) {
     public Map<String, Object> getAdvertiserCreativeMaterial(String accountId, String creativeIds) {
         Map<String, Object> resultMap = new HashMap<>();
         Map<String, Object> resultMap = new HashMap<>();
         CtopOauthToken cTopOauthToken = tokenService.getOauthTokenByAccountId(accountId);
         CtopOauthToken cTopOauthToken = tokenService.getOauthTokenByAccountId(accountId);
@@ -504,53 +493,6 @@ public class ByteDanceAdvertiserDataServiceImpl implements IByteDanceAdvertiserD
         return resultMap;
         return resultMap;
     }
     }
 
 
-    @Override
-    public Map<String, Object> advertiserCreativeUpdateStatus(String accountId, String creativeIds, String optStatus) {
-        Map<String, Object> resultMap = new HashMap<>();
-        JSONArray ids = new JSONArray();
-        String[] getCreativeIds = creativeIds.split(StringUtils.COMMA);
-        if (null != getCreativeIds && getCreativeIds.length > 0) {
-            for (int i = 0; i < getCreativeIds.length; i++) {
-                ids.add(Long.parseLong(getCreativeIds[i]));
-            }
-        }
-        CtopOauthToken cTopOauthToken = tokenService.getOauthTokenByAccountId(accountId);
-        //2: 根据token以及用户id获取用户信息数据
-        String url = PropertiesUtils.getValue("bytedance_config", "bytedance_api_url") + PropertiesUtils.getValue("bytedance_config", "bytedance_v2_creative_update_status");
-        Map<String, String> headers = new HashMap<>();
-        headers.put("Content-Type", "application/json");
-        headers.put("Access-Token", cTopOauthToken.getAccessToken());
-
-        JSONObject params = new JSONObject();
-        params.put("advertiser_id", cTopOauthToken.getAccountId());
-        params.put("creative_ids", ids.toJSONString());
-        params.put("opt_status", optStatus);
-        String result = HttpUtils.httpPostRequest(url, params, headers);
-        JSONObject jsonObject = JSONObject.parseObject(result);
-        Integer code = jsonObject.getInteger("code");
-
-        if (null == code || !code.equals(0)) {
-            log.info("修改创意状态接口异常==》accountId:{},message:{}", accountId, jsonObject.getString("message"));
-            resultMap.put("code", -1);
-            resultMap.put("message", "修改创意状态接口异常");
-            return resultMap;
-        }
-        JSONObject data = jsonObject.getJSONObject("data");
-        if (null == data) {
-            log.info("修改创意状态异常==》accountId:{},message:{}", accountId, jsonObject.getString("message"));
-            resultMap.put("code", -1);
-            resultMap.put("message", "修改创意状态异常");
-            return resultMap;
-        }
-        JSONArray returnCreativeIds = data.getJSONArray("creative_ids");
-        if (null != returnCreativeIds && returnCreativeIds.size() > 0) {
-            getAdvertiserCreative(accountId, creativeIds, null);
-        }
-        resultMap.put("code", 0);
-        resultMap.put("message", "广告创意状态修改成功");
-        return resultMap;
-    }
-
     /**
     /**
      * 查询人群包信息
      * 查询人群包信息
      *
      *
@@ -965,51 +907,7 @@ public class ByteDanceAdvertiserDataServiceImpl implements IByteDanceAdvertiserD
     }
     }
 
 
 
 
-    private void getAdvertiserCreativeByPageNumber(String accountId, Integer pageNumber, String ids, String date) {
-        CtopOauthToken cTopOauthToken = tokenService.getOauthTokenByAccountId(accountId);
-        //2: 根据token以及用户id获取用户信息数据
-        String url = PropertiesUtils.getValue("bytedance_config", "bytedance_api_url") + PropertiesUtils.getValue("bytedance_config", "bytedance_v2_creative_get");
-        Map<String, String> headers = new HashMap<>();
-        headers.put("Content-Type", "application/json");
-        headers.put("Access-Token", cTopOauthToken.getAccessToken());
 
 
-        TreeMap<String, Object> params = new TreeMap<>();
-        JSONObject filtering = new JSONObject();
-        if (null != ids && !"".equals(ids.trim())) {
-            String[] idsArray = ids.split(StringUtils.COMMA);
-            JSONArray filterIdsArray = new JSONArray();
-            for (int i = 0; i < idsArray.length; i++) {
-                Long id = Long.parseLong(idsArray[i]);
-                filterIdsArray.add(id);
-            }
-            filtering.put("ids", filterIdsArray);
-        }
-        if (null != date && !"".equals(date)) {
-            filtering.put("creative_create_time", date);
-        }
-        params.put("filtering", filtering.toJSONString());
-        params.put("advertiser_id", cTopOauthToken.getAccountId());
-        params.put("page", pageNumber + "");
-        String result = HttpUtils.httpGetRequest(url, headers, params);
-        JSONObject jsonObject = JSONObject.parseObject(result);
-        Integer code = jsonObject.getInteger("code");
-
-        if (null == code || !code.equals(0)) {
-            log.info("获取广告主广告创意信息接口异常==》accountId:{},message:{}", accountId, jsonObject.getString("message"));
-            return;
-        }
-        JSONArray data = jsonObject.getJSONObject("data").getJSONArray("list");
-        if (null == data || data.size() <= 0) {
-            log.info("广告主广告创意信息不存在==》accountId:{},message:{}", accountId, jsonObject.getString("message"));
-            return;
-        }
-        for (int i = 0; i < data.size(); i++) {
-            JSONObject dataObject = data.getJSONObject(i);
-            ByteDanceCreative creative = new ByteDanceCreative(dataObject, accountId);
-            creativeService.saveOrUpdate(creative);
-        }
-        getAdvertiserCreativeByPageNumber(accountId, pageNumber + 1, ids, date);
-    }
 
 
     private void getAdvertiserCampaignByPageNumber(String accountId, Integer pageNumber, String ids, String date) {
     private void getAdvertiserCampaignByPageNumber(String accountId, Integer pageNumber, String ids, String date) {
         CtopOauthToken cTopOauthToken = tokenService.getOauthTokenByAccountId(accountId);
         CtopOauthToken cTopOauthToken = tokenService.getOauthTokenByAccountId(accountId);

+ 104 - 6
module-toutiao/src/main/java/cn/com/ctop/toutiao/service/impl/ByteDanceCreativeServiceImpl.java

@@ -1,14 +1,11 @@
 package cn.com.ctop.toutiao.service.impl;
 package cn.com.ctop.toutiao.service.impl;
 
 
-import cn.com.ctop.common.module.utils.PropertiesUtils;
-import cn.com.ctop.common.module.utils.ResultMapUtils;
-import cn.com.ctop.common.module.utils.StatusCode;
 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.service.IFileInfoService;
 import cn.com.ctop.common.module.service.IFileInfoService;
+import cn.com.ctop.common.module.utils.*;
 import cn.com.ctop.toutiao.entity.ByteDanceCreative;
 import cn.com.ctop.toutiao.entity.ByteDanceCreative;
 import cn.com.ctop.toutiao.mapper.ByteDanceCreativeMapper;
 import cn.com.ctop.toutiao.mapper.ByteDanceCreativeMapper;
-import cn.com.ctop.toutiao.service.IByteDanceAdvertiserDataService;
 import cn.com.ctop.toutiao.service.IByteDanceCampaignTemplateService;
 import cn.com.ctop.toutiao.service.IByteDanceCampaignTemplateService;
 import cn.com.ctop.toutiao.service.IByteDanceCreativeService;
 import cn.com.ctop.toutiao.service.IByteDanceCreativeService;
 import cn.com.ctop.toutiao.service.IBytedanceAdvertisePlanTemplateService;
 import cn.com.ctop.toutiao.service.IBytedanceAdvertisePlanTemplateService;
@@ -31,6 +28,7 @@ import java.io.IOException;
 import java.io.InputStreamReader;
 import java.io.InputStreamReader;
 import java.util.HashMap;
 import java.util.HashMap;
 import java.util.Map;
 import java.util.Map;
+import java.util.TreeMap;
 
 
 /**
 /**
  * @Description: 今日头条创意信息
  * @Description: 今日头条创意信息
@@ -48,11 +46,111 @@ public class ByteDanceCreativeServiceImpl extends ServiceImpl<ByteDanceCreativeM
     @Autowired
     @Autowired
     private IBytedanceAdvertisePlanTemplateService planTemplateService;
     private IBytedanceAdvertisePlanTemplateService planTemplateService;
     @Autowired
     @Autowired
-    private IByteDanceAdvertiserDataService advertiserDataService;
-    @Autowired
     private ICtopOauthTokenService tokenService;
     private ICtopOauthTokenService tokenService;
 
 
     @Override
     @Override
+    public Map<String, Object> advertiserCreativeUpdateStatus(String accountId, String creativeIds, String optStatus) {
+        Map<String, Object> resultMap = new HashMap<>();
+        JSONArray ids = new JSONArray();
+        String[] getCreativeIds = creativeIds.split(StringUtils.COMMA);
+        if (null != getCreativeIds && getCreativeIds.length > 0) {
+            for (int i = 0; i < getCreativeIds.length; i++) {
+                ids.add(Long.parseLong(getCreativeIds[i]));
+            }
+        }
+        CtopOauthToken cTopOauthToken = tokenService.getOauthTokenByAccountId(accountId);
+        //2: 根据token以及用户id获取用户信息数据
+        String url = PropertiesUtils.getValue("bytedance_config", "bytedance_api_url") + PropertiesUtils.getValue("bytedance_config", "bytedance_v2_creative_update_status");
+        Map<String, String> headers = new HashMap<>();
+        headers.put("Content-Type", "application/json");
+        headers.put("Access-Token", cTopOauthToken.getAccessToken());
+
+        JSONObject params = new JSONObject();
+        params.put("advertiser_id", cTopOauthToken.getAccountId());
+        params.put("creative_ids", ids.toJSONString());
+        params.put("opt_status", optStatus);
+        String result = HttpUtils.httpPostRequest(url, params, headers);
+        JSONObject jsonObject = JSONObject.parseObject(result);
+        Integer code = jsonObject.getInteger("code");
+
+        if (null == code || !code.equals(0)) {
+            log.info("修改创意状态接口异常==》accountId:{},message:{}", accountId, jsonObject.getString("message"));
+            resultMap.put("code", -1);
+            resultMap.put("message", "修改创意状态接口异常");
+            return resultMap;
+        }
+        JSONObject data = jsonObject.getJSONObject("data");
+        if (null == data) {
+            log.info("修改创意状态异常==》accountId:{},message:{}", accountId, jsonObject.getString("message"));
+            resultMap.put("code", -1);
+            resultMap.put("message", "修改创意状态异常");
+            return resultMap;
+        }
+        JSONArray returnCreativeIds = data.getJSONArray("creative_ids");
+        if (null != returnCreativeIds && returnCreativeIds.size() > 0) {
+            getAdvertiserCreative(accountId, creativeIds, null);
+        }
+        resultMap.put("code", 0);
+        resultMap.put("message", "广告创意状态修改成功");
+        return resultMap;
+    }
+
+    @Override
+    public Map<String, Object> getAdvertiserCreative(String accountId, String ids, String date) {
+        Map<String, Object> resultMap = new HashMap<>();
+        getAdvertiserCreativeByPageNumber(accountId, 1, ids, date);
+        resultMap.put("code", 0);
+        resultMap.put("message", "获取广告主广告创意信息完成");
+        return resultMap;
+    }
+
+    public void getAdvertiserCreativeByPageNumber(String accountId, Integer pageNumber, String ids, String date) {
+        CtopOauthToken cTopOauthToken = tokenService.getOauthTokenByAccountId(accountId);
+        //2: 根据token以及用户id获取用户信息数据
+        String url = PropertiesUtils.getValue("bytedance_config", "bytedance_api_url") + PropertiesUtils.getValue("bytedance_config", "bytedance_v2_creative_get");
+        Map<String, String> headers = new HashMap<>();
+        headers.put("Content-Type", "application/json");
+        headers.put("Access-Token", cTopOauthToken.getAccessToken());
+
+        TreeMap<String, Object> params = new TreeMap<>();
+        JSONObject filtering = new JSONObject();
+        if (null != ids && !"".equals(ids.trim())) {
+            String[] idsArray = ids.split(StringUtils.COMMA);
+            JSONArray filterIdsArray = new JSONArray();
+            for (int i = 0; i < idsArray.length; i++) {
+                Long id = Long.parseLong(idsArray[i]);
+                filterIdsArray.add(id);
+            }
+            filtering.put("ids", filterIdsArray);
+        }
+        if (null != date && !"".equals(date)) {
+            filtering.put("creative_create_time", date);
+        }
+        params.put("filtering", filtering.toJSONString());
+        params.put("advertiser_id", cTopOauthToken.getAccountId());
+        params.put("page", pageNumber + "");
+        String result = HttpUtils.httpGetRequest(url, headers, params);
+        JSONObject jsonObject = JSONObject.parseObject(result);
+        Integer code = jsonObject.getInteger("code");
+
+        if (null == code || !code.equals(0)) {
+            log.info("获取广告主广告创意信息接口异常==》accountId:{},message:{}", accountId, jsonObject.getString("message"));
+            return;
+        }
+        JSONArray data = jsonObject.getJSONObject("data").getJSONArray("list");
+        if (null == data || data.size() <= 0) {
+            log.info("广告主广告创意信息不存在==》accountId:{},message:{}", accountId, jsonObject.getString("message"));
+            return;
+        }
+        for (int i = 0; i < data.size(); i++) {
+            JSONObject dataObject = data.getJSONObject(i);
+            ByteDanceCreative creative = new ByteDanceCreative(dataObject, accountId);
+            this.saveOrUpdate(creative);
+        }
+        getAdvertiserCreativeByPageNumber(accountId, pageNumber + 1, ids, date);
+    }
+
+    @Override
     public Map<String, Object> creativeCreate(String accountId, Long adId, String dataString) {
     public Map<String, Object> creativeCreate(String accountId, Long adId, String dataString) {
         Map<String, Object> resultMap = new HashMap<>();
         Map<String, Object> resultMap = new HashMap<>();
         //1:获取token
         //1:获取token

+ 0 - 1
module-toutiao/src/main/java/cn/com/ctop/toutiao/service/impl/BytedanceAdvertisePlanTemplateServiceImpl.java

@@ -35,7 +35,6 @@ public class BytedanceAdvertisePlanTemplateServiceImpl extends ServiceImpl<Byted
     private BytedanceDeliveryTargetTemplateMapper deliveryTargetTemplateMapper;
     private BytedanceDeliveryTargetTemplateMapper deliveryTargetTemplateMapper;
     @Autowired
     @Autowired
     private ByteDanceUserOrientationTemplateMapper userOrientationTemplateMapper;
     private ByteDanceUserOrientationTemplateMapper userOrientationTemplateMapper;
-
     @Autowired
     @Autowired
     private IByteDanceAdvertisePlanService advertisePlanService;
     private IByteDanceAdvertisePlanService advertisePlanService;
     @Autowired
     @Autowired