jinpengyong
2020-09-28 48bb075f91c5daf35cff0a16abe1136f132aafb4
src/main/resources/mapper/AQIMapper.xml
@@ -23,4 +23,12 @@
            #{time}
        </foreach>
    </select>
    <select id="getAqiByHour" resultType="java.util.Map">
        select DATE_FORMAT(time, '%Y-%m-%d %H:%i:%s') time,
        value
        from history_aqi_${timeUnits}
        where city_code=#{cityCode}
        and DATE_FORMAT(time, '%Y%H')=#{yearAndHour}
    </select>
</mapper>