gao.qiang 10 ماه پیش
والد
کامیت
ba29bba190
1فایلهای تغییر یافته به همراه7 افزوده شده و 0 حذف شده
  1. 7 0
      business-service/src/main/java/com/ozs/service/service/impl/MsgAlarmServiceImpl.java

+ 7 - 0
business-service/src/main/java/com/ozs/service/service/impl/MsgAlarmServiceImpl.java

@@ -13,6 +13,7 @@ import com.ozs.service.mapper.MsgAlarmMapper;
 import com.ozs.service.service.MsgAlarmService;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
 import com.ozs.service.service.RedisService;
+import lombok.extern.slf4j.Slf4j;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 
@@ -28,6 +29,7 @@ import java.util.stream.Collectors;
  * @since 2023-02-22
  */
 @Service
+@Slf4j
 public class MsgAlarmServiceImpl extends ServiceImpl<MsgAlarmMapper, MsgAlarm> implements MsgAlarmService {
     @Autowired
     private MsgAlarmMapper msgAlarmMapper;
@@ -155,15 +157,20 @@ public class MsgAlarmServiceImpl extends ServiceImpl<MsgAlarmMapper, MsgAlarm> i
 
     @Override
     public void getNormalBaseCameraManagementsCache(String setType) {
+        log.info("---------setType-----------"+setType);
         Set<BaseCameraVO> alarmSet = redisService.getSetMembers(Constants.ALARM_SET);
+        log.info("---------alarmSet-----------"+alarmSet);
         Set<String> cameraCodeSet = alarmSet.stream()
                 .map(BaseCameraVO::getCameraCode)
                 .collect(Collectors.toSet());
         QueryWrapper<BaseCameraManagement> queryWrapper = new QueryWrapper<>();
+        log.info("---------Constants.ALARM_SET-----------"+Constants.ALARM_SET);
         if(Constants.ALARM_SET.equals(setType)) {
+            log.info("---------cameraCodeSet----------"+cameraCodeSet);
             // 使用QueryWrapper和notin方法根据cameraCode列表查询BaseCameraManagement数据
             queryWrapper.notIn("camera_code", cameraCodeSet);
             Set<BaseCameraManagement> set = baseCameraManagementMapper.selectList(queryWrapper).stream().collect(Collectors.toSet());
+            log.info("---------set----------"+set);
             set.forEach(item -> {
                 BaseCameraVO  baseCameraVO=new BaseCameraVO();
                 baseCameraVO.setCameraCode(item.getCameraCode());