package com.ssj.dao.weixin.library.dao;

import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;

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

public interface ISubscribeQueryDao {

	//预约，签到，签离，列表查询
	Page<Map<String, Object>> findByPage(Map<String, Object> searchParams, Pageable pageable);
	
	//图书馆下的所有有效的会员列表查询
    Page<Map<String, Object>> findLibByVipPage(Map<String, Object> searchParams, Pageable pageable);
	
    Page<Map<String, Object>> findLibByRykeAndLeavePage(Map<String, Object> searchParams, Pageable pageable);
    
    Page<Map<String, Object>> findByConfirmPage(Map<String, Object> searchParams, Pageable pageable);
    
    List<Map<String, Object>> findByRykeList(String libId,String date);
    
	List<Map<String, Object>> querySalesUserCounter(String orgCode);
	
	Integer queryTyperCounter(String orgCode,String type);
	
	Integer queryPriceTypeCounter(String orgCode,String priceType);
	
	/**
	 * 以下周报统计
	 */
	Map<String, Object> countWeeklyRead(String vipId,String startTime,String endTime);
	
	Map<String,Object> queryRankingByVip(String vipId,String startTime,String endTime);
	
	List<Map<String,Object>> queryCompanionByVip(String vipId,String startTime,String endTime);
	
	Map<String, Object> queryBookTagByVip(String vipId,String startTime,String endTime);
	
	List<Map<String,Object>> queryBorrowByVip(String startTime,String endTime);
	
	Map<String,Object> queryEffectiveByVip(String vipId);
	
	Long countBorrowByVip(String vipId,String startTime,String endTime);
	
	List<Map<String,Object>> countLivelyByVip(String vipId,String startTime,String endTime);
	
	Long countSubscribeByVip(String vipId,String startTime,String endTime);

	Map<String, Object> findComeLibInfo(String vipId);

	Map<String, Object> findWeekReadInfo(String vipId);

	Map<String, Object> findworkInfo(String vipId,String libId);

	Map<String, Object> findWorkSug(String pushId);

	/**
	 * 查询当月学生的到馆次数和最后一次到馆时间
	 * @param vipId
	 * @param beginTime
	 * @param endTime
	 * @return
	 */
	Map<String, Object> findTheMonthCountAndTime (String vipId, String beginTime, String endTime);

	/**
	 * @param string 
	 * 
	 * @Title: pushBorrowTask
	 * @Description: 查询上月会员借阅数达到10本的
	 * @param @param libId
	 * @param @return    设定文件
	 * @return List<Map<String,Object>>    返回类型
	 * @author shenhao
	 * @date 2018年8月16日 上午10:16:40
	 * @throws
	 */
	List<Map<String, Object>> pushBorrowTask(String libId, String lastMonth);

    /**
     * 分页查询今日已签到的学生的vipId
     */
	Page<String> findVipIdPageSignedTodayByLibId(HashMap<String, Object> params, Pageable pageable);
}
