|
@@ -5,10 +5,13 @@ import cn.hutool.core.map.MapUtil;
|
|
|
import cn.hutool.core.util.ReflectUtil;
|
|
|
import cn.hutool.core.util.StrUtil;
|
|
|
import com.alibaba.fastjson.JSONObject;
|
|
|
+import com.fasterxml.jackson.databind.ObjectMapper;
|
|
|
+import com.fasterxml.jackson.databind.node.ArrayNode;
|
|
|
import com.fasterxml.jackson.databind.node.JsonNodeFactory;
|
|
|
import com.fasterxml.jackson.databind.node.ObjectNode;
|
|
|
import com.persagy.dmp.basic.model.QueryCriteria;
|
|
|
import com.persagy.dmp.basic.utils.JsonNodeUtils;
|
|
|
+import com.persagy.dmp.common.helper.SpringHelper;
|
|
|
import com.persagy.dmp.digital.entity.ObjectDigital;
|
|
|
import com.persagy.proxy.adm.constant.AdmDictConstant;
|
|
|
import com.persagy.proxy.adm.request.*;
|
|
@@ -131,6 +134,7 @@ public class AdmSpaceController {
|
|
|
Map<String, Field> fieldMap = JsonNodeUtils.getFieldMap(AdmSpace.class);
|
|
|
Map<String, Field> objFieldMap = JsonNodeUtils.getFieldMap(ObjectDigital.class);
|
|
|
Set<String> fields = fieldMap.keySet();
|
|
|
+ ObjectMapper objectMapper = SpringHelper.getBean(ObjectMapper.class);
|
|
|
for (AdmSpace space : vos) {
|
|
|
Map<String, Object> infos = space.getInfos();
|
|
|
if (MapUtil.isEmpty(infos)){
|
|
@@ -147,6 +151,10 @@ public class AdmSpaceController {
|
|
|
|
|
|
continue;
|
|
|
}
|
|
|
+ if (fields.contains(mapKey) && infos.get(mapKey) instanceof ArrayList){
|
|
|
+ ReflectUtil.setFieldValue(space,fieldMap.get(mapKey),objectMapper.readValue(objectMapper.writeValueAsString(infos.get(mapKey)), ArrayNode.class));
|
|
|
+ continue;
|
|
|
+ }
|
|
|
if (fields.contains(mapKey)){
|
|
|
|
|
|
ReflectUtil.setFieldValue(space,fieldMap.get(mapKey),infos.get(mapKey));
|