package com.fs.watch.mapper;

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

import java.util.List;

/**
* @author Administrator
* @description 针对表【watch_sleep_data(设备睡眠原始数据，储存用于算法计算睡眠结果)】的数据库操作Mapper
* @createDate 2024-10-15 11:06:51
* @Entity watch.domain.WatchSleepData
*/
@DataSource(DataSourceType.CLICKHOUSE)
public interface WatchSleepDataMapper{
    Integer queryByCreateTime(@Param("createTime") String createTime);

    void insert(@Param("data")WatchSleepData data);


    List<WatchSleepData> getByDateAndDeviceId(@Param("date")String date, @Param("deviceId")String deviceId);

    WatchSleepData getLast(String deviceId);

    List<WatchSleepData> queryByMonth(@Param("deviceId")String deviceId, @Param("monthStr")String monthStr);
}
