ProphaseAnemometryDataOrgMapper.java 1.6 KB

12345678910111213141516171819202122232425262728293031
  1. package com.jiayue.biz.mapper;
  2. import com.baomidou.dynamic.datasource.annotation.DS;
  3. import com.baomidou.mybatisplus.core.mapper.BaseMapper;
  4. import com.jiayue.biz.domain.ProphaseAnemometryData;
  5. import com.jiayue.biz.domain.ProphaseAnemometryDataOrg;
  6. import org.apache.ibatis.annotations.Insert;
  7. import org.apache.ibatis.annotations.Mapper;
  8. import org.apache.ibatis.annotations.Param;
  9. import org.apache.ibatis.annotations.Select;
  10. import java.sql.Timestamp;
  11. import java.util.List;
  12. @DS("tdengine")
  13. public interface ProphaseAnemometryDataOrgMapper extends BaseMapper<ProphaseAnemometryDataOrg> {
  14. @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})")
  15. int insertOneWithNew(ProphaseAnemometryData one);
  16. //所有层高风速风向平均值
  17. @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}")
  18. List<ProphaseAnemometryData> selectAve(@Param("equipmentId") String equipmentId, @Param("startTime") Timestamp startTime, @Param("endTime") Timestamp endTime);
  19. @Select("SELECT * FROM prophase_anemometry_data_org t1 where t1.equipment_id = #{equipmentId} and t1.ts >= #{startTime} and t1.ts <= #{endTime}")
  20. List<ProphaseAnemometryData> selectAll(@Param("equipmentId") String equipmentId, @Param("startTime") Timestamp startTime, @Param("endTime") Timestamp endTime);
  21. }