gao.qiang 9 ماه پیش
والد
کامیت
1d1f68cb0f

+ 7 - 5
hazard-sdk/src/main/java/com/ozs/controller/upload/GeoHazardMonitorTokenController.java

@@ -85,6 +85,8 @@ public class GeoHazardMonitorTokenController {
     private RedisService redisService;
     @Value("${base.webUrl}")
     private String webUrl;
+    @Value("${base.bakUrl}")
+    private String bakUrl;
     @Value("${base.wsUrl}")
     private String wsUrl;
     @Value("${base.recordUrl}")
@@ -368,7 +370,7 @@ public class GeoHazardMonitorTokenController {
             throw new RuntimeException(e);
         }
         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 {
             result = HttpClientUtil.get(url);
             if ("200".equals(result)) {
@@ -404,7 +406,7 @@ public class GeoHazardMonitorTokenController {
         JSONArray streamArray = null;
         while (!success && retryCount < maxRetries) {
             try {
-                String data = HttpClientUtil.gets(webUrl + "/api/summary");
+                String data = HttpClientUtil.gets(bakUrl + "/api/summary");
                 log.info("data------------------>" + data);
                 if (org.apache.commons.lang3.StringUtils.isNotEmpty(data)) {
                     JSONObject jsonObject = JSONObject.parseObject(data);
@@ -441,8 +443,8 @@ public class GeoHazardMonitorTokenController {
      * @return
      */
     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" +
                 "}";
 
-        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);
         JSONObject jsonObj = JSON.parseObject(jsonStr);
         log.info("-----getQueryRecords-------jsonObj----" + jsonObj);

+ 2 - 1
hazard-sdk/src/main/resources/application.yml

@@ -17,7 +17,8 @@ base:
   captchaType: math
   #图片路径前缀
   imgUrl: http://183.236.39.220:18801/picbucket
-  webUrl: http://10.161.12.50:9080
+  webUrl: http://183.236.39.220:8083
+  bakUrl: http://10.161.12.50:9080
   wsUrl: ws://183.236.39.220:8083
   recordUrl: http://183.236.39.220:18082