yujian
2019-10-16 b63cc5c46404ba8c149f9f7527e9af11e0b44360
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
package com.yeshi.fanli.service.impl.tlj;
 
import java.math.BigDecimal;
import java.util.Date;
 
import javax.annotation.Resource;
 
import org.springframework.stereotype.Service;
 
import com.yeshi.fanli.dao.mybatis.tlj.UserTaoLiJinReportMapper;
import com.yeshi.fanli.entity.bus.tlj.UserTaoLiJinReport;
import com.yeshi.fanli.service.inter.tlj.UserTaoLiJinOriginService;
import com.yeshi.fanli.service.inter.tlj.UserTaoLiJinReportService;
import com.yeshi.fanli.util.StringUtil;
 
@Service
public class UserTaoLiJinReportServiceImpl implements UserTaoLiJinReportService{
 
    @Resource
    private UserTaoLiJinReportMapper userTaoLiJinReportMapper;
    
    @Resource
    private UserTaoLiJinOriginService userTaoLiJinOriginService;
    
    @Override
    public void insertDefault(String rightsId) {
        if (StringUtil.isNullOrEmpty(rightsId)) {
            return;
        }
        
        UserTaoLiJinReport report = new UserTaoLiJinReport();
        report.setId(rightsId);
        report.setUnfreezeAmount(new BigDecimal(0));
        report.setUnfreezeNum(0);
        report.setRefundAmount(new BigDecimal(0));
        report.setRefundNum(0);
        report.setAlipayAmount(new BigDecimal(0));
        report.setUseAmount(new BigDecimal(0));
        report.setUseNum(0);
        report.setWinAmount(new BigDecimal(0));
        report.setWinNum(0);
        report.setPreCommissionAmount(new BigDecimal(0));
        report.setCreateTime(new Date());
        report.setUpdateTime(new Date());
        userTaoLiJinReportMapper.insertSelective(report);
    }
    
    
    @Override
    public void updateByPrimaryKeySelective(UserTaoLiJinReport record) {
        if (record == null || record.getId() == null) {
            return;
        }
        record.setUpdateTime(new Date());
        
        userTaoLiJinReportMapper.updateByPrimaryKeySelective(record);
    }
    
    
    @Override
    public UserTaoLiJinReport selectByPrimaryKey(String id) {
        return userTaoLiJinReportMapper.selectByPrimaryKeyStr(id);
    }
    
}