|
@@ -1,11 +1,14 @@
|
|
|
package com.diagbot.web;
|
|
|
|
|
|
import com.diagbot.dto.NeoEntityDTO;
|
|
|
+import com.diagbot.entity.node.base.BaseNode;
|
|
|
import com.diagbot.facade.EntityFacade;
|
|
|
+import com.diagbot.vo.KgQueryVO;
|
|
|
import com.diagbot.vo.NeoEntityVO;
|
|
|
import io.swagger.annotations.Api;
|
|
|
import io.swagger.annotations.ApiOperation;
|
|
|
|
|
|
+import org.mapstruct.Mapping;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.web.bind.annotation.*;
|
|
|
|
|
@@ -26,11 +29,6 @@ public class EntityController {
|
|
|
@Autowired
|
|
|
private EntityFacade entityFacade;
|
|
|
|
|
|
- @ApiOperation(value = "实体API", notes = "")
|
|
|
- @PostMapping("/initEntity")
|
|
|
- public void initEntity() {
|
|
|
- entityFacade.initEntity();
|
|
|
- }
|
|
|
|
|
|
@ApiOperation(value = "实体标签API", notes = "")
|
|
|
@GetMapping("/getLabels")
|
|
@@ -39,6 +37,12 @@ public class EntityController {
|
|
|
}
|
|
|
|
|
|
|
|
|
+ @ApiOperation(value = "实体查询API", notes = "")
|
|
|
+ @PostMapping("/getNode")
|
|
|
+ public List<BaseNode> getNodes(@RequestBody KgQueryVO kgQueryVO) {
|
|
|
+ return entityFacade.getNodes(kgQueryVO);
|
|
|
+ }
|
|
|
+
|
|
|
@ApiOperation(value = "实体更新API", notes = "")
|
|
|
@PostMapping("/updateNode")
|
|
|
public NeoEntityDTO updateNode(@RequestBody NeoEntityVO neoEntityVO) {
|
|
@@ -46,5 +50,11 @@ public class EntityController {
|
|
|
return entityFacade.updateNeoNode(neoEntityVO);
|
|
|
}
|
|
|
|
|
|
+ @ApiOperation(value = "实体删除API", notes = "")
|
|
|
+ @PostMapping("/deleteNode")
|
|
|
+ public int deleteNode(@RequestBody NeoEntityVO neoEntityVO) {
|
|
|
+ return entityFacade.deleteNeoNode(neoEntityVO);
|
|
|
+ }
|
|
|
+
|
|
|
}
|
|
|
|