|
@@ -368,9 +368,19 @@ public class ContentPlatformDemandVideoJob {
|
|
|
}
|
|
}
|
|
|
Long now = System.currentTimeMillis();
|
|
Long now = System.currentTimeMillis();
|
|
|
for (List<ContentPlatformDemandVideo> partition : Lists.partition(activeVideos, 20)) {
|
|
for (List<ContentPlatformDemandVideo> partition : Lists.partition(activeVideos, 20)) {
|
|
|
- List<Long> videoIds = partition.stream().map(ContentPlatformDemandVideo::getVideoId).collect(Collectors.toList());
|
|
|
|
|
|
|
+ List<Long> videoIds = partition.stream()
|
|
|
|
|
+ .filter(Objects::nonNull)
|
|
|
|
|
+ .map(ContentPlatformDemandVideo::getVideoId)
|
|
|
|
|
+ .filter(Objects::nonNull)
|
|
|
|
|
+ .collect(Collectors.toList());
|
|
|
|
|
+ if (CollectionUtils.isEmpty(videoIds)) {
|
|
|
|
|
+ continue;
|
|
|
|
|
+ }
|
|
|
Map<Long, VideoDetail> videoDetailMap = messageAttachmentService.getVideoDetail(new HashSet<>(videoIds));
|
|
Map<Long, VideoDetail> videoDetailMap = messageAttachmentService.getVideoDetail(new HashSet<>(videoIds));
|
|
|
for (ContentPlatformDemandVideo video : partition) {
|
|
for (ContentPlatformDemandVideo video : partition) {
|
|
|
|
|
+ if (video == null || video.getVideoId() == null) {
|
|
|
|
|
+ continue;
|
|
|
|
|
+ }
|
|
|
VideoDetail videoDetail = videoDetailMap.get(video.getVideoId());
|
|
VideoDetail videoDetail = videoDetailMap.get(video.getVideoId());
|
|
|
if (videoDetail == null || videoDetail.getAuditStatus() != 5) {
|
|
if (videoDetail == null || videoDetail.getAuditStatus() != 5) {
|
|
|
demandVideoMapperExt.updateStatusByVideoId(video.getVideoId(), dt, 0, now);
|
|
demandVideoMapperExt.updateStatusByVideoId(video.getVideoId(), dt, 0, now);
|