package com.yeejoin.amos.boot.module.das.mapper.iot;

import com.yeejoin.amos.boot.module.das.entity.iot.StbDtoData;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface TdengineIotDataMapper {
    @Select(" select last(`value`) as `value`, point_seq  from #{stbName} group by point_seq")
    List<StbDtoData> getStbDtoDataByStbName(String stbName);

    @Select(" select count(1) from information_schema.ins_tables where  stable_name=#{stbName} and db_name ='iot_data_data'")
    Long getTtableCount(String stbName);
}