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