From f9de63b6b72c97c4dfabe2a7b5aee3b8a4f11f0a Mon Sep 17 00:00:00 2001 From: vince <757871790@qq.com> Date: 星期二, 07 十一月 2023 23:57:09 +0800 Subject: [PATCH] 增加地磅按钮 --- src/main/java/com/fzzy/gateway/hx2023/websocket/WebSocketDeviceLed.java | 13 ++++++------- 1 files changed, 6 insertions(+), 7 deletions(-) diff --git a/src/main/java/com/fzzy/gateway/hx2023/websocket/WebSocketDeviceLed.java b/src/main/java/com/fzzy/gateway/hx2023/websocket/WebSocketDeviceLed.java index 7662a8a..70bed3b 100644 --- a/src/main/java/com/fzzy/gateway/hx2023/websocket/WebSocketDeviceLed.java +++ b/src/main/java/com/fzzy/gateway/hx2023/websocket/WebSocketDeviceLed.java @@ -1,7 +1,7 @@ package com.fzzy.gateway.hx2023.websocket; import com.alibaba.fastjson.JSONObject; -import com.fzzy.gateway.hx2023.ScConstant; +import com.fzzy.gateway.GatewayUtils; import com.fzzy.gateway.hx2023.data.WebSocketPacket; import lombok.extern.slf4j.Slf4j; import org.apache.commons.lang.StringUtils; @@ -13,8 +13,9 @@ import java.util.Map; import java.util.concurrent.ConcurrentHashMap; + /** - * + * 缃戝叧鎺ュ彈绯荤粺鍙戦�佺殑鎶ユ枃淇℃伅 */ @Slf4j @Component @@ -42,7 +43,7 @@ sessionPool.put(key, session); sessionIds.put(session.getId(), key); - ScConstant.updateOnline(deviceId); + GatewayUtils.updateOnline(deviceId); log.info("new webSocket,clientId={}", key); } @@ -57,7 +58,7 @@ String deviceId = key.substring(0, key.indexOf("-")); - ScConstant.updateOffOnline(deviceId); + GatewayUtils.updateOffOnline(deviceId); log.info("WebSocket杩炴帴鍏抽棴={}", key); @@ -84,7 +85,7 @@ String deviceId = key.substring(0, key.indexOf("-")); - ScConstant.updateOffOnline(deviceId); + GatewayUtils.updateOffOnline(deviceId); sessionPool.remove(key); sessionIds.remove(session.getId()); @@ -113,6 +114,4 @@ } } } - - } -- Gitblit v1.9.3