From 2be5f5212aa46a6f840c8623c6bb86f331fa6557 Mon Sep 17 00:00:00 2001 From: fengyarnom Date: Thu, 15 May 2025 17:29:57 +0800 Subject: [PATCH] =?UTF-8?q?fix=EF=BC=9A=E4=BF=AE=E6=94=B9=E4=BA=86?= =?UTF-8?q?=E8=81=9A=E5=90=88=E6=9F=A5=E8=AF=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- internal/dao/sensor.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/dao/sensor.go b/internal/dao/sensor.go index 77a299f..c22ba59 100644 --- a/internal/dao/sensor.go +++ b/internal/dao/sensor.go @@ -64,7 +64,7 @@ func (dao *SensorDAO) GetAggregatedData(start, end time.Time, interval string) ( // 构建通用查询 query := ` SELECT - MIN(timestamp) as ts, + DATE_FORMAT(MIN(timestamp), '%Y-%m-%dT%H:%i:%S') as ts, ROUND(AVG(temperature)/10, 1) as avg_temp, MAX(rainfall) - MIN(rainfall) as rainfall, ROUND(AVG(humidity)/10, 1) as avg_humidity,