You've already forked FrameTour-BE
避免bug报错
This commit is contained in:
@@ -252,6 +252,7 @@ public class TaskTaskServiceImpl implements TaskService {
|
||||
DeviceEntity device = deviceRepository.getDevice(item.getDeviceId());
|
||||
return Integer.valueOf(1).equals(device.getStatus());
|
||||
})
|
||||
.filter(item -> item.getDeviceId() != null) // 添加对 deviceId 为 null 的检查
|
||||
.collect(Collectors.groupingBy(item -> item.getDeviceId().toString()));
|
||||
if (sourcesMap.isEmpty()) {
|
||||
// 主动禁止没有视频源视频生成
|
||||
@@ -437,14 +438,17 @@ public class TaskTaskServiceImpl implements TaskService {
|
||||
return;
|
||||
}
|
||||
List<SourceEntity> videoSourceList = sourceMapper.listVideoByScenicFaceRelation(face.getScenicId(), faceId);
|
||||
if (videoSourceList == null || videoSourceList.isEmpty()) {
|
||||
log.info("task callback: 没有视频源");
|
||||
return;
|
||||
}
|
||||
Map<String, List<SourceEntity>> sourcesMap = videoSourceList.stream()
|
||||
.filter(Objects::nonNull)
|
||||
.filter(item -> Objects.nonNull(item.getVideoUrl()))
|
||||
.peek(item -> item.setUrl(item.getVideoUrl()))
|
||||
.filter(item -> {
|
||||
DeviceEntity device = deviceRepository.getDevice(item.getDeviceId());
|
||||
return Integer.valueOf(1).equals(device.getStatus());
|
||||
})
|
||||
.filter(item -> item.getDeviceId() != null) // 添加对 deviceId 为 null 的检查
|
||||
.collect(Collectors.groupingBy(item -> item.getDeviceId().toString()));
|
||||
if (sourcesMap.isEmpty()) {
|
||||
// 主动禁止没有视频源视频生成
|
||||
|
Reference in New Issue
Block a user