deviceId不存在时

This commit is contained in:
2025-07-22 17:17:25 +08:00
parent 156c487c0f
commit 4d53986277

View File

@@ -446,6 +446,10 @@ public class TaskTaskServiceImpl implements TaskService {
.peek(item -> item.setUrl(item.getVideoUrl()))
.filter(item -> {
DeviceEntity device = deviceRepository.getDevice(item.getDeviceId());
if (device == null) {
log.info("task callback: deviceId:{} is not exist", item.getDeviceId());
return false;
}
return Integer.valueOf(1).equals(device.getStatus());
})
.filter(item -> item.getDeviceId() != null) // 添加对 deviceId 为 null 的检查