Commit 2ee5e530 authored by nie'hong's avatar nie'hong

修改-填充展板编号,新增展板视频内容信息可为空

parent 55fc3974
...@@ -28,6 +28,12 @@ public class AddressUtil { ...@@ -28,6 +28,12 @@ public class AddressUtil {
if (ip == null || ip.length() == 0 || "unknown".equalsIgnoreCase(ip)) { if (ip == null || ip.length() == 0 || "unknown".equalsIgnoreCase(ip)) {
ip = request.getRemoteAddr(); ip = request.getRemoteAddr();
} }
// 多次反向代理后会有多个IP值,只有第一个是真实IP
if(null != ip && ip.length() > 15){
if(ip.indexOf(",") > 0){
ip = ip.substring(0, ip.indexOf(","));
}
}
return ip; return ip;
} }
......
...@@ -19,4 +19,5 @@ public interface ExhibitionBoardService extends IService<ExhibitionBoard> { ...@@ -19,4 +19,5 @@ public interface ExhibitionBoardService extends IService<ExhibitionBoard> {
List<ExhibitionBoard> getList(String learningProjectId, boolean b); List<ExhibitionBoard> getList(String learningProjectId, boolean b);
List<ExhibitionBoard> getByContentList(String learningContentId, boolean b); List<ExhibitionBoard> getByContentList(String learningContentId, boolean b);
} }
...@@ -357,20 +357,26 @@ public class ChinaMobileRestApiController extends BaseController { ...@@ -357,20 +357,26 @@ public class ChinaMobileRestApiController extends BaseController {
List<Map<String, String>> videoList = new ArrayList<>(); List<Map<String, String>> videoList = new ArrayList<>();
final ExhibitionBoard exhibitionBoard = this.exhibitionBoardService.getById(boardId); final ExhibitionBoard exhibitionBoard = this.exhibitionBoardService.getById(boardId);
final String videoContentId = exhibitionBoard.getVideoContentId(); final String videoContentId = exhibitionBoard.getVideoContentId();
LambdaQueryWrapper<Asset> assetLambdaQueryWrapper = Wrappers.<Asset>lambdaQuery().eq(Asset::getRefItemId, videoContentId).eq(Asset::getPublished, true); LambdaQueryWrapper<Asset> assetLambdaQueryWrapper;
List<Asset> assetList = this.assetService.list(assetLambdaQueryWrapper); List<Asset> assetList = new ArrayList<>();
List<String> languageList = assetList.stream().map(Asset::getLanguage).collect(Collectors.toList()); List<String> languageList = new ArrayList<>();
for (LanguageEnum languageEnum : LanguageEnum.values()) { if (StringUtils.isNotEmpty(videoContentId)) {
if (languageList.contains(languageEnum.name())) { assetLambdaQueryWrapper = Wrappers.<Asset>lambdaQuery().eq(Asset::getRefItemId, videoContentId).eq(Asset::getPublished, true);
Map<String, String> map = new LinkedHashMap<>(2); assetList = this.assetService.list(assetLambdaQueryWrapper);
map.put("code", languageEnum.name()); languageList = assetList.stream().map(Asset::getLanguage).collect(Collectors.toList());
map.put("name", languageEnum.getName()); for (LanguageEnum languageEnum : LanguageEnum.values()) {
videoList.add(map); if (languageList.contains(languageEnum.name())) {
Map<String, String> map = new LinkedHashMap<>(2);
map.put("code", languageEnum.name());
map.put("name", languageEnum.getName());
videoList.add(map);
}
} }
assetLambdaQueryWrapper.clear();
} }
langMap.put("video", videoList); langMap.put("video", videoList);
assetLambdaQueryWrapper.clear();
List<Map<String, String>> audioList = new ArrayList<>(); List<Map<String, String>> audioList = new ArrayList<>();
assetLambdaQueryWrapper = Wrappers.<Asset>lambdaQuery().eq(Asset::getRefItemId, boardId); assetLambdaQueryWrapper = Wrappers.<Asset>lambdaQuery().eq(Asset::getRefItemId, boardId);
assetLambdaQueryWrapper.eq(Asset::getPublished, true); assetLambdaQueryWrapper.eq(Asset::getPublished, true);
...@@ -417,16 +423,17 @@ public class ChinaMobileRestApiController extends BaseController { ...@@ -417,16 +423,17 @@ public class ChinaMobileRestApiController extends BaseController {
} }
//中移要求,如果翻页参数超出数据总数,返回第一页 //中移要求,如果翻页参数超出数据总数,返回第一页
Page<ExhibitionBoard> page1 = getPage(); Page<ExhibitionBoard> page1 = getPage();
long l = page1.getCurrent() * page1.getSize()-10; long l = page1.getCurrent() * page1.getSize() - 10;
int size = exhibitionBoardService.getList(learningProjectId, true).size(); int size = exhibitionBoardService.getList(learningProjectId, true).size();
if (l>size){ if (l > size) {
page1 = new Page<>(1, 10); page1 = new Page<>(1, 10);
} }
final IPage<ExhibitionBoard> page = this.learningContentBoardService.getBoardPageByLearningProjectId(page1, learningProjectId, null); final IPage<ExhibitionBoard> page = this.learningContentBoardService.getBoardPageByLearningProjectId(page1, learningProjectId, null);
for (ExhibitionBoard exhibitionBoard : page.getRecords()) { for (ExhibitionBoard exhibitionBoard : page.getRecords()) {
exhibitionBoard.setLearningProjectId(learningProjectId); exhibitionBoard.setLearningProjectId(learningProjectId);
if (exhibitionBoard.getVideoContentCopyrightOwnerId() != null) { // 展板的视频内容版权方
if (StringUtils.isNotEmpty(exhibitionBoard.getVideoContentCopyrightOwnerId())) {
String name = this.copyrightOwnerService.getById(exhibitionBoard.getVideoContentCopyrightOwnerId()).getName(); String name = this.copyrightOwnerService.getById(exhibitionBoard.getVideoContentCopyrightOwnerId()).getName();
exhibitionBoard.setBoardCopyrightOwnerName(name); exhibitionBoard.setBoardCopyrightOwnerName(name);
} }
...@@ -434,22 +441,25 @@ public class ChinaMobileRestApiController extends BaseController { ...@@ -434,22 +441,25 @@ public class ChinaMobileRestApiController extends BaseController {
String name = this.exhibitionBoardCatService.getById(exhibitionBoard.getExhibitionBoardCatId()).getName(); String name = this.exhibitionBoardCatService.getById(exhibitionBoard.getExhibitionBoardCatId()).getName();
exhibitionBoard.setExhibitionBoardCatName(name); exhibitionBoard.setExhibitionBoardCatName(name);
} }
if (exhibitionBoard.getVideoContentId() != null) { LambdaQueryWrapper<Asset> assetQueryWrapper;
if (StringUtils.isNotEmpty(exhibitionBoard.getVideoContentId())) {
final VideoContent videoContent = this.videoContentService.getById(exhibitionBoard.getVideoContentId()); final VideoContent videoContent = this.videoContentService.getById(exhibitionBoard.getVideoContentId());
if (videoContent != null) { if (videoContent != null) {
exhibitionBoard.setBoardVideoContentThumbnail(videoContent.getThumbnail()); exhibitionBoard.setBoardVideoContentThumbnail(videoContent.getThumbnail());
} }
}
LambdaQueryWrapper<Asset> assetQueryWrapper = Wrappers.<Asset>lambdaQuery().eq(Asset::getRefItemId, exhibitionBoard.getVideoContentId()); assetQueryWrapper = Wrappers.<Asset>lambdaQuery().eq(Asset::getRefItemId, exhibitionBoard.getVideoContentId());
assetQueryWrapper.eq(Asset::getPublished, true); assetQueryWrapper.eq(Asset::getPublished, true);
assetQueryWrapper.eq(Asset::getFileCat, FileCatEnum.VIDEO_CONTENT.name()); assetQueryWrapper.eq(Asset::getFileCat, FileCatEnum.VIDEO_CONTENT.name());
List<Asset> videoList = this.assetService.list(assetQueryWrapper); List<Asset> videoList = this.assetService.list(assetQueryWrapper);
for (Asset asset : videoList) { for (Asset asset : videoList) {
asset.setExhibitionBoardName(exhibitionBoard.getName()); asset.setExhibitionBoardName(exhibitionBoard.getName());
asset.setExhibitionBoardId(exhibitionBoard.getId()); asset.setExhibitionBoardId(exhibitionBoard.getId());
}
exhibitionBoard.setVideoList(videoList);
assetQueryWrapper.clear();
} }
assetQueryWrapper.clear();
assetQueryWrapper = Wrappers.<Asset>lambdaQuery().eq(Asset::getRefItemId, exhibitionBoard.getId()); assetQueryWrapper = Wrappers.<Asset>lambdaQuery().eq(Asset::getRefItemId, exhibitionBoard.getId());
assetQueryWrapper.eq(Asset::getPublished, true); assetQueryWrapper.eq(Asset::getPublished, true);
assetQueryWrapper.eq(Asset::getFileCat, FileCatEnum.EXHIBITION_BOARD_DATUM.name()); assetQueryWrapper.eq(Asset::getFileCat, FileCatEnum.EXHIBITION_BOARD_DATUM.name());
...@@ -461,13 +471,14 @@ public class ChinaMobileRestApiController extends BaseController { ...@@ -461,13 +471,14 @@ public class ChinaMobileRestApiController extends BaseController {
exhibitionBoard.setDatumList(datumList); exhibitionBoard.setDatumList(datumList);
// videoList.addAll(datumList.stream().filter(x -> FileTypeEnum.VIDEO.name().equalsIgnoreCase(x.getFileType())).collect(Collectors.toList())); // videoList.addAll(datumList.stream().filter(x -> FileTypeEnum.VIDEO.name().equalsIgnoreCase(x.getFileType())).collect(Collectors.toList()));
exhibitionBoard.setVideoList(videoList); // 填充编号
setBoardSerial(exhibitionBoard);
} }
return getResult(page); return getResult(page);
} }
@ApiImplicitParams(value = { @ApiImplicitParams(value = {
@ApiImplicitParam(name = "_index", value = "分页起始偏移量", paramType = "query", dataType = "Integer"), @ApiImplicitParam(name = "_index", value = "分页起始偏移量", paramType = "query", dataType = "Integer"),
@ApiImplicitParam(name = "_size", value = "返回条数", paramType = "query", dataType = "Integer"), @ApiImplicitParam(name = "_size", value = "返回条数", paramType = "query", dataType = "Integer"),
...@@ -477,17 +488,17 @@ public class ChinaMobileRestApiController extends BaseController { ...@@ -477,17 +488,17 @@ public class ChinaMobileRestApiController extends BaseController {
@RequiresAuthentication //@RequiresPermissions("exhibition:board:page") @RequiresAuthentication //@RequiresPermissions("exhibition:board:page")
@ApiOperation(value = "根据学习内容查询展板列表", notes = "根据学习内容查询展板列表") @ApiOperation(value = "根据学习内容查询展板列表", notes = "根据学习内容查询展板列表")
public Map<String, Object> getByContentExhibitionBoardPageList(@RequestParam(value = "learningContentId", required = false) String learningContentId) { public Map<String, Object> getByContentExhibitionBoardPageList(@RequestParam(value = "learningContentId", required = false) String learningContentId) {
//中移要求,如果翻页参数超出数据总数,返回第一页 //中移要求,如果翻页参数超出数据总数,返回第一页
Page<ExhibitionBoard> page1 = getPage(); Page<ExhibitionBoard> page1 = getPage();
long l = page1.getCurrent() * page1.getSize()-10; long l = page1.getCurrent() * page1.getSize() - 10;
int size = exhibitionBoardService.getByContentList(learningContentId, true).size(); int size = exhibitionBoardService.getByContentList(learningContentId, true).size();
if (l>size){ if (l > size) {
page1 = new Page<>(1, 10); page1 = new Page<>(1, 10);
} }
final IPage<ExhibitionBoard> page = this.learningContentBoardService.getBoardPageByLearningContentId(page1, learningContentId, null); final IPage<ExhibitionBoard> page = this.learningContentBoardService.getBoardPageByLearningContentId(page1, learningContentId, null);
for (ExhibitionBoard exhibitionBoard : page.getRecords()) { for (ExhibitionBoard exhibitionBoard : page.getRecords()) {
exhibitionBoard.setLearningContentId(learningContentId); exhibitionBoard.setLearningContentId(learningContentId);
if (exhibitionBoard.getVideoContentCopyrightOwnerId() != null) { if (StringUtils.isNotEmpty(exhibitionBoard.getVideoContentCopyrightOwnerId())) {
String name = this.copyrightOwnerService.getById(exhibitionBoard.getVideoContentCopyrightOwnerId()).getName(); String name = this.copyrightOwnerService.getById(exhibitionBoard.getVideoContentCopyrightOwnerId()).getName();
exhibitionBoard.setBoardCopyrightOwnerName(name); exhibitionBoard.setBoardCopyrightOwnerName(name);
} }
...@@ -495,22 +506,25 @@ public class ChinaMobileRestApiController extends BaseController { ...@@ -495,22 +506,25 @@ public class ChinaMobileRestApiController extends BaseController {
String name = this.exhibitionBoardCatService.getById(exhibitionBoard.getExhibitionBoardCatId()).getName(); String name = this.exhibitionBoardCatService.getById(exhibitionBoard.getExhibitionBoardCatId()).getName();
exhibitionBoard.setExhibitionBoardCatName(name); exhibitionBoard.setExhibitionBoardCatName(name);
} }
if (exhibitionBoard.getVideoContentId() != null) { LambdaQueryWrapper<Asset> assetQueryWrapper;
if (StringUtils.isNotEmpty(exhibitionBoard.getVideoContentId())) {
final VideoContent videoContent = this.videoContentService.getById(exhibitionBoard.getVideoContentId()); final VideoContent videoContent = this.videoContentService.getById(exhibitionBoard.getVideoContentId());
if (videoContent != null) { if (videoContent != null) {
exhibitionBoard.setBoardVideoContentThumbnail(videoContent.getThumbnail()); exhibitionBoard.setBoardVideoContentThumbnail(videoContent.getThumbnail());
} }
}
LambdaQueryWrapper<Asset> assetQueryWrapper = Wrappers.<Asset>lambdaQuery().eq(Asset::getRefItemId, exhibitionBoard.getVideoContentId()); assetQueryWrapper = Wrappers.<Asset>lambdaQuery().eq(Asset::getRefItemId, exhibitionBoard.getVideoContentId());
assetQueryWrapper.eq(Asset::getPublished, true); assetQueryWrapper.eq(Asset::getPublished, true);
assetQueryWrapper.eq(Asset::getFileCat, FileCatEnum.VIDEO_CONTENT.name()); assetQueryWrapper.eq(Asset::getFileCat, FileCatEnum.VIDEO_CONTENT.name());
List<Asset> videoList = this.assetService.list(assetQueryWrapper); List<Asset> videoList = this.assetService.list(assetQueryWrapper);
for (Asset asset : videoList) { for (Asset asset : videoList) {
asset.setExhibitionBoardName(exhibitionBoard.getName()); asset.setExhibitionBoardName(exhibitionBoard.getName());
asset.setExhibitionBoardId(exhibitionBoard.getId()); asset.setExhibitionBoardId(exhibitionBoard.getId());
}
exhibitionBoard.setVideoList(videoList);
assetQueryWrapper.clear();
} }
assetQueryWrapper.clear();
assetQueryWrapper = Wrappers.<Asset>lambdaQuery().eq(Asset::getRefItemId, exhibitionBoard.getId()); assetQueryWrapper = Wrappers.<Asset>lambdaQuery().eq(Asset::getRefItemId, exhibitionBoard.getId());
assetQueryWrapper.eq(Asset::getPublished, true); assetQueryWrapper.eq(Asset::getPublished, true);
assetQueryWrapper.eq(Asset::getFileCat, FileCatEnum.EXHIBITION_BOARD_DATUM.name()); assetQueryWrapper.eq(Asset::getFileCat, FileCatEnum.EXHIBITION_BOARD_DATUM.name());
...@@ -522,7 +536,9 @@ public class ChinaMobileRestApiController extends BaseController { ...@@ -522,7 +536,9 @@ public class ChinaMobileRestApiController extends BaseController {
exhibitionBoard.setDatumList(datumList); exhibitionBoard.setDatumList(datumList);
//videoList.addAll(datumList.stream().filter(x -> FileTypeEnum.VIDEO.name().equalsIgnoreCase(x.getFileType())).collect(Collectors.toList())); //videoList.addAll(datumList.stream().filter(x -> FileTypeEnum.VIDEO.name().equalsIgnoreCase(x.getFileType())).collect(Collectors.toList()));
exhibitionBoard.setVideoList(videoList);
// 填充编号
setBoardSerial(exhibitionBoard);
} }
return getResult(page); return getResult(page);
} }
...@@ -547,7 +563,7 @@ public class ChinaMobileRestApiController extends BaseController { ...@@ -547,7 +563,7 @@ public class ChinaMobileRestApiController extends BaseController {
if (boardCopyrightOwnerId != null) { if (boardCopyrightOwnerId != null) {
exhibitionBoard.setBoardCopyrightOwnerName(this.copyrightOwnerService.getById(boardCopyrightOwnerId).getName()); exhibitionBoard.setBoardCopyrightOwnerName(this.copyrightOwnerService.getById(boardCopyrightOwnerId).getName());
} }
if (exhibitionBoard.getVideoContentCopyrightOwnerId() != null) { if (StringUtils.isNotEmpty(exhibitionBoard.getVideoContentCopyrightOwnerId())) {
String name = this.copyrightOwnerService.getById(exhibitionBoard.getVideoContentCopyrightOwnerId()).getName(); String name = this.copyrightOwnerService.getById(exhibitionBoard.getVideoContentCopyrightOwnerId()).getName();
exhibitionBoard.setVideoContentCopyrightOwnerName(name); exhibitionBoard.setVideoContentCopyrightOwnerName(name);
} }
...@@ -610,6 +626,8 @@ public class ChinaMobileRestApiController extends BaseController { ...@@ -610,6 +626,8 @@ public class ChinaMobileRestApiController extends BaseController {
exhibitionBoard.setVideoList(videoList); exhibitionBoard.setVideoList(videoList);
exhibitionBoard.setVideoLanguageList(videoLanguageList); exhibitionBoard.setVideoLanguageList(videoLanguageList);
} }
// 填充编号
setBoardSerial(exhibitionBoard);
return getResult(exhibitionBoard); return getResult(exhibitionBoard);
} }
...@@ -689,16 +707,17 @@ public class ChinaMobileRestApiController extends BaseController { ...@@ -689,16 +707,17 @@ public class ChinaMobileRestApiController extends BaseController {
//学习项目图片默认展示主学习内容图片 //学习项目图片默认展示主学习内容图片
List<LearningContent> list1 = learningContentService.list(new LambdaQueryWrapper<LearningContent>().eq(LearningContent::getLearningProjectId, learningProject.getId()) List<LearningContent> list1 = learningContentService.list(new LambdaQueryWrapper<LearningContent>().eq(LearningContent::getLearningProjectId, learningProject.getId())
.eq(LearningContent::getIsMajor, true)); .eq(LearningContent::getIsMajor, true));
if (list1.size()>0) { if (list1.size() > 0) {
learningProject.setThumbnail(list1.get(0).getCover()); learningProject.setThumbnail(list1.get(0).getCover());
} }
List<ExhibitionBoard> list= exhibitionBoardService.getList(learningProject.getId(),true); List<ExhibitionBoard> list = exhibitionBoardService.getList(learningProject.getId(), true);
if (!list.isEmpty()) { if (!list.isEmpty()) {
String exhibitionBoardNames = list.stream().map(ExhibitionBoard::getName).collect(Collectors.joining("、")); String exhibitionBoardNames = list.stream().map(ExhibitionBoard::getName).collect(Collectors.joining("、"));
//所有展板名称 //所有展板名称
learningProject.setExhibitionBoardNames(exhibitionBoardNames); learningProject.setExhibitionBoardNames(exhibitionBoardNames);
} }
} }
return getResult(page); return getResult(page);
} }
...@@ -733,8 +752,8 @@ public class ChinaMobileRestApiController extends BaseController { ...@@ -733,8 +752,8 @@ public class ChinaMobileRestApiController extends BaseController {
.le(LearningContent::getCreateTime, genericPageParam.getEndDate().atTime(23, 59, 59)); .le(LearningContent::getCreateTime, genericPageParam.getEndDate().atTime(23, 59, 59));
} }
//学习内容适用范围筛选条件 //学习内容适用范围筛选条件
queryWrapper.apply(" (applicable_scope = 'ALL_PLAT' or (applicable_scope = 'THIS_ORGAN' and organ_code = '" + tUser.getOrgCode()+ queryWrapper.apply(" (applicable_scope = 'ALL_PLAT' or (applicable_scope = 'THIS_ORGAN' and organ_code = '" + tUser.getOrgCode() +
"') or (applicable_scope = 'THIS_ORGAN_SUB' and organ_code like '"+ tUser.getOrgCode()+"%' ))"); "') or (applicable_scope = 'THIS_ORGAN_SUB' and organ_code like '" + tUser.getOrgCode() + "%' ))");
// queryWrapper.and(wapper->wapper.eq(LearningContent::getApplicableScope,"ALL_PLAT") // queryWrapper.and(wapper->wapper.eq(LearningContent::getApplicableScope,"ALL_PLAT")
// .or(wapper2->wapper2.eq(LearningContent::getApplicableScope,"THIS_ORGAN").eq(LearningContent::getOrganCode,tUser.getOrgCode())) // .or(wapper2->wapper2.eq(LearningContent::getApplicableScope,"THIS_ORGAN").eq(LearningContent::getOrganCode,tUser.getOrgCode()))
// .or(wapper2->wapper2.eq(LearningContent::getApplicableScope,"THIS_ORGAN_SUB").likeRight(LearningContent::getOrganCode,tUser.getOrgCode()))); // .or(wapper2->wapper2.eq(LearningContent::getApplicableScope,"THIS_ORGAN_SUB").likeRight(LearningContent::getOrganCode,tUser.getOrgCode())));
...@@ -799,7 +818,7 @@ public class ChinaMobileRestApiController extends BaseController { ...@@ -799,7 +818,7 @@ public class ChinaMobileRestApiController extends BaseController {
@RequiresAuthentication //@RequiresPermissions("learning:content:board:page") @RequiresAuthentication //@RequiresPermissions("learning:content:board:page")
@ApiOperation(value = "根据学习内容模糊搜索查询", notes = "根据学习内容模糊搜索查询") @ApiOperation(value = "根据学习内容模糊搜索查询", notes = "根据学习内容模糊搜索查询")
public Map<String, Object> getByContentSearch(GenericPageParam genericPageParam, public Map<String, Object> getByContentSearch(GenericPageParam genericPageParam,
@RequestParam(value = "learningContentId", required = false) String learningContentId) { @RequestParam(value = "learningContentId", required = false) String learningContentId) {
IPage<ExhibitionBoard> page = this.learningContentBoardService.getBoardPageByLearningContentId(getPage(), learningContentId, genericPageParam.getNameOrCode()); IPage<ExhibitionBoard> page = this.learningContentBoardService.getBoardPageByLearningContentId(getPage(), learningContentId, genericPageParam.getNameOrCode());
return getResult(page); return getResult(page);
} }
...@@ -894,4 +913,16 @@ public class ChinaMobileRestApiController extends BaseController { ...@@ -894,4 +913,16 @@ public class ChinaMobileRestApiController extends BaseController {
map.put("runImgUrl", currentRun != null ? currentRun.getAppRunPic() : "未设置运行图片"); map.put("runImgUrl", currentRun != null ? currentRun.getAppRunPic() : "未设置运行图片");
return getResult(map); return getResult(map);
} }
/**
* 填充编号
*/
public void setBoardSerial(ExhibitionBoard board) {
String serialNo = board.getSerialNo();
int length = serialNo.length();
for (int i = 0; i < 3 - length; i++) {
board.setSerialNo("0" + serialNo);
serialNo = board.getSerialNo();
}
}
} }
...@@ -68,8 +68,6 @@ public class ExhibitionBoardController extends BaseController { ...@@ -68,8 +68,6 @@ public class ExhibitionBoardController extends BaseController {
private LearningContentBoardService learningContentBoardService; private LearningContentBoardService learningContentBoardService;
@Resource @Resource
private LearningContentService learningContentService; private LearningContentService learningContentService;
@Resource
private LearningProjectService learningProjectService;
@PostMapping("/save") @PostMapping("/save")
@RequiresAuthentication //@RequiresPermissions("exhibition:board:save") @RequiresAuthentication //@RequiresPermissions("exhibition:board:save")
...@@ -422,6 +420,10 @@ public class ExhibitionBoardController extends BaseController { ...@@ -422,6 +420,10 @@ public class ExhibitionBoardController extends BaseController {
exhibitionBoard.setVideoContentCopyrightOwnerName(copyrightOwner.getName()); exhibitionBoard.setVideoContentCopyrightOwnerName(copyrightOwner.getName());
} }
} }
if (StringUtils.isEmpty(exhibitionBoard.getVideoContentCopyrightOwnerId())) {
exhibitionBoard.setVideoContentCopyrightOwnerName("无");
exhibitionBoard.setVideoContentName("无");
}
if (exhibitionBoard.getExhibitionBoardCatId() != null) { if (exhibitionBoard.getExhibitionBoardCatId() != null) {
final ExhibitionBoardCat exhibitionBoardCat = this.exhibitionBoardCatService.getById(exhibitionBoard.getExhibitionBoardCatId()); final ExhibitionBoardCat exhibitionBoardCat = this.exhibitionBoardCatService.getById(exhibitionBoard.getExhibitionBoardCatId());
if (exhibitionBoardCat == null) { if (exhibitionBoardCat == null) {
...@@ -462,7 +464,7 @@ public class ExhibitionBoardController extends BaseController { ...@@ -462,7 +464,7 @@ public class ExhibitionBoardController extends BaseController {
if (boardCopyrightOwnerId != null) { if (boardCopyrightOwnerId != null) {
exhibitionBoard.setBoardCopyrightOwnerName(this.copyrightOwnerService.getById(boardCopyrightOwnerId).getName()); exhibitionBoard.setBoardCopyrightOwnerName(this.copyrightOwnerService.getById(boardCopyrightOwnerId).getName());
} }
if (exhibitionBoard.getVideoContentCopyrightOwnerId() != null) { if (StringUtils.isNotEmpty(exhibitionBoard.getVideoContentCopyrightOwnerId())) {
String name = this.copyrightOwnerService.getById(exhibitionBoard.getVideoContentCopyrightOwnerId()).getName(); String name = this.copyrightOwnerService.getById(exhibitionBoard.getVideoContentCopyrightOwnerId()).getName();
exhibitionBoard.setVideoContentCopyrightOwnerName(name); exhibitionBoard.setVideoContentCopyrightOwnerName(name);
} }
...@@ -485,7 +487,7 @@ public class ExhibitionBoardController extends BaseController { ...@@ -485,7 +487,7 @@ public class ExhibitionBoardController extends BaseController {
exhibitionBoard.setAuditHistoryList(auditList); exhibitionBoard.setAuditHistoryList(auditList);
final String videoContentId = exhibitionBoard.getVideoContentId(); final String videoContentId = exhibitionBoard.getVideoContentId();
if (videoContentId != null) { if (StringUtils.isNotEmpty(videoContentId)) {
final VideoContent videoContent = this.videoContentService.getById(videoContentId); final VideoContent videoContent = this.videoContentService.getById(videoContentId);
exhibitionBoard.setVideoContentName(videoContent.getName()); exhibitionBoard.setVideoContentName(videoContent.getName());
......
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