mirror of
https://github.com/dataease/dataease.git
synced 2026-06-17 04:51:43 +08:00
fix: 修复数值过滤报错 #17836
This commit is contained in:
@@ -258,7 +258,13 @@ public class CustomWhere2Str {
|
||||
&& StringUtils.equalsIgnoreCase(dsType, DatasourceConfiguration.DatasourceType.sqlServer.getType())) {
|
||||
whereValue = String.format(SQLConstants.WHERE_VALUE_VALUE_CH, value);
|
||||
} else {
|
||||
whereValue = String.format(SQLConstants.WHERE_VALUE_VALUE, value);
|
||||
if (request.getDatasetTableField().getDeType() == 2
|
||||
|| request.getDatasetTableField().getDeType() == 3
|
||||
|| request.getDatasetTableField().getDeType() == 4) {
|
||||
whereValue = String.format(SQLConstants.WHERE_NUMBER_VALUE, value);
|
||||
} else {
|
||||
whereValue = String.format(SQLConstants.WHERE_VALUE_VALUE, value);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -276,7 +276,13 @@ public class ExtWhere2Str {
|
||||
&& StringUtils.equalsIgnoreCase(dsType, DatasourceConfiguration.DatasourceType.sqlServer.getType())) {
|
||||
whereValue = String.format(SQLConstants.WHERE_VALUE_VALUE_CH, value.get(0));
|
||||
} else {
|
||||
whereValue = String.format(SQLConstants.WHERE_VALUE_VALUE, value.get(0));
|
||||
if (request.getDatasetTableField().getDeType() == 2
|
||||
|| request.getDatasetTableField().getDeType() == 3
|
||||
|| request.getDatasetTableField().getDeType() == 4) {
|
||||
whereValue = String.format(SQLConstants.WHERE_NUMBER_VALUE, value.get(0));
|
||||
} else {
|
||||
whereValue = String.format(SQLConstants.WHERE_VALUE_VALUE, value.get(0));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user