完善自动模式
parent
e542587200
commit
8aea454417
|
|
@ -63,6 +63,8 @@ public class DeviceStatusHandler {
|
|||
@Value("${spring.mqtt.latest-ttl-seconds:120}")
|
||||
private int latestTtlSeconds;
|
||||
|
||||
private static final String AUTO_MODE = "auto_mode";
|
||||
private static final String AUTO_OFF = "autooff";
|
||||
/**
|
||||
* 自动关任务管理器,调度/取消自动关任务
|
||||
*/
|
||||
|
|
@ -133,6 +135,10 @@ public class DeviceStatusHandler {
|
|||
if (lockHolder != null) {
|
||||
sendObj = new JSONObject(payloadObj); // 只在需要时复制
|
||||
sendObj.put("clientId", lockHolder);
|
||||
// 如果相等则为自动模式直接退出方法 不转发ack消息 自动关也不应该转发
|
||||
if (AUTO_MODE.equals(lockHolder) || AUTO_OFF.equals(lockHolder)) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue