package com.ssj.service.weixin.order.service;

import com.ssj.bean.weixin.order.domain.OrderDetails;
import com.ssj.framework.core.common.service.BaseService;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;

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


public interface OrderDetailsService extends BaseService<OrderDetails, String>{
	
	//昨日借阅图书数量
	List<Map<String, Object>> countOrderDetailsNum();
	
	//昨日销售订单收益
	List<Map<String, Object>> countOrderDetailsPriceByDay();
	
	//累计收益
	List<Map<String, Object>> countOrderDetailsPriceByCount();
	
	//会员借阅图书排行 TOP 10
	List<Map<String, Object>> countOrderDetailsByTop(String libId);
	
	//会员(孩子姓名)借阅本书排行总排行
	List<Map<String, Object>> countOrderDetailsByUser(String libId);
	
	//会员(孩子姓名)借阅本书排行30天
	List<Map<String, Object>> countOrderDetailsByDayUser(String libId);
	
	//图书馆的总vip总卡数
	Integer signSubscribCount(String libId);
	
	//图书馆的总vip卡数
	Integer signSubscribCounter(String libId,Integer day,String compare);
	
	Integer signSubscribByDayCounter(String libId,Date selectDate,Integer type);
	
	Integer signSubscribByMonthCounter(String libId,Date selectDate,Integer type);
	
	Integer signSubscribByActiveCounter(String libId,Date selectDate);
	
	//近天处于有书籍借阅状态，有到馆离馆记录  : 1
	//近天无到馆记录，但以往有签到记录      :  2
	//近天无任何使用记录   :  3
	List<Map<String, Object>> countActivityByDayUser(String libId,String startDate, String endDate,String type);
	
	
	//我的阅读成长记录
	List<Map<String, Object>> queryWeekGrOrderDetails(String userId);
	
	//推荐书的明细
	List<Map<String, Object>> queryOrderDetailsByIsbn(String isbn13);
	
	//本书的借阅量
	Integer countOrderDetailsByIsbn(String isbn13);
	
	//热度借阅
	Page<Map<String, Object>> findHotOrderDetailsPage(Map<String, Object> searchParams, Pageable pageable);
	
	//新书推荐
	Page<Map<String, Object>> findNewOrderDetailsPage(Map<String, Object> searchParams, Pageable pageable);
	
	Page<Map<String, Object>> findSearchBooksPage(Map<String, Object> searchParams, Pageable pageable);

	List<Map<String, Object>> findLibIdByUserId(String userId);

	OrderDetails findbyBookDetailId(String bookDetailid);
}
