|
@@ -2,6 +2,7 @@ package com.persagy.dmp.rwd.digital.handler;
|
|
|
|
|
|
import cn.hutool.core.collection.CollUtil;
|
|
|
import cn.hutool.core.util.StrUtil;
|
|
|
+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.common.context.AppContext;
|
|
@@ -154,10 +155,25 @@ public class ProjectMessageVO {
|
|
|
if(StrUtil.isNotBlank(manageZone)) {
|
|
|
infos.put("groupManageZone", manageZone);
|
|
|
}
|
|
|
- // 添加图片
|
|
|
+ // 添加图片 - BOSS提供的只有图片key
|
|
|
if(CollUtil.isNotEmpty(projectImage)) {
|
|
|
- projectImage.forEach(p -> infos.withArray("projPic").addPOJO(p));
|
|
|
+ ArrayNode projPic = infos.withArray("projPic");
|
|
|
+ projectImage.forEach(p -> ensureImageNode(projPic.addObject(), p));
|
|
|
}
|
|
|
return infos;
|
|
|
}
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 构建为附件对象
|
|
|
+ * @param node
|
|
|
+ * @param key
|
|
|
+ */
|
|
|
+ private void ensureImageNode(ObjectNode node, String key) {
|
|
|
+ if(StrUtil.isBlank(key)) {
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ node.put("key", key);
|
|
|
+ node.put("name", key);
|
|
|
+ node.put("type", "file");
|
|
|
+ }
|
|
|
}
|