From 19533a17aa55fafc70d0a385928e785cb50e1ebc Mon Sep 17 00:00:00 2001
From: admin <2780501319@qq.com>
Date: 星期五, 30 七月 2021 02:05:14 +0800
Subject: [PATCH] 爱奇艺视频更新

---
 src/main/java/com/yeshi/buwan/util/JuHe/VideoResourceUtil.java |   15 +++++++++++----
 1 files changed, 11 insertions(+), 4 deletions(-)

diff --git a/src/main/java/com/yeshi/buwan/util/JuHe/VideoResourceUtil.java b/src/main/java/com/yeshi/buwan/util/JuHe/VideoResourceUtil.java
index d795451..de21a4b 100644
--- a/src/main/java/com/yeshi/buwan/util/JuHe/VideoResourceUtil.java
+++ b/src/main/java/com/yeshi/buwan/util/JuHe/VideoResourceUtil.java
@@ -1,6 +1,6 @@
 package com.yeshi.buwan.util.JuHe;
 
-import com.yeshi.buwan.domain.DetailSystem;
+import com.yeshi.buwan.domain.system.DetailSystem;
 import com.yeshi.buwan.service.inter.video.VideoResourceVersionMapService;
 import org.springframework.cache.annotation.Cacheable;
 import org.springframework.stereotype.Component;
@@ -14,15 +14,22 @@
     @Resource
     private VideoResourceVersionMapService videoResourceVersionMapService;
 
-    @Cacheable(value = "homeCache", key = "'getAvailableResourceIds-'+'-'+#detailSystem.id+'-'+#versionCode")
-    public List<Long> getAvailableResourceIds(DetailSystem detailSystem, int versionCode) {
-        List<String> ridList = videoResourceVersionMapService.listResourceId(detailSystem.getId(), versionCode);
+    @Cacheable(value = "homeCache", key = "'getAvailableResourceIds-'+'-'+#detailSystem.id+'-'+#versionCode+'-'+#channel")
+    public List<Long> getAvailableResourceIds(DetailSystem detailSystem, int versionCode,String channel) {
+        List<String> ridList = videoResourceVersionMapService.listResourceId(detailSystem.getId(), versionCode,channel);
+//        if (detailSystem.getId().equalsIgnoreCase("43") && versionCode > 83) {
+//            ridList = new ArrayList<>();
+////            ridList.add("19");
+////            ridList.add("24");
+//            ridList.add("25");
+//        }
         List<Long> ids = new ArrayList<>();
         if (ridList != null) {
             for (String id : ridList) {
                 ids.add(Long.parseLong(id));
             }
         }
+
         return ids;
     }
 

--
Gitblit v1.8.0