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

import com.ssj.bean.weixin.libmy.domain.TbLibBookBorrow;
import com.ssj.framework.core.common.service.BaseService;
import com.ssj.framework.core.util.ResponseEntity;
import com.ssj.service.reading.request.BookRecommendReq;
import com.ssj.service.reading.request.ConfirmLibReq;
import com.ssj.service.reading.request.DispatcherAuditReq;
import com.ssj.service.weixin.library.dto.out.BookScanViewOutDto;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;

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

/** 
 * @author  ZhangCaibao 
 * @version 2018年8月15日 下午4:30:36 
 * 类说明 
 */
public interface IBookBorrowService  extends BaseService<TbLibBookBorrow, String>{

	public void addBookBorrow(String libId,String userId,String vipId,String isbn13,Integer type);
	
	public TbLibBookBorrow findByLibIdAndVipIdAndIsbn13(String libId,String vipId,String isbn13,Integer type);
	/**
	 * 我的心愿单
	* @param params
	* @param pageable
	* @return
	* 创建人：ZhangCaibao 
	* 2018年8月17日 下午3:58:40 
	* @Page<Map<String,Object>>
	 */
	 public Page<Map<String, Object>> myWish(Map<String, Object> params, Pageable pageable);
	 public Page<Map<String, Object>> othersWish(Map<String, Object> params, Pageable pageable);
	 
	 public Map<String,Object>  wishDetails(String isbn13,String vipId, String libId);
	 
	 public List<Map<String,Object>> wishUserList(String isbn13,String vipId,String userId,String libId);

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

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

	public ResponseEntity confirmToLib(ConfirmLibReq req,int type,String userId);

	public TbLibBookBorrow findIsHelp(String userId, String isbn13, String vipId,String libId);

	public void orderOverTime();

	public Map<String, Object> findHelpTimes(String libId, String vipId, String isbn13);

	public Page<Map<String, Object>> findForPage(Map<String, Object> params, Pageable initPage);

	public List<Map<String, Object>> getExportData(Map<String, Object> searchParams);

	public Map<String, Object> bookRecommend(BookRecommendReq req, String string);

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

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

	public Map<String, Object> findLibCancelInfo(String libId);

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

	public Map<String, Object> cancelLibHeadInfo(String libId, int type);

	public ResponseEntity confirmRecovery(String libId, Integer type, String userId);

	public ResponseEntity cancelComfirm(String libId, String userId);

	public ResponseEntity dispatcherAudit(DispatcherAuditReq req);

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

    BookScanViewOutDto findScanForBookDetail(String detailId);
}
