记录任务下发历史和接收是否成功

This commit is contained in:
2025-09-25 00:17:01 +08:00
parent 6b931648dc
commit e2e21601f4
7 changed files with 161 additions and 29 deletions

View File

@@ -72,8 +72,11 @@ func NewApplication(configPath string) (*Application, error) {
// 初始化传感器数据仓库
sensorDataRepo := repository.NewGormSensorDataRepository(storage.GetDB())
// 初始化命令下发历史仓库
deviceCommandLogRepo := repository.NewGormDeviceCommandLogRepository(storage.GetDB())
// 初始化设备上行监听器
listenHandler := transport.NewChirpStackListener(logger, sensorDataRepo, deviceRepo)
listenHandler := transport.NewChirpStackListener(logger, sensorDataRepo, deviceRepo, deviceCommandLogRepo)
// 初始化计划触发器管理器
analysisPlanTaskManager := task.NewAnalysisPlanTaskManager(planRepo, pendingTaskRepo, executionLogRepo, logger)