From 5b7ec8047335eb7f1bca813a969dae5ed5337bb9 Mon Sep 17 00:00:00 2001 From: yarnom Date: Tue, 14 Oct 2025 11:48:16 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E6=AD=A3=E8=9E=8D=E5=90=88?= =?UTF-8?q?=E5=87=BA=E7=8E=B0=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- internal/fusion/fusion.go | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/internal/fusion/fusion.go b/internal/fusion/fusion.go index d921e0b..9068689 100644 --- a/internal/fusion/fusion.go +++ b/internal/fusion/fusion.go @@ -509,15 +509,15 @@ func resolveIssuedAtInBucket(db *sql.DB, stationID, provider string, bucketHour func loadForecastSamples(db *sql.DB, stationID, provider string, issued time.Time) ([]forecastSample, error) { const q = ` SELECT forecast_time, - rain_mm_x1000, - temp_c_x100, - humidity_pct, - wind_speed_ms_x1000, - wind_gust_ms_x1000, - wind_dir_deg, - precip_prob_pct, - pressure_hpa_x100, - uv_index + COALESCE(rain_mm_x1000, 0), + COALESCE(temp_c_x100, 0), + COALESCE(humidity_pct, 0), + COALESCE(wind_speed_ms_x1000, 0), + COALESCE(wind_gust_ms_x1000, 0), + COALESCE(wind_dir_deg, 0), + COALESCE(precip_prob_pct, 0), + COALESCE(pressure_hpa_x100, 0), + COALESCE(uv_index, 0) FROM forecast_hourly WHERE station_id=$1 AND provider=$2 AND issued_at=$3 ORDER BY forecast_time ASC`