yujian
2020-05-09 7e7db2fa55a9a3af46d4fd8ede0dee147f101d64
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
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
package com.yeshi.fanli.service.impl.user.invite;
 
import javax.annotation.Resource;
 
import org.springframework.stereotype.Service;
 
import com.yeshi.fanli.dao.mybatis.ThreeSaleExtraInfoMapper;
import com.yeshi.fanli.entity.bus.user.ThreeSaleExtraInfo;
import com.yeshi.fanli.service.inter.user.invite.ThreeSaleExtraInfoSerivce;
 
@Service
public class ThreeSaleExtraInfoSerivceImpl implements ThreeSaleExtraInfoSerivce {
 
    @Resource
    private ThreeSaleExtraInfoMapper threeSaleExtraInfoMapper;
 
    @Override
    public int deleteByPrimaryKey(Long id) {
        return threeSaleExtraInfoMapper.deleteByPrimaryKey(id);
    }
 
    @Override
    public int insert(ThreeSaleExtraInfo record) {
        return threeSaleExtraInfoMapper.insert(record);
    }
 
    @Override
    public int insertSelective(ThreeSaleExtraInfo record) {
        return threeSaleExtraInfoMapper.insertSelective(record);
    }
 
    @Override
    public ThreeSaleExtraInfo selectByPrimaryKey(Long id) {
        return threeSaleExtraInfoMapper.selectByPrimaryKey(id);
    }
 
    @Override
    public int updateByPrimaryKeySelective(ThreeSaleExtraInfo record) {
        return threeSaleExtraInfoMapper.updateByPrimaryKeySelective(record);
    }
 
    @Override
    public int updateByPrimaryKey(ThreeSaleExtraInfo record) {
        return threeSaleExtraInfoMapper.updateByPrimaryKey(record);
    }
 
    
    @Override
    public ThreeSaleExtraInfo getbyBossIdAndWorkerId(Long bossId, Long workerId) {
        return threeSaleExtraInfoMapper.getbyBossIdAndWorkerId(bossId, workerId);
    }
    
    @Override
    public int deleteByBossIdAndWorkerId(Long bossId, Long workerId) {
        return threeSaleExtraInfoMapper.deleteByBossIdAndWorkerId(bossId, workerId);
    }
    
    
    @Override
    public boolean isRemindBoss(Long bossId, Long workerId) {
         ThreeSaleExtraInfo extraInfo = threeSaleExtraInfoMapper.getbyBossIdAndWorkerId(bossId, workerId);
         if (extraInfo == null) {
             return false;
         }
         
         Integer remindBoss = extraInfo.getRemindBoss();
         if (remindBoss == null || remindBoss != 1) {
             return false;
         }
         return true;
    }
    
    @Override
    public boolean isRemindWorker(Long bossId, Long workerId) {
         ThreeSaleExtraInfo extraInfo = threeSaleExtraInfoMapper.getbyBossIdAndWorkerId(bossId, workerId);
         if (extraInfo == null) {
             return false;
         }
         
         Integer remindWorker = extraInfo.getRemindWorker();
         if (remindWorker == null || remindWorker != 1) {
             return false;
         }
         return true;
    }
    
    
}