package com.ssj.dao.sys.lyh.dao;

import com.ssj.bean.sys.lyh.domain.TbYbDetail;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.jpa.domain.Specification;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public interface IYbDetailDao extends JpaRepository<TbYbDetail, String> {

	Page<TbYbDetail> findAll(Specification<TbYbDetail> specification, Pageable initPage);

	@Query(nativeQuery = true, value = "select * from TbYbDetail limit ?1,?2" )
	List<TbYbDetail> pageFind(int i, int pageSize);

}
