package com.fs.hisStore.service.impl;

import com.fs.hisStore.domain.FsHomeArticleCategoryScrm;
import com.fs.hisStore.mapper.FsHomeArticleCategoryScrmMapper;
import com.fs.hisStore.param.home.HomeArticleCategoryPageParam;
import com.fs.hisStore.service.IFsHomeArticleCategoryScrmService;
import com.fs.hisStore.vo.home.HomeArticleCategoryListVO;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 期刊分类Service业务层处理
 *
 * @author fs
 * @date 2025-05-21
 */
@Service
public class FsHomeArticleCategoryScrmServiceImpl implements IFsHomeArticleCategoryScrmService
{
    @Autowired
    private FsHomeArticleCategoryScrmMapper fsHomeArticleCategoryMapper;

    /**
     * 查询期刊分类
     *
     * @param categoryId 期刊分类ID
     * @return 期刊分类
     */
    @Override
    public FsHomeArticleCategoryScrm selectFsHomeArticleCategoryById(Long categoryId)
    {
        return fsHomeArticleCategoryMapper.selectFsHomeArticleCategoryById(categoryId);
    }

    /**
     * 查询期刊分类列表
     *
     * @param fsHomeArticleCategory 期刊分类
     * @return 期刊分类
     */
    @Override
    public List<FsHomeArticleCategoryScrm> selectFsHomeArticleCategoryList(FsHomeArticleCategoryScrm fsHomeArticleCategory)
    {
        return fsHomeArticleCategoryMapper.selectFsHomeArticleCategoryList(fsHomeArticleCategory);
    }

    /**
     * 新增期刊分类
     *
     * @param fsHomeArticleCategory 期刊分类
     * @return 结果
     */
    @Override
    public int insertFsHomeArticleCategory(FsHomeArticleCategoryScrm fsHomeArticleCategory)
    {
        return fsHomeArticleCategoryMapper.insertFsHomeArticleCategory(fsHomeArticleCategory);
    }

    /**
     * 修改期刊分类
     *
     * @param fsHomeArticleCategory 期刊分类
     * @return 结果
     */
    @Override
    public int updateFsHomeArticleCategory(FsHomeArticleCategoryScrm fsHomeArticleCategory)
    {
        return fsHomeArticleCategoryMapper.updateFsHomeArticleCategory(fsHomeArticleCategory);
    }

    /**
     * 批量删除期刊分类
     *
     * @param categoryIds 需要删除的期刊分类ID
     * @return 结果
     */
    @Override
    public int deleteFsHomeArticleCategoryByIds(Long[] categoryIds)
    {
        return fsHomeArticleCategoryMapper.deleteFsHomeArticleCategoryByIds(categoryIds);
    }

    /**
     * 删除期刊分类信息
     *
     * @param categoryId 期刊分类ID
     * @return 结果
     */
    @Override
    public int deleteFsHomeArticleCategoryById(Long categoryId)
    {
        return fsHomeArticleCategoryMapper.deleteFsHomeArticleCategoryById(categoryId);
    }

    @Override
    public List<HomeArticleCategoryListVO> selectHomeArticleCategoryPageList(HomeArticleCategoryPageParam param) {
        return fsHomeArticleCategoryMapper.selectHomeArticleCategoryPageList(param);
    }
}
