package com.fs.watch.service;

import com.fs.watch.domain.WatchSleepData;
import com.fs.watch.domain.vo.AppWatchSleepDataVo;
import com.fs.watch.domain.vo.WatchSleepDataVo;

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

/**
* @author Administrator
* @description 针对表【watch_sleep_data(设备睡眠原始数据，储存用于算法计算睡眠结果)】的数据库操作Service
* @createDate 2024-10-15 11:06:51
*/
public interface WatchSleepDataService{

    Boolean insert(WatchSleepData watchSleepData);

    WatchSleepDataVo getSleepSection(String date, String deviceId);

    AppWatchSleepDataVo queryByDateAndDeviceIdAndState(String date, String deviceId);

    AppWatchSleepDataVo list(Date startTime, Date endTime, String deviceId);


    WatchSleepData getLast(String deviceId);

    String getSleepStatus(Date startTime, Date endTime, String deviceId);

    List<Map<String, Object>> countSlByDate(String startTime, String endTime, String deviceId);
}
