|
@@ -7,12 +7,10 @@ import com.diagbot.facade.KgFacade;
|
|
|
import io.swagger.annotations.Api;
|
|
|
import io.swagger.annotations.ApiOperation;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
-import org.springframework.integration.support.StringObjectMapBuilder;
|
|
|
import org.springframework.web.bind.annotation.PostMapping;
|
|
|
import org.springframework.web.bind.annotation.RequestMapping;
|
|
|
import org.springframework.web.bind.annotation.RestController;
|
|
|
|
|
|
-import java.util.HashMap;
|
|
|
import java.util.List;
|
|
|
import java.util.Map;
|
|
|
|
|
@@ -24,6 +22,7 @@ import java.util.Map;
|
|
|
@RestController
|
|
|
@RequestMapping("/kg")
|
|
|
@Api(value = "朗通知识图谱API", tags = { "朗通知识图谱API" })
|
|
|
+@SuppressWarnings("unchecked")
|
|
|
public class KgController {
|
|
|
|
|
|
@Autowired
|
|
@@ -35,5 +34,26 @@ public class KgController {
|
|
|
public RespDTO<List<Map>> selectDisease() {
|
|
|
return RespDTO.onSuc(kgFacade.selectDisease());
|
|
|
}
|
|
|
+
|
|
|
+ @ApiOperation(value = "获取图谱", notes = "获取图谱")
|
|
|
+ @PostMapping("/getGraph")
|
|
|
+ @SysLogger("getGraph")
|
|
|
+ public RespDTO<List<Map>> getGraph() {
|
|
|
+ return RespDTO.onSuc(kgFacade.getGraph());
|
|
|
+ }
|
|
|
+
|
|
|
+ @ApiOperation(value = "获取分类", notes = "获取分类")
|
|
|
+ @PostMapping("/getTree")
|
|
|
+ @SysLogger("getTree")
|
|
|
+ public RespDTO<List<Map>> getTree() {
|
|
|
+ return RespDTO.onSuc(kgFacade.getTree());
|
|
|
+ }
|
|
|
+
|
|
|
+ @ApiOperation(value = "获取描述框架", notes = "获取描述框架")
|
|
|
+ @PostMapping("/getSchema")
|
|
|
+ @SysLogger("getSchema")
|
|
|
+ public RespDTO<List<Map>> getSchema() {
|
|
|
+ return RespDTO.onSuc(kgFacade.getSchema());
|
|
|
+ }
|
|
|
}
|
|
|
|