package com.fs.company.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.fs.company.domain.CompanyVoiceRoboticCallees;
import com.fs.company.mapper.CompanyVoiceRoboticCalleesMapper;
import com.fs.company.service.ICompanyVoiceRoboticCalleesService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 任务外呼电话Service业务层处理
 * 
 * @author fs
 * @date 2024-12-04
 */
@Service
public class CompanyVoiceRoboticCalleesServiceImpl extends ServiceImpl<CompanyVoiceRoboticCalleesMapper, CompanyVoiceRoboticCallees> implements ICompanyVoiceRoboticCalleesService
{
    @Autowired
    private CompanyVoiceRoboticCalleesMapper companyVoiceRoboticCalleesMapper;

    /**
     * 查询任务外呼电话
     * 
     * @param id 任务外呼电话ID
     * @return 任务外呼电话
     */
    @Override
    public CompanyVoiceRoboticCallees selectCompanyVoiceRoboticCalleesById(Long id)
    {
        return companyVoiceRoboticCalleesMapper.selectCompanyVoiceRoboticCalleesById(id);
    }

    /**
     * 查询任务外呼电话列表
     * 
     * @param companyVoiceRoboticCallees 任务外呼电话
     * @return 任务外呼电话
     */
    @Override
    public List<CompanyVoiceRoboticCallees> selectCompanyVoiceRoboticCalleesList(CompanyVoiceRoboticCallees companyVoiceRoboticCallees)
    {
        return companyVoiceRoboticCalleesMapper.selectCompanyVoiceRoboticCalleesList(companyVoiceRoboticCallees);
    }

    /**
     * 新增任务外呼电话
     * 
     * @param companyVoiceRoboticCallees 任务外呼电话
     * @return 结果
     */
    @Override
    public int insertCompanyVoiceRoboticCallees(CompanyVoiceRoboticCallees companyVoiceRoboticCallees)
    {
        return companyVoiceRoboticCalleesMapper.insertCompanyVoiceRoboticCallees(companyVoiceRoboticCallees);
    }

    /**
     * 修改任务外呼电话
     * 
     * @param companyVoiceRoboticCallees 任务外呼电话
     * @return 结果
     */
    @Override
    public int updateCompanyVoiceRoboticCallees(CompanyVoiceRoboticCallees companyVoiceRoboticCallees)
    {
        return companyVoiceRoboticCalleesMapper.updateCompanyVoiceRoboticCallees(companyVoiceRoboticCallees);
    }

    /**
     * 批量删除任务外呼电话
     * 
     * @param ids 需要删除的任务外呼电话ID
     * @return 结果
     */
    @Override
    public int deleteCompanyVoiceRoboticCalleesByIds(Long[] ids)
    {
        return companyVoiceRoboticCalleesMapper.deleteCompanyVoiceRoboticCalleesByIds(ids);
    }

    /**
     * 删除任务外呼电话信息
     * 
     * @param id 任务外呼电话ID
     * @return 结果
     */
    @Override
    public int deleteCompanyVoiceRoboticCalleesById(Long id)
    {
        return companyVoiceRoboticCalleesMapper.deleteCompanyVoiceRoboticCalleesById(id);
    }

    @Override
    public List<CompanyVoiceRoboticCallees> selectCompanyVoiceRoboticCalleesListByRoboticId(Long id) {
        CompanyVoiceRoboticCallees param = new CompanyVoiceRoboticCallees();
        param.setRoboticId(id);
        return selectCompanyVoiceRoboticCalleesList(param);
    }
}
