feat(backend):数据计算sql修复

This commit is contained in:
junjie 2021-06-11 13:35:11 +08:00
parent f89c0819f4
commit 26bc2b605e
2 changed files with 2 additions and 2 deletions

View File

@ -87,7 +87,7 @@ public class DorisQueryProvider extends QueryProvider {
stringBuilder.append("cast(").append(f.getDataeaseName()).append(" as decimal(20,0)) as ").append(f.getDataeaseName());
} else if (f.getDeType() == 3) {
stringBuilder.append("cast(").append(f.getDataeaseName()).append(" as decimal(20,2)) as ").append(f.getDataeaseName());
} else if (f.getDeType() == 0) {
} else if (f.getDeType() == 1) {
stringBuilder.append("DATE_FORMAT(").append(f.getDataeaseName()).append(",'%Y-%m-%d %H:%i:%S') as _").append(f.getDataeaseName());
} else {
stringBuilder.append(f.getDataeaseName());

View File

@ -87,7 +87,7 @@ public class MysqlQueryProvider extends QueryProvider {
stringBuilder.append("cast(").append(f.getOriginName()).append(" as decimal(20,0)) as ").append(f.getOriginName());
} else if (f.getDeType() == 3) {
stringBuilder.append("cast(").append(f.getOriginName()).append(" as decimal(20,2)) as ").append(f.getOriginName());
} else if (f.getDeType() == 0) {
} else if (f.getDeType() == 1) {
stringBuilder.append("DATE_FORMAT(").append(f.getOriginName()).append(",'%Y-%m-%d %H:%i:%S') as _").append(f.getOriginName());
} else {
stringBuilder.append(f.getOriginName());