This commit is contained in:
2025-07-27 19:06:34 +08:00
parent 9a6a90b58e
commit 93c74e181a
3 changed files with 18 additions and 5 deletions

View File

@@ -234,11 +234,14 @@ public class TaskTaskServiceImpl implements TaskService {
List<SourceEntity> videoSourceList = sourceMapper.listVideoByScenicFaceRelation(face.getScenicId(), faceId);
Map<String, List<SourceEntity>> sourcesMap = videoSourceList.stream()
.peek(item -> item.setUrl(item.getVideoUrl()))
.filter(item -> item.getDeviceId() != null) // 添加对 deviceId 为 null 的检查
.filter(item -> {
DeviceEntity device = deviceRepository.getDevice(item.getDeviceId());
if (device == null) {
return false;
}
return Integer.valueOf(1).equals(device.getStatus());
})
.filter(item -> item.getDeviceId() != null) // 添加对 deviceId 为 null 的检查
.collect(Collectors.groupingBy(item -> item.getDeviceId().toString()));
if (sourcesMap.isEmpty()) {
// 主动禁止没有视频源视频生成