feat(server-go): AI 巡检闭环后端(inspection_records + /inspections 幂等接口)

This commit is contained in:
weijuesen
2026-08-12 16:24:55 +08:00
parent b89ad5e865
commit 210bd6cefb
10 changed files with 354 additions and 3 deletions
+2
View File
@@ -72,6 +72,7 @@ func main() {
s3Svc := service.NewS3Service(cfg)
mediaSvc := service.NewMediaService(cfg)
transcodeSvc := service.NewTranscodeService(db, s3Svc)
aiSvc := service.NewAIClient(cfg.AIServiceBase)
// 9. 创建 Gin 引擎
gin.SetMode(gin.ReleaseMode)
@@ -107,6 +108,7 @@ 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)
// 启动后台设备状态同步(每 30 秒查询 WVP 设备在线状态)
go startDeviceStatusSync(db, mediaSvc)