fix: 【数据源】excel 中的空值,导入到数据源后,保持为空

This commit is contained in:
taojinlong
2025-05-28 15:37:07 +08:00
committed by taojinlong
parent 9c99824fbc
commit 3c99c83d24
2 changed files with 2 additions and 11 deletions

View File

@@ -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("'", "''");
}

View File

@@ -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("'", "\\'");
}