Commit 4f4c2df1 authored by jiawei's avatar jiawei

BUG修改====》》根据id修改审核报空指针异常,视频审核的时候可以查询未发布的视频

parent 8b8f38e1
......@@ -310,6 +310,9 @@ public class AuditServiceImpl extends ServiceImpl<AuditMapper, Audit> implements
final Map<String, String> collect = assetList.stream().collect(Collectors.toMap(Asset::getId, Asset::getFileUrlCrypto));
for (String videoFileId : videoFileIdList) {
final Asset asset = this.assetMapper.selectById(videoFileId);
if (asset==null){
continue;
}
asset.setThumbnail(videoContent.getThumbnail());
asset.setFileType(FileTypeEnum.VIDEO.name());
asset.setFileCat(FileCatEnum.VIDEO_CONTENT.name());
......@@ -398,6 +401,9 @@ public class AuditServiceImpl extends ServiceImpl<AuditMapper, Audit> implements
final Set<String> collect = assetList.stream().map(Asset::getId).collect(Collectors.toSet());
for (String audioId : audioIdList) {
final Asset asset = this.assetMapper.selectById(audioId);
if (asset==null){
continue;
}
asset.setFileType(FileTypeEnum.AUDIO.name());
asset.setFileCat(FileCatEnum.EXHIBITION_BOARD_AUDIO.name());
asset.setRefItemId(exhibitionBoardId);
......@@ -421,6 +427,10 @@ public class AuditServiceImpl extends ServiceImpl<AuditMapper, Audit> implements
final List<String> collect = assetList.stream().map(Asset::getId).collect(Collectors.toList());
for (String datumId : datumIdList) {
final Asset asset = this.assetMapper.selectById(datumId);
//决绝出现的空指针异常
if (asset==null){
continue;
}
asset.setFileCat(FileCatEnum.EXHIBITION_BOARD_DATUM.name());
asset.setRefItemId(exhibitionBoardId);
asset.setPublished(true);
......
......@@ -306,7 +306,7 @@ public class VideoContentController extends BaseController {
}
}
final LambdaQueryWrapper<Asset> assetQueryWrapper = Wrappers.<Asset>lambdaQuery().eq(Asset::getRefItemId, id);
assetQueryWrapper.eq(Asset::getPublished, true);
// assetQueryWrapper.eq(Asset::getPublished, true);
assetQueryWrapper.eq(Asset::getFileCat, FileCatEnum.VIDEO_CONTENT.name());
final List<Asset> videoFileList = this.assetService.list(assetQueryWrapper);
videoContent.setVideoFileList(videoFileList);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment