HistorydataPointMapper.xml 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  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.HistorydataPointMapper">
  6. <resultMap type="HistorydataPoint" id="HistorydataPointResult">
  7. <result property="nohis" column="nohis"/>
  8. <result property="statTime1" column="stat_time1"/>
  9. <result property="statTime2" column="stat_time2"/>
  10. <result property="statTime3" column="stat_time3"/>
  11. <result property="statTime4" column="stat_time4"/>
  12. <result property="statTime5" column="stat_time5"/>
  13. <result property="statTime6" column="stat_time6"/>
  14. <result property="data1" column="data1"/>
  15. <result property="data2" column="data2"/>
  16. <result property="data3" column="data3"/>
  17. <result property="data4" column="data4"/>
  18. </resultMap>
  19. <sql id="selectHistorydataPointVo">
  20. select nohis, stat_time1, stat_time2, stat_time3, stat_time4, stat_time5, stat_time6, data1, data2, data3, data4 from historydata_point
  21. </sql>
  22. <select id="selectHistorydataPointList" parameterType="HistorydataPoint" resultMap="HistorydataPointResult">
  23. <include refid="selectHistorydataPointVo"/>
  24. <where>
  25. <if test="nohis != null ">and nohis = #{nohis}</if>
  26. <if test="statTime1 != null ">and stat_time1 = #{statTime1}</if>
  27. <if test="statTime2 != null ">and stat_time2 = #{statTime2}</if>
  28. <if test="statTime3 != null ">and stat_time3 = #{statTime3}</if>
  29. <if test="statTime4 != null ">and stat_time4 = #{statTime4}</if>
  30. <if test="statTime5 != null ">and stat_time5 = #{statTime5}</if>
  31. <if test="statTime6 != null ">and stat_time6 = #{statTime6}</if>
  32. <if test="data1 != null ">and data1 = #{data1}</if>
  33. <if test="data2 != null ">and data2 = #{data2}</if>
  34. <if test="data3 != null ">and data3 = #{data3}</if>
  35. <if test="data4 != null ">and data4 = #{data4}</if>
  36. <if test="params.beginDataTime != null and params.beginDataTime != '' and params.endDataTime != null and params.endDataTime != ''">
  37. and stat_time4 between to_date(#{params.beginDataTime},'yyyy-MM-dd HH24:MI:SS') and
  38. to_date(#{params.endDataTime},'yyyy-MM-dd HH24:MI:SS')
  39. </if>
  40. </where>
  41. </select>
  42. <select id="selectHistorydataPointById" parameterType="Long" resultMap="HistorydataPointResult">
  43. <include refid="selectHistorydataPointVo"/>
  44. where nohis = #{nohis}
  45. </select>
  46. </mapper>