Merge pull request #94 from dataease/pr@dev@junjie

fix: 视图计算SQL修复
This commit is contained in:
XiaJunjie2020 2021-06-29 11:13:58 +08:00 committed by GitHub
commit 9987ba38fb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 4 deletions

View File

@ -237,7 +237,7 @@ public class DorisQueryProvider extends QueryProvider {
String filterSql = MessageFormat.format("SELECT * FROM {0} WHERE 1=1 {1} ORDER BY {2}", String filterSql = MessageFormat.format("SELECT * FROM {0} WHERE 1=1 {1} ORDER BY {2}",
"(" + sql + ") AS tmp", "(" + sql + ") AS tmp",
StringUtils.join(resultFilter, " "), StringUtils.join(resultFilter, " "),
StringUtils.join(yOrder, ",")); ObjectUtils.isNotEmpty(yOrder) ? StringUtils.join(yOrder, ",") : "null");
return filterSql; return filterSql;
} }
} }
@ -318,7 +318,7 @@ public class DorisQueryProvider extends QueryProvider {
String filterSql = MessageFormat.format("SELECT * FROM {0} WHERE 1=1 {1} ORDER BY {2}", String filterSql = MessageFormat.format("SELECT * FROM {0} WHERE 1=1 {1} ORDER BY {2}",
"(" + sql + ") AS tmp", "(" + sql + ") AS tmp",
StringUtils.join(resultFilter, " "), StringUtils.join(resultFilter, " "),
StringUtils.join(order, ",")); ObjectUtils.isNotEmpty(order) ? StringUtils.join(order, ",") : "null");
return filterSql; return filterSql;
} }
} }

View File

@ -245,7 +245,7 @@ public class MysqlQueryProvider extends QueryProvider {
String filterSql = MessageFormat.format("SELECT * FROM {0} WHERE 1=1 {1} ORDER BY {2}", String filterSql = MessageFormat.format("SELECT * FROM {0} WHERE 1=1 {1} ORDER BY {2}",
"(" + sql + ") AS tmp", "(" + sql + ") AS tmp",
StringUtils.join(resultFilter, " "), StringUtils.join(resultFilter, " "),
StringUtils.join(yOrder, ",")); ObjectUtils.isNotEmpty(yOrder) ? StringUtils.join(yOrder, ",") : "null");
return filterSql; return filterSql;
} }
} }
@ -326,7 +326,7 @@ public class MysqlQueryProvider extends QueryProvider {
String filterSql = MessageFormat.format("SELECT * FROM {0} WHERE 1=1 {1} ORDER BY {2}", String filterSql = MessageFormat.format("SELECT * FROM {0} WHERE 1=1 {1} ORDER BY {2}",
"(" + sql + ") AS tmp", "(" + sql + ") AS tmp",
StringUtils.join(resultFilter, " "), StringUtils.join(resultFilter, " "),
StringUtils.join(order, ",")); ObjectUtils.isNotEmpty(order) ? StringUtils.join(order, ",") : "null");
return filterSql; return filterSql;
} }
} }