mirror of
https://github.com/dataease/dataease.git
synced 2026-06-16 20:13:12 +08:00
fix: 数据集字段浮点转整型
This commit is contained in:
@@ -7,6 +7,7 @@ import io.dataease.dto.chart.ChartViewFieldDTO;
|
||||
import io.dataease.dto.sqlObj.SQLObj;
|
||||
import io.dataease.provider.QueryProvider;
|
||||
import io.dataease.provider.SQLConstants;
|
||||
import io.dataease.provider.mysql.MySQLConstants;
|
||||
import org.apache.commons.collections4.CollectionUtils;
|
||||
import org.apache.commons.lang3.ObjectUtils;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
@@ -114,6 +115,8 @@ public class DorisQueryProvider extends QueryProvider {
|
||||
if (f.getDeType() == 1) {
|
||||
String cast = String.format(DorisConstants.CAST, originField, DorisConstants.DEFAULT_INT_FORMAT) + "/1000";
|
||||
fieldName = String.format(DorisConstants.FROM_UNIXTIME, cast, DorisConstants.DEFAULT_DATE_FORMAT);
|
||||
} else if (f.getDeType() == 2) {
|
||||
fieldName = String.format(DorisConstants.CAST, originField, DorisConstants.DEFAULT_INT_FORMAT);
|
||||
} else {
|
||||
fieldName = originField;
|
||||
}
|
||||
|
||||
@@ -113,6 +113,8 @@ public class MysqlQueryProvider extends QueryProvider {
|
||||
if (f.getDeType() == 1) {
|
||||
String cast = String.format(MySQLConstants.CAST, originField, MySQLConstants.DEFAULT_INT_FORMAT) + "/1000";
|
||||
fieldName = String.format(MySQLConstants.FROM_UNIXTIME, cast, MySQLConstants.DEFAULT_DATE_FORMAT);
|
||||
} else if (f.getDeType() == 2) {
|
||||
fieldName = String.format(MySQLConstants.CAST, originField, MySQLConstants.DEFAULT_INT_FORMAT);
|
||||
} else {
|
||||
fieldName = originField;
|
||||
}
|
||||
|
||||
@@ -125,6 +125,8 @@ public class OracleQueryProvider extends QueryProvider {
|
||||
if (f.getDeType() == 1) {
|
||||
String cast = String.format(OracleConstants.CAST, originField, OracleConstants.DEFAULT_INT_FORMAT) + "/1000";
|
||||
fieldName = String.format(OracleConstants.FROM_UNIXTIME, cast, OracleConstants.DEFAULT_DATE_FORMAT);
|
||||
} else if (f.getDeType() == 2) {
|
||||
fieldName = String.format(OracleConstants.CAST, originField, OracleConstants.DEFAULT_INT_FORMAT);
|
||||
} else {
|
||||
fieldName = originField;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user