From 304d1ea9619612be354c511d48987462d54f4c49 Mon Sep 17 00:00:00 2001 From: jzy <928294064@qq.com> Date: Mon, 22 Sep 2025 21:27:12 +0800 Subject: [PATCH] yangshi --- .../web/controller/system/ZhyPointController.java | 10 +++++ .../system/ZhyPointRelationshipController.java | 46 ++++++++++++++++++++++ .../com/ruoyi/system/mapper/SysPointMapper.java | 1 + .../system/mapper/ZhyPointRelationshipMapper.java | 2 + .../resources/mapper/system/SysPointMapper.xml | 6 +++ .../mapper/system/ZhyPointRelationshipMapper.xml | 4 ++ ruoyi-ui/src/api/system/SysPoint.js | 7 ++++ ruoyi-ui/src/views/system/SysPoint/index.vue | 34 ++++++++++------ ruoyi-ui/src/views/system/fileManage/index.vue | 4 +- ruoyi-ui/src/views/system/small/index.vue | 28 +++++++------ 10 files changed, 116 insertions(+), 26 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 3cfe126..356672e 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 @@ -150,6 +150,16 @@ public class ZhyPointController extends BaseController return toAjax(zhyPointService.updateZhyPoint(zhyPoint)); } + @GetMapping("/deleteAll") + public AjaxResult deleteAll(){ + String cql = "MATCH (n:TestNode) OPTIONAL MATCH (n:TestNode)-[r]-() DELETE n,r"; + neo4jUtil.excuteCypherSql(cql); + sysPointMapper.deleteZhyPointAll(); + zhyPointRelationshipMapper.deleteAll(); + return AjaxResult.success(); + + + } /** * 删除知识点管理 */ diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/ZhyPointRelationshipController.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/ZhyPointRelationshipController.java index 103a296..534dfc7 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/ZhyPointRelationshipController.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/ZhyPointRelationshipController.java @@ -97,6 +97,13 @@ public class ZhyPointRelationshipController extends BaseController int endid = Integer.valueOf(String.valueOf(point2.get(0).get("uuid"))); String endType = String.valueOf(point2.get(0).get("type1")); + String author=""; + String keyword=""; + String agency=""; + String title=""; + + + String RType = ""; System.out.println(point); System.out.println(point2); @@ -133,6 +140,45 @@ public class ZhyPointRelationshipController extends BaseController RType = "相关"; } } + + + + + if (startType.equals("author")){ + author = zhyPointRelationship.getAuthor(); + } + if (startType.equals("keyword")){ + keyword = zhyPointRelationship.getKeyword(); + } + if (startType.equals("agency")){ + agency = zhyPointRelationship.getAgency(); + } + if (startType.equals("title")){ + title = zhyPointRelationship.getTitle(); + } + + + if (endType.equals("author")){ + author = zhyPointRelationship.getAuthor(); + } + if (endType.equals("keyword")){ + keyword = zhyPointRelationship.getKeyword(); + } + if (endType.equals("agency")){ + agency = zhyPointRelationship.getAgency(); + } + if (endType.equals("title")){ + title = zhyPointRelationship.getTitle(); + } + List flag = zhyPointMapper.selectPointRelationshipByName(author,keyword,agency,title); + if (flag.size()!=0){ + return AjaxResult.error(500,"数据重复"); + } + + + + + Map map = new HashMap(); map.put("relType",RType); int uuid = pointService.createReletionship(startid,endid,RType,map); diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/mapper/SysPointMapper.java b/ruoyi-system/src/main/java/com/ruoyi/system/mapper/SysPointMapper.java index 454c650..4ab473a 100644 --- a/ruoyi-system/src/main/java/com/ruoyi/system/mapper/SysPointMapper.java +++ b/ruoyi-system/src/main/java/com/ruoyi/system/mapper/SysPointMapper.java @@ -58,4 +58,5 @@ public interface SysPointMapper * @return 结果 */ public int deleteZhyPointByIds(Long[] ids); + public int deleteZhyPointAll(); } diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/mapper/ZhyPointRelationshipMapper.java b/ruoyi-system/src/main/java/com/ruoyi/system/mapper/ZhyPointRelationshipMapper.java index e4eee16..5ef9362 100644 --- a/ruoyi-system/src/main/java/com/ruoyi/system/mapper/ZhyPointRelationshipMapper.java +++ b/ruoyi-system/src/main/java/com/ruoyi/system/mapper/ZhyPointRelationshipMapper.java @@ -62,4 +62,6 @@ public interface ZhyPointRelationshipMapper * @return 结果 */ public int deleteZhyPointRelationshipByIds(Long[] ids); + + public int deleteAll(); } diff --git a/ruoyi-system/src/main/resources/mapper/system/SysPointMapper.xml b/ruoyi-system/src/main/resources/mapper/system/SysPointMapper.xml index 11eda1d..8475636 100644 --- a/ruoyi-system/src/main/resources/mapper/system/SysPointMapper.xml +++ b/ruoyi-system/src/main/resources/mapper/system/SysPointMapper.xml @@ -63,4 +63,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" #{id} + + + + delete from zhy_point + + \ No newline at end of file diff --git a/ruoyi-system/src/main/resources/mapper/system/ZhyPointRelationshipMapper.xml b/ruoyi-system/src/main/resources/mapper/system/ZhyPointRelationshipMapper.xml index d887cbe..94cff24 100644 --- a/ruoyi-system/src/main/resources/mapper/system/ZhyPointRelationshipMapper.xml +++ b/ruoyi-system/src/main/resources/mapper/system/ZhyPointRelationshipMapper.xml @@ -87,4 +87,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" #{id} + + delete from zhy_point_relationship + + \ No newline at end of file diff --git a/ruoyi-ui/src/api/system/SysPoint.js b/ruoyi-ui/src/api/system/SysPoint.js index 00650f0..0f6de36 100644 --- a/ruoyi-ui/src/api/system/SysPoint.js +++ b/ruoyi-ui/src/api/system/SysPoint.js @@ -42,3 +42,10 @@ export function delSysPoint(id) { method: 'delete' }) } + +export function deleteAll() { + return request({ + url: '/system/SysPoint/deleteAll', + method: 'get' + }) +} diff --git a/ruoyi-ui/src/views/system/SysPoint/index.vue b/ruoyi-ui/src/views/system/SysPoint/index.vue index fe1360f..c25f3a0 100644 --- a/ruoyi-ui/src/views/system/SysPoint/index.vue +++ b/ruoyi-ui/src/views/system/SysPoint/index.vue @@ -70,16 +70,19 @@ v-hasPermi="['system:SysPoint:remove']" >删除 - - 导出 - + + 一键清除 + + + + + + + + + + + @@ -150,7 +153,7 @@