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

import com.yihu.jw.entity.hospital.message.BaseBannerDO;
import com.yihu.jw.entity.hospital.message.SystemMessageDO;
import org.hibernate.annotations.SQLInsert;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.PagingAndSortingRepository;

import java.util.List;
import java.util.Map;

/**
 * @author wangzhinan
 * @vsrsion 2.0
 * Created at 2020.07.08
 */
public interface BaseBannerDao extends PagingAndSortingRepository<BaseBannerDO, String>, JpaSpecificationExecutor<BaseBannerDO> {

    @Query( value = "select max(t.is_sort) AS \"zuida\" from base_banner t",nativeQuery = true)
    Integer getMaxSort();
    @Query( value = "select min(t.is_sort) AS \"zuixiao\" from base_banner t",nativeQuery = true)
    Integer getMinSort();


}
