package com.ruoyi.base.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.base.mapper.DialogueLogMapper;
import com.ruoyi.base.domain.DialogueLog;
import com.ruoyi.base.service.IDialogueLogService;

/**
 * 对话日志Service业务层处理
 * 
 * @author ruoyi
 * @date 2026-05-19
 */
@Service
public class DialogueLogServiceImpl implements IDialogueLogService 
{
    @Autowired
    private DialogueLogMapper dialogueLogMapper;

    /**
     * 查询对话日志
     * 
     * @param id 对话日志主键
     * @return 对话日志
     */
    @Override
    public DialogueLog selectDialogueLogById(Long id)
    {
        return dialogueLogMapper.selectDialogueLogById(id);
    }

    /**
     * 查询对话日志列表
     * 
     * @param dialogueLog 对话日志
     * @return 对话日志
     */
    @Override
    public List<DialogueLog> selectDialogueLogList(DialogueLog dialogueLog)
    {
        return dialogueLogMapper.selectDialogueLogList(dialogueLog);
    }

    /**
     * 新增对话日志
     * 
     * @param dialogueLog 对话日志
     * @return 结果
     */
    @Override
    public int insertDialogueLog(DialogueLog dialogueLog)
    {
        dialogueLog.setCreateTime(DateUtils.getNowDate());
        return dialogueLogMapper.insertDialogueLog(dialogueLog);
    }

    /**
     * 修改对话日志
     * 
     * @param dialogueLog 对话日志
     * @return 结果
     */
    @Override
    public int updateDialogueLog(DialogueLog dialogueLog)
    {
        return dialogueLogMapper.updateDialogueLog(dialogueLog);
    }

    /**
     * 批量删除对话日志
     * 
     * @param ids 需要删除的对话日志主键
     * @return 结果
     */
    @Override
    public int deleteDialogueLogByIds(Long[] ids)
    {
        return dialogueLogMapper.deleteDialogueLogByIds(ids);
    }

    /**
     * 删除对话日志信息
     * 
     * @param id 对话日志主键
     * @return 结果
     */
    @Override
    public int deleteDialogueLogById(Long id)
    {
        return dialogueLogMapper.deleteDialogueLogById(id);
    }
}
