| | |
| | | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="com.moral.mapper.ForecastWeatherMapper"> |
| | | <resultMap id="BaseResultMap" type="com.moral.entity.ForecastWeather"> |
| | | <id column="monitor_point_id" property="monitorPointId" jdbcType="INTEGER"/> |
| | | <id column="city_code" property="cityCode" jdbcType="INTEGER"/> |
| | | </resultMap> |
| | | <select id="getForecastHour" resultType="java.util.Map"> |
| | | SELECT |
| | |
| | | from forecast_weather |
| | | where time >= #{start} |
| | | AND time <![CDATA[<]]> #{end} |
| | | AND monitor_point_id=#{monitorPointId} |
| | | AND city_code=#{cityCode} |
| | | </select> |
| | | |
| | | <select id="getForecast" resultType="java.util.Map"> |
| | |
| | | from forecast_weather |
| | | where time >= #{start} |
| | | AND time <![CDATA[<]]> #{end} |
| | | AND monitor_point_id=#{monitorPointId} |
| | | AND city_code=#{cityCode} |
| | | ORDER BY |
| | | time |
| | | </select> |
| | | |
| | | <update id="updateForecastWeather"> |
| | | update forecast_weather set json=#{json} |
| | | where monitor_point_id=#{monitorPointId} |
| | | where city_code=#{cityCode} |
| | | and time=#{time} |
| | | </update> |
| | | |
| | |
| | | WHERE |
| | | time >= #{start} |
| | | AND time <![CDATA[<]]> #{end} |
| | | AND monitor_point_id = #{monitorPointId} |
| | | AND city_code = #{cityCode} |
| | | </select> |
| | | </mapper> |