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.CmcStudyMapper;
import com.ruoyi.oa.domain.CmcStudy;
import com.ruoyi.oa.service.ICmcStudyService;

/**
 * 学习记录Service业务层处理
 * 
 * @author cmc
 * @date 2025-03-06
 */
@Service
public class CmcStudyServiceImpl implements ICmcStudyService 
{
    @Autowired
    private CmcStudyMapper cmcStudyMapper;

    /**
     * 查询学习记录
     * 
     * @param studyId 学习记录主键
     * @return 学习记录
     */
    @Override
    public CmcStudy selectCmcStudyByStudyId(Integer studyId)
    {
        return cmcStudyMapper.selectCmcStudyByStudyId(studyId);
    }

    /**
     * 查询学习记录列表
     * 
     * @param cmcStudy 学习记录
     * @return 学习记录
     */
    @Override
    public List<CmcStudy> selectCmcStudyList(CmcStudy cmcStudy)
    {
        return cmcStudyMapper.selectCmcStudyList(cmcStudy);
    }

    /**
     * 查询学习记录统计
     *
     * @param cmcStudy 学习记录
     * @return 学习记录
     */
    @Override
    public List<CmcStudy> selectCmcStudyStatistic(CmcStudy cmcStudy)
    {
        return cmcStudyMapper.selectCmcStudyStatistic(cmcStudy);
    }

    /**
     * 新增学习记录
     * 
     * @param cmcStudy 学习记录
     * @return 结果
     */
    @Override
    public int insertCmcStudy(CmcStudy cmcStudy)
    {
        return cmcStudyMapper.insertCmcStudy(cmcStudy);
    }

    /**
     * 修改学习记录
     * 
     * @param cmcStudy 学习记录
     * @return 结果
     */
    @Override
    public int updateCmcStudy(CmcStudy cmcStudy)
    {
        return cmcStudyMapper.updateCmcStudy(cmcStudy);
    }

    /**
     * 批量删除学习记录
     * 
     * @param studyIds 需要删除的学习记录主键
     * @return 结果
     */
    @Override
    public int deleteCmcStudyByStudyIds(Integer[] studyIds)
    {
        return cmcStudyMapper.deleteCmcStudyByStudyIds(studyIds);
    }

    /**
     * 删除学习记录信息
     * 
     * @param studyId 学习记录主键
     * @return 结果
     */
    @Override
    public int deleteCmcStudyByStudyId(Integer studyId)
    {
        return cmcStudyMapper.deleteCmcStudyByStudyId(studyId);
    }
}
