|
@@ -4,6 +4,7 @@ import cn.hutool.core.util.StrUtil;
|
|
|
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.common.constant.CommonConstant;
|
|
|
import com.persagy.proxy.adm.constant.AdmRelationTypeEnum;
|
|
|
import com.persagy.proxy.relation.model.SiInSpBase;
|
|
|
import com.persagy.proxy.relation.model.SiInSpBaseList;
|
|
@@ -59,11 +60,14 @@ public class RelationSpInSiController {
|
|
|
for (SiInSpBase siInSpBase : content) {
|
|
|
String ispaceId = siInSpBase.getIspaceId();
|
|
|
String spaceId = siInSpBase.getSpaceId();
|
|
|
- String objectType = siInSpBase.getObjectType();
|
|
|
+ if (StrUtil.isBlank(type)){
|
|
|
+ type = siInSpBase.getClassCode();
|
|
|
+ }
|
|
|
if (StrUtil.isEmpty(spaceId) || StrUtil.isBlank(ispaceId)) {
|
|
|
return AdmResponse.failure("必填项:ispaceId(元空间id)、spaceId(空间id)");
|
|
|
}
|
|
|
- RelationDTO relation = new RelationDTO(null, graphCode, relCode, objectType, spaceId, ispaceId);
|
|
|
+ RelationDTO relation = new RelationDTO(StrUtil.format(CommonConstant.DEFAULT_GRAPH_ID_FORMAT,graphCode),
|
|
|
+ graphCode, relCode, type, spaceId, ispaceId);
|
|
|
voList.add(relation);
|
|
|
}
|
|
|
service.doSave(AdmContextUtil.toDmpContext(), voList);
|