package com.yeejoin.amos.patrol.business.service.impl;

import java.util.List;

import javax.annotation.Resource;

import org.springframework.data.domain.Page;
import org.springframework.data.domain.PageImpl;
import org.springframework.stereotype.Service;

import com.yeejoin.amos.patrol.business.dao.mapper.QueryStatsMapper;
import com.yeejoin.amos.patrol.business.param.CheckStatsListPageParam;
import com.yeejoin.amos.patrol.business.service.intfc.IQueryStatsService;
import com.yeejoin.amos.patrol.business.vo.CheckStatsVo;

@Service("queryStatsService")
public class QueryStatsServiceImpl implements IQueryStatsService {
	
	@Resource
	private QueryStatsMapper queryStatsMapper;

	@Override
	public Page<CheckStatsVo> queryCheckStats(CheckStatsListPageParam paramMap) {
//		long total = queryStatsMapper.countCheckStatsData(paramMap);
		long total = 100;
		List<CheckStatsVo> content = queryStatsMapper.getCheckStats(paramMap);
		Page<CheckStatsVo> result = new PageImpl<CheckStatsVo>(content, paramMap, total);
		return result;
	}

}
