diff --git a/nxhs-service/src/main/java/cc/yunxi/service/impl/CommonService.java b/nxhs-service/src/main/java/cc/yunxi/service/impl/CommonService.java index ad37681..7e44e21 100644 --- a/nxhs-service/src/main/java/cc/yunxi/service/impl/CommonService.java +++ b/nxhs-service/src/main/java/cc/yunxi/service/impl/CommonService.java @@ -172,7 +172,7 @@ public class CommonService implements ICommonService { command.setRemark("登录成功"); boolean connected = mqttClient.isConnected(); if (connected) { - mqttClient.publish(wxLoginDTO.getDevCode() + "command", JSONUtil.toJsonStr(command)); + mqttClient.publish(wxLoginDTO.getDevCode() + "/command", JSONUtil.toJsonStr(command)); log.info("扫描登录 回收员 ===> 通知设备 code:{}", wxLoginDTO.getDevCode()); } else { log.error("扫描登录失败 回收员 ===> mqtt未连接 code:{}", wxLoginDTO.getDevCode()); @@ -214,7 +214,7 @@ public class CommonService implements ICommonService { command.setRemark("登录成功"); boolean connected = mqttClient.isConnected(); if (connected) { - mqttClient.publish(wxLoginDTO.getDevCode() + "command", JSONUtil.toJsonStr(command)); + mqttClient.publish(wxLoginDTO.getDevCode() + "/command", JSONUtil.toJsonStr(command)); log.info("扫描登录 散户 ===> 通知设备 code:{}", wxLoginDTO.getDevCode()); } else { log.error("扫描登录失败 散户 ===> mqtt未连接 code:{}", wxLoginDTO.getDevCode());