package com.bootdo.blog.service.impl;

import com.bootdo.portal.vo.IndexCarouselVO;
import com.bootdo.portal.vo.NameAndCountVO;
import com.bootdo.portal.vo.PoliciesAndRegulationsVO;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

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

import com.bootdo.blog.dao.ContentDao;
import com.bootdo.blog.domain.ContentDO;
import com.bootdo.blog.service.ContentService;



@Service
public class ContentServiceImpl implements ContentService {
	@Autowired
	private ContentDao bContentMapper;
	
	@Override
	public ContentDO get(Long cid){
		return bContentMapper.get(cid);
	}
	
	@Override
	public List<ContentDO> list(Map<String, Object> map){
		return bContentMapper.list(map);
	}
	
	@Override
	public int count(Map<String, Object> map){
		return bContentMapper.count(map);
	}
	
	@Override
	public int save(ContentDO bContent){
		return bContentMapper.save(bContent);
	}
	
	@Override
	public int update(ContentDO bContent){
		return bContentMapper.update(bContent);
	}

    @Override
    public int remove(Long cid) {
        return bContentMapper.remove(cid);
    }

    @Override
    public int batchRemove(Long[] cids) {
        return bContentMapper.batchRemove(cids);
    }

    @Override
    public List<IndexCarouselVO> getCarousel() {

        return bContentMapper.getCarousel();
    }

    @Override
    public List<IndexCarouselVO> getArticleByTags(Integer position) {
        return bContentMapper.getArticleByTags(position);
    }

    @Override
    public List<NameAndCountVO> getPopularEnterprise() {
        return bContentMapper.getPopularEnterprise();
    }

    @Override
    public List<NameAndCountVO> getPopularIndustry() {
        return bContentMapper.getPopularIndustry();
    }

    @Override
    public List<PoliciesAndRegulationsVO> portalPoliciesRegulations(Map<String, Object> parameter) {
        return bContentMapper.portalPoliciesRegulations(parameter);
    }

    @Override
    public Long portalPoliciesRegulationsCount(Map<String, Object> parameter) {
        return bContentMapper.portalPoliciesRegulationsCount(parameter);
    }

}
