|
@@ -85,6 +85,8 @@ public class GeoHazardMonitorTokenController {
|
|
private RedisService redisService;
|
|
private RedisService redisService;
|
|
@Value("${base.webUrl}")
|
|
@Value("${base.webUrl}")
|
|
private String webUrl;
|
|
private String webUrl;
|
|
|
|
+ @Value("${base.bakUrl}")
|
|
|
|
+ private String bakUrl;
|
|
@Value("${base.wsUrl}")
|
|
@Value("${base.wsUrl}")
|
|
private String wsUrl;
|
|
private String wsUrl;
|
|
@Value("${base.recordUrl}")
|
|
@Value("${base.recordUrl}")
|
|
@@ -368,7 +370,7 @@ public class GeoHazardMonitorTokenController {
|
|
throw new RuntimeException(e);
|
|
throw new RuntimeException(e);
|
|
}
|
|
}
|
|
String result;
|
|
String result;
|
|
- String url = webUrl + "/gb28181/api/invite?id=" + cameraCode + "&channel=" + channel + "&startTime=" + seconds + "&endTime=" + second;
|
|
|
|
|
|
+ String url = bakUrl + "/gb28181/api/invite?id=" + cameraCode + "&channel=" + channel + "&startTime=" + seconds + "&endTime=" + second;
|
|
try {
|
|
try {
|
|
result = HttpClientUtil.get(url);
|
|
result = HttpClientUtil.get(url);
|
|
if ("200".equals(result)) {
|
|
if ("200".equals(result)) {
|
|
@@ -404,7 +406,7 @@ public class GeoHazardMonitorTokenController {
|
|
JSONArray streamArray = null;
|
|
JSONArray streamArray = null;
|
|
while (!success && retryCount < maxRetries) {
|
|
while (!success && retryCount < maxRetries) {
|
|
try {
|
|
try {
|
|
- String data = HttpClientUtil.gets(webUrl + "/api/summary");
|
|
|
|
|
|
+ String data = HttpClientUtil.gets(bakUrl + "/api/summary");
|
|
log.info("data------------------>" + data);
|
|
log.info("data------------------>" + data);
|
|
if (org.apache.commons.lang3.StringUtils.isNotEmpty(data)) {
|
|
if (org.apache.commons.lang3.StringUtils.isNotEmpty(data)) {
|
|
JSONObject jsonObject = JSONObject.parseObject(data);
|
|
JSONObject jsonObject = JSONObject.parseObject(data);
|
|
@@ -441,8 +443,8 @@ public class GeoHazardMonitorTokenController {
|
|
* @return
|
|
* @return
|
|
*/
|
|
*/
|
|
public String startRecording(String cameraCode, String channel) {
|
|
public String startRecording(String cameraCode, String channel) {
|
|
- log.info("-----startRecording------" + webUrl + "/recordpro/api/start?streamPath=" + cameraCode + "/" + channel + "&type=mp4");
|
|
|
|
- return webUrl + "/recordpro/api/start?streamPath=" + cameraCode + "/" + channel + "&type=mp4";
|
|
|
|
|
|
+ log.info("-----startRecording------" + bakUrl + "/recordpro/api/start?streamPath=" + cameraCode + "/" + channel + "&type=mp4");
|
|
|
|
+ return bakUrl + "/recordpro/api/start?streamPath=" + cameraCode + "/" + channel + "&type=mp4";
|
|
}
|
|
}
|
|
|
|
|
|
/**
|
|
/**
|
|
@@ -465,7 +467,7 @@ public class GeoHazardMonitorTokenController {
|
|
" \"type\":\"" + type + "\"\n" +
|
|
" \"type\":\"" + type + "\"\n" +
|
|
"}";
|
|
"}";
|
|
|
|
|
|
- String jsonStr = HttpUtils.sendPost(webUrl + "/recordpro/api/query/records", param);
|
|
|
|
|
|
+ String jsonStr = HttpUtils.sendPost(bakUrl + "/recordpro/api/query/records", param);
|
|
log.info("-----getQueryRecords-------jsonStr----" + jsonStr);
|
|
log.info("-----getQueryRecords-------jsonStr----" + jsonStr);
|
|
JSONObject jsonObj = JSON.parseObject(jsonStr);
|
|
JSONObject jsonObj = JSON.parseObject(jsonStr);
|
|
log.info("-----getQueryRecords-------jsonObj----" + jsonObj);
|
|
log.info("-----getQueryRecords-------jsonObj----" + jsonObj);
|