package com.fs.watch.mapper;

import com.fs.common.annotation.DataSource;
import com.fs.common.enums.DataSourceType;
import com.fs.watch.domain.WatchAlarmData;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
* @author Administrator
* @description 针对表【watch_alarm_data(设备预警数据)】的数据库操作Mapper
* @createDate 2024-10-15 11:06:50
* @Entity watch.domain.WatchAlarmData
*/
@DataSource(DataSourceType.CLICKHOUSE)
public interface WatchAlarmDataMapper{
    void insert(@Param("data") WatchAlarmData data);

    void batchInsertData(@Param("list") List<WatchAlarmData> list);

    List<WatchAlarmData> queryByStatus(@Param("status") Integer status);

    List<WatchAlarmData> queryPageByStatus(WatchAlarmData data);

    List<WatchAlarmData> queryByStatusAndDeviceid(@Param("status")Integer status, @Param("appStatus")Integer appStatus,@Param("deviceId")String deviceId);

    Integer getUnreadNum(@Param("deviceId")String deviceId);

    Integer setAppStatusById(@Param("ids")List<String> ids);

    Boolean setIsDel(@Param("ids")List<String> ids);

    Integer setStatusById(@Param("ids") List<String> ids);

    Integer setAppStatusByDeviceId(@Param("deviceId")String deviceId);

    Boolean deleteByDeviceId(@Param("deviceId")String deviceId);
}
