lizijie
2019-07-25 30d1267479ad9cb076cb2692befc6fe3a53fa7d9
src/main/resources/mapper/HangzhouAqiMapper.xml
@@ -32,4 +32,19 @@
          )
          order by time asc
    </select>
    <select id="getAqisByOrganizationId" resultType="map">
      SELECT
         h.aqi_json ->> '$.AQI' * 1 aqi,
         DATE_FORMAT( h.time, '%H' ) * 1 time
      FROM
         hangzhou_aqi h
      <where>
         h.city_code = #{cityCode}
      AND h.time <![CDATA[<]]> #{end}
      </where>
      ORDER BY
         h.time DESC
      LIMIT 24
    </select>
</mapper>