package com.goldenwater.slgc.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.goldenwater.slgc.domain.CmsArticle;
import com.goldenwater.slgc.mapper.CmsArticleMapper;
import com.goldenwater.slgc.service.CmsArticleService;

/** 内容文章 业务实现 */
@Service
public class CmsArticleServiceImpl implements CmsArticleService {
    @Autowired
    private CmsArticleMapper cmsArticleMapper;

    @Override
    public List<CmsArticle> selectCmsArticleList(CmsArticle cmsArticle) {
        return cmsArticleMapper.selectCmsArticleList(cmsArticle);
    }

    @Override
    public CmsArticle selectCmsArticleById(String aid) {
        return cmsArticleMapper.selectCmsArticleById(aid);
    }

    @Override
    public int deleteCmsArticleByIds(String[] aids) {
        return cmsArticleMapper.deleteCmsArticleByIds(aids);
    }

    @Override
    public int insertCmsArticle(CmsArticle cmsArticle) {
        return cmsArticleMapper.insertCmsArticle(cmsArticle);
    }

    @Override
    public int updateCmsArticle(CmsArticle cmsArticle) {
        return cmsArticleMapper.updateCmsArticle(cmsArticle);
    }

    @Override
    @org.springframework.transaction.annotation.Transactional
    public int batchInsert(List<CmsArticle> list) {
        return cmsArticleMapper.batchInsert(list);
    }

    @Override
    @org.springframework.transaction.annotation.Transactional
    public int batchUpdate(List<CmsArticle> list) {
        return cmsArticleMapper.batchUpdate(list);
    }

    @Override
    public int selectTodayPublishedCount() {
        return cmsArticleMapper.selectTodayPublishedCount();
    }
}
