|
@@ -6,24 +6,23 @@ 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.CloudVideoProcessUtil;
|
|
import cn.com.ctop.common.module.utils.CloudVideoProcessUtil;
|
|
import cn.com.ctop.common.module.utils.CtopAdConstant;
|
|
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.PangolinAppService;
|
|
import cn.com.ctop.crawler.modules.pangolin.service.PangolinCrawlerService;
|
|
import cn.com.ctop.crawler.modules.pangolin.service.PangolinCrawlerService;
|
|
import cn.com.ctop.crawler.modules.pangolin.service.PangolinLoginService;
|
|
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.material.service.IByteDanceAdvertiserDataService;
|
|
import cn.com.ctop.toutiao.modules.material.service.IByteDanceAdvertiserDataService;
|
|
|
|
+import cn.com.ctop.toutiao.modules.material.service.IByteDanceCampaignService;
|
|
import cn.com.ctop.toutiao.modules.report.service.IReportService;
|
|
import cn.com.ctop.toutiao.modules.report.service.IReportService;
|
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
|
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.jeecg.modules.ctop.entity.KuaishouMatcostAccountMay;
|
|
|
|
-import org.jeecg.modules.ctop.service.IKuaishouMatcostAccountMayService;
|
|
|
|
import org.junit.Test;
|
|
import org.junit.Test;
|
|
import org.junit.runner.RunWith;
|
|
import org.junit.runner.RunWith;
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
import org.springframework.boot.test.context.SpringBootTest;
|
|
import org.springframework.boot.test.context.SpringBootTest;
|
|
import org.springframework.test.context.junit4.SpringRunner;
|
|
import org.springframework.test.context.junit4.SpringRunner;
|
|
|
|
|
|
-import java.math.BigDecimal;
|
|
|
|
import java.util.HashMap;
|
|
import java.util.HashMap;
|
|
import java.util.List;
|
|
import java.util.List;
|
|
import java.util.Map;
|
|
import java.util.Map;
|
|
@@ -123,33 +122,6 @@ public class SampleTest {
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
- @Autowired
|
|
|
|
- private IKuaishouMatcostAccountMayService matcostAccountMayService;
|
|
|
|
- @Test
|
|
|
|
- public void testLoadMinDate(){
|
|
|
|
- loadData();
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- private void loadData(){
|
|
|
|
- KuaishouMatcostAccountMay matcostAccountMay = matcostAccountMayService.getOne();
|
|
|
|
- if(null!=matcostAccountMay){
|
|
|
|
- BigDecimal cost = matcostAccountMayService.getCostByParams(matcostAccountMay);
|
|
|
|
- if(null!=cost&&!cost.toString().trim().equals("")){
|
|
|
|
- matcostAccountMayService.updateCostByCode(matcostAccountMay.getVideoCode(),cost);
|
|
|
|
- }else{
|
|
|
|
- matcostAccountMayService.updateCostByCode(matcostAccountMay.getVideoCode(),BigDecimal.ZERO);
|
|
|
|
- }
|
|
|
|
-// String minDate = matcostAccountMayService.getMinDate(matcostAccountMay.getVideoCode());
|
|
|
|
-// if(null == minDate||minDate.trim().equals("")){
|
|
|
|
-// matcostAccountMayService.updateByCode(matcostAccountMay.getVideoCode(),"-");
|
|
|
|
-// }else{
|
|
|
|
-// matcostAccountMayService.updateByCode(matcostAccountMay.getVideoCode(),minDate);
|
|
|
|
-// }
|
|
|
|
-
|
|
|
|
- loadData();
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
@Test
|
|
@Test
|
|
public void testPangolinData() {
|
|
public void testPangolinData() {
|
|
QueryWrapper<BindAccountLogin> queryWrapper = new QueryWrapper<>();
|
|
QueryWrapper<BindAccountLogin> queryWrapper = new QueryWrapper<>();
|
|
@@ -160,17 +132,24 @@ public class SampleTest {
|
|
if (list != null && !list.isEmpty()) {
|
|
if (list != null && !list.isEmpty()) {
|
|
for (BindAccountLogin bindAccountLogin : list) {
|
|
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.getAppId()));
|
|
|
|
-// }
|
|
|
|
|
|
+ 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.getAppId()));
|
|
|
|
+ }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
+ @Autowired
|
|
|
|
+ private IByteDanceCampaignService campaignService;
|
|
|
|
+ @Test
|
|
|
|
+ public void testGetCampaign(){
|
|
|
|
+ CtopOauthToken token = oauthTokenService.getOauthTokenByAccountId("1649600126891015");
|
|
|
|
+ campaignService.getAdvertiserCampaign(token,"1672261893872756",null);
|
|
|
|
+ }
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|