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.CmcTrainApprovalMapper;
import com.ruoyi.oa.domain.CmcTrainApproval;
import com.ruoyi.oa.service.ICmcTrainApprovalService;

/**
 * 参培审核Service业务层处理
 * 
 * @author cmc
 * @date 2025-03-04
 */
@Service
public class CmcTrainApprovalServiceImpl implements ICmcTrainApprovalService 
{
    @Autowired
    private CmcTrainApprovalMapper cmcTrainApprovalMapper;

    /**
     * 查询参培审核
     * 
     * @param participateId 参培审核主键
     * @return 参培审核
     */
    @Override
    public CmcTrainApproval selectCmcTrainApprovalByParticipateId(String participateId)
    {
        return cmcTrainApprovalMapper.selectCmcTrainApprovalByParticipateId(participateId);
    }

    /**
     * 查询参培审核列表
     * 
     * @param cmcTrainApproval 参培审核
     * @return 参培审核
     */
    @Override
    public List<CmcTrainApproval> selectCmcTrainApprovalList(CmcTrainApproval cmcTrainApproval)
    {
        return cmcTrainApprovalMapper.selectCmcTrainApprovalList(cmcTrainApproval);
    }

    /**
     * 新增参培审核
     * 
     * @param cmcTrainApproval 参培审核
     * @return 结果
     */
    @Override
    public int insertCmcTrainApproval(CmcTrainApproval cmcTrainApproval)
    {
        return cmcTrainApprovalMapper.insertCmcTrainApproval(cmcTrainApproval);
    }

    /**
     * 修改参培审核
     * 
     * @param cmcTrainApproval 参培审核
     * @return 结果
     */
    @Override
    public int updateCmcTrainApproval(CmcTrainApproval cmcTrainApproval)
    {
        return cmcTrainApprovalMapper.updateCmcTrainApproval(cmcTrainApproval);
    }

    /**
     * 批量删除参培审核
     * 
     * @param participateIds 需要删除的参培审核主键
     * @return 结果
     */
    @Override
    public int deleteCmcTrainApprovalByParticipateIds(String[] participateIds)
    {
        return cmcTrainApprovalMapper.deleteCmcTrainApprovalByParticipateIds(participateIds);
    }

    /**
     * 删除参培审核信息
     * 
     * @param participateId 参培审核主键
     * @return 结果
     */
    @Override
    public int deleteCmcTrainApprovalByParticipateId(String participateId)
    {
        return cmcTrainApprovalMapper.deleteCmcTrainApprovalByParticipateId(participateId);
    }
}
