Commit 770f3f19 authored by gaozhentao's avatar gaozhentao

修改拓扑图参数

parent 9c56cb40
......@@ -461,16 +461,16 @@ public class Manager {
public Map saveTopology(String json) {
JSONObject jsonObject = JSONObject.fromObject(json);
List<Map<String,String>> nodeList = jsonObject.getJSONArray("nodeDataArray");
List<Map<String,String>> linkList = jsonObject.getJSONArray("linkDataArray");
for(Map<String,String> map : nodeList){
if(map!=null && !map.isEmpty()){
flowDao.updateNode(map.get("serverName"),map.get("pos"), map.get("category"));
List<JSONObject> nodeList = jsonObject.getJSONArray("nodeDataArray");
List<JSONObject> linkList = jsonObject.getJSONArray("linkDataArray");
for(JSONObject js : nodeList){
if(!js.isNullObject()){
flowDao.updateNode(js.getString("serverName"),js.getString("pos"), js.getString("category"));
}
}
for(Map<String,String> map : linkList){
if(map!=null && !map.isEmpty()){
flowDao.updateLine(map.get("from"),map.get("to"), map.get("points"),map.get("color"));
for(JSONObject js : linkList){
if(!js.isNullObject()){
flowDao.updateLine(js.getString("from"),js.getString("to"), js.getString("points"),js.getString("color"));
}
}
Map result = new HashMap();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment