From 20f473dc4997e8b8a76f8c75d0a649be0a5ea139 Mon Sep 17 00:00:00 2001 From: admin <2780501319@qq.com> Date: 星期五, 02 四月 2021 00:32:03 +0800 Subject: [PATCH] 广告控制逻辑代码初步编写 --- src/main/java/com/yeshi/buwan/service/imp/VideoInfoService.java | 8 +++++++- 1 files changed, 7 insertions(+), 1 deletions(-) diff --git a/src/main/java/com/yeshi/buwan/service/imp/VideoInfoService.java b/src/main/java/com/yeshi/buwan/service/imp/VideoInfoService.java index 647ee25..f4f1479 100644 --- a/src/main/java/com/yeshi/buwan/service/imp/VideoInfoService.java +++ b/src/main/java/com/yeshi/buwan/service/imp/VideoInfoService.java @@ -44,6 +44,9 @@ @Resource private VideoResourceService videoResourceService; + @Resource + private ClearService clearService; + public VideoInfo getVideoInfo(String vid) { return videoInfoDao.find(VideoInfo.class, vid); } @@ -184,6 +187,7 @@ return null; } + /** * 鏍规嵁鍚嶇О涓庝富婕� * @@ -198,7 +202,9 @@ VideoInfo vi = list.get(i); if (getSameDirectorOrActorCount(vi.getDirector(), newVideoInfo.getDirector()) > 0 || getSameDirectorOrActorCount(vi.getMainActor(), newVideoInfo.getMainActor()) > 0) { // if (getSameDirectorOrActorCount(vi.getMainActor(), newVideoInfo.getMainActor()) > 0) { - return list.get(i); + //涓诲垎绫讳竴鏍� + if (vi.getVideoType() != null && newVideoInfo.getVideoType() != null && vi.getVideoType().getId() == newVideoInfo.getVideoType().getId()) + return list.get(i); // } } } -- Gitblit v1.8.0