yumeng 4 vuotta sitten
vanhempi
commit
479f26cdd5

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

@@ -2433,7 +2433,7 @@ public class KuaishouInterfaceServiceImpl implements IKuaishouInterfaceService {
     @Override
     public void getAppList(Long advertiserId, String accessToken) {
         try {
-            String url = PropertiesUtils.getConfig("kuaishou_api_url") + KuaishouInterfaceConstant.APP_LIST_v2;
+            String url = PropertiesUtils.getConfig("kuaishou_api_url") + KuaishouInterfaceConstant.APP_LIST;
             Map<String, String> headers = new HashMap<>();
             headers.put("Access-Token", accessToken);
             headers.put("Content-Type", " application/json");
@@ -3263,7 +3263,7 @@ public class KuaishouInterfaceServiceImpl implements IKuaishouInterfaceService {
             if (!Check.isNull(resultJson)) {
                 Integer code = resultJson.getInteger("code");
                 if (code == 0) {
-                    if(page == 1){ //分页保存数据,如果页数为1,删除之前的数据重新入库
+                    if (page == 1) { //分页保存数据,如果页数为1,删除之前的数据重新入库
                         Map<String, Object> deleteMap = new HashMap<>();
                         deleteMap.put("account_id", advertiserId);
                         appListMapper.deleteByMap(deleteMap);
@@ -3289,9 +3289,9 @@ public class KuaishouInterfaceServiceImpl implements IKuaishouInterfaceService {
                                 appListMapper.insert(appList);
                             }
                         }
-                        Integer totalPage = (totalCount-1)/pageSize + 1;
-                        if(page < totalPage ){
-                            getAppList2ByPage(advertiserId,accessToken,page+1,pageSize);
+                        Integer totalPage = (totalCount - 1) / pageSize + 1;
+                        if (page < totalPage) {
+                            getAppList2ByPage(advertiserId, accessToken, page + 1, pageSize);
                         }
                     }
                 } else {
@@ -3306,20 +3306,4 @@ public class KuaishouInterfaceServiceImpl implements IKuaishouInterfaceService {
     }
 
 
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
 }