| | |
| | | package com.yeshi.fanli.service.impl.goods;
|
| | |
|
| | | import java.io.Serializable;
|
| | | import java.util.List;
|
| | |
|
| | | import javax.annotation.Resource;
|
| | | import javax.transaction.Transactional;
|
| | |
|
| | | import org.springframework.stereotype.Service;
|
| | | import org.springframework.transaction.annotation.Transactional;
|
| | |
|
| | | import com.yeshi.fanli.dao.hongbao.HongBaoDao;
|
| | | import com.yeshi.fanli.dao.mybatis.share.ShareMapper;
|
| | | import com.yeshi.fanli.dto.HongBao;
|
| | | import com.yeshi.fanli.entity.taobao.PidUser;
|
| | | import com.yeshi.fanli.entity.taobao.ShareTaoPassword;
|
| | | import com.yeshi.fanli.service.inter.goods.ShareService;
|
| | | import com.yeshi.fanli.util.Constant;
|
| | |
|
| | | @Service
|
| | | public class ShareServiceImpl implements ShareService {
|
| | |
|
| | | @Resource
|
| | | private ShareMapper shareMapper;
|
| | | |
| | | @Resource
|
| | | private HongBaoDao hongBaoDao;
|
| | | |
| | |
|
| | | @Override
|
| | | public String getRandomPid() {
|
| | | return shareMapper.getRandomPid();
|
| | |
| | | }
|
| | |
|
| | | @Override
|
| | | public List<HongBao> getShareList(int pageIndex, long uid) {
|
| | | List<HongBao> shareList = hongBaoDao.list("from HongBao hb where hb.userInfo.id = ? and hb.type = '20' order by hb.createtime desc",
|
| | | (pageIndex - 1) * Constant.PAGE_SIZE, Constant.PAGE_SIZE, new Serializable[] { uid });
|
| | | return shareList;
|
| | | }
|
| | |
|
| | | @Override
|
| | | public int getInviteCount(long uid) {
|
| | | return shareMapper.getInviteCount(uid);
|
| | | }
|
| | |
|
| | | @Override
|
| | | public List<HongBao> getInviteList(int pageIndex, long uid) {
|
| | | List<HongBao> shareList = hongBaoDao.list("from HongBao hb where (hb.type = '6' or hb.type = '7') and hb.userInfo.id = ? order by hb.createtime desc",
|
| | | (pageIndex - 1) * Constant.PAGE_SIZE, Constant.PAGE_SIZE, new Serializable[] { uid });
|
| | | return shareList;
|
| | | }
|
| | |
|
| | | @Override
|
| | | public int getShareMoneyCount() {
|
| | | return shareMapper.getShareMoneyCount();
|
| | | }
|
| | | |
| | |
|
| | | }
|