| | |
| | | videoInfoVo.setCollectCnt(data.getCollectCnt()); |
| | | videoInfoVo.setStarCnt(data.getStarCnt()); |
| | | |
| | | if (AppContants.FLAG_INT_N.equals(videoInfoEntity.getIsFree())) { |
| | | if (loginUser == null) { |
| | | videoInfoVo.setNotLogin(AppContants.FLAG_INT_N); |
| | | return videoInfoVo; |
| | | } |
| | | |
| | | VideoMemberEntity member = this.videoMemberMapper.selectById(loginUser.getId()); |
| | | if (AppContants.FLAG_INT_N.equals(member.getIsVip())) { |
| | | videoInfoVo.setNotVip(AppContants.FLAG_INT_N); |
| | | return videoInfoVo; |
| | | } |
| | | } |
| | | |
| | | if (loginUser != null) { |
| | | VideoCommentLikeEntity commentLike = this.videoCommentLikeMapper.selectCommentLikeByMemberIdAndRelateId(loginUser.getId(), videoInfoEntity.getId()); |
| | | if (commentLike != null) { |
| | |
| | | } |
| | | } |
| | | |
| | | if (AppContants.FLAG_INT_N.equals(videoInfoEntity.getIsFree())) { |
| | | if (loginUser == null) { |
| | | videoInfoVo.setNotLogin(AppContants.FLAG_INT_N); |
| | | return videoInfoVo; |
| | | } |
| | | |
| | | VideoMemberEntity member = this.videoMemberMapper.selectById(loginUser.getId()); |
| | | if (AppContants.FLAG_INT_N.equals(member.getIsVip())) { |
| | | videoInfoVo.setNotVip(AppContants.FLAG_INT_N); |
| | | return videoInfoVo; |
| | | } |
| | | } |
| | | |
| | | |
| | | VideoMasterItemsEntity currentItem = this.videoMasterItemsMapper.selectItemByVideoIdAndItemId(videoId, itemId); |
| | | if (currentItem == null) { |
| | | throw new FebsException("视频不存在"); |
| | |
| | | videoInfoVo.setThumb(currentItem.getThumb()); |
| | | videoInfoVo.setItemId(currentItem.getId()); |
| | | videoInfoVo.setTimeLength(currentItem.getTimeLength()); |
| | | |
| | | if (loginUser != null) { |
| | | VideoHistoryEntity history = this.videoHistoryMapper.selectByMemberIdAndVideoId(loginUser.getId(), videoInfoEntity.getId()); |
| | | if (history == null) { |
| | | history = new VideoHistoryEntity(); |
| | | history.setVideoId(videoInfoEntity.getId()); |
| | | history.setMemberId(loginUser.getId()); |
| | | history.setVideoItemId(currentItem.getId()); |
| | | this.videoHistoryMapper.insert(history); |
| | | } else { |
| | | history.setVideoItemId(currentItem.getId()); |
| | | this.videoHistoryMapper.updateById(history); |
| | | } |
| | | } |
| | | |
| | | return videoInfoVo; |
| | | } |
| | | |