From ff6990e48fa918c5f44f890dfdb6af83a6874428 Mon Sep 17 00:00:00 2001 From: weiyachao <13526234727@126.com> Date: Wed, 18 Oct 2023 17:15:37 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B0=83=E8=AF=95=E9=9F=B3=E4=B9=90=E5=BB=B6?= =?UTF-8?q?=E8=BF=9F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/qiuguo/iot/third/service/MusicService.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/iot-common/iot-third/src/main/java/com/qiuguo/iot/third/service/MusicService.java b/iot-common/iot-third/src/main/java/com/qiuguo/iot/third/service/MusicService.java index ba7473c..a1b89f1 100644 --- a/iot-common/iot-third/src/main/java/com/qiuguo/iot/third/service/MusicService.java +++ b/iot-common/iot-third/src/main/java/com/qiuguo/iot/third/service/MusicService.java @@ -64,7 +64,7 @@ public class MusicService { if (type == 1) { return webClient.get().uri(baseUrl+"/search?keywords="+keyword).retrieve() .bodyToMono(SearchResponse.class) - .delaySubscription(Duration.ofMillis(300), Schedulers.boundedElastic()) + .delaySubscription(Duration.ofMillis(1000), Schedulers.boundedElastic()) .flatMap(res -> { if (!Objects.equals(res.getCode(), 200)) { return Mono.empty(); @@ -91,7 +91,7 @@ public class MusicService { } else { return webClient.get().uri(baseUrl+"/search?keywords="+keyword+"&type=100").retrieve() .bodyToMono(SingerResponse.class) - .delaySubscription(Duration.ofMillis(300), Schedulers.boundedElastic()) + .delaySubscription(Duration.ofMillis(1000), Schedulers.boundedElastic()) .flatMap(res -> { if (!Objects.equals(res.getCode(), 200) && res.getResult().getArtists().size() == 0) { return Mono.empty(); @@ -99,7 +99,7 @@ public class MusicService { String id = res.getResult().getArtists().get(0).getId(); return webClient.get().uri(baseUrl+"/artist/top/song?id="+id).retrieve() .bodyToMono(SingerSongsResponse.class) - .delaySubscription(Duration.ofMillis(300), Schedulers.boundedElastic()) + .delaySubscription(Duration.ofMillis(1000), Schedulers.boundedElastic()) .flatMap(song -> { if (Objects.equals(200, song.getCode()) && song.getSongs().size() > 0) { String ids = song.getSongs().stream().limit(3)