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.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.fs.im.mapper.FsImMsgSendDetailMapper;
import com.fs.im.domain.FsImMsgSendDetail;
import com.fs.im.service.IFsImMsgSendDetailService;

/**
 * openim消息记录详情Service业务层处理
 * 
 * @author fs
 * @date 2025-08-21
 */
@Service
public class FsImMsgSendDetailServiceImpl extends ServiceImpl<FsImMsgSendDetailMapper, FsImMsgSendDetail> implements IFsImMsgSendDetailService {

    /**
     * 查询openim消息记录详情
     * 
     * @param logDetailId openim消息记录详情主键
     * @return openim消息记录详情
     */
    @Override
    public FsImMsgSendDetail selectFsImMsgSendDetailByLogDetailId(Long logDetailId)
    {
        return baseMapper.selectFsImMsgSendDetailByLogDetailId(logDetailId);
    }

    /**
     * 查询openim消息记录详情列表
     * 
     * @param fsImMsgSendDetail openim消息记录详情
     * @return openim消息记录详情
     */
    @Override
    public List<FsImMsgSendDetail> selectFsImMsgSendDetailList(FsImMsgSendDetail fsImMsgSendDetail)
    {
        return baseMapper.selectFsImMsgSendDetailList(fsImMsgSendDetail);
    }

    /**
     * 新增openim消息记录详情
     * 
     * @param fsImMsgSendDetail openim消息记录详情
     * @return 结果
     */
    @Override
    public int insertFsImMsgSendDetail(FsImMsgSendDetail fsImMsgSendDetail)
    {
        fsImMsgSendDetail.setCreateTime(DateUtils.getNowDate());
        return baseMapper.insertFsImMsgSendDetail(fsImMsgSendDetail);
    }

    /**
     * 修改openim消息记录详情
     * 
     * @param fsImMsgSendDetail openim消息记录详情
     * @return 结果
     */
    @Override
    public int updateFsImMsgSendDetail(FsImMsgSendDetail fsImMsgSendDetail)
    {
        return baseMapper.updateFsImMsgSendDetail(fsImMsgSendDetail);
    }

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

    /**
     * 删除openim消息记录详情信息
     * 
     * @param logDetailId openim消息记录详情主键
     * @return 结果
     */
    @Override
    public int deleteFsImMsgSendDetailByLogDetailId(Long logDetailId)
    {
        return baseMapper.deleteFsImMsgSendDetailByLogDetailId(logDetailId);
    }
}
