|
|
@ -167,6 +167,7 @@ public class ZhyRelationshipController extends BaseController |
|
|
} |
|
|
} |
|
|
zhyRelationship.setTargetName(dd2.getDocTitle()); |
|
|
zhyRelationship.setTargetName(dd2.getDocTitle()); |
|
|
zhyRelationship.setIsgraph(1l); |
|
|
zhyRelationship.setIsgraph(1l); |
|
|
|
|
|
zhyRelationship.setRelationship("相关"); |
|
|
zhyRelationshipMapper.insertZhyRelationship(zhyRelationship); |
|
|
zhyRelationshipMapper.insertZhyRelationship(zhyRelationship); |
|
|
String cqr = "MATCH (a:Doc),(b:Doc) WHERE a.docId = '"+zhyRelationship.getSource()+"' AND b.docId = '"+zhyRelationship.getTarget()+"'CREATE (a)-[r:"+zhyRelationship.getRelationship()+"{ name: '"+zhyRelationship.getRelationship()+ "', DbId: '"+zhyRelationship.getId()+"' }] -> (b) RETURN r"; |
|
|
String cqr = "MATCH (a:Doc),(b:Doc) WHERE a.docId = '"+zhyRelationship.getSource()+"' AND b.docId = '"+zhyRelationship.getTarget()+"'CREATE (a)-[r:"+zhyRelationship.getRelationship()+"{ name: '"+zhyRelationship.getRelationship()+ "', DbId: '"+zhyRelationship.getId()+"' }] -> (b) RETURN r"; |
|
|
neo4jUtil.excuteCypherSql(cqr); |
|
|
neo4jUtil.excuteCypherSql(cqr); |
|
|
@ -219,6 +220,7 @@ public class ZhyRelationshipController extends BaseController |
|
|
ZhyDoc dd2 = test1Mapper.selectDocById(vv); |
|
|
ZhyDoc dd2 = test1Mapper.selectDocById(vv); |
|
|
zhyRelationship.setTargetName(dd2.getDocTitle()); |
|
|
zhyRelationship.setTargetName(dd2.getDocTitle()); |
|
|
zhyRelationship.setIsgraph(1l); |
|
|
zhyRelationship.setIsgraph(1l); |
|
|
|
|
|
zhyRelationship.setRelationship("相关"); |
|
|
zhyRelationshipMapper.insertZhyRelationship(zhyRelationship); |
|
|
zhyRelationshipMapper.insertZhyRelationship(zhyRelationship); |
|
|
String cqr = "MATCH (a:Doc),(b:Doc) WHERE a.docId = '"+zhyRelationship.getSource()+"' AND b.docId = '"+zhyRelationship.getTarget()+"'CREATE (a)-[r:"+zhyRelationship.getRelationship()+"{ name: '"+zhyRelationship.getRelationship()+ "', DbId: '"+zhyRelationship.getId()+"' }] -> (b) RETURN r"; |
|
|
String cqr = "MATCH (a:Doc),(b:Doc) WHERE a.docId = '"+zhyRelationship.getSource()+"' AND b.docId = '"+zhyRelationship.getTarget()+"'CREATE (a)-[r:"+zhyRelationship.getRelationship()+"{ name: '"+zhyRelationship.getRelationship()+ "', DbId: '"+zhyRelationship.getId()+"' }] -> (b) RETURN r"; |
|
|
neo4jUtil.excuteCypherSql(cqr); |
|
|
neo4jUtil.excuteCypherSql(cqr); |
|
|
|