|
@@ -5,13 +5,14 @@ import cn.com.ctop.common.module.entity.CtopOauthToken;
|
|
import cn.com.ctop.common.module.service.IBindAccountLoginService;
|
|
import cn.com.ctop.common.module.service.IBindAccountLoginService;
|
|
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.crawler.modules.oceanengine.service.IOceanEngineService;
|
|
|
|
-import cn.com.ctop.kuaishou.modules.batch.entity.vo.ConvertVo;
|
|
|
|
-import cn.com.ctop.kuaishou.modules.batch.service.IKuaishouInterfaceService;
|
|
|
|
|
|
+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;
|
|
import cn.com.ctop.kuaishou.modules.graphql.service.IKuaishouWebInterfaceService;
|
|
import cn.com.ctop.kuaishou.modules.graphql.service.IKuaishouWebInterfaceService;
|
|
import cn.com.ctop.toutiao.modules.report.service.IByteDanceVideoReportDailyService;
|
|
import cn.com.ctop.toutiao.modules.report.service.IByteDanceVideoReportDailyService;
|
|
import cn.com.ctop.toutiao.modules.report.service.IBytedanceReportService;
|
|
import cn.com.ctop.toutiao.modules.report.service.IBytedanceReportService;
|
|
-import io.swagger.models.auth.In;
|
|
|
|
|
|
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
|
import lombok.extern.slf4j.Slf4j;
|
|
import lombok.extern.slf4j.Slf4j;
|
|
import org.jeecg.common.util.DateUtils;
|
|
import org.jeecg.common.util.DateUtils;
|
|
import org.junit.Test;
|
|
import org.junit.Test;
|
|
@@ -21,7 +22,6 @@ import org.springframework.boot.test.context.SpringBootTest;
|
|
import org.springframework.test.context.junit4.SpringRunner;
|
|
import org.springframework.test.context.junit4.SpringRunner;
|
|
|
|
|
|
import java.text.SimpleDateFormat;
|
|
import java.text.SimpleDateFormat;
|
|
-import java.util.ArrayList;
|
|
|
|
import java.util.Date;
|
|
import java.util.Date;
|
|
import java.util.HashMap;
|
|
import java.util.HashMap;
|
|
import java.util.List;
|
|
import java.util.List;
|
|
@@ -34,10 +34,6 @@ import java.util.concurrent.Executors;
|
|
@Slf4j
|
|
@Slf4j
|
|
public class SampleTest {
|
|
public class SampleTest {
|
|
@Autowired
|
|
@Autowired
|
|
- private IOceanEngineService oceanEngineService;
|
|
|
|
- @Autowired
|
|
|
|
- private IKuaishouInterfaceService interfaceService;
|
|
|
|
- @Autowired
|
|
|
|
private IBytedanceReportService bytedanceReportService;
|
|
private IBytedanceReportService bytedanceReportService;
|
|
@Autowired
|
|
@Autowired
|
|
private IByteDanceVideoReportDailyService byteDanceVideoReportDailyService;
|
|
private IByteDanceVideoReportDailyService byteDanceVideoReportDailyService;
|
|
@@ -46,10 +42,6 @@ public class SampleTest {
|
|
|
|
|
|
@Test
|
|
@Test
|
|
public void testOceanEngineJob() {
|
|
public void testOceanEngineJob() {
|
|
-
|
|
|
|
-
|
|
|
|
-
|
|
|
|
-
|
|
|
|
try {
|
|
try {
|
|
CtopOauthToken byId = oauthTokenService.getById(303094936123368L);
|
|
CtopOauthToken byId = oauthTokenService.getById(303094936123368L);
|
|
String nowDate = DateUtils.getNowDate("yyyy-MM-dd");
|
|
String nowDate = DateUtils.getNowDate("yyyy-MM-dd");
|
|
@@ -69,21 +61,6 @@ public class SampleTest {
|
|
} catch (Exception e) {
|
|
} catch (Exception e) {
|
|
e.printStackTrace();
|
|
e.printStackTrace();
|
|
}
|
|
}
|
|
-
|
|
|
|
-/*
|
|
|
|
- List list = new ArrayList();
|
|
|
|
- list.add(1);
|
|
|
|
- list.add(2);
|
|
|
|
- list.add(3);
|
|
|
|
- list.add(7);
|
|
|
|
- for (int i = 0; i < list.size(); i++) {
|
|
|
|
- Integer o = (Integer) list.get(i);
|
|
|
|
- List<ConvertVo> convertList = interfaceService.getConvertList(6435317L, "42761e184c6e966236fcfd167375a875", o);
|
|
|
|
- System.err.println(convertList);
|
|
|
|
- }*/
|
|
|
|
-
|
|
|
|
-
|
|
|
|
-
|
|
|
|
String account = "3248395570@qq.com";
|
|
String account = "3248395570@qq.com";
|
|
/* String password = "Ydxq-704127411";
|
|
/* String password = "Ydxq-704127411";
|
|
oceanEngineService.login(account,password);
|
|
oceanEngineService.login(account,password);
|
|
@@ -149,48 +126,48 @@ public class SampleTest {
|
|
Long end = System.currentTimeMillis();
|
|
Long end = System.currentTimeMillis();
|
|
log.info("总用时:{}毫秒", end - start);
|
|
log.info("总用时:{}毫秒", end - start);
|
|
}
|
|
}
|
|
-// @Autowired
|
|
|
|
-// private PangolinLoginService pangolinLoginService;
|
|
|
|
-// @Autowired
|
|
|
|
-// private PangolinCrawlerService pangolinCrawlerService;
|
|
|
|
-// @Autowired
|
|
|
|
-// private PangolinAppService pangolinAppService;
|
|
|
|
-// @Test
|
|
|
|
-// public void testPangolinLogin(){
|
|
|
|
-// QueryWrapper<BindAccountLogin> queryWrapper = new QueryWrapper<>();
|
|
|
|
-// queryWrapper.eq("login_type","pangolin");
|
|
|
|
-// queryWrapper.eq("status",1);
|
|
|
|
-// List<BindAccountLogin> list = bindAccountLoginService.list(queryWrapper);
|
|
|
|
-// if(list!=null&&!list.isEmpty()){
|
|
|
|
-// for (BindAccountLogin login:list) {
|
|
|
|
-// if(null==login.getCookie()||"".equals(login.getCookie().trim())){
|
|
|
|
-// pangolinLoginService.pangolinLogin(login.getAccountName(), login.getPassword());
|
|
|
|
-// }
|
|
|
|
-// }
|
|
|
|
-// }
|
|
|
|
-// }
|
|
|
|
-//
|
|
|
|
-// @Test
|
|
|
|
-// public void testPangolinData(){
|
|
|
|
-// QueryWrapper<BindAccountLogin> queryWrapper = new QueryWrapper<>();
|
|
|
|
-// queryWrapper.eq("login_type", "pangolin");
|
|
|
|
-// queryWrapper.eq("status", 1);
|
|
|
|
-// queryWrapper.isNotNull("cookie");
|
|
|
|
-// List<BindAccountLogin> list = bindAccountLoginService.list(queryWrapper);
|
|
|
|
-// if (list != null && !list.isEmpty()) {
|
|
|
|
-// for (BindAccountLogin bindAccountLogin : list) {
|
|
|
|
-// 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()));
|
|
|
|
-// }
|
|
|
|
-// }
|
|
|
|
-// }
|
|
|
|
-// }
|
|
|
|
|
|
+ @Autowired
|
|
|
|
+ private PangolinLoginService pangolinLoginService;
|
|
|
|
+ @Autowired
|
|
|
|
+ private PangolinCrawlerService pangolinCrawlerService;
|
|
|
|
+ @Autowired
|
|
|
|
+ private PangolinAppService pangolinAppService;
|
|
|
|
+ @Test
|
|
|
|
+ public void testPangolinLogin(){
|
|
|
|
+ QueryWrapper<BindAccountLogin> queryWrapper = new QueryWrapper<>();
|
|
|
|
+ queryWrapper.eq("login_type","pangolin");
|
|
|
|
+ queryWrapper.eq("status",1);
|
|
|
|
+ List<BindAccountLogin> list = bindAccountLoginService.list(queryWrapper);
|
|
|
|
+ if(list!=null&&!list.isEmpty()){
|
|
|
|
+ for (BindAccountLogin login:list) {
|
|
|
|
+ if(null==login.getCookie()||"".equals(login.getCookie().trim())){
|
|
|
|
+ pangolinLoginService.pangolinLogin(login.getAccountName(), login.getPassword());
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ @Test
|
|
|
|
+ public void testPangolinData(){
|
|
|
|
+ QueryWrapper<BindAccountLogin> queryWrapper = new QueryWrapper<>();
|
|
|
|
+ queryWrapper.eq("login_type", "pangolin");
|
|
|
|
+ queryWrapper.eq("status", 1);
|
|
|
|
+ queryWrapper.isNotNull("cookie");
|
|
|
|
+ List<BindAccountLogin> list = bindAccountLoginService.list(queryWrapper);
|
|
|
|
+ if (list != null && !list.isEmpty()) {
|
|
|
|
+ for (BindAccountLogin bindAccountLogin : list) {
|
|
|
|
+ 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()));
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ }
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|