package com.yc.education.service.impl;

import com.github.pagehelper.PageHelper;
import com.yc.education.mapper.NewsMapper;
import com.yc.education.model.News;
import com.yc.education.service.NewsService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @author YaoShiHang
 * @Date 19:43 2018-04-12
 */
@Service
public class NewsServiceImpl extends BaseService<News>  implements NewsService {

    @Autowired
    private NewsMapper mapper;

    @Override
    public List<News> listAll(int page, int rows) {
        PageHelper.startPage(page, rows);
        return mapper.listAll();
    }
}
