package com.fs.company.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.fs.common.utils.DateUtils;
import com.fs.company.domain.CompanyVoiceRoboticWx;
import com.fs.company.mapper.CompanyVoiceRoboticWxMapper;
import com.fs.company.service.ICompanyVoiceRoboticWxService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * AI外呼任务加微方式Service业务层处理
 * 
 * @author fs
 * @date 2024-12-06
 */
@Service
public class CompanyVoiceRoboticWxServiceImpl extends ServiceImpl<CompanyVoiceRoboticWxMapper, CompanyVoiceRoboticWx> implements ICompanyVoiceRoboticWxService
{
    @Autowired
    private CompanyVoiceRoboticWxMapper companyVoiceRoboticWxMapper;

    /**
     * 查询AI外呼任务加微方式
     * 
     * @param id AI外呼任务加微方式ID
     * @return AI外呼任务加微方式
     */
    @Override
    public CompanyVoiceRoboticWx selectCompanyVoiceRoboticWxById(Long id)
    {
        return companyVoiceRoboticWxMapper.selectCompanyVoiceRoboticWxById(id);
    }

    /**
     * 查询AI外呼任务加微方式列表
     * 
     * @param companyVoiceRoboticWx AI外呼任务加微方式
     * @return AI外呼任务加微方式
     */
    @Override
    public List<CompanyVoiceRoboticWx> selectCompanyVoiceRoboticWxList(CompanyVoiceRoboticWx companyVoiceRoboticWx)
    {
        return companyVoiceRoboticWxMapper.selectCompanyVoiceRoboticWxList(companyVoiceRoboticWx);
    }

    /**
     * 新增AI外呼任务加微方式
     * 
     * @param companyVoiceRoboticWx AI外呼任务加微方式
     * @return 结果
     */
    @Override
    public int insertCompanyVoiceRoboticWx(CompanyVoiceRoboticWx companyVoiceRoboticWx)
    {
        companyVoiceRoboticWx.setCreateTime(DateUtils.getNowDate());
        return companyVoiceRoboticWxMapper.insertCompanyVoiceRoboticWx(companyVoiceRoboticWx);
    }

    /**
     * 修改AI外呼任务加微方式
     * 
     * @param companyVoiceRoboticWx AI外呼任务加微方式
     * @return 结果
     */
    @Override
    public int updateCompanyVoiceRoboticWx(CompanyVoiceRoboticWx companyVoiceRoboticWx)
    {
        return companyVoiceRoboticWxMapper.updateCompanyVoiceRoboticWx(companyVoiceRoboticWx);
    }

    /**
     * 批量删除AI外呼任务加微方式
     * 
     * @param ids 需要删除的AI外呼任务加微方式ID
     * @return 结果
     */
    @Override
    public int deleteCompanyVoiceRoboticWxByIds(Long[] ids)
    {
        return companyVoiceRoboticWxMapper.deleteCompanyVoiceRoboticWxByIds(ids);
    }

    /**
     * 删除AI外呼任务加微方式信息
     * 
     * @param id AI外呼任务加微方式ID
     * @return 结果
     */
    @Override
    public int deleteCompanyVoiceRoboticWxById(Long id)
    {
        return companyVoiceRoboticWxMapper.deleteCompanyVoiceRoboticWxById(id);
    }

    @Override
    public List<CompanyVoiceRoboticWx> selectWxList(Long id) {
        List<CompanyVoiceRoboticWx> list = companyVoiceRoboticWxMapper.selectByRoboticId(id);
        return list;
    }
}
