package com.ycwl.basic.mapper;

import com.ycwl.basic.model.pc.scenicDeviceStats.entity.ScenicDeviceStatsEntity;
import com.ycwl.basic.model.pc.scenicDeviceStats.resp.ScenicDeviceStatsResp;
import org.apache.ibatis.annotations.Param;

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

/**
 * 景区设备统计Mapper接口
 */
public interface ScenicDeviceStatsMapper {
    /**
     * 插入景区设备统计记录
     * @param stats 景区设备统计对象
     * @return 影响行数
     */
    int insert(@Param("stats") ScenicDeviceStatsEntity stats);

    List<ScenicDeviceStatsEntity> countDeviceStats(Date start, Date end);

    List<ScenicDeviceStatsResp> countCachedStatsByScenicId(Long scenicId, Date start, Date end);
    List<ScenicDeviceStatsResp> countRealtimeStatsByScenicId(Long scenicId, Date start, Date end);
}