mirror of
https://github.com/dataease/dataease.git
synced 2026-05-16 05:50:45 +08:00
fix(数据源): 修复API数据源分页错误
This commit is contained in:
@@ -99,7 +99,7 @@ public class ApiUtils {
|
||||
dataList.addAll(fetchResult(response, apiDefinition));
|
||||
String cursor = null;
|
||||
try {
|
||||
cursor = JsonPath.read(response, apiDefinition.getRequest().getPage().getResponseData().get(0).getResolutionPath());
|
||||
cursor = JsonPath.read(response, apiDefinition.getRequest().getPage().getResponseData().get(0).getResolutionPath()).toString();
|
||||
} catch (Exception e) {
|
||||
}
|
||||
while (cursor != null) {
|
||||
@@ -107,7 +107,11 @@ public class ApiUtils {
|
||||
response = execHttpRequest(false, apiDefinition, apiDefinition.getApiQueryTimeout() == null || apiDefinition.getApiQueryTimeout() <= 0 ? 10 : apiDefinition.getApiQueryTimeout(), params(datasourceRequest));
|
||||
dataList.addAll(fetchResult(response, apiDefinition));
|
||||
try {
|
||||
cursor = JsonPath.read(response, apiDefinition.getRequest().getPage().getResponseData().get(0).getResolutionPath());
|
||||
if (cursor.equalsIgnoreCase(JsonPath.read(response, apiDefinition.getRequest().getPage().getResponseData().get(0).getResolutionPath()).toString())) {
|
||||
cursor = null;
|
||||
} else {
|
||||
cursor = JsonPath.read(response, apiDefinition.getRequest().getPage().getResponseData().get(0).getResolutionPath()).toString();
|
||||
}
|
||||
} catch (Exception e) {
|
||||
cursor = null;
|
||||
}
|
||||
|
||||
@@ -45,7 +45,8 @@ public class H2EngineProvider extends EngineProvider {
|
||||
for (int i = 0; i < strings.length; i++) {
|
||||
if (tableFields.get(i).isChecked()) {
|
||||
if (StringUtils.isEmpty(strings[i])) {
|
||||
if (tableFields.get(i).getFieldType().equals("LONG") || tableFields.get(i).getFieldType().equals("DOUBLE")) {
|
||||
String type = tableFields.get(i).getType() == null ? tableFields.get(i).getFieldType() : tableFields.get(i).getType();
|
||||
if (type.equals("LONG") || type.equals("DOUBLE")) {
|
||||
strings1[length] = "0";
|
||||
} else {
|
||||
strings1[length] = null;
|
||||
|
||||
@@ -52,7 +52,8 @@ public class MysqlEngineProvider extends EngineProvider {
|
||||
for (int i = 0; i < strings.length; i++) {
|
||||
if (tableFields.get(i).isChecked()) {
|
||||
if (StringUtils.isEmpty(strings[i])) {
|
||||
if (tableFields.get(i).getFieldType().equals("LONG") || tableFields.get(i).getFieldType().equals("DOUBLE")) {
|
||||
String type = tableFields.get(i).getType() == null ? tableFields.get(i).getFieldType() : tableFields.get(i).getType();
|
||||
if (type.equals("LONG") || type.equals("DOUBLE")) {
|
||||
strings1[length] = "0";
|
||||
} else {
|
||||
strings1[length] = null;
|
||||
|
||||
Reference in New Issue
Block a user