From bf02ef7119092c24f8b041f96e8d7b66792949bc Mon Sep 17 00:00:00 2001 From: liu Date: Thu, 1 Aug 2024 14:02:03 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BB=A3=E7=A0=81=E6=8F=90=E4=BA=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main/java/com/supervision/neo4j/dto/WebRelDTO.java | 8 ++++---- .../supervision/neo4j/service/impl/Neo4jServiceImpl.java | 6 +++--- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/main/java/com/supervision/neo4j/dto/WebRelDTO.java b/src/main/java/com/supervision/neo4j/dto/WebRelDTO.java index 20c185f..3ddc7be 100644 --- a/src/main/java/com/supervision/neo4j/dto/WebRelDTO.java +++ b/src/main/java/com/supervision/neo4j/dto/WebRelDTO.java @@ -5,15 +5,15 @@ import lombok.Data; @Data public class WebRelDTO { - private long source; + private String source; - private long target; + private String target; private String name; public WebRelDTO(long source, long target, String name) { - this.source = source; - this.target = target; + this.source = String.valueOf(source); + this.target = String.valueOf(target); this.name = name; } } diff --git a/src/main/java/com/supervision/neo4j/service/impl/Neo4jServiceImpl.java b/src/main/java/com/supervision/neo4j/service/impl/Neo4jServiceImpl.java index 3d6a52e..3a7e0a3 100644 --- a/src/main/java/com/supervision/neo4j/service/impl/Neo4jServiceImpl.java +++ b/src/main/java/com/supervision/neo4j/service/impl/Neo4jServiceImpl.java @@ -257,7 +257,7 @@ public class Neo4jServiceImpl implements Neo4jService { public R getNode(String picType, String caseId) { Map map = new HashMap<>(); List list = new ArrayList<>(); - List> nodes = new ArrayList<>(); + List> nodes = new ArrayList<>(); try { Session session = driver.session(); Map params = new HashMap<>(); @@ -280,10 +280,10 @@ public class Neo4jServiceImpl implements Neo4jService { Record record = node.next(); String name = record.get("name").asString(); long idLong = record.get("id").asLong(); - Map nodeMap = new HashMap<>(); + Map nodeMap = new HashMap<>(); nodeMap.put("name", name); nodeMap.put("entityName", name); - nodeMap.put("id", idLong); + nodeMap.put("id", String.valueOf(idLong)); nodes.add(nodeMap); } } catch (Exception e) {