package com.sckw.slope.detection.dao.tdengine;

import com.baomidou.dynamic.datasource.annotation.DS;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.sckw.slope.detection.model.dos.tdengine.Original;
import com.sckw.slope.detection.model.vo.OriginalDeviceVO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

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

@DS("td")
@Mapper
@Repository
public interface OriginalMapper extends BaseMapper<Original> {

    Original selectByData(@Param("rawTs") Date rawTs);

    List<OriginalDeviceVO> selectListLimit(@Param("newPage") Integer newPage, @Param("pageSize") Integer pageSize, @Param("deviceSn") String deviceSn);

    int selectDataCount(@Param("deviceSn") String deviceSn);
}