|
@@ -10,7 +10,6 @@ import com.persagy.dmp.common.constant.ResponseCode;
|
|
import com.persagy.dmp.common.exception.BusinessException;
|
|
import com.persagy.dmp.common.exception.BusinessException;
|
|
import com.persagy.dmp.common.helper.SpringHelper;
|
|
import com.persagy.dmp.common.helper.SpringHelper;
|
|
import com.persagy.dmp.common.model.entity.BaseEntity;
|
|
import com.persagy.dmp.common.model.entity.BaseEntity;
|
|
-import org.springframework.beans.BeanUtils;
|
|
|
|
|
|
|
|
import java.io.IOException;
|
|
import java.io.IOException;
|
|
import java.lang.reflect.Field;
|
|
import java.lang.reflect.Field;
|
|
@@ -111,7 +110,7 @@ public class JsonNodeUtils {
|
|
private static void ensureExtras(ObjectNode node, String extraColumn, Set<String> extraColumns) {
|
|
private static void ensureExtras(ObjectNode node, String extraColumn, Set<String> extraColumns) {
|
|
JsonNode extraNode = node.get(extraColumn);
|
|
JsonNode extraNode = node.get(extraColumn);
|
|
// 如果扩展列的值为空或不是对象,直接返回
|
|
// 如果扩展列的值为空或不是对象,直接返回
|
|
- if(extraNode.isNull() || !extraNode.isObject()) {
|
|
|
|
|
|
+ if(extraNode == null || extraNode.isNull() || !extraNode.isObject()) {
|
|
return;
|
|
return;
|
|
}
|
|
}
|
|
Iterator<String> extraKeys = extraNode.fieldNames();
|
|
Iterator<String> extraKeys = extraNode.fieldNames();
|
|
@@ -229,7 +228,7 @@ public class JsonNodeUtils {
|
|
* @return
|
|
* @return
|
|
*/
|
|
*/
|
|
public static Object getNodeValue(JsonNode node) {
|
|
public static Object getNodeValue(JsonNode node) {
|
|
- if(node.isContainerNode() || node.isNull()) {
|
|
|
|
|
|
+ if(node == null || node.isContainerNode() || node.isNull()) {
|
|
return null;
|
|
return null;
|
|
}
|
|
}
|
|
if(node.isBigDecimal()) {
|
|
if(node.isBigDecimal()) {
|