Browse Source

提交测试版本

yumeng 3 years ago
parent
commit
c25edf527e

+ 6 - 6
jeecg-boot-module-system/src/main/java/org/jeecg/modules/ctop/controller/TestController.java

@@ -175,8 +175,8 @@ public class TestController {
     @GetMapping(value = "/creativeList")
     public void creativeList() {
         List<Long> accountList = new ArrayList<>();
-        accountList.add(11580103L);
-        accountList.add(11580102L);
+        accountList.add(13837819L);
+        accountList.add(13819304L);
         for (int i = 0; i < accountList.size(); i++) {
             Long aLong = accountList.get(i);
             CtopOauthToken oauthToken = oauthTokenService.getTokenByAccountId(aLong);
@@ -203,8 +203,8 @@ public class TestController {
     @GetMapping(value = "/unitList")
     public void unitList() {
         List<Long> accountList = new ArrayList<>();
-        accountList.add(11580103L);
-        accountList.add(11580102L);
+        accountList.add(13586134L);
+        accountList.add(13586053L);
 
 
         for (int i = 0; i < accountList.size(); i++) {
@@ -297,8 +297,8 @@ public class TestController {
     @GetMapping(value = "/getProgramCreative")
     public void getProgramCreative() {
         List<Long> accountList = new ArrayList<>();
-        accountList.add(11580103L);
-        accountList.add(11580102L);
+        accountList.add(13837819L);
+        accountList.add(13819304L);
 
         for (int i = 0; i < accountList.size(); i++) {
             Long aLong = accountList.get(i);

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

@@ -42,7 +42,6 @@ import org.springframework.test.context.junit4.SpringRunner;
 
 import javax.annotation.Resource;
 import java.text.ParseException;
-import java.text.SimpleDateFormat;
 import java.util.*;
 import java.util.concurrent.CountDownLatch;
 import java.util.concurrent.ExecutorService;
@@ -111,26 +110,16 @@ public class SampleTest {
 
     @Test
     public void loadKuaishouCookie() throws ParseException {
-        List<Long> accList = new ArrayList<>();
-        accList.add(11789495L);
-        accList.add(11574866L);
-        for (int i = 0; i < accList.size(); i++) {
-            Long aLong = accList.get(i);
-            CtopOauthToken token = tokenService.getTokenByAccountId(aLong);
-            SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd");
-            Date parse = simpleDateFormat.parse("2021-12-17");
-            Date parse1 = simpleDateFormat.parse("2021-12-23");
 
+        CtopOauthToken tokenByAccountId = tokenService.getTokenByAccountId(13972744L);
 
-            kuaishouInterfaceService.getAdvertiserReportDaily(token, parse, parse1, null);
-            kuaiShouReportDailyMaterialService.getMaterialReportByAccountIdAndStatDate(token.getAccountId(), token.getAccessToken(), "2021-12-17", "2021-12-23", "DAILY", 1);
+        JSONObject deepConversionJson = iKuaishouInterfaceService.getDeepConversionInfosV2(13972744L, tokenByAccountId.getAccessToken(), 2, null);
 
-
-        }
+        System.err.println(deepConversionJson);
 
 
-        // sendMessageService.sendMessage("d2331a00e1be42ec8542167e321eeb01", "测试消息");
-    }
+    // sendMessageService.sendMessage("d2331a00e1be42ec8542167e321eeb01", "测试消息");
+}
 
 
     @Test

+ 3 - 0
module-kuaishou/src/main/java/cn/com/ctop/kuaishou/modules/batch/service/impl/KuaishouInterfaceServiceImpl.java

@@ -1889,6 +1889,7 @@ public class KuaishouInterfaceServiceImpl implements IKuaishouInterfaceService {
     @Override
     public JSONObject getDeepConversionInfosV2(Long advertiserId, String accessToken, Integer campaignType, Long appId) {
         String url = PropertiesUtils.getConfig("kuaishou_api_url") + KuaishouInterfaceConstant.DEEP_CONVERSION_INFOS;
+        System.err.println(url);
         JSONObject param = new JSONObject();
         param.put("advertiser_id", advertiserId);
         if (!Check.isNull(campaignType)) {
@@ -1901,6 +1902,8 @@ public class KuaishouInterfaceServiceImpl implements IKuaishouInterfaceService {
         headers.put("Access-Token", accessToken);
         headers.put("Content-Type", " application/json");
         try {
+            System.err.println(param);
+            System.err.println(headers);
             String result = HttpUtils.kuaiShouhttpPostRequest(url, param.toJSONString(), headers);
             JSONObject resultJson = JSONObject.parseObject(result);
             log.info(resultJson.toJSONString());