Commit dcdd9670 authored by liqin's avatar liqin 💬

bug fixed

parent 4f5b90da
...@@ -223,12 +223,10 @@ public class CopyrightOwnerController extends BaseController { ...@@ -223,12 +223,10 @@ public class CopyrightOwnerController extends BaseController {
this.copyrightOwnerService.removeById(id); this.copyrightOwnerService.removeById(id);
final LambdaUpdateWrapper<VideoContent> updateWrapper = Wrappers.<VideoContent>lambdaUpdate().eq(VideoContent::getVideoContentCopyrightOwnerId, id); final LambdaUpdateWrapper<VideoContent> updateWrapper = Wrappers.<VideoContent>lambdaUpdate().eq(VideoContent::getVideoContentCopyrightOwnerId, id);
updateWrapper.set(VideoContent::getDeleted, true); this.videoContentService.remove(updateWrapper);
this.videoContentService.update(updateWrapper);
final LambdaUpdateWrapper<ExhibitionBoard> updateWrapper1 = Wrappers.<ExhibitionBoard>lambdaUpdate().eq(ExhibitionBoard::getBoardCopyrightOwnerId, id); final LambdaUpdateWrapper<ExhibitionBoard> updateWrapper1 = Wrappers.<ExhibitionBoard>lambdaUpdate().eq(ExhibitionBoard::getBoardCopyrightOwnerId, id);
updateWrapper1.set(ExhibitionBoard::getDeleted, true); this.exhibitionBoardService.remove(updateWrapper1);
this.exhibitionBoardService.update(updateWrapper1);
return getSuccessResult(); return getSuccessResult();
} }
......
...@@ -192,7 +192,9 @@ public class ExhibitionBoardController extends BaseController { ...@@ -192,7 +192,9 @@ public class ExhibitionBoardController extends BaseController {
@PostMapping("/getList") @PostMapping("/getList")
@RequiresAuthentication //@RequiresPermissions("exhibition:board:list") @RequiresAuthentication //@RequiresPermissions("exhibition:board:list")
@ApiOperation(value = "获取展板全部列表(无分页)", notes = "获取展板全部列表(无分页)") @ApiOperation(value = "获取展板全部列表(无分页)", notes = "获取展板全部列表(无分页)")
public Map<String, Object> getExhibitionBoardList(List<String> exhibitionBoardCatIdList, List<String> boardCopyrightOwnerIdList) { public Map<String, Object> getExhibitionBoardList(
@RequestParam(value = "exhibitionBoardCatIdList", required = false) List<String> exhibitionBoardCatIdList,
@RequestParam(value = "boardCopyrightOwnerIdList", required = false) List<String> boardCopyrightOwnerIdList) {
final LambdaQueryWrapper<ExhibitionBoard> lambdaQueryWrapper = Wrappers.<ExhibitionBoard>lambdaQuery().eq(ExhibitionBoard::getAuditStatus, "APPROVED_FINAL").eq(ExhibitionBoard::getPublished, true); final LambdaQueryWrapper<ExhibitionBoard> lambdaQueryWrapper = Wrappers.<ExhibitionBoard>lambdaQuery().eq(ExhibitionBoard::getAuditStatus, "APPROVED_FINAL").eq(ExhibitionBoard::getPublished, true);
if (exhibitionBoardCatIdList != null && !exhibitionBoardCatIdList.isEmpty()) { if (exhibitionBoardCatIdList != null && !exhibitionBoardCatIdList.isEmpty()) {
lambdaQueryWrapper.in(ExhibitionBoard::getExhibitionBoardCatId, exhibitionBoardCatIdList); lambdaQueryWrapper.in(ExhibitionBoard::getExhibitionBoardCatId, exhibitionBoardCatIdList);
...@@ -204,16 +206,28 @@ public class ExhibitionBoardController extends BaseController { ...@@ -204,16 +206,28 @@ public class ExhibitionBoardController extends BaseController {
List<ExhibitionBoard> exhibitionBoardList = exhibitionBoardService.list(lambdaQueryWrapper); List<ExhibitionBoard> exhibitionBoardList = exhibitionBoardService.list(lambdaQueryWrapper);
for (ExhibitionBoard exhibitionBoard : exhibitionBoardList) { for (ExhibitionBoard exhibitionBoard : exhibitionBoardList) {
if (exhibitionBoard.getBoardCopyrightOwnerId() != null) { if (exhibitionBoard.getBoardCopyrightOwnerId() != null) {
String name = this.copyrightOwnerService.getById(exhibitionBoard.getBoardCopyrightOwnerId()).getName(); final CopyrightOwner copyrightOwner = this.copyrightOwnerService.getById(exhibitionBoard.getBoardCopyrightOwnerId());
exhibitionBoard.setBoardCopyrightOwnerName(name); if (copyrightOwner == null) {
exhibitionBoard.setBoardCopyrightOwnerName("对应的展板版权方已被删除");
} else {
exhibitionBoard.setBoardCopyrightOwnerName(copyrightOwner.getName());
}
} }
if (exhibitionBoard.getVideoContentCopyrightOwnerId() != null) { if (exhibitionBoard.getVideoContentCopyrightOwnerId() != null) {
String name = this.copyrightOwnerService.getById(exhibitionBoard.getVideoContentCopyrightOwnerId()).getName(); final CopyrightOwner copyrightOwner = this.copyrightOwnerService.getById(exhibitionBoard.getVideoContentCopyrightOwnerId());
exhibitionBoard.setVideoContentCopyrightOwnerName(name); if (copyrightOwner == null) {
exhibitionBoard.setVideoContentCopyrightOwnerName("对应的视频内容版权方已被删除");
} else {
exhibitionBoard.setVideoContentCopyrightOwnerName(copyrightOwner.getName());
}
} }
if (exhibitionBoard.getExhibitionBoardCatId() != null) { if (exhibitionBoard.getExhibitionBoardCatId() != null) {
String name = this.exhibitionBoardCatService.getById(exhibitionBoard.getExhibitionBoardCatId()).getName(); final ExhibitionBoardCat exhibitionBoardCat = this.exhibitionBoardCatService.getById(exhibitionBoard.getExhibitionBoardCatId());
exhibitionBoard.setExhibitionBoardCatName(name); if (exhibitionBoardCat == null) {
exhibitionBoard.setExhibitionBoardCatName("对应的展板分类已被删除");
} else {
exhibitionBoard.setExhibitionBoardCatName(exhibitionBoardCat.getName());
}
} }
} }
return getResult(exhibitionBoardList); return getResult(exhibitionBoardList);
......
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