feat(视图):为日期维度,增加日期显示与格式转换功能

This commit is contained in:
junjie 2021-06-01 17:39:11 +08:00
parent 784f6fbf63
commit 5a565f3fa5
2 changed files with 2 additions and 2 deletions

View File

@ -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);

View File

@ -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);