diff --git a/core/core-backend/src/main/java/io/dataease/datasource/provider/ApiUtils.java b/core/core-backend/src/main/java/io/dataease/datasource/provider/ApiUtils.java index 42e454d24c..678527256c 100644 --- a/core/core-backend/src/main/java/io/dataease/datasource/provider/ApiUtils.java +++ b/core/core-backend/src/main/java/io/dataease/datasource/provider/ApiUtils.java @@ -274,7 +274,7 @@ public class ApiUtils { SimpleDateFormat simpleDateFormat = new SimpleDateFormat(timeFormat.split(" ")[1]); httpClientConfig.addHeader(header.get("name").toString(), simpleDateFormat.format(date)); } - if (StringUtils.isNotEmpty(timeFormat) && timeFormat.split(" ")[0].equalsIgnoreCase("timestamp")) { + if (StringUtils.isNotEmpty(timeFormat) && timeFormat.split(" ")[0].equalsIgnoreCase("currentTimestamp")) { httpClientConfig.addHeader(header.get("name").toString(), String.valueOf(System.currentTimeMillis())); } } else { @@ -341,7 +341,7 @@ public class ApiUtils { SimpleDateFormat simpleDateFormat = new SimpleDateFormat(timeFormat.split(" ")[1]); params.add(argument.get("name") + "=" + simpleDateFormat.format(date)); } - if (StringUtils.isNotEmpty(timeFormat) && timeFormat.split(" ")[0].equalsIgnoreCase("timestamp")) { + if (StringUtils.isNotEmpty(timeFormat) && timeFormat.split(" ")[0].equalsIgnoreCase("currentTimestamp")) { params.add(argument.get("name") + "=" + System.currentTimeMillis()); } } else { @@ -480,7 +480,7 @@ public class ApiUtils { SimpleDateFormat simpleDateFormat = new SimpleDateFormat(timeFormat.split(" ")[1]); body.put(jsonNode.get("name").toString(), simpleDateFormat.format(date)); } - if (StringUtils.isNotEmpty(timeFormat) && timeFormat.split(" ")[0].equalsIgnoreCase("timestamp")) { + if (StringUtils.isNotEmpty(timeFormat) && timeFormat.split(" ")[0].equalsIgnoreCase("currentTimestamp")) { body.put(jsonNode.get("name").toString(), String.valueOf(System.currentTimeMillis())); } } else { diff --git a/core/core-frontend/src/views/visualized/data/datasource/form/ApiKeyValue.vue b/core/core-frontend/src/views/visualized/data/datasource/form/ApiKeyValue.vue index 9cabcdc2e4..2e0086a2fa 100644 --- a/core/core-frontend/src/views/visualized/data/datasource/form/ApiKeyValue.vue +++ b/core/core-frontend/src/views/visualized/data/datasource/form/ApiKeyValue.vue @@ -114,7 +114,7 @@ const timeFunLists = [ }, { label: t('data_source.timestamp'), - value: 'timestamp' + value: 'currentTimestamp' } ] diff --git a/core/core-frontend/src/views/visualized/data/datasource/form/ApiVariable.vue b/core/core-frontend/src/views/visualized/data/datasource/form/ApiVariable.vue index 6530eb56bc..888d9013e5 100644 --- a/core/core-frontend/src/views/visualized/data/datasource/form/ApiVariable.vue +++ b/core/core-frontend/src/views/visualized/data/datasource/form/ApiVariable.vue @@ -151,7 +151,7 @@ const timeFunLists = [ }, { label: t('data_source.timestamp'), - value: 'timestamp' + value: 'currentTimestamp' } ]