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

import com.yihu.jw.entity.hospital.suggest.BaseSuggestionDO;
import com.yihu.jw.entity.hospital.suggest.BaseSuggestionDictDO;
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 BaseSuggestionDictDao extends PagingAndSortingRepository<BaseSuggestionDictDO, String>, JpaSpecificationExecutor<BaseSuggestionDictDO> {
    @Query( value = "select max(t.is_sort) AS \"zuida\" from base_suggestions_dict t",nativeQuery = true)
    Integer getMaxSort();
    @Query( value = "select min(t.is_sort) AS \"zuixiao\" from base_suggestions_dict t",nativeQuery = true)
    Integer getMinSort();
}
