package com.yihu.wlyy.repository.doctor;

import com.yihu.wlyy.entity.doctor.survey.SurveyQuestions;
import org.springframework.data.domain.Pageable;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.PagingAndSortingRepository;

import java.util.List;

/**
 * Created by Reece on 2017/3/9.
 */
public interface SurveyQuestionsDao extends PagingAndSortingRepository<SurveyQuestions, Long> {
    @Query("select  t from SurveyQuestions t where t.title like ?1 and t.del= 1 ")
    List<SurveyQuestions> findByTitle(String title, Pageable request);

    @Query("select  t from SurveyQuestions t where t.del = 1 ")
    List<SurveyQuestions> findByTitle(Pageable request);
}
