package com.fs.fastGpt.service.impl;

import com.fs.common.utils.DateUtils;
import com.fs.fastGpt.domain.FastgptChatVoiceHomo;
import com.fs.fastGpt.mapper.FastgptChatVoiceHomoMapper;
import com.fs.fastGpt.service.IFastgptChatVoiceHomoService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 多音字Service业务层处理
 *
 * @author fs
 * @date 2024-12-20
 */
@Service
public class FastgptChatVoiceHomoServiceImpl implements IFastgptChatVoiceHomoService
{
    @Autowired
    private FastgptChatVoiceHomoMapper fastgptChatVoiceHomoMapper;

    /**
     * 查询多音字
     *
     * @param id 多音字主键
     * @return 多音字
     */
    @Override
    public FastgptChatVoiceHomo selectFastgptChatVoiceHomoById(Long id)
    {
        return fastgptChatVoiceHomoMapper.selectFastgptChatVoiceHomoById(id);
    }

    /**
     * 查询多音字列表
     *
     * @param fastgptChatVoiceHomo 多音字
     * @return 多音字
     */
    @Override
    public List<FastgptChatVoiceHomo> selectFastgptChatVoiceHomoList(FastgptChatVoiceHomo fastgptChatVoiceHomo)
    {
        return fastgptChatVoiceHomoMapper.selectFastgptChatVoiceHomoList(fastgptChatVoiceHomo);
    }

    /**
     * 新增多音字
     *
     * @param fastgptChatVoiceHomo 多音字
     * @return 结果
     */
    @Override
    public int insertFastgptChatVoiceHomo(FastgptChatVoiceHomo fastgptChatVoiceHomo)
    {
        fastgptChatVoiceHomo.setCreateTime(DateUtils.getNowDate());
        return fastgptChatVoiceHomoMapper.insertFastgptChatVoiceHomo(fastgptChatVoiceHomo);
    }

    /**
     * 修改多音字
     *
     * @param fastgptChatVoiceHomo 多音字
     * @return 结果
     */
    @Override
    public int updateFastgptChatVoiceHomo(FastgptChatVoiceHomo fastgptChatVoiceHomo)
    {
        return fastgptChatVoiceHomoMapper.updateFastgptChatVoiceHomo(fastgptChatVoiceHomo);
    }

    /**
     * 批量删除多音字
     *
     * @param ids 需要删除的多音字主键
     * @return 结果
     */
    @Override
    public int deleteFastgptChatVoiceHomoByIds(Long[] ids)
    {
        return fastgptChatVoiceHomoMapper.deleteFastgptChatVoiceHomoByIds(ids);
    }

    /**
     * 删除多音字信息
     *
     * @param id 多音字主键
     * @return 结果
     */
    @Override
    public int deleteFastgptChatVoiceHomoById(Long id)
    {
        return fastgptChatVoiceHomoMapper.deleteFastgptChatVoiceHomoById(id);
    }
}
