package com.ruoyi.system.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.NewsMapper;
import com.ruoyi.system.domain.News;
import com.ruoyi.system.service.INewsService;

@Service
public class NewsServiceImpl implements INewsService
{
    @Autowired
    private NewsMapper newsMapper;

    @Override
    public News selectNewsById(Long newsId)
    {
        return newsMapper.selectNewsById(newsId);
    }

    @Override
    public List<News> selectNewsList(News news)
    {
        return newsMapper.selectNewsList(news);
    }

    @Override
    public int insertNews(News news)
    {
        return newsMapper.insertNews(news);
    }

    @Override
    public int updateNews(News news)
    {
        return newsMapper.updateNews(news);
    }

    @Override
    public int deleteNewsById(Long newsId)
    {
        return newsMapper.deleteNewsById(newsId);
    }

    @Override
    public int deleteNewsByIds(Long[] newsIds)
    {
        return newsMapper.deleteNewsByIds(newsIds);
    }
}
