diff --git a/src/main/java/com/genersoft/iot/vmp/gb28181/session/CatalogDataManager.java b/src/main/java/com/genersoft/iot/vmp/gb28181/session/CatalogDataManager.java index ac5119e3..d0a7dc12 100755 --- a/src/main/java/com/genersoft/iot/vmp/gb28181/session/CatalogDataManager.java +++ b/src/main/java/com/genersoft/iot/vmp/gb28181/session/CatalogDataManager.java @@ -257,4 +257,20 @@ public class CatalogDataManager implements CommandLineRunner { catalogData.setErrorMsg(errorMsg); catalogData.setTime(Instant.now()); } + + public int size(String deviceId) { + CatalogData catalogData = dataMap.get(deviceId); + if (catalogData == null) { + return 0; + } + return catalogData.getRedisKeysForChannel().size(); + } + + public int sumNum(String deviceId) { + CatalogData catalogData = dataMap.get(deviceId); + if (catalogData == null) { + return 0; + } + return catalogData.getTotal(); + } }