package com.fs.company.service.impl;

import java.util.List;
import com.fs.common.utils.DateUtils;
import com.fs.company.vo.CompanyVoiceConfigListVO;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.fs.company.mapper.CompanyVoiceConfigMapper;
import com.fs.company.domain.CompanyVoiceConfig;
import com.fs.company.service.ICompanyVoiceConfigService;

/**
 * 呼叫频率配置Service业务层处理
 * 
 * @author fs
 * @date 2021-11-13
 */
@Service
public class CompanyVoiceConfigServiceImpl implements ICompanyVoiceConfigService 
{
    @Autowired
    private CompanyVoiceConfigMapper companyVoiceConfigMapper;

    /**
     * 查询呼叫频率配置
     * 
     * @param configId 呼叫频率配置ID
     * @return 呼叫频率配置
     */
    @Override
    public CompanyVoiceConfig selectCompanyVoiceConfigById(Long configId)
    {
        return companyVoiceConfigMapper.selectCompanyVoiceConfigById(configId);
    }

    /**
     * 查询呼叫频率配置列表
     * 
     * @param companyVoiceConfig 呼叫频率配置
     * @return 呼叫频率配置
     */
    @Override
    public List<CompanyVoiceConfig> selectCompanyVoiceConfigList(CompanyVoiceConfig companyVoiceConfig)
    {
        return companyVoiceConfigMapper.selectCompanyVoiceConfigList(companyVoiceConfig);
    }

    /**
     * 新增呼叫频率配置
     * 
     * @param companyVoiceConfig 呼叫频率配置
     * @return 结果
     */
    @Override
    public int insertCompanyVoiceConfig(CompanyVoiceConfig companyVoiceConfig)
    {
        companyVoiceConfig.setCreateTime(DateUtils.getNowDate());
        return companyVoiceConfigMapper.insertCompanyVoiceConfig(companyVoiceConfig);
    }

    /**
     * 修改呼叫频率配置
     * 
     * @param companyVoiceConfig 呼叫频率配置
     * @return 结果
     */
    @Override
    public int updateCompanyVoiceConfig(CompanyVoiceConfig companyVoiceConfig)
    {
        return companyVoiceConfigMapper.updateCompanyVoiceConfig(companyVoiceConfig);
    }

    /**
     * 批量删除呼叫频率配置
     * 
     * @param configIds 需要删除的呼叫频率配置ID
     * @return 结果
     */
    @Override
    public int deleteCompanyVoiceConfigByIds(Long[] configIds)
    {
        return companyVoiceConfigMapper.deleteCompanyVoiceConfigByIds(configIds);
    }

    /**
     * 删除呼叫频率配置信息
     * 
     * @param configId 呼叫频率配置ID
     * @return 结果
     */
    @Override
    public int deleteCompanyVoiceConfigById(Long configId)
    {
        return companyVoiceConfigMapper.deleteCompanyVoiceConfigById(configId);
    }

    @Override
    public CompanyVoiceConfig selectCompanyVoiceConfigByCompanyId(Long companyId) {
        return companyVoiceConfigMapper.selectCompanyVoiceConfigByCompanyId(companyId);
    }

    @Override
    public List<CompanyVoiceConfigListVO> selectCompanyVoiceConfigListVO(CompanyVoiceConfig companyVoiceConfig) {
        return companyVoiceConfigMapper.selectCompanyVoiceConfigListVO(companyVoiceConfig);
    }
}
