Browse Source

VideoPostQueryImpl#getVideoPostData 只允许 publish 和 noVideoFile 状态的视频返回

reghao 1 year ago
parent
commit
01999b80c7

+ 5 - 0
content/content-service/src/main/java/cn/reghao/tnb/content/app/vod/service/impl/VideoPostQueryImpl.java

@@ -191,6 +191,11 @@ public class VideoPostQueryImpl implements VideoPostQuery {
             return WebResult.notFound();
         }
 
+        int status = videoPost.getStatus();
+        if (status != VideoStatus.publish.getValue() || status != VideoStatus.noVideoFile.getValue()) {
+            return WebResult.notFound();
+        }
+
         long loginUser = UserContext.getUser();
         long owner = videoPost.getPublishBy();
         int scope = videoPost.getScope();