package com.ruoyi.llm.service.impl;

import com.ruoyi.llm.domain.CmcChat;
import com.ruoyi.llm.mapper.CmcChatMapper;
import com.ruoyi.llm.service.ICmcChatService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * cmc聊天记录Service业务层处理
 * 
 * @author cmc
 * @date 2025-04-08
 */
@Service
public class CmcChatServiceImpl implements ICmcChatService 
{
    @Autowired
    private CmcChatMapper cmcChatMapper;

    /**
     * 查询cmc聊天记录
     * 
     * @param chatId cmc聊天记录主键
     * @return cmc聊天记录
     */
    @Override
    public CmcChat selectCmcChatByChatId(String chatId)
    {
        return cmcChatMapper.selectCmcChatByChatId(chatId);
    }

    /**
     * 查询cmc聊天记录列表
     * 
     * @param cmcChat cmc聊天记录
     * @return cmc聊天记录
     */
    @Override
    public List<CmcChat> selectCmcChatList(CmcChat cmcChat)
    {
        return cmcChatMapper.selectCmcChatList(cmcChat);
    }

    /**
     * 新增cmc聊天记录
     * 
     * @param cmcChat cmc聊天记录
     * @return 结果
     */
    @Override
    public int insertCmcChat(CmcChat cmcChat)
    {
        return cmcChatMapper.insertCmcChat(cmcChat);
    }

    /**
     * 修改cmc聊天记录
     * 
     * @param cmcChat cmc聊天记录
     * @return 结果
     */
    @Override
    public int updateCmcChat(CmcChat cmcChat)
    {
        return cmcChatMapper.updateCmcChat(cmcChat);
    }

    /**
     * 批量删除cmc聊天记录
     * 
     * @param chatIds 需要删除的cmc聊天记录主键
     * @return 结果
     */
    @Override
    public int deleteCmcChatByChatIds(String[] chatIds)
    {
        return cmcChatMapper.deleteCmcChatByChatIds(chatIds);
    }

    /**
     * 删除cmc聊天记录信息
     * 
     * @param chatId cmc聊天记录主键
     * @return 结果
     */
    @Override
    public int deleteCmcChatByChatId(String chatId)
    {
        return cmcChatMapper.deleteCmcChatByChatId(chatId);
    }
}
