WfYcHistoryData1Mapper.xml 2.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  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.WfYcHistoryData1Mapper">
  6. <resultMap type="WfYcHistoryData1" id="WfYcHistoryData1Result">
  7. <result property="analogNo" column="analog_no"/>
  8. <result property="dataTime" column="data_time"/>
  9. <result property="ycRawVal" column="yc_raw_val"/>
  10. <result property="ycVal" column="yc_val"/>
  11. <result property="dataFlag" column="data_flag"/>
  12. </resultMap>
  13. <sql id="selectWfYcHistoryData1Vo">
  14. select analog_no, data_time, yc_raw_val, yc_val, data_flag from wf_yc_history_data1
  15. </sql>
  16. <select id="selectWfYcHistoryData1List" parameterType="WfYcHistoryData1" resultMap="WfYcHistoryData1Result">
  17. <include refid="selectWfYcHistoryData1Vo"/>
  18. <where>
  19. <if test="analogNo != null ">and analog_no = #{analogNo}</if>
  20. <if test="ycRawVal != null ">and yc_raw_val = #{ycRawVal}</if>
  21. <if test="ycVal != null ">and yc_val = #{ycVal}</if>
  22. <if test="dataFlag != null ">and data_flag = #{dataFlag}</if>
  23. <if test="params.beginDataTime != null and params.beginDataTime != '' and params.endDataTime != null and params.endDataTime != ''">
  24. and data_time between to_date(#{params.beginDataTime},'yyyy-MM-dd HH24:MI:SS') and
  25. to_date(#{params.endDataTime},'yyyy-MM-dd HH24:MI:SS')
  26. </if>
  27. <if test="dataTime != null ">and data_time = #{dataTime}</if>
  28. </where>
  29. </select>
  30. <select id="selectWfYcHistoryData1ById" parameterType="Long" resultMap="WfYcHistoryData1Result">
  31. <include refid="selectWfYcHistoryData1Vo"/>
  32. where analog_no = #{analogNo}
  33. </select>
  34. <select id="selectWfYcHistoryData1" parameterType="WfYcHistoryData1" resultMap="WfYcHistoryData1Result">
  35. <include refid="selectWfYcHistoryData1Vo"/>
  36. where analog_no = #{analogNo} and data_time = #{dateTime}
  37. </select>
  38. <select id="selectWfYcHistoryData11" parameterType="WfYcHistoryData1" resultMap="WfYcHistoryData1Result">
  39. <include refid="selectWfYcHistoryData1Vo"/>
  40. where analog_no = #{analogNo} and data_time > #{dateTime}
  41. </select>
  42. </mapper>