Commit 72246219 authored by liqin's avatar liqin 💬

bug fixed

parent be44504f
......@@ -425,7 +425,7 @@ public class AuditServiceImpl extends ServiceImpl<AuditMapper, Audit> implements
this.learningContentBoardCatService.save(learningContentBoardCat);
}
}
final List<String> copyrightOwnerIdList = learningContent.getCopyrightOwnerIdList();
final List<String> copyrightOwnerIdList = one.getCopyrightOwnerIdList();
if (copyrightOwnerIdList != null && !copyrightOwnerIdList.isEmpty()) {
LambdaUpdateWrapper<LearningContentCopyrightOwner> lambdaUpdateWrapper = Wrappers.<LearningContentCopyrightOwner>lambdaUpdate().eq(LearningContentCopyrightOwner::getLearningContentId, learningContentId);
this.learningContentCopyrightOwnerService.remove(lambdaUpdateWrapper);
......@@ -435,7 +435,7 @@ public class AuditServiceImpl extends ServiceImpl<AuditMapper, Audit> implements
this.learningContentCopyrightOwnerService.save(contentCopyrightOwner);
}
}
final List<String> exhibitionBoardIdList = learningContent.getExhibitionBoardIdList();
final List<String> exhibitionBoardIdList = one.getExhibitionBoardIdList();
if (exhibitionBoardIdList != null && !exhibitionBoardIdList.isEmpty()) {
LambdaUpdateWrapper<LearningContentBoard> lambdaUpdateWrapper = Wrappers.<LearningContentBoard>lambdaUpdate().eq(LearningContentBoard::getLearningContentId, learningContentId);
this.learningContentBoardService.remove(lambdaUpdateWrapper);
......
......@@ -319,6 +319,55 @@ public class ExhibitionBoardController extends BaseController {
exhibitionBoard.setDatumList(datumList);
exhibitionBoard.setDatumIdList(datumList.stream().map(Asset::getId).collect(Collectors.toList()));
final String videoContentId = exhibitionBoard.getVideoContentId();
if (videoContentId != null) {
final VideoContent videoContent = this.videoContentService.getById(videoContentId);
exhibitionBoard.setVideoContentName(videoContent.getName());
assetQueryWrapper.clear();
assetQueryWrapper = Wrappers.<Asset>lambdaQuery().eq(Asset::getRefItemId, videoContentId);
assetQueryWrapper.eq(Asset::getFileCat, FileCatEnum.VIDEO_CONTENT.name());
final List<Asset> videoList = this.assetService.list(assetQueryWrapper);
exhibitionBoard.setVideoList(videoList);
}
return getResult(exhibitionBoard);
}
@ApiOperation(value = "获取展板详情(审核时使用)", notes = "获取展板详情(审核时使用)")
@ApiImplicitParams({
@ApiImplicitParam(name = "id", value = "标识ID", dataType = "String", paramType = "path", required = true)
})
@GetMapping("/getAudit/{id}")
@RequiresAuthentication //@RequiresPermissions("video:content:get:id")
@MethodLog(operModule = OperModule.VIDEOCONTENT, operType = OperType.SELECT)
public Map<String, Object> getAuditInfoById(@PathVariable("id") String id) {
final ExhibitionBoard exhibitionBoard = JSONObject.parseObject(exhibitionBoardTmpService.getById(id).getData(), ExhibitionBoard.class);
String exhibitionBoardCatId = exhibitionBoard.getExhibitionBoardCatId();
if (exhibitionBoardCatId != null) {
exhibitionBoard.setExhibitionBoardCatName(this.exhibitionBoardCatService.getById(exhibitionBoardCatId).getName());
}
String boardCopyrightOwnerId = exhibitionBoard.getBoardCopyrightOwnerId();
if (boardCopyrightOwnerId != null) {
exhibitionBoard.setBoardCopyrightOwnerName(this.copyrightOwnerService.getById(boardCopyrightOwnerId).getName());
}
if (exhibitionBoard.getVideoContentCopyrightOwnerId() != null) {
String name = this.copyrightOwnerService.getById(exhibitionBoard.getVideoContentCopyrightOwnerId()).getName();
exhibitionBoard.setVideoContentCopyrightOwnerName(name);
}
LambdaQueryWrapper<Asset> assetQueryWrapper = Wrappers.<Asset>lambdaQuery().eq(Asset::getRefItemId, exhibitionBoard.getId());
assetQueryWrapper.eq(Asset::getFileCat, FileCatEnum.EXHIBITION_BOARD_AUDIO.name());
final List<Asset> audioList = this.assetService.list(assetQueryWrapper);
exhibitionBoard.setAudioList(audioList);
exhibitionBoard.setAudioIdList(audioList.stream().map(Asset::getId).collect(Collectors.toList()));
assetQueryWrapper.clear();
assetQueryWrapper = Wrappers.<Asset>lambdaQuery().eq(Asset::getRefItemId, exhibitionBoard.getId());
assetQueryWrapper.eq(Asset::getFileCat, FileCatEnum.EXHIBITION_BOARD_DATUM.name());
final List<Asset> datumList = this.assetService.list(assetQueryWrapper);
exhibitionBoard.setDatumList(datumList);
exhibitionBoard.setDatumIdList(datumList.stream().map(Asset::getId).collect(Collectors.toList()));
final LambdaQueryWrapper<Audit> auditQueryWrapper = Wrappers.<Audit>lambdaQuery().eq(Audit::getRefItemId, id);
auditQueryWrapper.select(Audit::getContent);
auditQueryWrapper.select(Audit::getType);
......
......@@ -358,6 +358,88 @@ public class LearningContentController extends BaseController {
}
learningContent.setExhibitionBoardList(exhibitionBoardList);
}
return getResult(learningContent);
}
@ApiOperation(value = "获取学习内容详情(审核时使用)", notes = "获取学习内容详情(审核时使用)")
@ApiImplicitParams({
@ApiImplicitParam(name = "id", value = "标识ID", dataType = "String", paramType = "path", required = true)
})
@GetMapping("/getAudit/{id}")
@RequiresAuthentication //@RequiresPermissions("video:content:get:id")
@MethodLog(operModule = OperModule.VIDEOCONTENT, operType = OperType.SELECT)
public Map<String, Object> getAuditInfoById(@PathVariable("id") String id) {
final LearningContent learningContent = JSONObject.parseObject(learningContentTmpService.getById(id).getData(), LearningContent.class);
LearningProject learningProject = this.learningProjectService.getById(learningContent.getLearningProjectId());
if (learningProject != null) {
learningContent.setLearningProjectName(learningProject.getName());
}
final List<String> exhibitionBoardCatIdList = learningContent.getExhibitionBoardIdList();
final List<ExhibitionBoardCat> exhibitionBoardCats = this.exhibitionBoardCatService.listByIds(exhibitionBoardCatIdList);
if (!exhibitionBoardCats.isEmpty()) {
learningContent.setExhibitionBoardCatIdList(exhibitionBoardCats.stream().map(ExhibitionBoardCat::getId).collect(Collectors.toList()));
learningContent.setExhibitionBoardCatNameList(exhibitionBoardCats.stream().map(ExhibitionBoardCat::getName).collect(Collectors.toList()));
}
final List<String> copyrightOwnerIdList = learningContent.getCopyrightOwnerIdList();
final List<CopyrightOwner> copyrightOwnerList = this.copyrightOwnerService.listByIds(copyrightOwnerIdList);
if (!copyrightOwnerList.isEmpty()) {
learningContent.setCopyrightOwnerIdList(copyrightOwnerList.stream().map(CopyrightOwner::getId).collect(Collectors.toList()));
learningContent.setCopyrightOwnerNameList(copyrightOwnerList.stream().map(CopyrightOwner::getName).collect(Collectors.toList()));
}
final List<String> exhibitionBoardIdList = learningContent.getExhibitionBoardIdList();
if (!exhibitionBoardIdList.isEmpty()) {
final List<ExhibitionBoard> exhibitionBoardList = this.exhibitionBoardService.listByIds(exhibitionBoardIdList);
if (!exhibitionBoardList.isEmpty()) {
learningContent.setExhibitionBoardIdList(exhibitionBoardList.stream().map(ExhibitionBoard::getId).collect(Collectors.toList()));
learningContent.setExhibitionBoardNameList(exhibitionBoardList.stream().map(ExhibitionBoard::getName).collect(Collectors.toList()));
}
for (ExhibitionBoard exhibitionBoard : exhibitionBoardList) {
String exhibitionBoardCatId = exhibitionBoard.getExhibitionBoardCatId();
if (exhibitionBoardCatId != null) {
exhibitionBoard.setExhibitionBoardCatName(this.exhibitionBoardCatService.getById(exhibitionBoardCatId).getName());
}
String boardCopyrightOwnerId = exhibitionBoard.getBoardCopyrightOwnerId();
if (boardCopyrightOwnerId != null) {
final CopyrightOwner copyrightOwner = this.copyrightOwnerService.getById(boardCopyrightOwnerId);
if (copyrightOwner != null) {
exhibitionBoard.setBoardCopyrightOwnerName(copyrightOwner.getName());
}
}
if (exhibitionBoard.getVideoContentCopyrightOwnerId() != null) {
String name = this.copyrightOwnerService.getById(exhibitionBoard.getVideoContentCopyrightOwnerId()).getName();
exhibitionBoard.setVideoContentCopyrightOwnerName(name);
}
LambdaQueryWrapper<Asset> assetQueryWrapper = Wrappers.<Asset>lambdaQuery().eq(Asset::getRefItemId, exhibitionBoard.getId());
assetQueryWrapper.eq(Asset::getFileCat, FileCatEnum.EXHIBITION_BOARD_AUDIO.name());
final List<Asset> audioList = this.assetService.list(assetQueryWrapper);
exhibitionBoard.setAudioList(audioList);
assetQueryWrapper.clear();
assetQueryWrapper = Wrappers.<Asset>lambdaQuery().eq(Asset::getRefItemId, exhibitionBoard.getId());
assetQueryWrapper.eq(Asset::getFileCat, FileCatEnum.EXHIBITION_BOARD_DATUM.name());
final List<Asset> datumList = this.assetService.list(assetQueryWrapper);
exhibitionBoard.setDatumList(datumList);
String videoContentId = exhibitionBoard.getVideoContentId();
if (videoContentId != null) {
final VideoContent videoContent = this.videoContentService.getOne(Wrappers.<VideoContent>lambdaQuery().eq(VideoContent::getId, videoContentId));
if (videoContent != null) {
assetQueryWrapper.clear();
assetQueryWrapper = Wrappers.<Asset>lambdaQuery().eq(Asset::getRefItemId, videoContentId);
assetQueryWrapper.eq(Asset::getFileCat, FileCatEnum.VIDEO_CONTENT.name());
final List<Asset> videoList = this.assetService.list(assetQueryWrapper);
exhibitionBoard.setVideoList(videoList);
exhibitionBoard.setVideoContentName(videoContent.getName());
}
}
}
learningContent.setExhibitionBoardList(exhibitionBoardList);
}
final LambdaQueryWrapper<Audit> auditQueryWrapper = Wrappers.<Audit>lambdaQuery().eq(Audit::getRefItemId, id);
auditQueryWrapper.select(Audit::getContent);
......
......@@ -281,6 +281,49 @@ public class VideoContentController extends BaseController {
return getResult(videoContent);
}
@ApiOperation(value = "获取视频内容详情(审核时使用)", notes = "获取视频内容详情(审核时使用)")
@ApiImplicitParams({
@ApiImplicitParam(name = "id", value = "标识ID", dataType = "String", paramType = "path", required = true)
})
@GetMapping("/getAudit/{id}")
@RequiresAuthentication //@RequiresPermissions("video:content:get:id")
@MethodLog(operModule = OperModule.VIDEOCONTENT, operType = OperType.SELECT)
public Map<String, Object> getAuditInfoById(@PathVariable("id") String id) {
final VideoContent videoContent = JSONObject.parseObject(videoContentTmpService.getById(id).getData(), VideoContent.class);
if (videoContent.getVideoContentCatId() != null) {
VideoContentCat videoContentCat = this.videoContentCatService.getById(videoContent.getVideoContentCatId());
if (videoContentCat != null) {
videoContent.setVideoContentCatName(videoContentCat.getName());
}
}
if (videoContent.getVideoContentCopyrightOwnerId() != null) {
CopyrightOwner copyrightOwner = this.copyrightOwnerService.getById(videoContent.getVideoContentCopyrightOwnerId());
if (copyrightOwner != null) {
videoContent.setVideoContentCopyrightOwnerName(copyrightOwner.getName());
}
}
final LambdaQueryWrapper<Asset> assetQueryWrapper = Wrappers.<Asset>lambdaQuery().eq(Asset::getRefItemId, id);
assetQueryWrapper.eq(Asset::getFileCat, FileCatEnum.VIDEO_CONTENT.name());
final List<Asset> videoFileList = this.assetService.list(assetQueryWrapper);
videoContent.setVideoFileList(videoFileList);
videoContent.setVideoFileIdList(videoFileList.stream().map(Asset::getId).collect(Collectors.toList()));
final LambdaQueryWrapper<Audit> auditQueryWrapper = Wrappers.<Audit>lambdaQuery().eq(Audit::getRefItemId, id);
auditQueryWrapper.select(Audit::getContent);
auditQueryWrapper.select(Audit::getType);
auditQueryWrapper.select(Audit::getOperation);
auditQueryWrapper.select(Audit::getStatus);
auditQueryWrapper.select(Audit::getFirstTime);
auditQueryWrapper.select(Audit::getFirstRemarks);
auditQueryWrapper.select(Audit::getSecondTime);
auditQueryWrapper.select(Audit::getSecondTime);
auditQueryWrapper.select(Audit::getLevel);
final List<Audit> auditList = this.auditService.list(auditQueryWrapper);
videoContent.setAuditHistoryList(auditList);
return getResult(videoContent);
}
@DeleteMapping("/delete/{id}")
@RequiresAuthentication //@RequiresPermissions("video:content:delete")
@ApiOperation(value = "根据ID删除视频内容", notes = "根据ID删除视频内容")
......
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