package com.fs.fastGpt.service.impl;

import com.fs.common.utils.DateUtils;
import com.fs.fastGpt.domain.FastGptChatMsgLogs;
import com.fs.fastGpt.mapper.FastGptChatMsgLogsMapper;
import com.fs.fastGpt.param.FastGptChatMsgLogsListParam;
import com.fs.fastGpt.service.IFastGptChatMsgLogsService;
import com.fs.fastGpt.vo.FastGptChatMsgLogsListCVO;
import com.fs.fastGpt.vo.FastGptChatMsgLogsVO;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 聊天记录日志Service业务层处理
 * 
 * @author fs
 * @date 2024-10-10
 */
@Service
public class FastGptChatMsgLogsServiceImpl implements IFastGptChatMsgLogsService 
{
    @Autowired
    private FastGptChatMsgLogsMapper fastGptChatMsgLogsMapper;

    /**
     * 查询聊天记录日志
     * 
     * @param logsId 聊天记录日志主键
     * @return 聊天记录日志
     */
    @Override
    public FastGptChatMsgLogs selectFastGptChatMsgLogsByLogsId(Long logsId)
    {
        return fastGptChatMsgLogsMapper.selectFastGptChatMsgLogsByLogsId(logsId);
    }

    /**
     * 查询聊天记录日志列表
     * 
     * @param fastGptChatMsgLogs 聊天记录日志
     * @return 聊天记录日志
     */
    @Override
    public List<FastGptChatMsgLogs> selectFastGptChatMsgLogsList(FastGptChatMsgLogs fastGptChatMsgLogs)
    {
        return fastGptChatMsgLogsMapper.selectFastGptChatMsgLogsList(fastGptChatMsgLogs);
    }

    /**
     * 新增聊天记录日志
     * 
     * @param fastGptChatMsgLogs 聊天记录日志
     * @return 结果
     */
    @Override
    public int insertFastGptChatMsgLogs(FastGptChatMsgLogs fastGptChatMsgLogs)
    {
        fastGptChatMsgLogs.setCreateTime(DateUtils.getNowDate());
        return fastGptChatMsgLogsMapper.insertFastGptChatMsgLogs(fastGptChatMsgLogs);
    }

    /**
     * 修改聊天记录日志
     * 
     * @param fastGptChatMsgLogs 聊天记录日志
     * @return 结果
     */
    @Override
    public int updateFastGptChatMsgLogs(FastGptChatMsgLogs fastGptChatMsgLogs)
    {
        return fastGptChatMsgLogsMapper.updateFastGptChatMsgLogs(fastGptChatMsgLogs);
    }

    /**
     * 批量删除聊天记录日志
     * 
     * @param logsIds 需要删除的聊天记录日志主键
     * @return 结果
     */
    @Override
    public int deleteFastGptChatMsgLogsByLogsIds(Long[] logsIds)
    {
        return fastGptChatMsgLogsMapper.deleteFastGptChatMsgLogsByLogsIds(logsIds);
    }

    /**
     * 删除聊天记录日志信息
     * 
     * @param logsId 聊天记录日志主键
     * @return 结果
     */
    @Override
    public int deleteFastGptChatMsgLogsByLogsId(Long logsId)
    {
        return fastGptChatMsgLogsMapper.deleteFastGptChatMsgLogsByLogsId(logsId);
    }

    @Override
    public List<FastGptChatMsgLogsVO> selectFastGptChatMsgLogsListVO(FastGptChatMsgLogs fastGptChatMsgLogs) {
        return fastGptChatMsgLogsMapper.selectFastGptChatMsgLogsListVO(fastGptChatMsgLogs);
    }

    @Override
    public List<FastGptChatMsgLogsListCVO> selectFastGptChatMsgLogsListCVO(FastGptChatMsgLogsListParam param) {
        return fastGptChatMsgLogsMapper.selectFastGptChatMsgLogsListCVO(param);
    }
}
