NoscaleWtgDaPfPeriodDataMapper.xml 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. <?xml version="1.0" encoding="UTF-8" ?>
  2. <!DOCTYPE mapper
  3. PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
  4. "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
  5. <mapper namespace="com.ruoyi.predict.mapper.NoscaleWtgDaPfPeriodDataMapper">
  6. <resultMap type="NoscaleWtgDaPfPeriodData" id="NoscaleWtgDaPfPeriodDataResult">
  7. <result property="wtgNo" column="wtg_no"/>
  8. <result property="modelNo" column="model_no"/>
  9. <result property="dataTime" column="data_time"/>
  10. <result property="value" column="value"/>
  11. <result property="dataFlag" column="data_flag"/>
  12. </resultMap>
  13. <sql id="selectNoscaleWtgDaPfPeriodDataVo">
  14. select wtg_no, model_no, data_time, value, data_flag from noscale_wtg_da_pf_period_data
  15. </sql>
  16. <select id="selectNoscaleWtgDaPfPeriodDataList" parameterType="NoscaleWtgDaPfPeriodData"
  17. resultMap="NoscaleWtgDaPfPeriodDataResult">
  18. <include refid="selectNoscaleWtgDaPfPeriodDataVo"/>
  19. <where>
  20. <if test="wtgNo != null ">and wtg_no = #{wtgNo}</if>
  21. <if test="modelNo != null ">and model_no = #{modelNo}</if>
  22. <if test="value != null ">and value = #{value}</if>
  23. <if test="dataFlag != null ">and data_flag = #{dataFlag}</if>
  24. <if test="params.beginDataTime != null and params.beginDataTime != '' and params.endDataTime != null and params.endDataTime != ''">
  25. and data_time between to_date(#{params.beginDataTime},'yyyy-MM-dd HH24:MI:SS') and
  26. to_date(#{params.endDataTime},'yyyy-MM-dd HH24:MI:SS')
  27. </if>
  28. <if test="dataTime != null ">and data_time = #{dataTime}</if>
  29. </where>
  30. order by data_time asc
  31. </select>
  32. <select id="selectNoscaleWtgDaPfPeriodDataById" parameterType="Long" resultMap="NoscaleWtgDaPfPeriodDataResult">
  33. <include refid="selectNoscaleWtgDaPfPeriodDataVo"/>
  34. where wtg_no = #{wtgNo}
  35. </select>
  36. </mapper>