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

import com.ssj.bean.weixin.libmy.domain.TbLibJoin;
import com.ssj.bean.weixin.libmy.domain.TbLibManager;
import com.ssj.bean.weixin.libmy.domain.TbLibSubscribe;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;

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


public interface ILibJoinQueryDao {

	 Page<Map<String, Object>> findForPage(Map<String, Object> searchParams, Pageable pageable);
	 
	 Page<Map<String, Object>> findForVIPPage(Map<String, Object> searchParams, Pageable pageable);
	
	 Page<Map<String, Object>> findBookDetailForPage(Map<String, Object> searchParams, Pageable pageable);
	
	 public void insertTbLibManager(List<TbLibManager> list);
	
	 List<Map<String, Object>> getAllSchoolMap(Map<String, Object> params);
	
	 Page<Map<String, Object>> findForPageList(Map<String, Object> searchParams, Pageable pageable);
	 
	 List<Map<String, Object>> getLibVipList(Map<String, Object> searchParams);
	 
	 Page<Map<String, Object>> findForBasePageList(Map<String, Object> params, Pageable initPage);
	 
	 public List<Map<String, Object>> getLocationJoin(String league_lat, String league_lng,Integer type);
	 
	  public List<Map<String, Object>> getPositionArea(String league_lat, String league_lng,Integer type,String schoolName);
	 
	 public Page<Map<String, Object>>  getLocationArea(Map<String, Object> searchParams, Pageable pageable);
	 public Page<Map<String, Object>>  getLocationJoin(Map<String, Object> searchParams, Pageable pageable);
	 public Page<Map<String, Object>>  getLocationJoinService(Map<String, Object> searchParams, Pageable pageable);
	 
	 public List<Map<String, Object>> getNoLocationJoin(Integer type);
	 public Page<Map<String, Object>> growthRecordList(Map<String, Object> params, Pageable pageable);
	 
	
	 List<Map<String, Object>> countLibVipNum();
	
	 List<Map<String, Object>> countLibSubscribeNum();

	 
	 Map<String, Object> findSubCount(String libId, TbLibSubscribe subsccribe);
	 
	 Map<String, Object> findInAndBorrow(String vipId);
	 
	 Map<String, Object> findOneManager(String libId);
	 
	List<Map<String, Object>> countCurOpenCard(boolean iscount);

	Map<String, Object> getUserCountByLib(String libId);

	List<Map<String, Object>> get2LibUser(String libId, String type);

	List<Map<String, Object>> findManageList(String libId);
	public List<Map<String, Object>> findManageUserList(String userId);

	List<Map<String, Object>> findSaleList(String libId);

	Map<String, Object> getLibUserInfo(String userId, String libId);

	Page<Map<String, Object>> vipUserList(Map<String, Object> params, Pageable pageable);

	Map<String, Object> getSaleUserInfo(String userId, String libId);

	Page<Map<String, Object>> vipList(Map<String, Object> params, Pageable pageable);

	List<Map<String, Object>> findLibUserList(Map<String, Object> params);

	List<Map<String, Object>> findVipUserList(Map<String, Object> params);

	List<Map<String, Object>> searchAddUser(Map<String, Object> params);
	
	List<Map<String, Object>> searchAddUserList(Map<String, Object> params);

	List<Map<String, Object>> pushNotice(String libId);

	List<Map<String, Object>> findRecommendBook(int grTotal,int pageSize);

	List<Map<String, Object>> getJoinAll(int i);

	List<Map<String, Object>> getNearJoin(String league_lat, String league_lng, int i);

	List<Map<String, Object>> findManageOpenidList(String libId, int type);

	List<Map<String, Object>> findAnything(String libId, int type);
	
    List<Map<String, Object>> getTopAndLibId(int topSize);  
    List<Map<String, Object>> getdefaultBookAndLibId(String libId,String [] isbn,String searchContent,String vipId,int type);
    List<Map<String, Object>> getdefaultBookAndLibId(String libId,String bookName);
    List<Map<String, Object>> getdefaultBookAndLibId(String [] isbn,String searchContent,String vipId);
    List<Map<String, Object>> alreadyBookAndLibId(String libId,String vipId);
    List<Map<String,Object>> getServiceVip(String userId,String libId,String species);
    List<Map<String,Object>> getServiceVip(String userId,String species);
	Map<String, Object> getIsbnBorrowInfo(String isbn13);
	List<TbLibJoin> findByLikeNameAndCity(String name, String province, String city, String area,Integer pageNo,Integer pageSize);
	Long countByLikeNameAndCity(String name, String province, String city, String area);
}
