Commit e7da0b4c authored by gaozhentao's avatar gaozhentao

修改拓扑图参数

parent a4216153
......@@ -22,7 +22,15 @@ public class FlowLine {
String coordinateLeft; //左坐标
@Column("coordinate_right")
String coordinateRight; //右坐标
String points; //坐标
public String getPoints() {
return points;
}
public void setPoints(String points) {
this.points = points;
}
public String getCluster_name_left() {
return cluster_name_left;
......
......@@ -400,8 +400,8 @@ public class Manager {
List<FlowLine> flowLines = flowDao.findLineAll();
List<TcpFlowLineDto> lineDtos = new ArrayList<>();
List<TcpFlowNodeDto> nodeDtos = new ArrayList<>();
TcpFlowNodeDto nodeDto = new TcpFlowNodeDto();
for(FlowNode node : flowNodes){
TcpFlowNodeDto nodeDto = new TcpFlowNodeDto();
long faultCount=0;
try {
faultCount = getFaultCount(node.getServerPath());
......@@ -452,6 +452,7 @@ public class Manager {
for(Map<String,String> map : list){
if(map!=null && !map.isEmpty()){
flowDao.updateNode(map.get("clusterName"),map.get("coordinate"), map.get("mark"));
flowDao.updateLine(map.get("clusterNameLeft"),map.get("clusterNameRight"), map.get("points"));
// String id = UUID.randomUUID().toString();
// FlowLine flowLine = new FlowLine();
// flowLine.setClusterNameLeft(map.get("clusterNameLeft"));
......
......@@ -50,4 +50,10 @@ public class FlowDaoImpl {
"VALUES( '"+flowLine.getCluster_name_left()+"', '"+flowLine.getClusterNameRight()+"', '"+flowLine.getCoordinateLeft()+"', '"+flowLine.getCoordinateRight()+"');";
template.getCqlOperations().execute(cql);
}
public void updateLine(String clusterNameLeft, String clusterNameRight, String points) {
String cql ="UPDATE ctid_prof.flowline SET points='"+points+"' " +
"where cluster_name_left='"+clusterNameLeft+"' and cluster_name_right='"+clusterNameRight+"'";
template.getCqlOperations().execute(cql);
}
}
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