12345678910111213141516171819202122232425262728293031 |
- package com.jiayue.biz.mapper;
- import com.baomidou.dynamic.datasource.annotation.DS;
- import com.baomidou.mybatisplus.core.mapper.BaseMapper;
- import com.jiayue.biz.domain.ProphaseAnemometryData;
- import com.jiayue.biz.domain.ProphaseAnemometryDataOrg;
- import org.apache.ibatis.annotations.Insert;
- import org.apache.ibatis.annotations.Mapper;
- import org.apache.ibatis.annotations.Param;
- import org.apache.ibatis.annotations.Select;
- import java.sql.Timestamp;
- import java.util.List;
- @DS("tdengine")
- public interface ProphaseAnemometryDataOrgMapper extends BaseMapper<ProphaseAnemometryDataOrg> {
- @Insert("INSERT INTO anemometry_org_${equipmentId}_${layerHeight} USING prophase_anemometry_data_org TAGS(#{equipmentId}, #{layerHeight}) VALUES(#{ts}, #{wsInst}, #{wsMax}, #{wsMin}, #{wsAve}, #{wsGust}, #{wsSta}, #{wdInst}, #{wdMax}, #{wdMin}, #{wdAve}, #{wdSta})")
- int insertOneWithNew(ProphaseAnemometryData one);
- //所有层高风速风向平均值
- @Select("SELECT t1.ts,t1.ws_ave,t1.wd_ave,t1.layer_height FROM prophase_anemometry_data_org t1 where t1.equipment_id = #{equipmentId} and t1.ts >= #{startTime} and t1.ts <= #{endTime}")
- List<ProphaseAnemometryData> selectAve(@Param("equipmentId") String equipmentId, @Param("startTime") Timestamp startTime, @Param("endTime") Timestamp endTime);
- @Select("SELECT * FROM prophase_anemometry_data_org t1 where t1.equipment_id = #{equipmentId} and t1.ts >= #{startTime} and t1.ts <= #{endTime}")
- List<ProphaseAnemometryData> selectAll(@Param("equipmentId") String equipmentId, @Param("startTime") Timestamp startTime, @Param("endTime") Timestamp endTime);
- }
|