package com.fs.watch.mapper;

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

import java.util.List;

/**
* @author Administrator
* @description 针对表【watch_device_data(设备信息)】的数据库操作Mapper
* @createDate 2024-10-15 11:06:50
* @Entity watch.domain.WatchDeviceData
*/
public interface WatchDeviceDataMapper{

    @DataSource(DataSourceType.CLICKHOUSE)
    int insert(@Param("data") WatchDeviceData data);

    @DataSource(DataSourceType.CLICKHOUSE)
    Integer queryByCreateTime(@Param("createTime") String createTime);

    @DataSource(DataSourceType.CLICKHOUSE)
    int upadate(@Param("data")WatchDeviceData data);

    @DataSource(DataSourceType.CLICKHOUSE)
    WatchDeviceData getByDeviceId(@Param("deviceId") String deviceId);

    @DataSource(DataSourceType.CLICKHOUSE)
    List<WatchDeviceData> getListByDeviceId(String deviceIds);

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

    @DataSource(DataSourceType.CLICKHOUSE)
    void deleteByDeviceId(@Param("deviceId") String deviceId);

    @DataSource(DataSourceType.CLICKHOUSE)
    int updateByDeviceId(@Param("data")WatchDeviceData watchDeviceData);
}
