feat: 建立统一检测任务、样本链与发病事件

This commit is contained in:
weijuesen
2026-08-14 03:31:02 +08:00
parent a25bc7abc6
commit cc93c9a053
26 changed files with 1716 additions and 32 deletions
+2 -1
View File
@@ -87,7 +87,7 @@ func main() {
wechatSvc := service.NewWechatService(cfg.WechatAppID, cfg.WechatSecret)
weatherSvc := service.NewWeatherService(cfg.QWeatherAPIKey, cfg.QWeatherLocation)
outbox := service.NewOutbox(db)
outbox.SetHandler(service.NewWechatOutboxHandler(db, wechatSvc))
outbox.SetHandler(service.NewOutboxHandler(db, wechatSvc))
outboxCtx, cancelOutbox := context.WithCancel(context.Background())
defer cancelOutbox()
outbox.Start(outboxCtx)
@@ -131,6 +131,7 @@ func main() {
handler.RegisterWechatRoutes(api, db, wechatSvc)
handler.RegisterWeatherRoutes(api, db, weatherSvc)
handler.RegisterLampRoutes(api, db, s3Svc, cfg.S3BucketImages)
handler.RegisterDetectionTaskRoutes(api, db)
handler.RegisterConsumableRoutes(api, db)
handler.RegisterConsultationRoutes(api, db)
handler.RegisterDetectionMethodRoutes(api, db)