Merge remote-tracking branch 'origin/main' into main

This commit is contained in:
wangjiahao 2021-06-04 15:47:56 +08:00
commit e3ab785540

View File

@ -82,6 +82,14 @@ public class MysqlQueryProvider extends QueryProvider {
} else {
stringBuilder.append(f.getOriginName());
}
} else if (f.getDeExtractType() == 0) {
if (f.getDeType() == 2) {
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 {
stringBuilder.append(f.getOriginName());
}
} else {
if (f.getDeType() == 1) {
stringBuilder.append("FROM_UNIXTIME(cast(").append(f.getOriginName()).append(" as decimal(20,0))/1000,'%Y-%m-%d %H:%i:%S') as ").append(f.getOriginName());