package com.yihu.jw.hospital.doctor.dao;

import com.yihu.jw.entity.base.doctor.BaseDoctorBackgroundDO;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.PagingAndSortingRepository;

import java.util.List;

/**
 *
 */
public interface BaseDoctorBackgroundDao extends PagingAndSortingRepository<BaseDoctorBackgroundDO, String>, JpaSpecificationExecutor<BaseDoctorBackgroundDO> {
    @Query(value = "select * from base_doctor_background t where t,doctor = ?1 ",nativeQuery = true)
    List<BaseDoctorBackgroundDO> getBackroundByDoctor(String doctor);

    @Query(value = "select * from base_doctor_background t limit ?1,?2",nativeQuery = true)
    List<BaseDoctorBackgroundDO> getBackroundAll(Integer page,Integer pageSize);
}
