package com.jiayue.ipfcst.common.data.repository;

import com.jiayue.ipfcst.common.data.entity.ChannelDisconLog;

import java.util.Date;
import java.util.List;

/**
 * 通道断开日志仓储
 *
 * @author xsl
 * @version 3.0
 */
public interface ChannelDisconLogRepository extends BaseRepository<ChannelDisconLog, Integer> {
    /**
     * 根据通道ID获取需要更新重连的
     * @param channelId
     * @return
     */
    List<ChannelDisconLog> findByChannelIdAndDisconnectTimeIsNotNullAndReconnectTimeIsNull(String channelId);

    /**
     * 根据创建时间段查询通道断开日志
     * @param startTime
     * @param endTime
     * @return
     */
    List<ChannelDisconLog> findByCreateTimeBetween(Date startTime, Date endTime);
}
