package com.fs.im.service.impl;

import java.util.List;
import com.fs.common.utils.DateUtils;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;
import com.fs.im.mapper.ImSendLogMapper;
import com.fs.im.domain.ImSendLog;
import com.fs.im.service.IImSendLogService;

/**
 * openim消息发送记录Service业务层处理
 *
 * @author fs
 * @date 2025-08-12
 */
@Service
public class ImSendLogServiceImpl extends ServiceImpl<ImSendLogMapper, ImSendLog> implements IImSendLogService {

    /**
     * 查询openim消息发送记录
     *
     * @param logId openim消息发送记录主键
     * @return openim消息发送记录
     */
    @Override
    public ImSendLog selectImSendLogByLogId(Long logId)
    {
        return baseMapper.selectImSendLogByLogId(logId);
    }

    /**
     * 查询openim消息发送记录列表
     *
     * @param imSendLog openim消息发送记录
     * @return openim消息发送记录
     */
    @Override
    public List<ImSendLog> selectImSendLogList(ImSendLog imSendLog)
    {
        return baseMapper.selectImSendLogList(imSendLog);
    }

    /**
     * 新增openim消息发送记录
     *
     * @param imSendLog openim消息发送记录
     * @return 结果
     */
    @Override
    public int insertImSendLog(ImSendLog imSendLog)
    {
        imSendLog.setCreateTime(DateUtils.getNowDate());
        return baseMapper.insertImSendLog(imSendLog);
    }

    /**
     * 修改openim消息发送记录
     *
     * @param imSendLog openim消息发送记录
     * @return 结果
     */
    @Override
    public int updateImSendLog(ImSendLog imSendLog)
    {
        return baseMapper.updateImSendLog(imSendLog);
    }

    /**
     * 批量删除openim消息发送记录
     *
     * @param logIds 需要删除的openim消息发送记录主键
     * @return 结果
     */
    @Override
    public int deleteImSendLogByLogIds(Long[] logIds)
    {
        return baseMapper.deleteImSendLogByLogIds(logIds);
    }

    /**
     * 删除openim消息发送记录信息
     *
     * @param logId openim消息发送记录主键
     * @return 结果
     */
    @Override
    public int deleteImSendLogByLogId(Long logId)
    {
        return baseMapper.deleteImSendLogByLogId(logId);
    }
}
