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 @@