package com.ruoyi.rocketmq.service.impl;

import java.util.List;
import com.ruoyi.common.core.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.rocketmq.mapper.InitialHeartbeatListenLogMapper;
import com.ruoyi.rocketmq.domain.InitialHeartbeatListenLog;
import com.ruoyi.rocketmq.service.IInitialHeartbeatListenLogService;

/**
 * 心跳信息日志Service业务层处理
 * 
 * @author gyt
 * @date 2025-09-08
 */
@Service
public class InitialHeartbeatListenLogServiceImpl implements IInitialHeartbeatListenLogService 
{
    @Autowired
    private InitialHeartbeatListenLogMapper initialHeartbeatListenLogMapper;

    /**
     * 查询心跳信息日志
     * 
     * @param clientId 心跳信息日志主键
     * @return 心跳信息日志
     */
    @Override
    public InitialHeartbeatListenLog selectInitialHeartbeatListenLogByClientId(String clientId)
    {
        return initialHeartbeatListenLogMapper.selectInitialHeartbeatListenLogByClientId(clientId);
    }

    /**
     * 查询心跳信息日志列表
     * 
     * @param initialHeartbeatListenLog 心跳信息日志
     * @return 心跳信息日志
     */
    @Override
    public List<InitialHeartbeatListenLog> selectInitialHeartbeatListenLogList(InitialHeartbeatListenLog initialHeartbeatListenLog)
    {
        return initialHeartbeatListenLogMapper.selectInitialHeartbeatListenLogList(initialHeartbeatListenLog);
    }

    /**
     * 新增心跳信息日志
     * 
     * @param initialHeartbeatListenLog 心跳信息日志
     * @return 结果
     */
    @Override
    public int insertInitialHeartbeatListenLog(InitialHeartbeatListenLog initialHeartbeatListenLog)
    {
        initialHeartbeatListenLog.setCreateTime(DateUtils.getNowDate());
        return initialHeartbeatListenLogMapper.insertInitialHeartbeatListenLog(initialHeartbeatListenLog);
    }

    /**
     * 修改心跳信息日志
     * 
     * @param initialHeartbeatListenLog 心跳信息日志
     * @return 结果
     */
    @Override
    public int updateInitialHeartbeatListenLog(InitialHeartbeatListenLog initialHeartbeatListenLog)
    {
        initialHeartbeatListenLog.setUpdateTime(DateUtils.getNowDate());
        return initialHeartbeatListenLogMapper.updateInitialHeartbeatListenLog(initialHeartbeatListenLog);
    }

    /**
     * 批量删除心跳信息日志
     * 
     * @param clientIds 需要删除的心跳信息日志主键
     * @return 结果
     */
    @Override
    public int deleteInitialHeartbeatListenLogByClientIds(String[] clientIds)
    {
        return initialHeartbeatListenLogMapper.deleteInitialHeartbeatListenLogByClientIds(clientIds);
    }

    /**
     * 删除心跳信息日志信息
     * 
     * @param clientId 心跳信息日志主键
     * @return 结果
     */
    @Override
    public int deleteInitialHeartbeatListenLogByClientId(String clientId)
    {
        return initialHeartbeatListenLogMapper.deleteInitialHeartbeatListenLogByClientId(clientId);
    }
}
