admin
2020-10-13 fc7a6634496066fe45dca8ea9832bdd2f7341db4
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
package com.yeshi.buwan.service.imp.baidu;
 
import com.yeshi.buwan.service.inter.baidu.BaiDuCPUService;
import com.yeshi.buwan.util.BaiDuCPUUtil;
import com.yeshi.buwan.vo.baidu.BaiDuCPUTypeVO;
import org.springframework.cache.annotation.Cacheable;
import org.springframework.stereotype.Service;
 
import java.util.List;
 
@Service
public class BaiDuCPUServiceImpl implements BaiDuCPUService {
 
 
    @Cacheable(value = "classCache", key = "'baidu-getNewsTypeList'")
    @Override
    public List<BaiDuCPUTypeVO> getNewsTypeListCache() {
        return BaiDuCPUUtil.getNewsTotalTypes();
    }
 
    @Cacheable(value = "classCache", key = "'baidu-getVideoTypeList'")
    @Override
    public List<BaiDuCPUTypeVO> getVideoTypeListCache() {
        return BaiDuCPUUtil.getVideosTotalTypes();
    }
 
    @Cacheable(value = "classCache", key = "'baidu-getNewsSafeTypeList'")
    @Override
    public List<BaiDuCPUTypeVO> getNewsSafeTypeListCache() {
        return BaiDuCPUUtil.getNewsSafeTypes();
    }
 
    @Cacheable(value = "classCache", key = "'baidu-getVideoSafeTypeList'")
    @Override
    public List<BaiDuCPUTypeVO> getVideoSafeTypeListCache() {
        return BaiDuCPUUtil.getVideoSafeTypes();
    }
}