wyyay 1 year ago
parent
commit
af0f3e1df6

+ 4 - 4
hazard-admin/src/main/java/com/ozs/web/controller/common/PictureController.java

@@ -43,7 +43,7 @@ public class PictureController {
     MsgAlarmService msgAlarmService;
     @Resource
     MinioUtils minioUtils;
-    public final long timeout = 10000;
+
     /**
      * 获取图片
      *
@@ -61,9 +61,9 @@ public class PictureController {
                 queryWrapper.lambda().eq(MsgAlarm::getIsLock,2);
                 List<MsgAlarm> msgAlarmList = msgAlarmService.list(queryWrapper);
                 try {
-                    System.out.println("http://124.70.58.209:18891/api/snap?stream="+l.getCameraCode()+"/"+l.getChannel()+"&timeout="+timeout);
-                    log.info("请求url"+"http://124.70.58.209:18891/api/snap?stream="+l.getCameraCode()+"/"+l.getChannel()+"&timeout="+timeout);
-                    URL url = new URL("http://124.70.58.209:18891/api/snap?stream="+l.getCameraCode()+"/"+l.getChannel()+"&timeout="+timeout);
+                    System.out.println("http://124.70.58.209:18891/snap/"+l.getCameraCode()+"/"+l.getChannel());
+                    log.info("请求url"+"http://124.70.58.209:18891/snap/"+l.getCameraCode()+"/"+l.getChannel());
+                    URL url = new URL("http://124.70.58.209:18891/snap/"+l.getCameraCode()+"/"+l.getChannel());
                     String fileName = "cameraPicture/"+l.getCameraCode()+"_"+uuid +".jpg";
                     log.info("fileName="+fileName);
                     getCapture(url, fileName);