| | |
| | | package com.yeshi.buwan.util.JuHe; |
| | | |
| | | import com.yeshi.buwan.domain.system.DetailSystem; |
| | | import com.yeshi.buwan.service.inter.video.VideoResourcePlayVersionMapService; |
| | | import com.yeshi.buwan.service.inter.video.VideoResourceVersionMapService; |
| | | import org.springframework.cache.annotation.Cacheable; |
| | | import org.springframework.stereotype.Component; |
| | |
| | | @Resource |
| | | private VideoResourceVersionMapService videoResourceVersionMapService; |
| | | |
| | | @Resource |
| | | private VideoResourcePlayVersionMapService videoResourcePlayVersionMapService; |
| | | |
| | | @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); |
| | |
| | | } |
| | | |
| | | |
| | | @Cacheable(value = "homeCache", key = "'getAvailablePlayResourceIds-'+'-'+#detailSystem.id+'-'+#versionCode+'-'+#channel") |
| | | public List<Long> getAvailablePlayResourceIds(DetailSystem detailSystem, int versionCode,String channel) { |
| | | List<String> ridList = videoResourcePlayVersionMapService.listResourceId(detailSystem.getId(), versionCode,channel); |
| | | List<Long> ids = new ArrayList<>(); |
| | | if (ridList != null) { |
| | | for (String id : ridList) { |
| | | ids.add(Long.parseLong(id)); |
| | | } |
| | | } |
| | | |
| | | return ids; |
| | | } |
| | | |
| | | |
| | | } |