| | |
| | | <id column="weather_condition" property="weatherCondition" javaType="java.lang.String" jdbcType="VARCHAR"/> |
| | | <id column="temperature" property="temperature" javaType="java.lang.String" jdbcType="VARCHAR"/> |
| | | </resultMap> |
| | | |
| | | |
| | | <select id="query" resultMap="WeatherResult"> |
| | | select id, time, format(wind_speed, 2) "wind_speed", wind_direction, weather_condition, format(temperature, 2) "temperature" |
| | | from yssh_weather |
| | | <where> |
| | | time between #{begin} and #{end} |
| | | </where> |
| | | order by time; |
| | | </select> |
| | | |
| | | <select id="query2" resultMap="WeatherResult"> |
| | | select id, time, format(wind_speed, 2) "wind_speed", wind_direction, weather_condition, format(temperature, 2) "temperature" |
| | | from yssh_weather |
| | | <where> |
| | | 1 = 1 |
| | | <if test="begin != null"> |
| | | and str_to_date(time, '%Y-%m-%d-%H:%i:%S') >= #{begin} |