package com.zhiwei.manage.dao;

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

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

public interface DataDao {

	public void insert(Data data);

	public List<Data> findByPt(Date startTime, Date endTime, String pt);

	public List<Data> findBySource(Date startTime, Date endTime, String source);

	public List<Data> findBytempName(Date startTime, Date endTime, String tempName);
	
	public List<Data> findByMethod(Date startTime,Date endTime,String method,Object value);
	
	public int findBySourceFromLibrary(Date startTime, Date endTime, String source);
	
	public int findBySpId(Date startTime, Date endTime, String syId);
	/**
	 * 根据数据来源来搜索数据
	 * @param startTime
	 * @param endTime
	 * @param source
	 * @return List
	 */
	public List<EasyNews> findByAccurateSource(String startTime, String endTime, String source);
	
	public int findByAccurateType(Date startTime, Date endTime, String type);
	
	/**
	 * 根据可视化模板的id去搜索数据
	 * @param startTime
	 * @param endTime
	 * @param SpId
	 * @return List
	 */
	public List<EasyNews> findByAccurateSpId(String startTime, String endTime, String SpId);
	
	public List<String> findSourceByLikeParam(String param);
	
	public List<String> findTmpNameByLikeParam(String param); 
	
	public List<String> findTypeByLikeParam(String param);
	
	public long finCountByDayData(Date startTime,Date endTime,Template temp);

	public long finCountByDayData(Date startTime,Date endTime,String pt);
}
