|
@@ -39,6 +39,8 @@ public class ContentServiceImpl implements ContentService {
|
|
|
|
|
|
private final String SINGLE_VIDEO_UID = "76862180";
|
|
private final String SINGLE_VIDEO_UID = "76862180";
|
|
|
|
|
|
|
|
+ private final Integer VIDEO_NUM = 3;
|
|
|
|
+
|
|
@Autowired
|
|
@Autowired
|
|
private MatchVideoMapper matchVideoMapper;
|
|
private MatchVideoMapper matchVideoMapper;
|
|
|
|
|
|
@@ -355,17 +357,17 @@ public class ContentServiceImpl implements ContentService {
|
|
if (planAccount == null) {
|
|
if (planAccount == null) {
|
|
return crawlerVideoList;
|
|
return crawlerVideoList;
|
|
}
|
|
}
|
|
- if (crawlerVideoList.size() < 3) {
|
|
|
|
|
|
+ if (crawlerVideoList.size() < VIDEO_NUM) {
|
|
CrawlerVideo crawlerVideo = crawlerVideoList.get(0);
|
|
CrawlerVideo crawlerVideo = crawlerVideoList.get(0);
|
|
- int needAddCount = 3 - crawlerVideoList.size();
|
|
|
|
|
|
+ int needAddCount = VIDEO_NUM - crawlerVideoList.size();
|
|
for (int i = 0; i < needAddCount; i++) {
|
|
for (int i = 0; i < needAddCount; i++) {
|
|
CrawlerVideo copyCrawlerVideo = new CrawlerVideo();
|
|
CrawlerVideo copyCrawlerVideo = new CrawlerVideo();
|
|
BeanUtils.copyProperties(crawlerVideo, copyCrawlerVideo);
|
|
BeanUtils.copyProperties(crawlerVideo, copyCrawlerVideo);
|
|
crawlerVideoList.add(copyCrawlerVideo);
|
|
crawlerVideoList.add(copyCrawlerVideo);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
- if (crawlerVideoList.size() > 3) {
|
|
|
|
- return crawlerVideoList.subList(0, 3);
|
|
|
|
|
|
+ if (crawlerVideoList.size() > VIDEO_NUM) {
|
|
|
|
+ return crawlerVideoList.subList(0, VIDEO_NUM);
|
|
}
|
|
}
|
|
return crawlerVideoList;
|
|
return crawlerVideoList;
|
|
} catch (Exception e) {
|
|
} catch (Exception e) {
|