wyyay 10 місяців тому
батько
коміт
a1427b3d4d

+ 2 - 0
business-service/src/main/java/com/ozs/service/service/impl/CameraCaptureService.java

@@ -64,7 +64,9 @@ public class CameraCaptureService {
                 }
                 ByteArrayInputStream byteArrayInputStream = new ByteArrayInputStream(byteArrayOutputStream.toByteArray());
                 log.info("getCapture======" + fileName);
+                System.out.println("fileName"+fileName+"图片开始截图时间"+new Date()+"--数组大小"+bytes.length);
                 minioUtils.minIoClientUpload(byteArrayInputStream, fileName);
+                System.out.println("fileName"+fileName+"图片结束截图时间"+new Date());
             }
         } catch (Exception e) {
             //先关闭外层的缓冲流,再关闭内层的流,但是在关闭外层流的同时,

+ 4 - 1
business-service/src/main/java/com/ozs/service/service/impl/MsgAlarmServiceImpl.java

@@ -156,10 +156,13 @@ public class MsgAlarmServiceImpl extends ServiceImpl<MsgAlarmMapper, MsgAlarm> i
     @Override
     public void getNormalBaseCameraManagementsCache(String setType) {
         Set<BaseCameraVO> alarmSet = redisService.getSetMembers(Constants.ALARM_SET);
+        Set<String> cameraCodeSet = alarmSet.stream()
+                .map(BaseCameraVO::getCameraCode)
+                .collect(Collectors.toSet());
         QueryWrapper<BaseCameraManagement> queryWrapper = new QueryWrapper<>();
         if(Constants.ALARM_SET.equals(setType)) {
             // 使用QueryWrapper和notin方法根据cameraCode列表查询BaseCameraManagement数据
-            queryWrapper.notIn("camera_code", alarmSet);
+            queryWrapper.notIn("camera_code", cameraCodeSet);
             Set<BaseCameraManagement> set = baseCameraManagementMapper.selectList(queryWrapper).stream().collect(Collectors.toSet());
             set.forEach(item -> {
                 BaseCameraVO  baseCameraVO=new BaseCameraVO();