admin
2019-07-30 573c491b4a1ba60e12a5678a01c1546c0077c1ee
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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
package com.yeshi.fanli.service.impl.config;
 
import java.util.List;
 
import javax.annotation.Resource;
 
import org.springframework.cache.annotation.Cacheable;
import org.springframework.stereotype.Service;
 
import com.yeshi.fanli.dao.mybatis.goods.SuperHotSearchMapper;
import com.yeshi.fanli.entity.bus.search.HotSearch;
import com.yeshi.fanli.entity.bus.su.search.SuperHotSearch;
import com.yeshi.fanli.entity.system.BusinessSystem;
import com.yeshi.fanli.service.inter.config.BusinessSystemService;
import com.yeshi.fanli.service.inter.config.SuperHotSearchService;
 
@Service
public class SuperHotSearchSerivceImpl implements SuperHotSearchService {
 
    @Resource
    private SuperHotSearchMapper superHotSearchMapper;
 
    @Resource
    private BusinessSystemService businessSystemService;
 
    public List<SuperHotSearch> getSuperHotSearchBySystemId(long id) {
        return superHotSearchMapper.listBySystemId(id);
    }
 
    
    @Override
    public List<SuperHotSearch> listSuperHotSearch(List<Long> list) {
        if (list == null || list.size() == 0) {
            return null;
        }
        return superHotSearchMapper.listByHotSearchListID(list);
    }
    
 
    @Override
    @Cacheable(value = "crgCache", key = "'getSuperHotSearchBySystemIdCache'+#id")
    public List<SuperHotSearch> getSuperHotSearchBySystemIdCache(long id) {
        return getSuperHotSearchBySystemId(id);
    }
 
    
    @Override
    public List<SuperHotSearch> getHotSearchSystem(Long id, Long systemId) {
        return superHotSearchMapper.listBySystemIdAndHotSearchId(id, systemId);
    }
    
    @Override
    public void deleteSuper(Long id, Long systemId) {
        superHotSearchMapper.deleteBySystemIdAndHotSearchId(id,systemId);
    }
    
    @Override
    public void addSuper(Long id, BusinessSystem system) {
        SuperHotSearch superHotSearch = new SuperHotSearch();
        HotSearch hotSearch = new HotSearch();
        hotSearch.setId(id);
        superHotSearch.setHotSearch(hotSearch);
        superHotSearch.setSystem(system);
        superHotSearchMapper.insert(superHotSearch);
    }
 
}