|
@@ -1,6 +1,7 @@
|
|
|
package com.diagbot.web;
|
|
|
|
|
|
import com.diagbot.annotation.SysLogger;
|
|
|
+import com.diagbot.dto.GraphDTO;
|
|
|
import com.diagbot.dto.NodeDTO;
|
|
|
import com.diagbot.dto.RespDTO;
|
|
|
import com.diagbot.facade.KgFacade;
|
|
@@ -13,6 +14,7 @@ import org.springframework.web.bind.annotation.RequestBody;
|
|
|
import org.springframework.web.bind.annotation.RequestMapping;
|
|
|
import org.springframework.web.bind.annotation.RestController;
|
|
|
|
|
|
+import javax.validation.Valid;
|
|
|
import java.util.List;
|
|
|
import java.util.Map;
|
|
|
|
|
@@ -30,13 +32,6 @@ public class KgController {
|
|
|
@Autowired
|
|
|
private KgFacade kgFacade;
|
|
|
|
|
|
- @ApiOperation(value = "查看疾病", notes = "查看疾病")
|
|
|
- @PostMapping("/selectDisease")
|
|
|
- @SysLogger("selectDisease")
|
|
|
- public RespDTO<List<Map>> selectDisease() {
|
|
|
- return RespDTO.onSuc(kgFacade.selectDisease());
|
|
|
- }
|
|
|
-
|
|
|
@ApiOperation(value = "查询节点", notes = "查询节点")
|
|
|
@PostMapping("/getNode")
|
|
|
@SysLogger("getNode")
|
|
@@ -47,8 +42,8 @@ public class KgController {
|
|
|
@ApiOperation(value = "获取图谱", notes = "获取图谱")
|
|
|
@PostMapping("/getGraph")
|
|
|
@SysLogger("getGraph")
|
|
|
- public RespDTO<List<Map>> getGraph(@RequestBody KgQueryVO kgQueryVO) {
|
|
|
- return RespDTO.onSuc(kgFacade.getGraph());
|
|
|
+ public RespDTO<List<GraphDTO>> getGraph(@RequestBody @Valid KgQueryVO kgQueryVO) {
|
|
|
+ return RespDTO.onSuc(kgFacade.getGraph(kgQueryVO));
|
|
|
}
|
|
|
|
|
|
@ApiOperation(value = "获取分类", notes = "获取分类")
|