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.CmcTrainMapper;
import com.ruoyi.oa.domain.CmcTrain;
import com.ruoyi.oa.service.ICmcTrainService;

/**
 * 培训记录Service业务层处理
 * 
 * @author cmc
 * @date 2024-09-25
 */
@Service
public class CmcTrainServiceImpl implements ICmcTrainService 
{
    @Autowired
    private CmcTrainMapper cmcTrainMapper;

    /**
     * 查询培训记录
     * 
     * @param trainId 培训记录主键
     * @return 培训记录
     */
    @Override
    public CmcTrain selectCmcTrainByTrainId(Integer trainId)
    {
        return cmcTrainMapper.selectCmcTrainByTrainId(trainId);
    }

    /**
     * 查询培训记录列表
     * 
     * @param cmcTrain 培训记录
     * @return 培训记录
     */
    @Override
    public List<CmcTrain> selectCmcTrainList(CmcTrain cmcTrain)
    {
        return cmcTrainMapper.selectCmcTrainList(cmcTrain);
    }

    /**
     * 新增培训记录
     * 
     * @param cmcTrain 培训记录
     * @return 结果
     */
    @Override
    public int insertCmcTrain(CmcTrain cmcTrain)
    {
        return cmcTrainMapper.insertCmcTrain(cmcTrain);
    }

    /**
     * 修改培训记录
     * 
     * @param cmcTrain 培训记录
     * @return 结果
     */
    @Override
    public int updateCmcTrain(CmcTrain cmcTrain)
    {
        return cmcTrainMapper.updateCmcTrain(cmcTrain);
    }

    /**
     * 批量删除培训记录
     * 
     * @param trainIds 需要删除的培训记录主键
     * @return 结果
     */
    @Override
    public int deleteCmcTrainByTrainIds(Integer[] trainIds)
    {
        return cmcTrainMapper.deleteCmcTrainByTrainIds(trainIds);
    }

    /**
     * 删除培训记录信息
     * 
     * @param trainId 培训记录主键
     * @return 结果
     */
    @Override
    public int deleteCmcTrainByTrainId(Integer trainId)
    {
        return cmcTrainMapper.deleteCmcTrainByTrainId(trainId);
    }
}
