Bläddra i källkod

Merge branch 'wyp/0108-articleVideoAudit' of Server/long-article-recommend into master

wangyunpeng 6 månader sedan
förälder
incheckning
7e09d70e62

+ 1 - 0
long-article-recommend-service/src/main/java/com/tzld/longarticle/recommend/server/model/vo/ArticleVideoAuditListVO.java

@@ -21,6 +21,7 @@ public class ArticleVideoAuditListVO {
         private Long videoId;
         private String title;
         private String videoUrl;
+        private String coverUrl;
         private Integer status;
         private String auditAccount;
         private Long auditTimestamp;

+ 6 - 0
long-article-recommend-service/src/main/java/com/tzld/longarticle/recommend/server/service/recommend/ArticleVideoAuditService.java

@@ -24,6 +24,7 @@ import org.apache.commons.collections4.CollectionUtils;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.beans.factory.annotation.Value;
 import org.springframework.stereotype.Service;
+import org.springframework.util.StringUtils;
 
 import java.util.*;
 import java.util.stream.Collectors;
@@ -84,6 +85,11 @@ public class ArticleVideoAuditService {
                 videoItem.setVideoId(video.getId());
                 videoItem.setTitle(video.getVideoTitle());
                 videoItem.setVideoUrl(cdnUrl + video.getVideoOssPath());
+                if (StringUtils.hasText(video.getCoverOssPath())) {
+                    videoItem.setCoverUrl(cdnUrl + video.getCoverOssPath());
+                } else {
+                    videoItem.setCoverUrl(video.getCoverUrl());
+                }
                 videoItem.setStatus(video.getStatus());
                 videoItem.setAuditAccount(video.getAuditAccount());
                 videoItem.setAuditTimestamp(video.getAuditTimestamp());