package com.cirle.scientific.dao;/*
 *24901
 *2022/12/22
 *8:55
 */

import com.cirle.scientific.po.QkjExaminationApp;
import com.cirle.scientific.po.QkjExamineRecordApp;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.PagingAndSortingRepository;

import java.util.List;

/**
 * @author 24901
 */
public interface QkjExamineRecordAppDao extends PagingAndSortingRepository<QkjExamineRecordApp, Long>, JpaSpecificationExecutor<QkjExamineRecordApp> {


    @Query(value = "select * from qkj_examine_record_app where type = ?1 ", nativeQuery = true)
    List<QkjExamineRecordApp> getByType(Integer type);

    @Query(value = "select * from qkj_examine_record_app where mem_card = ?1 and  type = ?2 ", nativeQuery = true)
    QkjExamineRecordApp getByMemCard(String memCard, Integer type);

}
