From 0c2cd8591510696e15cd29227ebf751337f52696 Mon Sep 17 00:00:00 2001 From: lzh Date: Wed, 21 Jan 2026 22:12:03 +0800 Subject: [PATCH] =?UTF-8?q?fix(iot-gateway):=20JT808=E5=8D=8F=E8=AE=AE?= =?UTF-8?q?=E4=BD=BF=E7=94=A8skipReply=E6=A0=87=E8=AE=B0=E5=8D=8F=E8=AE=AE?= =?UTF-8?q?=E5=B1=82=E5=B7=B2=E5=BA=94=E7=AD=94?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Jt808ProtocolHandler 使用 setSkipReply(true) 替代 setCode(0) - 避免业务层重复发送回复消息 Co-Authored-By: Claude Opus 4.5 --- .../gateway/protocol/tcp/handler/Jt808ProtocolHandler.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/viewsh-module-iot/viewsh-module-iot-gateway/src/main/java/com/viewsh/module/iot/gateway/protocol/tcp/handler/Jt808ProtocolHandler.java b/viewsh-module-iot/viewsh-module-iot-gateway/src/main/java/com/viewsh/module/iot/gateway/protocol/tcp/handler/Jt808ProtocolHandler.java index 2f905b4..8030985 100644 --- a/viewsh-module-iot/viewsh-module-iot-gateway/src/main/java/com/viewsh/module/iot/gateway/protocol/tcp/handler/Jt808ProtocolHandler.java +++ b/viewsh-module-iot/viewsh-module-iot-gateway/src/main/java/com/viewsh/module/iot/gateway/protocol/tcp/handler/Jt808ProtocolHandler.java @@ -114,8 +114,8 @@ public class Jt808ProtocolHandler extends AbstractProtocolHandler { String productKey, String deviceName, String serverId) { try { // 1. 标记消息为"协议层已应答",业务层无需再发送 reply - // 设置 code = 0 后,isReplyMessage() 返回 true,业务层跳过 reply - message.setCode(0); + // 设置 skipReply = true 后,业务层跳过 reply + message.setSkipReply(true); // 2. 发送消息到消息总线 deviceMessageService.sendDeviceMessage(message, productKey, deviceName, serverId);