From 236cf59aae727d304487676413c4337f73b16e67 Mon Sep 17 00:00:00 2001
From: vince <757871790@qq.com>
Date: 星期二, 16 一月 2024 12:14:19 +0800
Subject: [PATCH] Merge remote-tracking branch 'orgin/igds-api-gateway' into igds-api-gateway

---
 src/main/java/com/fzzy/gateway/GatewayUtils.java |   14 ++++++++++++++
 1 files changed, 14 insertions(+), 0 deletions(-)

diff --git a/src/main/java/com/fzzy/gateway/GatewayUtils.java b/src/main/java/com/fzzy/gateway/GatewayUtils.java
index 4414d4b..7e4df85 100644
--- a/src/main/java/com/fzzy/gateway/GatewayUtils.java
+++ b/src/main/java/com/fzzy/gateway/GatewayUtils.java
@@ -58,6 +58,7 @@
 
         return null;
     }
+
     public static GatewayDevice getCacheByDeviceSIp(String ip) {
         Collection<GatewayDevice> list = allCacheDevice();
         if (null == list || list.isEmpty()) return null;
@@ -124,4 +125,17 @@
     public static Collection<GatewayDevice> listDeviceWeight() {
         return cacheMapDeviceWeight.values();
     }
+
+    public static GatewayDevice getCacheByDepotSysId(String depotSysId) {
+
+        if (null == depotSysId) return null;
+        Collection<GatewayDevice> list = allCacheDevice();
+        if (null == list || list.isEmpty()) return null;
+
+        for (GatewayDevice device : list) {
+            if (null == device.getDepotIdSys()) continue;
+            if (depotSysId.equals(device.getDepotIdSys())) return device;
+        }
+        return null;
+    }
 }

--
Gitblit v1.9.3