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

(cherry picked from commit a155736605)
This commit is contained in:
Kris 2025-10-11 14:23:28 +08:00
parent 84d6fbd401
commit a3f9ea6b10
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

@ -863,7 +863,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) +"异常!";
@ -1080,7 +1080,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) +"异常!";
@ -3582,7 +3582,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) +"异常!";
@ -3817,7 +3817,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) +"异常!";