forked from github/dataease
feat(视图):为日期维度,增加日期显示与格式转换功能
This commit is contained in:
parent
196c003445
commit
3a49628b62
@ -134,7 +134,7 @@ public class DorisQueryProvider extends QueryProvider {
|
||||
stringBuilder.append("unix_timestamp(").append(x.getDataeaseName()).append(")*1000 as ").append(x.getDataeaseName());
|
||||
} else if (x.getDeType() == 1) {
|
||||
String format = transDateFormat(x.getDateStyle(), x.getDatePattern());
|
||||
stringBuilder.append("DATE_FORMAT(").append(x.getDataeaseName()).append(",'").append(format).append("')");
|
||||
stringBuilder.append("DATE_FORMAT(").append(x.getDataeaseName()).append(",'").append(format).append("') as ").append(x.getDataeaseName());
|
||||
} else {
|
||||
stringBuilder.append(x.getDataeaseName());
|
||||
}
|
||||
|
@ -140,7 +140,7 @@ public class MysqlQueryProvider extends QueryProvider {
|
||||
stringBuilder.append("unix_timestamp(").append(x.getDataeaseName()).append(")*1000 as ").append(x.getDataeaseName());
|
||||
} else if (x.getDeType() == 1) {
|
||||
String format = transDateFormat(x.getDateStyle(), x.getDatePattern());
|
||||
stringBuilder.append("DATE_FORMAT(").append(x.getDataeaseName()).append(",'").append(format).append("')");
|
||||
stringBuilder.append("DATE_FORMAT(").append(x.getDataeaseName()).append(",'").append(format).append("') as ").append(x.getDataeaseName());
|
||||
} else {
|
||||
stringBuilder.append(x.getDataeaseName());
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user