package com.iamberry.wechat.service.news.dao.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Repository;

import com.iamberry.wechat.core.entity.news.News;
import com.iamberry.wechat.service.mapper.NewsMapper;
import com.iamberry.wechat.service.news.dao.NewsDao;

@Repository
public class NewsDaoImpl implements NewsDao {

	@Autowired
	private NewsMapper newsMapper;

	@Override
	public List<News> listAll() {
		// TODO Auto-generated method stub
		return newsMapper.listAll();
	}

	@Override
	public Integer addNews(News news) {
		// TODO Auto-generated method stub
		return newsMapper.addNews(news);
	}

	public News getOne(Integer id) {
		// TODO Auto-generated method stub
		return newsMapper.getOne(id);
	}

	@Override
	public Integer updateOne(News news) {
		// TODO Auto-generated method stub
		return newsMapper.updateOne(news);
	}

	@Override
	public Integer updateAccess(Integer id) {
		// TODO Auto-generated method stub
		return newsMapper.updateAccess(id);
	}

	@Override
	public Integer updateShare(Integer id) {
		// TODO Auto-generated method stub
		return newsMapper.updateShare(id);
	}
	
}
