AreaPeriodDataMapper.xml 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637
  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.AreaPeriodDataMapper">
  6. <resultMap type="AreaPeriodData" id="AreaPeriodDataResult">
  7. <result property="areaNo" column="area_no"/>
  8. <result property="dataTime" column="data_time"/>
  9. <result property="p" column="p"/>
  10. <result property="windSpeed" column="wind_speed"/>
  11. <result property="temp" column="temp"/>
  12. <result property="dataFlag" column="data_flag"/>
  13. </resultMap>
  14. <sql id="selectAreaPeriodDataVo">
  15. select area_no, data_time, p, wind_speed, temp, data_flag from area_period_data
  16. </sql>
  17. <select id="selectAreaPeriodDataList" parameterType="AreaPeriodData" resultMap="AreaPeriodDataResult">
  18. <include refid="selectAreaPeriodDataVo"/>
  19. <where>
  20. <if test="areaNo != null ">and area_no = #{areaNo}</if>
  21. <if test="dataTime != null ">and data_time = #{dataTime}</if>
  22. <if test="p != null ">and p = #{p}</if>
  23. <if test="windSpeed != null ">and wind_speed = #{windSpeed}</if>
  24. <if test="temp != null ">and temp = #{temp}</if>
  25. <if test="dataFlag != null ">and data_flag = #{dataFlag}</if>
  26. </where>
  27. </select>
  28. <select id="selectAreaPeriodDataById" parameterType="Long" resultMap="AreaPeriodDataResult">
  29. <include refid="selectAreaPeriodDataVo"/>
  30. where area_no = #{areaNo}
  31. </select>
  32. </mapper>