From 04b46d80259aeb557839f673928b766638dad4d3 Mon Sep 17 00:00:00 2001 From: huang <1724659546@qq.com> Date: Fri, 28 Nov 2025 14:37:53 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E6=97=A5=E5=BF=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- internal/domain/device/general_device_service.go | 6 +++--- .../transport/lora/lora_mesh_uart_passthrough_transport.go | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/internal/domain/device/general_device_service.go b/internal/domain/device/general_device_service.go index 4364735..78bd2b8 100644 --- a/internal/domain/device/general_device_service.go +++ b/internal/domain/device/general_device_service.go @@ -223,7 +223,7 @@ func (g *GeneralDeviceService) Collect(ctx context.Context, areaControllerID uin logger.Errorf("创建待采集请求失败 (CorrelationID: %s): %v", correlationID, err) return err } - logger.Infof("成功创建待采集请求 (CorrelationID: %s, DeviceID: %d)", correlationID, areaController.ID) + logger.Debugf("成功创建待采集请求 (CorrelationID: %s, DeviceID: %d)", correlationID, areaController.ID) // 5. 构建最终的空中载荷 batchCmd := &proto.BatchCollectCommand{ @@ -240,12 +240,12 @@ func (g *GeneralDeviceService) Collect(ctx context.Context, areaControllerID uin logger.Errorf("序列化采集指令失败 (CorrelationID: %s): %v", correlationID, err) return err } - logger.Infof("构造空中载荷成功: networkID: %v, payload: %v", networkID, instruction) + logger.Debugf("构造空中载荷成功: networkID: %v, payload: %v", networkID, instruction) if _, err := g.comm.Send(serviceCtx, networkID, payload); err != nil { logger.DPanicf("待采集请求 (CorrelationID: %s) 已创建,但发送到设备失败: %v。数据可能不一致!", correlationID, err) return err } - logger.Infof("成功将采集请求 (CorrelationID: %s) 发送到设备 %s", correlationID, networkID) + logger.Debugf("成功将采集请求 (CorrelationID: %s) 发送到设备 %s", correlationID, networkID) return nil } diff --git a/internal/infra/transport/lora/lora_mesh_uart_passthrough_transport.go b/internal/infra/transport/lora/lora_mesh_uart_passthrough_transport.go index a302e48..063fe5e 100644 --- a/internal/infra/transport/lora/lora_mesh_uart_passthrough_transport.go +++ b/internal/infra/transport/lora/lora_mesh_uart_passthrough_transport.go @@ -266,7 +266,7 @@ func (t *LoRaMeshUartPassthroughTransport) executeSend(ctx context.Context, req frame.WriteByte(currentChunk) // 当前包序号 frame.Write(chunk) // 数据块 - logger.Infof("构建LoRa数据包: %v", frame.Bytes()) + logger.Debugf("构建LoRa数据包: %v", frame.Bytes()) _, err := t.port.Write(frame.Bytes()) if err != nil { return nil, fmt.Errorf("写入串口失败: %w", err)