diff --git a/ruoyi-common/ruoyi-common-mqtt/src/main/java/org/dromara/common/mqtt/server/MqttGateway.java b/ruoyi-common/ruoyi-common-mqtt/src/main/java/org/dromara/common/mqtt/server/MqttGateway.java index f3a43a08e..b832918f7 100644 --- a/ruoyi-common/ruoyi-common-mqtt/src/main/java/org/dromara/common/mqtt/server/MqttGateway.java +++ b/ruoyi-common/ruoyi-common-mqtt/src/main/java/org/dromara/common/mqtt/server/MqttGateway.java @@ -163,7 +163,7 @@ public class MqttGateway { * @param command 命令内容 */ public void sendCommand(String deviceCode, String command) { - String topic = "iot-hazard/" + deviceCode; + String topic = "iot_hazard/" + deviceCode; // 发布消息,QoS=1,不保留 publish(topic, command, 1, false); }