package com.ssj.service.weixin.admin.service.impl;

import com.ssj.bean.weixin.libmy.domain.TbLibSubscribe;
import com.ssj.dao.weixin.admin.dao.BorrowingDao;
import com.ssj.dao.weixin.admin.dao.BorrowingQueryDao;
import com.ssj.framework.core.common.service.BaseServiceImpl;
import com.ssj.service.weixin.admin.service.BorrowingService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.repository.PagingAndSortingRepository;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

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

@Service
@Transactional
public class BorrowingServiceImpl extends BaseServiceImpl<TbLibSubscribe, String> implements BorrowingService{

	@Autowired
	private BorrowingDao  borrowingDao;
    @Autowired
    private BorrowingQueryDao  borrowingQueryDao;
	@Override
	public Page<Map<String, Object>> findForPage(
			Map<String, Object> searchParams, Pageable pageable) {
		return borrowingQueryDao.findForPage(searchParams, pageable);
	}


	@Override
	public PagingAndSortingRepository<TbLibSubscribe, String> getDao() {
		return borrowingDao;
	}


	


	@Override
	public Map<String, Object> getTodayData(String libId) {
		return borrowingQueryDao.getTodayData(libId);
	}


	@Override
	public Page<Map<String, Object>>  findForEventReminderPage(
			Map<String, Object> searchParams, Pageable pageable) {
		return borrowingQueryDao. findForEventReminderPage(searchParams, pageable);
	}


	@Override
	public List<Map<String, Object>> findForEventReminder(String libId) {
		
		return borrowingQueryDao.findForEventReminder(libId);
	}


	


	

}
