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

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

parent 55fc3974
......@@ -28,6 +28,12 @@ public class AddressUtil {
if (ip == null || ip.length() == 0 || "unknown".equalsIgnoreCase(ip)) {
ip = request.getRemoteAddr();
}
// 多次反向代理后会有多个IP值,只有第一个是真实IP
if(null != ip && ip.length() > 15){
if(ip.indexOf(",") > 0){
ip = ip.substring(0, ip.indexOf(","));
}
}
return ip;
}
......
......@@ -19,4 +19,5 @@ public interface ExhibitionBoardService extends IService<ExhibitionBoard> {
List<ExhibitionBoard> getList(String learningProjectId, boolean b);
List<ExhibitionBoard> getByContentList(String learningContentId, boolean b);
}
......@@ -68,8 +68,6 @@ public class ExhibitionBoardController extends BaseController {
private LearningContentBoardService learningContentBoardService;
@Resource
private LearningContentService learningContentService;
@Resource
private LearningProjectService learningProjectService;
@PostMapping("/save")
@RequiresAuthentication //@RequiresPermissions("exhibition:board:save")
......@@ -422,6 +420,10 @@ public class ExhibitionBoardController extends BaseController {
exhibitionBoard.setVideoContentCopyrightOwnerName(copyrightOwner.getName());
}
}
if (StringUtils.isEmpty(exhibitionBoard.getVideoContentCopyrightOwnerId())) {
exhibitionBoard.setVideoContentCopyrightOwnerName("无");
exhibitionBoard.setVideoContentName("无");
}
if (exhibitionBoard.getExhibitionBoardCatId() != null) {
final ExhibitionBoardCat exhibitionBoardCat = this.exhibitionBoardCatService.getById(exhibitionBoard.getExhibitionBoardCatId());
if (exhibitionBoardCat == null) {
......@@ -462,7 +464,7 @@ public class ExhibitionBoardController extends BaseController {
if (boardCopyrightOwnerId != null) {
exhibitionBoard.setBoardCopyrightOwnerName(this.copyrightOwnerService.getById(boardCopyrightOwnerId).getName());
}
if (exhibitionBoard.getVideoContentCopyrightOwnerId() != null) {
if (StringUtils.isNotEmpty(exhibitionBoard.getVideoContentCopyrightOwnerId())) {
String name = this.copyrightOwnerService.getById(exhibitionBoard.getVideoContentCopyrightOwnerId()).getName();
exhibitionBoard.setVideoContentCopyrightOwnerName(name);
}
......@@ -485,7 +487,7 @@ public class ExhibitionBoardController extends BaseController {
exhibitionBoard.setAuditHistoryList(auditList);
final String videoContentId = exhibitionBoard.getVideoContentId();
if (videoContentId != null) {
if (StringUtils.isNotEmpty(videoContentId)) {
final VideoContent videoContent = this.videoContentService.getById(videoContentId);
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