fix: 视图计算SQL修复

This commit is contained in:
junjie 2021-06-29 11:06:51 +08:00
parent b00d779f22
commit c519ddefa2
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}",
"(" + sql + ") AS tmp",
StringUtils.join(resultFilter, " "),
StringUtils.join(yOrder, ","));
ObjectUtils.isNotEmpty(yOrder) ? StringUtils.join(yOrder, ",") : "null");
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}",
"(" + sql + ") AS tmp",
StringUtils.join(resultFilter, " "),
StringUtils.join(order, ","));
ObjectUtils.isNotEmpty(order) ? StringUtils.join(order, ",") : "null");
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}",
"(" + sql + ") AS tmp",
StringUtils.join(resultFilter, " "),
StringUtils.join(yOrder, ","));
ObjectUtils.isNotEmpty(yOrder) ? StringUtils.join(yOrder, ",") : "null");
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}",
"(" + sql + ") AS tmp",
StringUtils.join(resultFilter, " "),
StringUtils.join(order, ","));
ObjectUtils.isNotEmpty(order) ? StringUtils.join(order, ",") : "null");
return filterSql;
}
}