package com.usky.iot.mapper;

import com.usky.iot.domain.BaseAlarm;
import com.usky.common.mybatis.core.CrudMapper;
import com.usky.iot.domain.BaseAlarmType;
import com.usky.iot.domain.DmpDeviceInfo;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

/**
 * <p>
 * 统一告警表 Mapper 接口
 * </p>
 *
 * @author han
 * @since 2023-07-13
 */
public interface BaseAlarmMapper extends CrudMapper<BaseAlarm> {
    BaseAlarmType getAlarmTypeOne(String alarmType);

    List<BaseAlarmType> getAlarmTypeList();

    List<DmpDeviceInfo> getDeviceInfoList(@Param("devList") List<String> devList);

    List<BaseAlarm> getUnDeviceAlarmList(@Param("devList") List<String> devList);

    List<BaseAlarm> getDeviceAlarmList(@Param("devList") List<String> devList);

    List<Map<String,Object>> getAlarmStatisticDay(@Param("startTime") String startTime,
                                                  @Param("endTime") String endTime,
                                                  @Param("tenantId") Integer tenantId);
}
