From f35ee54c4452aa50df487bef238e88159b6acfa8 Mon Sep 17 00:00:00 2001 From: jzy <928294064@qq.com> Date: Tue, 4 Nov 2025 15:21:59 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E4=B8=AD=E5=BF=83=E8=AF=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../web/controller/system/ZhyPointController.java | 27 +++++++++++++++++++++- ruoyi-ui/src/views/system/SysPoint/index.vue | 5 ++-- 2 files changed, 29 insertions(+), 3 deletions(-) diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/ZhyPointController.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/ZhyPointController.java index 5115cdf..d9283e7 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/ZhyPointController.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/ZhyPointController.java @@ -13,6 +13,7 @@ import com.ruoyi.api.service.impl.PointService; import com.ruoyi.common.utils.Neo4jUtil; import com.ruoyi.system.domain.ZhyDoc; import com.ruoyi.system.mapper.SysPointMapper; +import com.ruoyi.system.mapper.Test1Mapper; import com.ruoyi.system.mapper.ZhyPointRelationshipGroupMapper; import com.ruoyi.system.mapper.ZhyPointRelationshipMapper; import com.ruoyi.system.service.IZhyPointRelationshipService; @@ -349,6 +350,8 @@ public class ZhyPointController extends BaseController @Autowired ZhyPointRelationshipGroupMapper zhyPointRelationshipGroupMapper; + @Autowired + Test1Mapper test1Mapper; @GetMapping("/deleteAll") public AjaxResult deleteAll(){ String cql = "MATCH (n:TestNode) OPTIONAL MATCH (n:TestNode)-[r]-() DELETE n,r"; @@ -356,9 +359,31 @@ public class ZhyPointController extends BaseController sysPointMapper.deleteZhyPointAll(); zhyPointRelationshipMapper.deleteAll(); zhyPointRelationshipGroupMapper.deleteAll(); - return AjaxResult.success(); + + ZhyDoc zhyDoc = new ZhyDoc(); + zhyDoc.setGroupId(2L); + zhyDoc.setDocLevel(1L); + List list=test1Mapper.selectZhyDocList(zhyDoc); + System.out.println(list); + for (int i = 0; i < list.size(); i++) { + ZhyPoint zhyPoint = new ZhyPoint(); + String name = list.get(i).getDocTitle(); + + Map data = new HashMap<>(); + data.put("type", "keyword"); + int neo4jId = pointService.createPoint(name, data); + + zhyPoint.setPointName(name); + zhyPoint.setType1("keyword"); + zhyPoint.setUuid(Long.valueOf(neo4jId)); + zhyPointService.insertZhyPoint(zhyPoint); + } + + + + return AjaxResult.success(); } /** * 删除知识点管理 diff --git a/ruoyi-ui/src/views/system/SysPoint/index.vue b/ruoyi-ui/src/views/system/SysPoint/index.vue index fbe742d..74f14ae 100644 --- a/ruoyi-ui/src/views/system/SysPoint/index.vue +++ b/ruoyi-ui/src/views/system/SysPoint/index.vue @@ -110,6 +110,7 @@