| | |
| | | import com.yeshi.fanli.dao.mybatis.pdd.PDDOrderMapper; |
| | | import com.yeshi.fanli.dao.mybatis.taobao.TaoBaoOrderMapper; |
| | | import com.yeshi.fanli.dao.mybatis.taobao.TaoBaoWeiQuanOrderMapper; |
| | | import com.yeshi.fanli.dao.user.count.CountOrderInfoDao; |
| | | import com.yeshi.fanli.dao.user.count.CountOrderTrackRateDao; |
| | | import com.yeshi.fanli.dto.ChartTDO; |
| | | import com.yeshi.fanli.dto.order.CountOrderDTO; |
| | |
| | | import com.yeshi.fanli.service.inter.order.CommonOrderCountService; |
| | | import com.yeshi.fanli.util.Constant; |
| | | import com.yeshi.fanli.util.StringUtil; |
| | | import com.yeshi.fanli.util.TimeUtil; |
| | | import org.yeshi.utils.TimeUtil; |
| | | |
| | | @Service |
| | | public class CommonOrderCountServiceImpl implements CommonOrderCountService { |
| | |
| | | |
| | | @Resource |
| | | private CommonOrderCountMapper commonOrderCountMapper; |
| | | |
| | | |
| | | @Resource |
| | | private CountOrderInfoDao countOrderInfoDao; |
| | | |
| | | |
| | | |
| | | @Resource |
| | | private CountOrderTrackRateDao countOrderTrackRateDao; |
| | | |
| | | |
| | | @Override |
| | | public Long countByState(Integer state) { |
| | | return commonOrderCountMapper.countByState(state); |
| | |
| | | } |
| | | |
| | | @Override |
| | | public List<Long> getUidByValidOrderByDay(String preDay) { |
| | | return commonOrderCountMapper.getUidByValidOrderByDay(preDay); |
| | | } |
| | | |
| | | |
| | | @Override |
| | | public Integer countDownOrderUserByUidAndDate(Date preDay, List<Long> list) { |
| | | return commonOrderCountMapper.countDownOrderUserByUidAndDate(preDay, list); |
| | | } |
| | | |
| | | @Override |
| | | public List<Long> getDownOrderUserByListUidAndDate(Date preDay, List<Long> list) { |
| | | return commonOrderCountMapper.getDownOrderUserByListUidAndDate(preDay, list); |
| | | } |
| | | |
| | | |
| | | @Override |
| | | public List<CountOrderDTO> countCommissionByDay(String preDay) { |
| | |
| | | record.setId(StringUtil.Md5(preDay + trackRateEnum.name())); |
| | | countOrderTrackRateDao.save(record); |
| | | } |
| | | |
| | | |
| | | @Override |
| | | public Long countOrderBySourceTypeAndDay(int source, String preDay) { |
| | | return commonOrderCountMapper.countOrderBySourceTypeAndDay(preDay, source); |
| | | } |
| | | |
| | | @Override |
| | | public long countOrderBySourceAndNearDay(Long uid, int source, int day) { |
| | | Long count = commonOrderCountMapper.countOrderBySourceAndNearDay(uid, source, day); |
| | | if (count == null) { |
| | | count = 0L; |
| | | } |
| | | return count; |
| | | } |
| | | |
| | | @Override |
| | | public long countHistoryOrderNum(Long uid) { |
| | | Long count = commonOrderCountMapper.countHistoryOrderNum(uid); |
| | | if (count == null) { |
| | | count = 0L; |
| | | } |
| | | return count; |
| | | } |
| | | |
| | | |
| | | } |