|
@@ -157,10 +157,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();
|