package com.cirle.scientific.dao;

import com.cirle.scientific.po.QkjCertificatePhysicians;
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 QkjCertificatePhysiciansDao extends PagingAndSortingRepository<QkjCertificatePhysicians, Long>, JpaSpecificationExecutor<QkjCertificatePhysicians> {

    @Query(value = "select  * from  qkj_certificate_physicians where mem_card = ?1", nativeQuery = true)
    QkjCertificatePhysicians findByMemCard(String memCard);

    @Query(value = "select  professional_two from  qkj_certificate_physicians where mem_card = ?1", nativeQuery = true)
    Integer findByMemCardA(String memCard);

    @Query(value = "select  * from  qkj_certificate_physicians where mem_card = ?1", nativeQuery = true)
    List<QkjCertificatePhysicians> check(String businessLicense);

    QkjCertificatePhysicians findByNum(String num);

}
