admin
2021-03-24 c44a4296e8913080bff7ca0ee1b65356ed34ec3d
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;
@@ -17,12 +17,19 @@
    @Cacheable(value = "homeCache", key = "'getAvailableResourceIds-'+'-'+#detailSystem.id+'-'+#versionCode")
    public List<Long> getAvailableResourceIds(DetailSystem detailSystem, int versionCode) {
        List<String> ridList = videoResourceVersionMapService.listResourceId(detailSystem.getId(), versionCode);
        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;
    }