From 0915f9c21ee26c3b52a763eed9000d3b165e19ce Mon Sep 17 00:00:00 2001
From: kaiyu <404897439@qq.com>
Date: Fri, 27 Nov 2020 11:22:15 +0800
Subject: [PATCH] BS登陆接口增加返回数据regionCode 开通mapPath接口,通过token获取用户地图
---
src/main/resources/mapper/ForecastWeatherMapper.xml | 29 ++++++++++++++++++++---------
1 files changed, 20 insertions(+), 9 deletions(-)
diff --git a/src/main/resources/mapper/ForecastWeatherMapper.xml b/src/main/resources/mapper/ForecastWeatherMapper.xml
index a7ecfcc..9ce0208 100644
--- a/src/main/resources/mapper/ForecastWeatherMapper.xml
+++ b/src/main/resources/mapper/ForecastWeatherMapper.xml
@@ -7,7 +7,7 @@
<select id="getForecastHour" resultType="java.util.Map">
SELECT
DATE_FORMAT(time, #{typeFormat}) time,
- json->'$.O3C' 'O3'
+ json->'$.${sensor1}' '${sensor2}'
from forecast_weather
where time >= #{start}
AND time <![CDATA[<]]> #{end}
@@ -33,13 +33,24 @@
<select id="getPrecip6Hour" resultType="java.util.Map">
- select
- round(sum(json->'$.precip'),2) 'precip6'
- FROM
- forecast_weather
- WHERE
- time >= #{start}
- AND time <![CDATA[<]]> #{end}
- AND city_code = #{cityCode}
+ select
+ round(sum(json->'$.precip'),2) 'precip6'
+ FROM
+ forecast_weather
+ WHERE
+ time >= #{start}
+ AND time <![CDATA[<]]> #{end}
+ AND city_code = #{cityCode}
+ </select>
+
+ <select id="getO38Hours" resultType="java.util.Map">
+ select
+ cast(AVG(json->'$.O3C') as UNSIGNED integer) 'O3_8H'
+ FROM
+ forecast_weather
+ WHERE
+ time >= #{start}
+ AND time <![CDATA[<]]> #{end}
+ AND city_code = #{cityCode}
</select>
</mapper>
\ No newline at end of file
--
Gitblit v1.8.0