package com.ssj.service.weixin.library.service;

import com.ssj.bean.weixin.libmy.domain.LibUserHistory;
import com.ssj.framework.core.common.service.BaseService;
import com.ssj.framework.core.util.ResponseEntity;
import com.ssj.service.reading.in.BookBackInDto;
import com.ssj.service.reading.in.VipSignSaveInDto;
import com.ssj.service.reading.out.*;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;

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

public interface LibUserHistoryService extends BaseService<LibUserHistory, String> {
	/**
	 * 
	* 创建人:zhanglin
	* @param @param searchParams
	* @param @param pageable
	* @param @return       
	* 方法说明：图书借阅记录
	 * @date 2017年6月20日 下午3:53:43
	 */
	 Page<Map<String, Object>> findForPage(Map<String, Object> searchParams, Pageable pageable);
	 /**
	  * 
	 * 创建人:zhanglin
	 * @param @param searchParams
	 * @param @param pageable
	 * @param @return       
	 * 方法说明：签到签离
	  * @date 2017年6月27日 下午6:04:14
	  */
	 Page<Map<String, Object>> findForQGPage(Map<String, Object> searchParams, Pageable pageable);
	 /**
	  * 
	 * 创建人:zhanglin
	 * @param @param searchParams
	 * @param @param pageable
	 * @param @return       
	 * 方法说明：月度签到签离
	  * @date 2017年6月28日 下午5:32:57
	  */
	 Page<Map<String, Object>> findForYDPage(Map<String, Object> searchParams, Pageable pageable);
	 
	 List<Map<String, Object>> getLibQGList(Map<String, Object> searchParams);
	 
	 List<Map<String, Object>> getLibYDList(Map<String, Object> searchParams);
	 
	 

	List<Map<String, Object>> findRechargeInfo(String id);
	/**
	 * 
	* 创建人:zhanglin
	* @param @param searchParams
	* @param @param pageable
	* @param @return       
	* 方法说明：pc端一键签到
	 * @date 2017年10月25日 下午2:43:16
	 */
	Page<Map<String, Object>> findCheckPage(Map<String, Object> searchParams, Pageable pageable);
	/**
	 * 
	* 创建人:zhanglin
	* @param @param searchParams
	* @param @param pageable
	* @param @return       
	* 方法说明：pc端一键签离
	 * @date 2017年10月26日 上午10:56:09
	 */
	Page<Map<String, Object>> findCheckOutPage(Map<String, Object> searchParams, Pageable pageable);
	/*
	 * 查询isbn这本书有借阅多少次,根据会员总数计算百分比。》5%三星，》2% 2颗星 >1% 1颗星
	 */
	int findUserHistoryIsbn(String isbn13,Integer serviceCount);
	String findUserHistoryChildTheme(String childTheme,Integer serviceCount);

    int findUserIsbnHeat(String isbn13);

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

	ResponseEntity signSubmit(VipSignSaveInDto req,String userId);

	VipSignDayOutDto dayCount(Map<String, String> params);

	VipSignMonthOutDto monthCount(Map<String, String> params);

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

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

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

	List<LibBookLableOutDto> findThemeInfo(Map<String, Object> params);

	List<LibBookGradeOutDto> findGradeInfo(Map<String, Object> params);

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

	List<VipBorrowOutDto> findBorrowDetailList(String infoId, String dateStr, String isClose, String libId);

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

	int findTotayAdd(String libId);

	List<VipServiceOutDto> findVipLibServiceList(Map<String, Object> params);

	VipManagerOutDto vipDetailInfo(Map<String, Object> params);

	List<VipSignDayDetailOutDto> vipSignInfoList(Map<String, Object> params);


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

	List<ManagerOutDto> findUserList(Map<String, Object> params);

	Map<String, Object> findBorrowInfo(Map<String, Object> params);

    ResponseEntity callBookBack(String libId);

    void confirmBackBorrow(BookBackInDto req);

	List<BookBackOutDto> findBackdList(List<String> bookDetailsId);
}
