diff --git a/backend/src/main/java/io/dataease/provider/doris/DorisQueryProvider.java b/backend/src/main/java/io/dataease/provider/doris/DorisQueryProvider.java index ce075803cb..04d99e6a0b 100644 --- a/backend/src/main/java/io/dataease/provider/doris/DorisQueryProvider.java +++ b/backend/src/main/java/io/dataease/provider/doris/DorisQueryProvider.java @@ -150,7 +150,7 @@ public class DorisQueryProvider extends QueryProvider { }).toArray(String[]::new); String[] group = xAxis.stream().map(x -> "_" + x.getDataeaseName()).toArray(String[]::new); String[] xOrder = xAxis.stream().filter(f -> StringUtils.isNotEmpty(f.getSort()) && !StringUtils.equalsIgnoreCase(f.getSort(), "none")) - .map(f -> f.getDataeaseName() + " " + f.getSort()).toArray(String[]::new); + .map(f -> "_" + f.getDataeaseName() + " " + f.getSort()).toArray(String[]::new); String[] yOrder = yAxis.stream().filter(f -> StringUtils.isNotEmpty(f.getSort()) && !StringUtils.equalsIgnoreCase(f.getSort(), "none")) .map(f -> "_" + f.getSummary() + "_" + (StringUtils.equalsIgnoreCase(f.getDataeaseName(), "*") ? "" : f.getDataeaseName()) + " " + f.getSort()).toArray(String[]::new); String[] order = Arrays.copyOf(xOrder, xOrder.length + yOrder.length); diff --git a/backend/src/main/java/io/dataease/provider/mysql/MysqlQueryProvider.java b/backend/src/main/java/io/dataease/provider/mysql/MysqlQueryProvider.java index 7c9fbf920b..066204f1f2 100644 --- a/backend/src/main/java/io/dataease/provider/mysql/MysqlQueryProvider.java +++ b/backend/src/main/java/io/dataease/provider/mysql/MysqlQueryProvider.java @@ -156,7 +156,7 @@ public class MysqlQueryProvider extends QueryProvider { }).toArray(String[]::new); String[] group = xAxis.stream().map(x -> "_" + x.getDataeaseName()).toArray(String[]::new); String[] xOrder = xAxis.stream().filter(f -> StringUtils.isNotEmpty(f.getSort()) && !StringUtils.equalsIgnoreCase(f.getSort(), "none")) - .map(f -> f.getDataeaseName() + " " + f.getSort()).toArray(String[]::new); + .map(f -> "_" + f.getDataeaseName() + " " + f.getSort()).toArray(String[]::new); String[] yOrder = yAxis.stream().filter(f -> StringUtils.isNotEmpty(f.getSort()) && !StringUtils.equalsIgnoreCase(f.getSort(), "none")) .map(f -> "_" + f.getSummary() + "_" + (StringUtils.equalsIgnoreCase(f.getDataeaseName(), "*") ? "" : f.getDataeaseName()) + " " + f.getSort()).toArray(String[]::new); String[] order = Arrays.copyOf(xOrder, xOrder.length + yOrder.length);