mirror of
https://github.com/dataease/dataease.git
synced 2026-05-16 05:50:45 +08:00
fix: 【数据源】excel 中的空值,导入到数据源后,保持为空
This commit is contained in:
@@ -46,12 +46,7 @@ public class H2EngineProvider extends EngineProvider {
|
||||
if (tableFields.get(i).isChecked()) {
|
||||
if (StringUtils.isEmpty(strings[i])) {
|
||||
String type = tableFields.get(i).getType() == null ? tableFields.get(i).getFieldType() : tableFields.get(i).getType();
|
||||
if (type.equals("LONG") || type.equals("DOUBLE")) {
|
||||
strings1[length] = "0";
|
||||
} else {
|
||||
strings1[length] = null;
|
||||
}
|
||||
|
||||
strings1[length] = null;
|
||||
} else {
|
||||
strings1[length] = strings[i].replace("\\", "\\\\").replace("'", "''");
|
||||
}
|
||||
|
||||
@@ -54,11 +54,7 @@ public class MysqlEngineProvider extends EngineProvider {
|
||||
if (tableFields.get(i).isChecked()) {
|
||||
if (StringUtils.isEmpty(strings[i])) {
|
||||
String type = tableFields.get(i).getType() == null ? tableFields.get(i).getFieldType() : tableFields.get(i).getType();
|
||||
if (type.equals("LONG") || type.equals("DOUBLE")) {
|
||||
strings1[length] = "0";
|
||||
} else {
|
||||
strings1[length] = null;
|
||||
}
|
||||
strings1[length] = null;
|
||||
} else {
|
||||
strings1[length] = strings[i].replace("\\", "\\\\").replace("'", "\\'");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user