package com.fs.his.service.impl;

import java.util.Collections;
import java.util.List;

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

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

    /**
     * 查询文章分类
     *
     * @param cateId 文章分类主键
     * @return 文章分类
     */
    @Override
    public FsArticleCate selectFsArticleCateByCateId(Long cateId)
    {
        return fsArticleCateMapper.selectFsArticleCateByCateId(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 需要删除的文章分类主键
     * @return 结果
     */
    @Override
    public int deleteFsArticleCateByCateIds(Long[] cateIds)
    {
        return fsArticleCateMapper.deleteFsArticleCateByCateIds(cateIds);
    }

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

    @Override
    public List<OptionsVO> selectFsArticleCateAllList() {
        return fsArticleCateMapper.selectFsArticleCateAllList();
    }

    @Override
    public List<FsArticleCate> selectFsArticleCateAllListVO() {

       return fsArticleCateMapper.selectFsArticleCateAllListVO();
    }
}
