feat(server-go): 微信订阅消息骨架(#11,绑定/订阅/巡检触发,配置占位)

This commit is contained in:
weijuesen
2026-08-12 17:28:07 +08:00
parent 79e524b1d4
commit 921b185da2
9 changed files with 517 additions and 4 deletions
+3 -1
View File
@@ -73,6 +73,7 @@ func main() {
mediaSvc := service.NewMediaService(cfg)
transcodeSvc := service.NewTranscodeService(db, s3Svc)
aiSvc := service.NewAIClient(cfg.AIServiceBase)
wechatSvc := service.NewWechatService(cfg.WechatAppID, cfg.WechatSecret)
// 9. 创建 Gin 引擎
gin.SetMode(gin.ReleaseMode)
@@ -108,8 +109,9 @@ func main() {
handler.RegisterVideoRecordRoutes(api, db, mediaSvc, cfg)
handler.RegisterStorageRoutes(api, db)
handler.RegisterKnowledgeRoutes(api, db, s3Svc, cfg.S3BucketImages)
handler.RegisterInspectionRoutes(api, db, s3Svc, aiSvc, cfg.S3BucketImages)
handler.RegisterInspectionRoutes(api, db, s3Svc, aiSvc, cfg.S3BucketImages, wechatSvc, cfg.WechatTemplateInspection)
handler.RegisterTrayBatchRoutes(api, db)
handler.RegisterWechatRoutes(api, db, wechatSvc)
// 启动后台设备状态同步(每 30 秒查询 WVP 设备在线状态)
go startDeviceStatusSync(db, mediaSvc)