From fdd55c59b331d1bdca21e6c8237223f8df91dcd5 Mon Sep 17 00:00:00 2001 From: taojinlong Date: Tue, 18 Nov 2025 17:05:19 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E3=80=90=E6=95=B0=E6=8D=AE=E6=BA=90?= =?UTF-8?q?=E3=80=91API=20=E6=95=B0=E6=8D=AE=E6=BA=90=E6=94=AF=E6=8C=81?= =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E6=97=B6=E9=97=B4=E6=88=B3=E5=8F=82=E6=95=B0?= =?UTF-8?q?=E3=80=82=20#17244?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/java/io/dataease/datasource/provider/ApiUtils.java | 6 +++--- .../views/visualized/data/datasource/form/ApiKeyValue.vue | 2 +- .../views/visualized/data/datasource/form/ApiVariable.vue | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) 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' } ]