|
|
|
@ -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<ZhyDoc> 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<String, Object> 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(); |
|
|
|
} |
|
|
|
/** |
|
|
|
* 删除知识点管理 |
|
|
|
|