From 7f0cdcd1bd85a778b71259c10a635b7eb8461082 Mon Sep 17 00:00:00 2001 From: taojinlong Date: Tue, 31 Aug 2021 21:55:59 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20oracle=20=E8=A1=A8=E5=90=8D=E6=94=AF?= =?UTF-8?q?=E6=8C=81=E5=B0=8F=E5=86=99=E5=AD=97=E6=AF=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../io/dataease/provider/oracle/OracleQueryProvider.java | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/backend/src/main/java/io/dataease/provider/oracle/OracleQueryProvider.java b/backend/src/main/java/io/dataease/provider/oracle/OracleQueryProvider.java index 47b7cd6837..fb66621274 100644 --- a/backend/src/main/java/io/dataease/provider/oracle/OracleQueryProvider.java +++ b/backend/src/main/java/io/dataease/provider/oracle/OracleQueryProvider.java @@ -635,12 +635,17 @@ public class OracleQueryProvider extends QueryProvider { stringBuilder.append(" \"").append(f.getOriginName()).append("\""); return stringBuilder.toString(); }).toArray(String[]::new); - return MessageFormat.format("SELECT {0} FROM {1} ORDER BY null", StringUtils.join(array, ","), table ); + return MessageFormat.format("SELECT {0} FROM {1} ORDER BY null", StringUtils.join(array, ","), "\"" + table + "\""); } @Override public String createRawQuerySQLAsTmp(String sql, List fields) { - return createRawQuerySQL(" (" + sqlFix(sql) + ") DE_TMP ", fields, null); + String[] array = fields.stream().map(f -> { + StringBuilder stringBuilder = new StringBuilder(); + stringBuilder.append(" \"").append(f.getOriginName()).append("\""); + return stringBuilder.toString(); + }).toArray(String[]::new); + return MessageFormat.format("SELECT {0} FROM {1} ORDER BY null", StringUtils.join(array, ","), " (" + sqlFix(sql) + ") DE_TMP " ); } public String transMysqlFilterTerm(String term) {