yujian
2019-10-30 f3c83214e7b0eadacf925351d1a9625c44a59bd2
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
package com.yeshi.fanli.service.impl.user;
 
import javax.annotation.Resource;
 
import org.springframework.stereotype.Service;
 
import com.yeshi.fanli.dao.mybatis.user.UserSystemCouponActivateMapper;
import com.yeshi.fanli.entity.bus.user.UserSystemCouponActivate;
import com.yeshi.fanli.service.inter.config.ConfigService;
import com.yeshi.fanli.service.inter.user.UserSystemCouponActivateService;
 
@Service
public class UserSystemCouponActivateServiceImpl implements UserSystemCouponActivateService{
 
    @Resource
    private UserSystemCouponActivateMapper userSystemCouponActivateMapper;
    
    @Resource
    private ConfigService configService;
    
    
    
    @Override
    public UserSystemCouponActivate selectForUpdate(Long id) {
        return userSystemCouponActivateMapper.selectForUpdate(id);
    }
    
    @Override
    public void updateByPrimaryKeySelective(UserSystemCouponActivate record) {
        userSystemCouponActivateMapper.updateByPrimaryKeySelective(record);
    }
    
    @Override 
    public int getActivateCount(Long id) {
        UserSystemCouponActivate coupon = userSystemCouponActivateMapper.selectByPrimaryKey(id);
        if (coupon != null)
            return coupon.getCount();
        
        return 0;
    }
}