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

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


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

    @Query(value = "select * from qkj_examination_app where obj_type = ?1 and obj_id = ?2 and status = 0 ", nativeQuery = true)
    List<QkjExaminationApp> selectExIdByTypeAndObjId(Integer type, Integer objId);

}
