| | |
| | | </select> |
| | | |
| | | <insert id="insertAQIData"> |
| | | INSERT INTO hangzhou_aqi (time, aqi_json,city_code) values( |
| | | INSERT INTO hangzhou_aqi (`time`, aqi_json,city_code) values( |
| | | #{time}, |
| | | #{data}, |
| | | #{code} |
| | | ) |
| | | </insert> |
| | | |
| | | <select id="getO3" resultType="java.util.Map"> |
| | | select DATE_FORMAT(time, #{typeFormat}) time, |
| | | ifnull(aqi_json->'$.O3C',aqi_json->'$.O3') 'O3' |
| | | from hangzhou_aqi |
| | | where city_code=#{cityCode} |
| | | and time >= #{startTime} |
| | | AND time <![CDATA[<]]> #{endTime} |
| | | and DATE_FORMAT(time, #{typeFormat}) like '%${time}' |
| | | </select> |
| | | </mapper> |