package com.yc.education.mapper;

import com.yc.education.model.News;
import com.yc.education.util.MyMapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface NewsMapper extends MyMapper<News> {
    /*查询所有*/
    List<News> getNews(@Param("titleName") String titleName, @Param("startTime") String startTime,@Param("endTime") String endTime);

    /*查询单条*/
    News getNewsById(Integer id);



    /*前端默认查询最高值*/
    News selNewsId();

    /*前端无条件查询*/
    List<News> selNews();

    /*根据已知id查询上一页*/
    News selNewsSize(Integer id);

    /*根据已知id查询下一页*/
    News selNewsNum(Integer id);
}