| | |
| | | item.setContent(content); |
| | | item.setVideoUrl(null); |
| | | item.setVideoFileName(null); |
| | | item.setVideoDescription(null); |
| | | return; |
| | | } |
| | | |
| | |
| | | if (videoUrl == null) { |
| | | throw new IllegalArgumentException("请填写视频地址或上传本地视频"); |
| | | } |
| | | String videoDescription = trimToNull(req.getVideoDescription()); |
| | | if (videoDescription == null) { |
| | | throw new IllegalArgumentException("请输入视频介绍"); |
| | | } |
| | | item.setContent(null); |
| | | item.setVideoUrl(videoUrl); |
| | | item.setVideoFileName(trimToNull(req.getVideoFileName())); |
| | | item.setVideoDescription(videoDescription); |
| | | } |
| | | |
| | | private int validateContentType(Integer contentType) { |
| | |
| | | vo.setContent(item.getContent()); |
| | | vo.setVideoUrl(item.getVideoUrl()); |
| | | vo.setVideoFileName(item.getVideoFileName()); |
| | | vo.setVideoDescription(item.getVideoDescription()); |
| | | vo.setStatus(item.getStatus()); |
| | | vo.setClickCount(defaultNumber(item.getClickCount())); |
| | | vo.setCreatedAt(item.getCreatedAt()); |