代码提交

topo_dev
liu 9 months ago
parent 4b8e8e02bd
commit bf02ef7119

@ -5,15 +5,15 @@ import lombok.Data;
@Data @Data
public class WebRelDTO { public class WebRelDTO {
private long source; private String source;
private long target; private String target;
private String name; private String name;
public WebRelDTO(long source, long target, String name) { public WebRelDTO(long source, long target, String name) {
this.source = source; this.source = String.valueOf(source);
this.target = target; this.target = String.valueOf(target);
this.name = name; this.name = name;
} }
} }

@ -257,7 +257,7 @@ public class Neo4jServiceImpl implements Neo4jService {
public R<?> getNode(String picType, String caseId) { public R<?> getNode(String picType, String caseId) {
Map<String, Object> map = new HashMap<>(); Map<String, Object> map = new HashMap<>();
List<WebRelDTO> list = new ArrayList<>(); List<WebRelDTO> list = new ArrayList<>();
List<Map<String, Object>> nodes = new ArrayList<>(); List<Map<String, String>> nodes = new ArrayList<>();
try { try {
Session session = driver.session(); Session session = driver.session();
Map<String, Object> params = new HashMap<>(); Map<String, Object> params = new HashMap<>();
@ -280,10 +280,10 @@ public class Neo4jServiceImpl implements Neo4jService {
Record record = node.next(); Record record = node.next();
String name = record.get("name").asString(); String name = record.get("name").asString();
long idLong = record.get("id").asLong(); long idLong = record.get("id").asLong();
Map<String, Object> nodeMap = new HashMap<>(); Map<String, String> nodeMap = new HashMap<>();
nodeMap.put("name", name); nodeMap.put("name", name);
nodeMap.put("entityName", name); nodeMap.put("entityName", name);
nodeMap.put("id", idLong); nodeMap.put("id", String.valueOf(idLong));
nodes.add(nodeMap); nodes.add(nodeMap);
} }
} catch (Exception e) { } catch (Exception e) {

Loading…
Cancel
Save