|
@@ -3,6 +3,8 @@ package org.diagbot.push.controller;
|
|
|
import org.diagbot.common.work.ResponseData;
|
|
|
import org.diagbot.common.work.SearchData;
|
|
|
import org.diagbot.graph.javabean.GdbResponse;
|
|
|
+import org.diagbot.graph.jdbc.DriverManager;
|
|
|
+import org.diagbot.graph.jdbc.Neo4jAPI;
|
|
|
import org.diagbot.graphWeb.work.GraphCalculate;
|
|
|
import org.diagbot.graphWeb.work.HighRiskCalculate;
|
|
|
import org.diagbot.pub.api.Response;
|
|
@@ -14,6 +16,7 @@ import org.springframework.web.bind.annotation.RequestMethod;
|
|
|
import org.springframework.web.bind.annotation.ResponseBody;
|
|
|
|
|
|
import javax.servlet.http.HttpServletRequest;
|
|
|
+import java.util.Map;
|
|
|
|
|
|
@Controller
|
|
|
@RequestMapping("/graph")
|
|
@@ -66,4 +69,13 @@ public class GraphController extends BaseController {
|
|
|
response.setData(responseData);
|
|
|
return response;
|
|
|
}
|
|
|
+
|
|
|
+ @RequestMapping(value = "/scale", method = RequestMethod.POST)
|
|
|
+ @ResponseBody
|
|
|
+ public Map<String, Object> scale(HttpServletRequest request, @RequestBody SearchData searchData) throws Exception {
|
|
|
+ Neo4jAPI neo4jAPI = new Neo4jAPI(DriverManager.newDrive("192.168.2.233","neo4j","root"));
|
|
|
+ String scaleName = searchData.getScaleName();
|
|
|
+ Map<String, Object> scale = neo4jAPI.getScale(scaleName);
|
|
|
+ return scale;
|
|
|
+ }
|
|
|
}
|