fix
Helius
2021-12-17 6a654dcb433278297d0605c38326c9ff7d7ef73e
fix
1 files modified
30 ■■■■ changed files
src/main/java/cc/mrbird/febs/video/service/impl/VideoMasterInfoServiceImpl.java 30 ●●●● patch | view | raw | blame | history
src/main/java/cc/mrbird/febs/video/service/impl/VideoMasterInfoServiceImpl.java
@@ -192,23 +192,25 @@
            }
        }
        if (loginUser != null) {
            VideoCommentLikeEntity commentLike = this.videoCommentLikeMapper.selectCommentLikeByMemberIdAndRelateId(loginUser.getId(), videoInfoEntity.getId());
            if (commentLike != null) {
                videoInfoVo.setIsLike(1);
            } else {
                videoInfoVo.setIsLike(2);
            }
            VideoCollectionEntity collection = this.videoCollectionMapper.selectVideoCollectionByVideoIdAndMemberId(videoInfoEntity.getId(), loginUser.getId());
            if (collection != null) {
                videoInfoVo.setIsCollect(1);
            } else {
                videoInfoVo.setIsCollect(2);
            }
        }
        VideoMasterItemsEntity currentItem = this.videoMasterItemsMapper.selectItemByVideoIdAndItemId(videoId, itemId);
        if (currentItem == null) {
            throw new FebsException("视频不存在");
        }
        VideoCommentLikeEntity commentLike = this.videoCommentLikeMapper.selectCommentLikeByMemberIdAndRelateId(loginUser.getId(), videoInfoEntity.getId());
        if (commentLike != null) {
            videoInfoVo.setIsLike(1);
        } else {
            videoInfoVo.setIsLike(2);
        }
        VideoCollectionEntity collection = this.videoCollectionMapper.selectVideoCollectionByVideoIdAndMemberId(videoInfoEntity.getId(), loginUser.getId());
        if (collection != null) {
            videoInfoVo.setIsCollect(1);
        } else {
            videoInfoVo.setIsCollect(2);
        }
        videoInfoVo.setNotLogin(AppContants.FLAG_INT_Y);