|
@@ -61,16 +61,16 @@ public class DataWriteTest {
|
|
|
}
|
|
|
try{
|
|
|
JSONArray jsonArray = JSONArray.parseArray(value);
|
|
|
- BaseEntity fromEntity = createNoExists(startLabel, temp.getEntity());
|
|
|
- startId = fromEntity.getId();
|
|
|
+ BaseEntity startEntity = createNoExists(startLabel, temp.getEntity());
|
|
|
+ startId = startEntity.getId();
|
|
|
List<RelationshipVO> relationshipList = new ArrayList<>();
|
|
|
for(int i=0;i<jsonArray.size();i++){
|
|
|
String name = jsonArray.getString(i);
|
|
|
if(StringUtils.isEmpty(name)){
|
|
|
continue;
|
|
|
}
|
|
|
- BaseEntity toEntity = createNoExists(endLabel, name);
|
|
|
- Long endId = toEntity.getId();
|
|
|
+ BaseEntity endEntity = createNoExists(endLabel, name);
|
|
|
+ Long endId = endEntity.getId();
|
|
|
RelationshipVO relationshipVO = new RelationshipVO();
|
|
|
relationshipVO.setStartId(startId);
|
|
|
relationshipVO.setEndId(endId);
|
|
@@ -80,7 +80,7 @@ public class DataWriteTest {
|
|
|
relationshipList.add(relationshipVO);
|
|
|
}
|
|
|
if(!CollectionUtils.isEmpty(relationshipList)) {
|
|
|
- relationshipService.createRelationship(relationshipList);
|
|
|
+ System.out.println( relationshipService.createRelationship(relationshipList));
|
|
|
}
|
|
|
}catch (Exception e){
|
|
|
e.printStackTrace();
|