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;
|
}
|
|
|
}
|