package com.fs.store.service.impl;

import java.util.List;

import com.fs.store.vo.FsArticleCateListQueryVO;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.fs.store.mapper.FsArticleCateMapper;
import com.fs.store.domain.FsArticleCate;
import com.fs.store.service.IFsArticleCateService;

/**
 * 文章分类Service业务层处理
 * 
 * @author fs
 * @date 2022-03-25
 */
@Service
public class FsArticleCateServiceImpl implements IFsArticleCateService 
{
    @Autowired
    private FsArticleCateMapper fsArticleCateMapper;

    /**
     * 查询文章分类
     * 
     * @param cateId 文章分类ID
     * @return 文章分类
     */
    @Override
    public FsArticleCate selectFsArticleCateById(Long cateId)
    {
        return fsArticleCateMapper.selectFsArticleCateById(cateId);
    }

    /**
     * 查询文章分类列表
     * 
     * @param fsArticleCate 文章分类
     * @return 文章分类
     */
    @Override
    public List<FsArticleCate> selectFsArticleCateList(FsArticleCate fsArticleCate)
    {
        return fsArticleCateMapper.selectFsArticleCateList(fsArticleCate);
    }

    /**
     * 新增文章分类
     * 
     * @param fsArticleCate 文章分类
     * @return 结果
     */
    @Override
    public int insertFsArticleCate(FsArticleCate fsArticleCate)
    {
        return fsArticleCateMapper.insertFsArticleCate(fsArticleCate);
    }

    /**
     * 修改文章分类
     * 
     * @param fsArticleCate 文章分类
     * @return 结果
     */
    @Override
    public int updateFsArticleCate(FsArticleCate fsArticleCate)
    {
        return fsArticleCateMapper.updateFsArticleCate(fsArticleCate);
    }

    /**
     * 批量删除文章分类
     * 
     * @param cateIds 需要删除的文章分类ID
     * @return 结果
     */
    @Override
    public int deleteFsArticleCateByIds(Long[] cateIds)
    {
        return fsArticleCateMapper.deleteFsArticleCateByIds(cateIds);
    }

    /**
     * 删除文章分类信息
     * 
     * @param cateId 文章分类ID
     * @return 结果
     */
    @Override
    public int deleteFsArticleCateById(Long cateId)
    {
        return fsArticleCateMapper.deleteFsArticleCateById(cateId);
    }

    @Override
    public List<FsArticleCateListQueryVO> selectFsArticleCateListQuery() {
        return fsArticleCateMapper.selectFsArticleCateListQuery();
    }
}
