From 3722ec8031b4319f0a2662fa3a5a57f06774aa9b Mon Sep 17 00:00:00 2001 From: huang <1724659546@qq.com> Date: Tue, 30 Sep 2025 00:32:56 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B3=A8=E5=85=A5=E4=BE=9D=E8=B5=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- internal/core/application.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/internal/core/application.go b/internal/core/application.go index 7244a69..3767c85 100644 --- a/internal/core/application.go +++ b/internal/core/application.go @@ -64,6 +64,9 @@ func NewApplication(configPath string) (*Application, error) { // 初始化设备仓库 deviceRepo := repository.NewGormDeviceRepository(storage.GetDB()) + // 初始化区域主控仓库 + areaControllerRepo := repository.NewGormAreaControllerRepository(storage.GetDB()) + // 初始化计划仓库 planRepo := repository.NewGormPlanRepository(storage.GetDB()) @@ -89,7 +92,7 @@ func NewApplication(configPath string) (*Application, error) { auditService := audit.NewService(userActionLogRepo, logger) // 初始化设备上行监听器 - listenHandler := transport.NewChirpStackListener(logger, sensorDataRepo, deviceRepo, deviceCommandLogRepo, pendingCollectionRepo) + listenHandler := transport.NewChirpStackListener(logger, sensorDataRepo, deviceRepo, areaControllerRepo, deviceCommandLogRepo, pendingCollectionRepo) // 初始化计划触发器管理器 analysisPlanTaskManager := task.NewAnalysisPlanTaskManager(planRepo, pendingTaskRepo, executionLogRepo, logger)