瀏覽代碼

获取视频

yumeng 5 年之前
父節點
當前提交
ee9fa7d3c1

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

@@ -130,7 +130,10 @@ public class TestController {
                 @Override
                 public void run() {
                     try {
-                        kuaishouInterfaceService.getCreativeList(token, null, null);
+                      //  kuaishouInterfaceService.getCreativeList(token, null, null);
+                        kuaishouInterfaceService.getVideoList(token, null, null);
+                        //3: 获取图片信息数据
+                     //   kuaishouInterfaceService.getImageList(token, startDate, endDate);
                     } catch (Exception e) {
                         e.printStackTrace();
                     }

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

@@ -428,7 +428,6 @@ public class KuaiShouUpdateServiceImpl implements IKuaiShouUpdateService {
             if (!Check.isNull(resultJson)) {
                 Integer code = resultJson.getInteger("code");
                 if (code == 0) {
-
                     if (putStatus == 3) {
                         Map<String, Object> deleteMap = new HashMap<>();
                         deleteMap.put("account_id", advertiserId);
@@ -438,7 +437,6 @@ public class KuaiShouUpdateServiceImpl implements IKuaiShouUpdateService {
                         interfaceService.getCreative(token, advertiserId, creativeId);
                     }
 
-
                     returnMap.put("code", 0);
                     returnMap.put("success", true);
                     returnMap.put("message", "修改成功");

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

@@ -273,6 +273,7 @@ public class KuaishouInterfaceServiceImpl implements IKuaishouInterfaceService {
 
     private void getVideoListByPage(CtopOauthToken token, Date startDate, Date endDate, int page) {
         try {
+            log.info("获取视频数据,accountId:{}", token.getAccountId());
             String url = PropertiesUtils.getConfig("kuaishou_api_url") + KuaishouInterfaceConstant.VIDEO_LIST;
             Map<String, String> headers = new HashMap<>();
             headers.put("Content-Type", "application/json");
@@ -1805,7 +1806,6 @@ public class KuaishouInterfaceServiceImpl implements IKuaishouInterfaceService {
 
             String result = HttpUtils.kuaiShouhttpPostRequest(url, param.toJSONString(), headers);
             JSONObject resultJson = JSONObject.parseObject(result);
-            System.err.println(resultJson);
             if (Check.isNull(resultJson)) {
                 log.error("获取广告创意返回结果为空,advertiserId:{}", advertiserId);
                 return;
@@ -1876,7 +1876,6 @@ public class KuaishouInterfaceServiceImpl implements IKuaishouInterfaceService {
 
     public void getCreativeListByPage(String accessToken, Long advertiserId, Date startDate, Date endDate, Integer page) {
         try {
-            System.err.println("获取创意accountId:" + advertiserId);
             String url = PropertiesUtils.getConfig("kuaishou_api_url") + KuaishouInterfaceConstant.CREATIVE_LIST;
             Map<String, String> headers = new HashMap<>();
             headers.put("Content-Type", " application/json");