|
@@ -103,8 +103,6 @@ public class RestApi {
|
|
|
|
|
|
@PostMapping(path = { "/query", "/zkt-sdk/query" }, produces = "application/json;charset=UTF-8")
|
|
|
public String query(@RequestBody String param, HttpServletRequest request) {
|
|
|
- String ip = RestUtil.getIp(request);
|
|
|
- log.info("ip:" + ip + " || query: " + param);
|
|
|
String result = RestUtil.query(param);
|
|
|
return result;
|
|
|
}
|
|
@@ -116,7 +114,6 @@ public class RestApi {
|
|
|
ConcurrentHashMap<String, Date> param2time = RepositoryBase.ip2param2time.get(ip);
|
|
|
Date exist = param2time.putIfAbsent(param, new Date());
|
|
|
if (exist == null) {
|
|
|
- log.info("ip:" + ip + " || post yes: " + param);
|
|
|
try {
|
|
|
Object resultObject = RestUtil.post(param);
|
|
|
String result = JSONObject.toJSONString(resultObject, SerializerFeature.WriteMapNullValue);
|
|
@@ -125,16 +122,12 @@ public class RestApi {
|
|
|
param2time.remove(param);
|
|
|
}
|
|
|
} else {
|
|
|
- log.info("ip:" + ip + " || post no: " + param);
|
|
|
return null;
|
|
|
}
|
|
|
}
|
|
|
|
|
|
@PostMapping(path = { "/wrapper_post", "/zkt-sdk/wrapper_post" }, produces = "application/json;charset=UTF-8")
|
|
|
public String wrapper_post(@RequestBody String param, HttpServletRequest request) {
|
|
|
- String ip = RestUtil.getIp(request);
|
|
|
- log.info("ip:" + ip + " || wrapper_post : " + param);
|
|
|
-
|
|
|
JSONObject paramObject = JSON.parseObject(param);
|
|
|
String path = paramObject.get("path").toString();
|
|
|
Object Content = RestUtil.post(path);
|
|
@@ -146,56 +139,42 @@ public class RestApi {
|
|
|
|
|
|
@PostMapping(path = { "/post_filter_and_page", "/zkt-sdk/post_filter_and_page" }, produces = "application/json;charset=UTF-8")
|
|
|
public String post_filter_and_page(@RequestBody String param, HttpServletRequest request) {
|
|
|
- String ip = RestUtil.getIp(request);
|
|
|
- log.info("ip:" + ip + " || post_filter_and_page: " + param);
|
|
|
String result = RestUtil.post_filter_and_page(param);
|
|
|
return result;
|
|
|
}
|
|
|
|
|
|
@PostMapping(path = { "/control", "/zkt-sdk/control" }, produces = "application/json;charset=UTF-8")
|
|
|
public String control(@RequestBody String param, HttpServletRequest request) {
|
|
|
- String ip = RestUtil.getIp(request);
|
|
|
- log.info("ip:" + ip + " || control: " + param);
|
|
|
String result = RestUtil.control(param);
|
|
|
return result;
|
|
|
}
|
|
|
|
|
|
@PostMapping(path = { "/get_control_value", "/zkt-sdk/get_control_value" }, produces = "application/json;charset=UTF-8")
|
|
|
public String get_control_value(@RequestBody String param, HttpServletRequest request) {
|
|
|
- String ip = RestUtil.getIp(request);
|
|
|
- log.info("ip:" + ip + " || get_control_value: " + param);
|
|
|
String result = RestUtil.get_control_value(param);
|
|
|
return result;
|
|
|
}
|
|
|
|
|
|
@PostMapping(path = { "/fjd_query", "/zkt-sdk/fjd_query" }, produces = "application/json;charset=UTF-8")
|
|
|
public String fjd_query(@RequestBody String param, HttpServletRequest request) {
|
|
|
- String ip = RestUtil.getIp(request);
|
|
|
- log.info("ip:" + ip + " || fjd_query: " + param);
|
|
|
String result = RestUtil.fjd_query(param);
|
|
|
return result;
|
|
|
}
|
|
|
|
|
|
@PostMapping(path = { "/history_fjd_query", "/zkt-sdk/history_fjd_query" }, produces = "application/json;charset=UTF-8")
|
|
|
public String fjd_query_history(@RequestBody String param, HttpServletRequest request) {
|
|
|
- String ip = RestUtil.getIp(request);
|
|
|
- log.info("ip:" + ip + " || fjd_query_history: " + param);
|
|
|
String result = RestUtil.fjd_query_history(param);
|
|
|
return result;
|
|
|
}
|
|
|
|
|
|
@PostMapping(path = { "/path_array_history_fjd_query", "/zkt-sdk/path_array_history_fjd_query" }, produces = "application/json;charset=UTF-8")
|
|
|
public String path_array_history_fjd_query(@RequestBody String param, HttpServletRequest request) {
|
|
|
- String ip = RestUtil.getIp(request);
|
|
|
- log.info("ip:" + ip + " || path_array_history_fjd_query: " + param);
|
|
|
String result = RestUtil.path_array_history_fjd_query(param);
|
|
|
return result;
|
|
|
}
|
|
|
|
|
|
@PostMapping(path = { "/getEquipStaticInfo", "/zkt-sdk/getEquipStaticInfo" }, produces = "application/json;charset=UTF-8")
|
|
|
public String getEquipStaticInfo(@RequestBody String param, HttpServletRequest request) {
|
|
|
- String ip = RestUtil.getIp(request);
|
|
|
- log.info("ip:" + ip + " || getEquipStaticInfo: " + param);
|
|
|
String result = RestUtil.getEquipStaticInfo(param).toJSONString();
|
|
|
return result;
|
|
|
}
|