package com.yihu.wlyy.repository.doctor;

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

import java.util.List;

/**
 * Created by Reece on 2017/3/10.
 */
public interface SurveyTemplateQuestionsDao extends PagingAndSortingRepository<SurveyTemplateQuestions, Long> {
    @Query("select  t from SurveyTemplateQuestions t where t.templateCode = ?1 ")
    List<SurveyTemplateQuestions> findById(String tempCode);

    @Query("select  t from SurveyTemplateQuestions t where t.templateCode = ?1 and t.code = ?2 ")
    SurveyTemplateQuestions findById(String tempCode,String qstCode);
}
