package com.easyproject.clientbus.service.chat.impl;

import com.easyproject.clientbus.service.chat.IConversationChatService;
import com.easyproject.service.domain.aichat.BotConversationChat;
import com.easyproject.service.mapper.aichat.BotConversationChatMapper;
import lombok.extern.slf4j.Slf4j;
import org.springframework.scheduling.annotation.Async;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;

/**
 * 方法说明: 处理对话
 * @param
 * @return
 * @author java-101
 * @date 2025-04-10 13:47:01
 */
@Slf4j
@Service
public class ConversationChatServiceImpl implements IConversationChatService {

    @Resource
    private BotConversationChatMapper conversationChatMapper;

    /**
     * 方法说明: 异步存储对话信息
     * @param
     * @return
     * @author java-101
     * @date 2025-04-10 14:31:16
     */
    @Async
    @Override
    public void asyncSaveChat(BotConversationChat chat) {
        log.info("存储对话信息：{}",chat);
        conversationChatMapper.insert(chat);
    }
}
