【fix】 修复查询对象异常问题

This commit is contained in:
Kris 2025-10-11 14:23:28 +08:00
parent ceef113fa3
commit a155736605
2 changed files with 6 additions and 6 deletions

View File

@ -878,7 +878,7 @@ public class DataImportBatchServiceImpl implements DataImportBatchService {
continue;
}
Map<String, Object> m = customMapper.getById("new_id", reference_to, value);
if (!m.isEmpty() && m.get("new_id") != null) {
if (m!= null && !m.isEmpty() && m.get("new_id") != null) {
account.put(field, m.get("new_id"));
}else {
message = "对象类型:" + api + "的数据:"+ map.get("Id") +"的引用对象:" + reference_to + "的数据:"+ map.get(field) +"异常!";
@ -1336,7 +1336,7 @@ public class DataImportBatchServiceImpl implements DataImportBatchService {
}
Map<String, Object> m = customMapper.getById("new_id", reference_to, data.get(j - 1).get(dataField.getField()).toString());
if (!m.isEmpty() && m.get("new_id") != null) {
if (m!= null && !m.isEmpty() && m.get("new_id") != null) {
account.put(dataField.getField(), m.get("new_id"));
}else {
message = "对象类型:" + api + "的数据:"+ data.get(j - 1).get("Id") +"的引用对象:" + reference_to + "的数据:"+ data.get(j - 1).get(dataField.getField()) +"异常!";

View File

@ -856,7 +856,7 @@ public class DataImportNewServiceImpl implements DataImportNewService {
continue;
}
Map<String, Object> m = customMapper.getById("new_id", reference_to, value);
if (!m.isEmpty() && m.get("new_id") != null) {
if (m!= null && !m.isEmpty() && m.get("new_id") != null) {
account.setField(field, m.get("new_id"));
}else {
message = "对象类型:" + api + "的数据:"+ map.get("Id") +"的引用对象:" + reference_to + "的数据:"+ map.get(field) +"异常!";
@ -1073,7 +1073,7 @@ public class DataImportNewServiceImpl implements DataImportNewService {
continue;
}
Map<String, Object> m = customMapper.getById("new_id", reference_to, value);
if (!m.isEmpty() && m.get("new_id") != null) {
if (m!= null && !m.isEmpty() && m.get("new_id") != null) {
account.setField(field, m.get("new_id"));
}else {
message = "对象类型:" + api + "的数据:"+ map.get("Id") +"的引用对象:" + reference_to + "的数据:"+ map.get(field) +"异常!";
@ -3505,7 +3505,7 @@ public class DataImportNewServiceImpl implements DataImportNewService {
continue;
}
Map<String, Object> m = customMapper.getById("new_id", reference_to, value);
if (!m.isEmpty() && m.get("new_id") != null) {
if (m!= null && !m.isEmpty() && m.get("new_id") != null) {
account.setField(field, m.get("new_id"));
}else {
message = "对象类型:" + api + "的数据:"+ data.get(j - 1).get("Id") +"的引用对象:" + reference_to + "的数据:"+ data.get(j - 1).get(field) +"异常!";
@ -3740,7 +3740,7 @@ public class DataImportNewServiceImpl implements DataImportNewService {
continue;
}
Map<String, Object> m = customMapper.getById("new_id", reference_to, value);
if (!m.isEmpty() && m.get("new_id") != null) {
if (m!= null && !m.isEmpty() && m.get("new_id") != null) {
account.setField(field, m.get("new_id"));
}else {
message = "对象类型:" + api + "的数据:"+ data.get(j - 1).get("Id") +"的引用对象:" + reference_to + "的数据:"+ data.get(j - 1).get(field) +"异常!";