Parcourir la source

Merge branch 'test' of http://git.tjyourong.com.cn/ctop/adsp-boot into test

hcst_sunzhen il y a 4 ans
Parent
commit
e7f795085f

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

@@ -2,6 +2,8 @@ package org.jeecg;
 
 import cn.com.ctop.common.module.entity.CtopOauthToken;
 import cn.com.ctop.common.module.service.ICtopOauthTokenService;
+import cn.com.ctop.common.module.service.IRefreshTokenService;
+import cn.com.ctop.kuaishou.modules.report.service.IKuaiShouDailyAgentService;
 import cn.com.ctop.kuaishou.modules.report.service.IKuaishouReportDailyAgentService;
 import cn.com.ctop.toutiao.modules.material.service.IByteDanceCampaignService;
 import cn.com.ctop.toutiao.modules.material.service.IByteDanceCreativeService;
@@ -23,28 +25,36 @@ public class SampleTest {
     private ICtopOauthTokenService oauthTokenService;
     @Autowired
     private IByteDanceCreativeService creativeService;
-	@Autowired
+    @Autowired
     private IByteDanceCampaignService campaignService;
     @Autowired
     private IKuaishouReportDailyAgentService kuaishouReportDailyAgentService;
+    @Autowired
+    private IKuaiShouDailyAgentService kuaiShouDailyAgentService;
+    @Autowired
+    private IRefreshTokenService refreshTokenService;
 
     @Test
     public void loadBytedanceCreativeData() {
-        CtopOauthToken token = oauthTokenService.getTokenByAccountId(1649600126891015L);
-        creativeService.getAdvertiserCreative(token,null,null);
+
+     //   refreshTokenService.getKuaiShouAgentRefresh();
+
+        String nowDate = DateUtils.getNowDate("yyyy-MM-dd");
+        String yesterday = DateUtils.getAnotherDay("yyyy-MM-dd", nowDate, -1);
+        kuaiShouDailyAgentService.getAgentReportByPage(nowDate, nowDate);
     }
 
     @Test
-    public void testLoadBytedanceData(){
+    public void testLoadBytedanceData() {
         CtopOauthToken token = oauthTokenService.getTokenByAccountId(1673731621920840L);
-       campaignService.getAdvertiserCampaign(token,null,null);
+        campaignService.getAdvertiserCampaign(token, null, null);
     }
 
     @Test
-    public void loadKuaishouAgentData(){
-        for(int i=0;i<30;i++){
-            String currentDate = DateUtils.formatDate(DateUtils.addDay(new Date(),-i));
-            kuaishouReportDailyAgentService.getReport(currentDate,DateUtils.getNowDate("yyyy-MM-dd"));
+    public void loadKuaishouAgentData() {
+        for (int i = 0; i < 30; i++) {
+            String currentDate = DateUtils.formatDate(DateUtils.addDay(new Date(), -i));
+            kuaishouReportDailyAgentService.getReport(currentDate, DateUtils.getNowDate("yyyy-MM-dd"));
         }
     }
 }

+ 0 - 1
module-kuaishou/src/main/java/cn/com/ctop/kuaishou/modules/report/service/impl/KuaiShouDailyAgentServiceImpl.java

@@ -65,7 +65,6 @@ public class KuaiShouDailyAgentServiceImpl extends ServiceImpl<KuaiShouDailyAgen
 
             String result = HttpUtils.kuaiShouhttpPostRequest(url, param.toJSONString(), headers);
             JSONObject resultJson = JSONObject.parseObject(result);
-            System.err.println(resultJson);
             if (Check.isNull(resultJson)) {
                 log.info("代理商数据返回为空");
                 return;