Skip to content

Commit

Permalink
fix:格式化标签输入
Browse files Browse the repository at this point in the history
  • Loading branch information
MiracleTanC committed Jan 1, 2022
1 parent 3b4493a commit e596801
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -642,7 +642,7 @@ public void batchInsertByCsv(String domain, String csvUrl, int status) {
String loadNodeCypher1 = null;
String loadNodeCypher2 = null;
String addIndexCypher = null;
addIndexCypher = " CREATE INDEX ON :" + domain + "(name);";
addIndexCypher = " CREATE INDEX ON :`" + domain + "`(name);";
loadNodeCypher1 = " USING PERIODIC COMMIT 500 LOAD CSV FROM '" + csvUrl + "' AS line " + " MERGE (:`" + domain
+ "` {name:line[0]});";
loadNodeCypher2 = " USING PERIODIC COMMIT 500 LOAD CSV FROM '" + csvUrl + "' AS line " + " MERGE (:`" + domain
Expand Down Expand Up @@ -674,15 +674,15 @@ public void updateNodeFileStatus(String domain, long nodeId, int status) {
public void updateCoordinateOfNode(String domain, String uuid, Double fx, Double fy) {
String cypher = null;
if (fx == null && fy == null) {
cypher = " MATCH (n:" + domain + ") where ID(n)=" + uuid
cypher = " MATCH (n:`" + domain + "`) where ID(n)=" + uuid
+ " set n.fx=null, n.fy=null; ";
} else {
assert fx != null;
if ("0.0".equals(fx.toString()) && "0.0".equals(fy.toString())) {
cypher = " MATCH (n:" + domain + ") where ID(n)=" + uuid
cypher = " MATCH (n:`" + domain + "`) where ID(n)=" + uuid
+ " set n.fx=null, n.fy=null; ";
} else {
cypher = " MATCH (n:" + domain + ") where ID(n)=" + uuid
cypher = " MATCH (n:`" + domain + "`) where ID(n)=" + uuid
+ " set n.fx='" + fx + "', n.fy='" + fy + "';";
}
}
Expand Down

0 comments on commit e596801

Please sign in to comment.