[WebApi]新增無氣象資料提示

This commit is contained in:
張家睿 2025-02-05 18:06:10 +08:00
parent bd57b6a5f0
commit bfe4c01caa
2 changed files with 4 additions and 4 deletions

View File

@ -60,14 +60,14 @@ namespace FrontendWebApi.ApiControllers
(
SELECT w.get_value
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
limit 1
) AS Temp,
(
SELECT w.get_value
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
limit 1
) AS RH

View File

@ -9,8 +9,8 @@ namespace FrontendWebApi.Models
{
public string WxText { get; set; }
public string Wx { get; set; }
public int Temp { get; set; }
public int RH { get; set; }
public int? Temp { get; set; }
public int? RH { get; set; }
}
public class DefaultBuilding