package com.yihu.jw.hospital.prescription.dao;

import com.yihu.jw.entity.base.words.BaseSensitiveDO;
import org.checkerframework.framework.qual.RequiresQualifier;
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 HZY
 * @vsrsion 1.0
 * Created at 2020/7/6
 */
public interface BaseSensitiveDao extends PagingAndSortingRepository<BaseSensitiveDO, String>, JpaSpecificationExecutor<BaseSensitiveDO> {

    BaseSensitiveDO findBySensitiveWord(String sensitive);
    @Query(value = "select * from base_sensitive p where p.status = 1 ",nativeQuery = true)
    List<BaseSensitiveDO> getSensitiveWords();
}
