yujian
2019-05-29 0588d6be74335f41c79a8d8e32dbd1c3d3e47fa3
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
package com.yeshi.fanli.service.impl.lable;
 
import javax.annotation.Resource;
 
import org.springframework.cache.annotation.Cacheable;
import org.springframework.stereotype.Service;
 
import com.yeshi.fanli.dao.mybatis.lable.MergeClassMapper;
import com.yeshi.fanli.entity.bus.lable.MergeClass;
import com.yeshi.fanli.exception.MergeClassException;
import com.yeshi.fanli.service.inter.lable.MergeClassService;
 
@Service
public class MergeClassServiceImpl implements MergeClassService {
 
    
    @Resource
    private MergeClassMapper mergeClassMapper;
    
 
    @Override
    public int insert(MergeClass record) throws MergeClassException{
        return mergeClassMapper.insert(record);
    }
 
    
    @Override
    public int updateByPrimaryKey(MergeClass record) throws MergeClassException{
        return mergeClassMapper.updateByPrimaryKey(record);
    }
 
    @Override
    public int updateByPrimaryKeySelective(MergeClass record) throws MergeClassException{
        return mergeClassMapper.updateByPrimaryKeySelective(record);
    }
 
    @Override
    public int deleteByPrimaryKey(Long id) throws MergeClassException{
        return mergeClassMapper.deleteByPrimaryKey(id);
    }
 
 
    @Override
    public MergeClass selectByPrimaryKey(Long id) throws MergeClassException {
        return mergeClassMapper.selectByPrimaryKey(id);
    }
    
    @Override
    @Cacheable(value = "mergeClassCache",key="'selectByPrimaryKeyCache-'+#id")
    public MergeClass selectByPrimaryKeyCache(Long id) throws MergeClassException {
        return selectByPrimaryKey(id);
    }
}