package com.aiotagro.cattletrade.business.mapper;

import com.aiotagro.cattletrade.business.entity.JbqServerLog;
import com.aiotagro.cattletrade.business.vo.ServerLocationVo;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

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

/**
 * <p>
 * 智能主机日志表 Mapper 接口
 * </p>
 *
 * @author admin
 * @since 2024-12-26
 */
@Mapper
public interface JbqServerLogMapper extends BaseMapper<JbqServerLog> {

    List<ServerLocationVo> selectServerLocationByTime(@Param("deviceId") String serverDeviceId,@Param("deliverTime") Date deliverTime,@Param("checkTime") Date checkTime);
    
    /**
     * 批量插入主机日志数据
     */
    int batchInsert(@Param("list") List<JbqServerLog> logList);

    /**
     * 查询用于百度鹰眼推送的主机轨迹
     */
    List<JbqServerLog> listLogsForYingyan(@Param("deviceIds") List<String> deviceIds,
                                          @Param("startTime") Date startTime,
                                          @Param("endTime") Date endTime,
                                          @Param("limit") Integer limit);
}
