Authored by qinchao

系统mysql支持切换

... ... @@ -15,7 +15,6 @@ import org.springframework.web.bind.annotation.RestController;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
/**
* Created by zhengyouwei on 2016/10/24.
... ... @@ -103,12 +102,12 @@ public class CenterSwitchCtrl {
String result1 ="";
String result2 ="";
if(centerSwitchModel.getName().toLowerCase().equals("switch_mysql")){
String toCloud=centerSwitchModel.getExe();
//第一步:执行响应的shell文件脚本(token校验再switchdb项目完成)
BaseResponse mysqlResponse = httpRestClientService.postForObject(SWITCH_DB_URL + "/switchMysql", centerSwitchModel, BaseResponse.class);
BaseResponse<String> mysqlResponse = httpRestClientService.postForObject(SWITCH_DB_URL + "/switchMysql", centerSwitchModel, BaseResponse.class);
if(200!=mysqlResponse.getCode()){
return mysqlResponse;
}
result1 = mysqlResponse.getData();
//第二步:查看第一步的执行的状态
result2 = httpRestClientService.postForObject(SWITCH_DB_URL+"/checkStatus", null, String.class);
}else{
... ...