package com.zhiwei.manage.service;

import java.util.Date;
import java.util.List;
import java.util.Map;

import com.zhiwei.manage.bean.EasyNews;
import com.zhiwei.manage.bean.News;

/**
 * 新闻
 * 
 * @author admin
 *
 */
public interface NewsService {

	/**
	 * 根据来源和type获取新闻数据
	 * 
	 * @param delayedCount
	 * @param type
	 * @param source
	 * @return
	 */
	public List<News> findByNew(int delayedCount, String type, String source);

	/**
	 * 根据来源和type获取新闻数据
	 * 
	 * @param filedCount
	 * @param type
	 * @param source
	 * @return
	 */
	public List<News> findByFiled(int filedCount, String type, String source);

	/**
	 * 根据采集主键获取新闻
	 * 
	 * @param spyId
	 * @param start
	 * @param end
	 * @return
	 */
	public int findCount(String spyId, Date start, Date end);

	/**
	 * 获取所有的来源
	 * 
	 * @return
	 */
	public List<Object> findAllSource();

	public int findCountBySource(String source, Date start, Date end);

	public List<EasyNews> findAllNews(Date start, Date end);

	public List<Map<String, Object>> findNews(String host, int port, String dbNamel, String collection, int count,
			String id, String pt);

}
