[WebApi]新增無氣象資料提示
This commit is contained in:
parent
bd57b6a5f0
commit
bfe4c01caa
@ -60,14 +60,14 @@ namespace FrontendWebApi.ApiControllers
|
|||||||
(
|
(
|
||||||
SELECT w.get_value
|
SELECT w.get_value
|
||||||
FROM api_weateher w
|
FROM api_weateher w
|
||||||
WHERE w.weather_type = '溫度' AND @DateNow >= w.start_time
|
WHERE w.weather_type = '溫度' AND @DateNow BETWEEN w.start_time AND DATE_ADD(w.start_time, INTERVAL 1 HOUR)
|
||||||
order by created_at desc, id desc
|
order by created_at desc, id desc
|
||||||
limit 1
|
limit 1
|
||||||
) AS Temp,
|
) AS Temp,
|
||||||
(
|
(
|
||||||
SELECT w.get_value
|
SELECT w.get_value
|
||||||
FROM api_weateher w
|
FROM api_weateher w
|
||||||
WHERE w.weather_type = '相對濕度' AND @DateNow >= w.start_time
|
WHERE w.weather_type = '相對濕度' AND @DateNow BETWEEN w.start_time AND DATE_ADD(w.start_time, INTERVAL 1 HOUR)
|
||||||
order by created_at desc, id desc
|
order by created_at desc, id desc
|
||||||
limit 1
|
limit 1
|
||||||
) AS RH
|
) AS RH
|
||||||
|
@ -9,8 +9,8 @@ namespace FrontendWebApi.Models
|
|||||||
{
|
{
|
||||||
public string WxText { get; set; }
|
public string WxText { get; set; }
|
||||||
public string Wx { get; set; }
|
public string Wx { get; set; }
|
||||||
public int Temp { get; set; }
|
public int? Temp { get; set; }
|
||||||
public int RH { get; set; }
|
public int? RH { get; set; }
|
||||||
}
|
}
|
||||||
|
|
||||||
public class DefaultBuilding
|
public class DefaultBuilding
|
||||||
|
Loading…
Reference in New Issue
Block a user