...
|
...
|
@@ -3,6 +3,7 @@ package com.ui.ctrl; |
|
|
import com.alibaba.fastjson.JSON;
|
|
|
import com.alibaba.fastjson.JSONArray;
|
|
|
import com.alibaba.fastjson.JSONObject;
|
|
|
import com.ui.User.DnsRefreshLocal;
|
|
|
import com.ui.User.UserAuthLocal;
|
|
|
import com.ui.http.HttpRestClient;
|
|
|
import com.ui.model.BaseResponse;
|
...
|
...
|
@@ -48,6 +49,9 @@ public class OuterIntfCtrl { |
|
|
@Autowired
|
|
|
UserAuthLocal userAuthLocal;
|
|
|
|
|
|
@Autowired
|
|
|
DnsRefreshLocal dnsRefreshLocal;
|
|
|
|
|
|
/**
|
|
|
* 对外接口,通用指标上报
|
|
|
*/
|
...
|
...
|
@@ -296,35 +300,19 @@ public class OuterIntfCtrl { |
|
|
@RequestMapping("/dnsJustForShell")
|
|
|
@ResponseBody
|
|
|
public String dnsJustForShell(String domain, String cloud, String type, String operate, String record, String value) {
|
|
|
if (StringUtils.isBlank(domain) || StringUtils.isBlank(cloud) || StringUtils.isBlank(operate)) {
|
|
|
return "param error";
|
|
|
}
|
|
|
Map<String, String> map=new HashMap<>();
|
|
|
map.put("domain",domain);
|
|
|
map.put("cloud",cloud);
|
|
|
map.put("operate",operate);
|
|
|
|
|
|
map.put("record",StringUtils.isBlank(record)?"":record);
|
|
|
map.put("type",StringUtils.isBlank(type)?"":type);
|
|
|
map.put("value",StringUtils.isBlank(value)?"":value);
|
|
|
return httpClient.defaultGet("/internalDns/justForShell",String.class,map);
|
|
|
return dnsRefreshLocal.dnsJustForShell(domain, cloud, type, operate, record, value);
|
|
|
}
|
|
|
|
|
|
@RequestMapping("/dnsJustForShellUpdate")
|
|
|
@ResponseBody
|
|
|
public String dnsJustForShellUpdate( String cloud, String record, String value) {
|
|
|
String domain="yohoops.org";
|
|
|
String operate="update";
|
|
|
String type="";
|
|
|
return this.dnsJustForShell(domain,cloud,type,operate,record,value);
|
|
|
return dnsRefreshLocal.dnsJustForShellUpdate(cloud,record,value);
|
|
|
}
|
|
|
|
|
|
@RequestMapping("/dnsJustForShellCommit")
|
|
|
@ResponseBody
|
|
|
public String dnsJustForShellCommit( String cloud) {
|
|
|
String domain="yohoops.org";
|
|
|
String operate="commit";
|
|
|
return this.dnsJustForShell(domain,cloud,"",operate,"","");
|
|
|
return dnsRefreshLocal.dnsJustForShellCommit(cloud);
|
|
|
}
|
|
|
|
|
|
|
...
|
...
|
|