UserGiftStaServiceImpl.java 1.74 KB
package com.bjivt.service.showtime.impl;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

import com.bjivt.base.dao.BaseDao;
import com.bjivt.base.service.impl.BaseServiceImpl;
import com.bjivt.dao.showtime.UserGiftStaDao;
import com.bjivt.entity.vo.StatisticsUserGift;
import com.bjivt.entity.vo.UserGift;
import com.bjivt.service.showtime.UserGiftStaService;
import com.bjivt.util.Pager;
@Component
public class UserGiftStaServiceImpl extends BaseServiceImpl<StatisticsUserGift, Integer>implements UserGiftStaService {
	@Autowired
	private UserGiftStaDao userGiftStaDao;
	@Override
	public BaseDao getBaseDao() {
		return userGiftStaDao;
	}
	@Override
	public List<StatisticsUserGift> findListByPager(UserGift usergift,Pager page) {
		Map<String, Object> map = new HashMap<String, Object>();
		
		
		map.put("startTime", usergift.getStartTime());
		map.put("endTime", usergift.getEndTime());
		map.put("toUserId", usergift.getToUserId());
		map.put("page", page);
		int count = userGiftStaDao.getCountByParam(map);
		page.setCount(count);
		return userGiftStaDao.findListByPager(map);
	}
	@Override
	public List<StatisticsUserGift> findAllList(UserGift gift, Pager page) {
		Map<String, Object> map = new HashMap<String, Object>();
		
		
		map.put("startTime", gift.getStartTime());
		map.put("endTime", gift.getEndTime());
		map.put("toUserId", gift.getToUserId());
		return userGiftStaDao.findAllList(map);
	}
	@Override
	public List<String> findUserGfitList(StatisticsUserGift sgift) {
		Map<String, Object> map = new HashMap<String, Object>();
		
		
		map.put("toUserId", sgift.getId());
		return userGiftStaDao.findUserGfitList(map);
	}
}