|
@@ -230,6 +230,15 @@ public class MatchVideoServiceImpl {
|
|
|
}
|
|
|
|
|
|
public void addCrawlerVideo(MatchVideo matchVideo) {
|
|
|
+
|
|
|
+ //判断数据是否已经存在
|
|
|
+ CrawlerVideoExample crawlerVideoExample = new CrawlerVideoExample();
|
|
|
+ crawlerVideoExample.createCriteria().andContentIdEqualTo(matchVideo.getContentId());
|
|
|
+ long l = crawlerVideoMapper.countByExample(crawlerVideoExample);
|
|
|
+ if (l > 0) {
|
|
|
+ return;
|
|
|
+ }
|
|
|
+
|
|
|
//数据准备
|
|
|
SingleVideoSourceExample example = new SingleVideoSourceExample();
|
|
|
example.createCriteria().andContentTraceIdEqualTo(matchVideo.getVideoPoolTraceId());
|
|
@@ -246,7 +255,6 @@ public class MatchVideoServiceImpl {
|
|
|
SingleVideoSource singleVideoSource = singleVideoSources.get(0);
|
|
|
VideoContentUnderstanding videoContentUnderstanding = videoContentUnderstandings.get(0);
|
|
|
|
|
|
-
|
|
|
//视频抓取表插入
|
|
|
CrawlerVideo crawlerVideo = new CrawlerVideo();
|
|
|
crawlerVideo.setDownloadStatus(2);
|