feat: file upload and download

This commit is contained in:
2026-04-28 19:38:02 +08:00
parent f9077dafcf
commit f6c06bd7ad
7 changed files with 512 additions and 8 deletions
+3
View File
@@ -2,6 +2,7 @@ package main
import (
"hr_receiver/config"
"hr_receiver/controllers"
"hr_receiver/models"
"hr_receiver/mqtt"
"hr_receiver/routes"
@@ -28,6 +29,7 @@ func main() {
&models.RegressionResult{},
&models.User{},
&models.UserRegionBinding{},
&models.AppFile{},
&models.MqttHeartRateRecord{},
&models.MqttStepCountRecord{},
&models.MqttGatewayStatusRecord{},
@@ -40,6 +42,7 @@ func main() {
if err := mqtt.Start(config.DB, config.App.MQTT); err != nil {
log.Printf("mqtt listener start failed: %v", err)
}
controllers.StartLessonPlanCleanupJob(config.DB)
// 启动服务
r := routes.SetupRouter()