package com.ruoyi.oa.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.oa.mapper.CmcResourceMapper;
import com.ruoyi.oa.domain.CmcResource;
import com.ruoyi.oa.service.ICmcResourceService;

/**
 * 学习资料Service业务层处理
 * 
 * @author cmc
 * @date 2025-03-05
 */
@Service
public class CmcResourceServiceImpl implements ICmcResourceService 
{
    @Autowired
    private CmcResourceMapper cmcResourceMapper;

    /**
     * 查询学习资料
     * 
     * @param resourceId 学习资料主键
     * @return 学习资料
     */
    @Override
    public CmcResource selectCmcResourceByResourceId(Integer resourceId)
    {
        return cmcResourceMapper.selectCmcResourceByResourceId(resourceId);
    }

    /**
     * 查询学习资料
     *
     * @param cmcResource 学习资料
     * @return 学习资料
     */
    @Override
    public List<CmcResource> selectCmcResourceListBelow(CmcResource cmcResource)
    {
        return cmcResourceMapper.selectCmcResourceListBelow(cmcResource);
    }

    /**
     * 查询学习资料列表
     * 
     * @param cmcResource 学习资料
     * @return 学习资料
     */
    @Override
    public List<CmcResource> selectCmcResourceList(CmcResource cmcResource)
    {
        return cmcResourceMapper.selectCmcResourceList(cmcResource);
    }

    /**
     * 新增学习资料
     * 
     * @param cmcResource 学习资料
     * @return 结果
     */
    @Override
    public int insertCmcResource(CmcResource cmcResource)
    {
        return cmcResourceMapper.insertCmcResource(cmcResource);
    }

    /**
     * 修改学习资料
     * 
     * @param cmcResource 学习资料
     * @return 结果
     */
    @Override
    public int updateCmcResource(CmcResource cmcResource)
    {
        return cmcResourceMapper.updateCmcResource(cmcResource);
    }

    /**
     * 批量删除学习资料
     * 
     * @param resourceIds 需要删除的学习资料主键
     * @return 结果
     */
    @Override
    public int deleteCmcResourceByResourceIds(Integer[] resourceIds)
    {
        return cmcResourceMapper.deleteCmcResourceByResourceIds(resourceIds);
    }

    /**
     * 删除学习资料信息
     * 
     * @param resourceId 学习资料主键
     * @return 结果
     */
    @Override
    public int deleteCmcResourceByResourceId(Integer resourceId)
    {
        return cmcResourceMapper.deleteCmcResourceByResourceId(resourceId);
    }
}
