feat(server-go): 蚕房健康画像与年度发病统计(#24)

This commit is contained in:
weijuesen
2026-08-13 13:34:13 +08:00
parent 1a6bcd27fe
commit cbcb22e851
5 changed files with 252 additions and 6 deletions
+2 -1
View File
@@ -91,7 +91,7 @@ func main() {
api.Use(middleware.Auth(cfg))
// 公开路由(auth 白名单中跳过鉴权)
handler.RegisterHealthRoutes(api)
handler.RegisterHealthRoutes(api, db)
handler.RegisterVideoStreamRoutes(api, transcodeSvc, db, mediaSvc, cfg)
// JWT 保护的业务路由
@@ -119,6 +119,7 @@ func main() {
handler.RegisterConsultationRoutes(api, db)
handler.RegisterDetectionMethodRoutes(api, db)
handler.RegisterTraceRoutes(api, db)
handler.RegisterHealthRoutes(api, db)
// 启动高发病天气预警定时任务(未配置时跳过)
go startWeatherAlertLoop(db, weatherSvc, time.Duration(cfg.QWeatherIntervalMin)*time.Minute)