AreaDaEfPeriodDataMapper.xml 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  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.AreaDaEfPeriodDataMapper">
  6. <resultMap type="AreaDaEfPeriodData" id="AreaDaEfPeriodDataResult">
  7. <result property="areaNo" column="area_no"/>
  8. <result property="modelNo" column="model_no"/>
  9. <result property="timeScale" column="time_scale"/>
  10. <result property="dataTime" column="data_time"/>
  11. <result property="value" column="value"/>
  12. <result property="dataFlag" column="data_flag"/>
  13. </resultMap>
  14. <sql id="selectAreaDaEfPeriodDataVo">
  15. select area_no, model_no, time_scale, data_time, value, data_flag from area_da_ef_period_data
  16. </sql>
  17. <select id="selectAreaDaEfPeriodDataList" parameterType="AreaDaEfPeriodData" resultMap="AreaDaEfPeriodDataResult">
  18. <include refid="selectAreaDaEfPeriodDataVo"/>
  19. <where>
  20. <if test="areaNo != null ">and area_no = #{areaNo}</if>
  21. <if test="modelNo != null ">and model_no = #{modelNo}</if>
  22. <if test="timeScale != null ">and time_scale = #{timeScale}</if>
  23. <if test="value != null ">and value = #{value}</if>
  24. <if test="dataFlag != null ">and data_flag = #{dataFlag}</if>
  25. <if test="params.beginDataTime != null and params.beginDataTime != '' and params.endDataTime != null and params.endDataTime != ''">
  26. and data_time between to_date(#{params.beginDataTime},'yyyy-MM-dd HH24:MI:SS') and
  27. to_date(#{params.endDataTime},'yyyy-MM-dd HH24:MI:SS')
  28. </if>
  29. <if test="dataTime != null ">and data_time = #{dataTime}</if>
  30. </where>
  31. order by data_time asc
  32. </select>
  33. <select id="selectAreaDaEfPeriodDataById" parameterType="Long" resultMap="AreaDaEfPeriodDataResult">
  34. <include refid="selectAreaDaEfPeriodDataVo"/>
  35. where area_no = #{areaNo}
  36. </select>
  37. </mapper>