From 5a68c819cb074dcd8c5b23da8c65a2e3aabb1dfe Mon Sep 17 00:00:00 2001 From: shikong <919411476@qq.com> Date: Fri, 12 Jan 2024 14:58:57 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8F=AA=E6=B3=A8=E5=86=8C=E5=B7=B2=E5=90=AF?= =?UTF-8?q?=E7=94=A8=E8=AE=BE=E5=A4=87?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../mocking/service/gb28181/register/RegisterService.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/gb28181-mocking-service/src/main/java/cn/skcks/docking/gb28181/mocking/service/gb28181/register/RegisterService.java b/gb28181-mocking-service/src/main/java/cn/skcks/docking/gb28181/mocking/service/gb28181/register/RegisterService.java index 37699d2..6b21409 100644 --- a/gb28181-mocking-service/src/main/java/cn/skcks/docking/gb28181/mocking/service/gb28181/register/RegisterService.java +++ b/gb28181-mocking-service/src/main/java/cn/skcks/docking/gb28181/mocking/service/gb28181/register/RegisterService.java @@ -50,10 +50,10 @@ public class RegisterService { public DeferredResult> register() { DeferredResult> result = new DeferredResult<>(TimeUnit.SECONDS.toMillis(TIMEOUT)); - List allDevice = deviceService.getAllDevice(); + List enabledDevice = deviceService.getAllEnabledDevice(); - List>[]> completableFutures = ListUtil.split(allDevice, 10).stream().map(items -> { - CompletableFuture>[] array = allDevice.stream().map(this::register).toArray(CompletableFuture[]::new); + List>[]> completableFutures = ListUtil.split(enabledDevice, 10).stream().map(items -> { + CompletableFuture>[] array = enabledDevice.stream().map(this::register).toArray(CompletableFuture[]::new); CompletableFuture.allOf(array); return array; }).toList();