Skip to content

Commit

Permalink
add note
Browse files Browse the repository at this point in the history
  • Loading branch information
527515025 committed Mar 24, 2020
1 parent 092e20b commit b0977ca
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,8 @@ public void saveQueen(List<Queen> list) {
public GraphDTO getKingAndQueen(String kingName) {
Neo4jSession session = neo4jDao.open();
String cypher = "match p=(a:King)-[r:`传位`]->(b:King)-[r2:`皇后`*1..]->(c:Queen) where a.name ='" + kingName + "' return p";
// 通过皇帝名字查询到当前皇帝皇后以及上一任皇帝皇后
// match p=(a:King)-[r:`传位`]->(b:King)-[r2:`皇后`*1..]->(c:Queen), (a:King)-[r3:`皇后`*1..]->(d:Queen) where b.name ='朱棣' return a,b,c,d
Iterator<Map<String, Object>> iterator = session.exec(cypher);
GraphDTO gto = mapToGraph(iterator);
return gto;
Expand Down

0 comments on commit b0977ca

Please sign in to comment.