package com.yeshi.fanli.service.impl.user.invite;
|
|
import java.math.BigDecimal;
|
import java.util.Date;
|
import java.util.List;
|
|
import javax.annotation.Resource;
|
|
import org.springframework.stereotype.Service;
|
|
import com.yeshi.fanli.dao.user.ThreeSaleFocusInfoDao;
|
import com.yeshi.fanli.dto.user.ThreeSaleFocusDTO;
|
import com.yeshi.fanli.entity.bus.user.ThreeSaleFocusInfo;
|
import com.yeshi.fanli.service.inter.user.invite.ThreeSaleFocusInfoService;
|
import com.yeshi.fanli.service.inter.user.invite.ThreeSaleSerivce;
|
|
@Service
|
public class ThreeSaleFocusInfoServiceImpl implements ThreeSaleFocusInfoService {
|
|
@Resource
|
private ThreeSaleFocusInfoDao threeSaleFocusInfoDao;
|
|
@Resource
|
private ThreeSaleSerivce threeSaleSerivce;
|
|
@Override
|
public void save(ThreeSaleFocusInfo record) {
|
threeSaleFocusInfoDao.save(record);
|
}
|
|
|
@Override
|
public void updateMemoName(Long workerId, int type, String memoName) {
|
threeSaleFocusInfoDao.updateMemoName(workerId, type, memoName);
|
}
|
|
@Override
|
public void updateTags(Long workerId, int type, String tags) {
|
threeSaleFocusInfoDao.updateTags(workerId, type, tags);
|
}
|
|
@Override
|
public void updateNickName(Long workerId, String nickName) {
|
threeSaleFocusInfoDao.updateNickName(workerId, nickName);
|
}
|
|
|
@Override
|
public void updateStateValid(Long workerId, boolean stateValid) {
|
threeSaleFocusInfoDao.updateStateValid(workerId, stateValid);
|
}
|
|
@Override
|
public void updateTaobaoBind(Long workerId, boolean taobaoBind) {
|
threeSaleFocusInfoDao.updateTaobaoBind(workerId, taobaoBind);
|
}
|
|
@Override
|
public void updateWeixinBind(Long workerId, boolean weixinBind) {
|
threeSaleFocusInfoDao.updateWeixinBind(workerId, weixinBind);
|
}
|
|
@Override
|
public void updateActiveTime(Long workerId, Date activeTime) {
|
threeSaleFocusInfoDao.updateActiveTime(workerId, activeTime);
|
}
|
|
@Override
|
public void updateFansNum(Long workerId) {
|
long firstTeam = threeSaleSerivce.countFirstTeam(workerId);
|
long secondTeam = threeSaleSerivce.countSecondTeam(workerId);
|
int fansNum = (int) (firstTeam + secondTeam);
|
threeSaleFocusInfoDao.updateFansNum(workerId, fansNum);
|
}
|
|
@Override
|
public void updateIncome(Long workerId, BigDecimal income) {
|
threeSaleFocusInfoDao.updateIncome(workerId, income);
|
}
|
|
|
@Override
|
public List<ThreeSaleFocusInfo> query(int start, int count, int type, Long uid, ThreeSaleFocusDTO focusDTO) {
|
return threeSaleFocusInfoDao.query(start, count, type, uid, focusDTO);
|
}
|
|
@Override
|
public long count(int type, Long uid, ThreeSaleFocusDTO focusDTO) {
|
return threeSaleFocusInfoDao.count(type, uid, focusDTO);
|
}
|
|
@Override
|
public ThreeSaleFocusInfo getbyWorkerId(Long workerId) {
|
return threeSaleFocusInfoDao.getbyWorkerId(workerId);
|
}
|
}
|