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
*/
public interface WatchAlarmDataMapper{
    @DataSource(DataSourceType.CLICKHOUSE)
    void insert(@Param("data") WatchAlarmData data);

    @DataSource(DataSourceType.CLICKHOUSE)
    void batchInsertData(@Param("list") List<WatchAlarmData> list);

    @DataSource(DataSourceType.CLICKHOUSE)
    List<WatchAlarmData> queryByStatus(@Param("status") Integer status);

    @DataSource(DataSourceType.CLICKHOUSE)
    List<WatchAlarmData> queryPageByStatus(WatchAlarmData data);

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

    @DataSource(DataSourceType.CLICKHOUSE)
    Integer getUnreadNum(@Param("deviceId")String deviceId);

    @DataSource(DataSourceType.CLICKHOUSE)
    Integer setAppStatusById(@Param("ids")List<String> ids);

    @DataSource(DataSourceType.CLICKHOUSE)
    Boolean setIsDel(@Param("ids")List<String> ids);

    @DataSource(DataSourceType.CLICKHOUSE)
    Integer setStatusById(@Param("ids") List<String> ids);

}
