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.CmcManageDeptMapper;
import com.ruoyi.oa.domain.CmcManageDept;
import com.ruoyi.oa.service.ICmcManageDeptService;

/**
 * cmc领导分管Service业务层处理
 * 
 * @author cmc
 * @date 2024-07-04
 */
@Service
public class CmcManageDeptServiceImpl implements ICmcManageDeptService 
{
    @Autowired
    private CmcManageDeptMapper cmcManageDeptMapper;

    /**
     * 查询cmc领导分管
     * 
     * @param userId cmc领导分管主键
     * @return cmc领导分管
     */
    @Override
    public CmcManageDept selectCmcManageDeptByUserId(Long userId)
    {
        return cmcManageDeptMapper.selectCmcManageDeptByUserId(userId);
    }

    /**
     * 查询cmc领导分管列表
     * 
     * @param cmcManageDept cmc领导分管
     * @return cmc领导分管
     */
    @Override
    public List<CmcManageDept> selectCmcManageDeptList(CmcManageDept cmcManageDept)
    {
        return cmcManageDeptMapper.selectCmcManageDeptList(cmcManageDept);
    }

    /**
     * 新增cmc领导分管
     * 
     * @param cmcManageDept cmc领导分管
     * @return 结果
     */
    @Override
    public int insertCmcManageDept(CmcManageDept cmcManageDept)
    {
        return cmcManageDeptMapper.insertCmcManageDept(cmcManageDept);
    }

    /**
     * 修改cmc领导分管
     * 
     * @param cmcManageDept cmc领导分管
     * @return 结果
     */
    @Override
    public int updateCmcManageDept(CmcManageDept cmcManageDept)
    {
        return cmcManageDeptMapper.updateCmcManageDept(cmcManageDept);
    }

    /**
     * 批量删除cmc领导分管
     * 
     * @param userIds 需要删除的cmc领导分管主键
     * @return 结果
     */
    @Override
    public int deleteCmcManageDeptByUserIds(Long[] userIds)
    {
        return cmcManageDeptMapper.deleteCmcManageDeptByUserIds(userIds);
    }

    /**
     * 删除cmc领导分管信息
     * 
     * @param userId cmc领导分管主键
     * @return 结果
     */
    @Override
    public int deleteCmcManageDeptByUserId(Long userId)
    {
        return cmcManageDeptMapper.deleteCmcManageDeptByUserId(userId);
    }
}
