Explorar el Código

修改pangolin爬虫逻辑

syh hace 5 años
padre
commit
05115dd375

+ 1 - 1
jeecg-boot-module-system/src/main/resources/application-test.yml

@@ -113,7 +113,7 @@ spring:
         max-wait: -1ms  #最大建立连接等待时间。如果超过此时间将接到异常。设为-1表示无限制。
         min-idle: 0     #最小等待连接中的数量,设 0 为没有限制
       shutdown-timeout: 100ms
-    password: foobared
+    password:
     port: 6379
 #mybatis plus 设置
 mybatis-plus:

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

@@ -5,6 +5,7 @@ import cn.com.ctop.common.module.entity.CtopOauthToken;
 import cn.com.ctop.common.module.service.IBindAccountLoginService;
 import cn.com.ctop.common.module.service.ICtopOauthTokenService;
 import cn.com.ctop.common.module.utils.CtopAdConstant;
+import cn.com.ctop.crawler.modules.pangolin.entity.PangolinApp;
 import cn.com.ctop.crawler.modules.pangolin.service.PangolinAppService;
 import cn.com.ctop.crawler.modules.pangolin.service.PangolinCrawlerService;
 import cn.com.ctop.crawler.modules.pangolin.service.PangolinLoginService;
@@ -122,15 +123,15 @@ public class SampleTest {
         List<BindAccountLogin> list = bindAccountLoginService.list(queryWrapper);
         if (list != null && !list.isEmpty()) {
             for (BindAccountLogin bindAccountLogin : list) {
-                pangolinCrawlerService.getChannelList(bindAccountLogin);
+//                pangolinCrawlerService.getChannelList(bindAccountLogin);
 //                pangolinCrawlerService.getActivationList(bindAccountLogin, DateUtils.getNowDate("yyyy-MM-dd"), 1);
 //                pangolinCrawlerService.getCheckList(bindAccountLogin);
-//                QueryWrapper<PangolinApp> queryWrapper1 = new QueryWrapper<>();
-//                queryWrapper1.eq("account_name", bindAccountLogin.getAccountName());
-//                List<PangolinApp> appList = pangolinAppService.list(queryWrapper1);
-//                if (appList != null && !appList.isEmpty()) {
-//                    appList.forEach(pangolinApp -> pangolinCrawlerService.getRealTimeList(bindAccountLogin, pangolinApp.getId()));
-//                }
+                QueryWrapper<PangolinApp> queryWrapper1 = new QueryWrapper<>();
+                queryWrapper1.eq("account_name", bindAccountLogin.getAccountName());
+                List<PangolinApp> appList = pangolinAppService.list(queryWrapper1);
+                if (appList != null && !appList.isEmpty()) {
+                    appList.forEach(pangolinApp -> pangolinCrawlerService.getRealTimeList(bindAccountLogin, pangolinApp.getAppId()));
+                }
             }
         }
     }

+ 0 - 7
module-common/src/main/java/cn/com/ctop/common/module/utils/CosUtils.java

@@ -284,12 +284,5 @@ public class CosUtils {
         String fileName = UUID.randomUUID().toString()+filepath.substring(filepath.lastIndexOf("."));
         String filePath = uploadFile(filepath, fileSavePath, fileName);
         System.out.println(filePath);
-//          downLoadFile(BUCKETNAME , KEY);
-        // deleteFile(BUCKETNAME , KEY01);
-//        createBucket("sunjunxian01-1251782781");
-        //deleteBucket();
-//        doesBucketExist("sunjunxian01-1251782781");
-//        System.out.println(listObjects(BUCKETNAME));
-        //System.out.println("BUCKETNAME的位置:" + getBucketLocation(BUCKETNAME));
     }
 }