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.CompanyWxDialog;
import com.fs.company.mapper.CompanyWxDialogMapper;
import com.fs.company.service.ICompanyWxDialogService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 添加微信话术Service业务层处理
 * 
 * @author fs
 * @date 2024-12-06
 */
@Service
public class CompanyWxDialogServiceImpl extends ServiceImpl<CompanyWxDialogMapper, CompanyWxDialog> implements ICompanyWxDialogService
{
    @Autowired
    private CompanyWxDialogMapper companyWxDialogMapper;

    /**
     * 查询添加微信话术
     * 
     * @param id 添加微信话术ID
     * @return 添加微信话术
     */
    @Override
    public CompanyWxDialog selectCompanyWxDialogById(Long id)
    {
        return companyWxDialogMapper.selectCompanyWxDialogById(id);
    }

    /**
     * 查询添加微信话术列表
     * 
     * @param companyWxDialog 添加微信话术
     * @return 添加微信话术
     */
    @Override
    public List<CompanyWxDialog> selectCompanyWxDialogList(CompanyWxDialog companyWxDialog){
        return companyWxDialogMapper.selectCompanyWxDialogList(companyWxDialog);
    }

    /**
     * 新增添加微信话术
     * 
     * @param companyWxDialog 添加微信话术
     * @return 结果
     */
    @Override
    public int insertCompanyWxDialog(CompanyWxDialog companyWxDialog)
    {
        companyWxDialog.setCreateTime(DateUtils.getNowDate());
        return companyWxDialogMapper.insertCompanyWxDialog(companyWxDialog);
    }

    /**
     * 修改添加微信话术
     * 
     * @param companyWxDialog 添加微信话术
     * @return 结果
     */
    @Override
    public int updateCompanyWxDialog(CompanyWxDialog companyWxDialog)
    {
        return companyWxDialogMapper.updateCompanyWxDialog(companyWxDialog);
    }

    /**
     * 批量删除添加微信话术
     * 
     * @param ids 需要删除的添加微信话术ID
     * @return 结果
     */
    @Override
    public int deleteCompanyWxDialogByIds(Long[] ids)
    {
        return companyWxDialogMapper.deleteCompanyWxDialogByIds(ids);
    }

    /**
     * 删除添加微信话术信息
     * 
     * @param id 添加微信话术ID
     * @return 结果
     */
    @Override
    public int deleteCompanyWxDialogById(Long id)
    {
        return companyWxDialogMapper.deleteCompanyWxDialogById(id);
    }
}
