Authored by qinchao

去掉不用dnsspot信息

... ... @@ -243,6 +243,7 @@ public class HttpUriContants {
public static final String CENTERSWITCH_SWITCH_SMS_CHECK = "/centerSwitch/checkSmsCode";
//只是查看状态
public static final String CENTERSWITCH_STATUS = "/centerSwitch/checkStatus";
public static final String CENTERSWITCH_DEFAULT_DNS = "/centerSwitch/defaultDns";
//java监控信息
public static final String JAVA_MONITOR_GET = "/newJavaApiInfo/queryByServiceType";
... ...
... ... @@ -145,30 +145,8 @@ public class TopoSwitchCtrl {
}
//dns
String defaultDns = "";
MultiValueMap<String, String> requestEntity = new LinkedMultiValueMap<>();
requestEntity.add("login_token", "31578,5f5402160468dc375159e2e94eeef1da");
requestEntity.add("format","json");
requestEntity.add("domain_id", "16862974");
requestEntity.add("record_id","293178513");
try{
String requestResponse = httpRestClient.post("https://dnsapi.cn/Record.Info", requestEntity, String.class);
JSONObject responseJSON = JSONObject.parseObject(requestResponse);
JSONObject responseStatus = JSONObject.parseObject(responseJSON.getString("status"));
if ("1".equals(responseStatus.getString("code"))){
if (requestResponse.indexOf("amazonaws") == -1){
defaultDns = "qq";
}else{
defaultDns = "aws";
}
}else{
logger.error(" TopoSwitchCtrl - getNgixnStatus - JSON - err:" + responseJSON.getString("message"));
}
}catch (Exception e){
logger.error(" TopoSwitchCtrl - getNgixnStatus - https://dnsapi.cn/Record.Info - err", e);
}
String defaultDns = httpRestClient.defaultGet(HttpUriContants.CENTERSWITCH_DEFAULT_DNS,String.class);
resultMap.put("luaType", luaType);
resultMap.put("awsApiNginx", awsApiNginx);
resultMap.put("awsGrayNginx", awsGrayNginx);
... ...
... ... @@ -114,30 +114,7 @@ public class AppTopoSwitchCtrl {
}
//dns
String defaultDns = "";
MultiValueMap<String, String> requestEntity = new LinkedMultiValueMap<>();
requestEntity.add("login_token", "31578,5f5402160468dc375159e2e94eeef1da");
requestEntity.add("format","json");
requestEntity.add("domain_id", "16862974");
requestEntity.add("record_id","293178513");
try{
String requestResponse = httpRestClient.post("https://dnsapi.cn/Record.Info", requestEntity, String.class);
JSONObject responseJSON = JSONObject.parseObject(requestResponse);
JSONObject responseStatus = JSONObject.parseObject(responseJSON.getString("status"));
if ("1".equals(responseStatus.getString("code"))){
if (requestResponse.indexOf("amazonaws") == -1){
defaultDns = "qq";
}else{
defaultDns = "aws";
}
}else{
logger.error(" TopoSwitchCtrl - getNgixnStatus - JSON - err:" + responseJSON.getString("message"));
}
}catch (Exception e){
logger.error(" TopoSwitchCtrl - getNgixnStatus - https://dnsapi.cn/Record.Info - err", e);
}
String defaultDns = httpRestClient.defaultGet(HttpUriContants.CENTERSWITCH_DEFAULT_DNS,String.class);
logger.info("getNgixnStatus 3...");
... ...