From df964ac5632f2f6e9c4f646213728351b180f551 Mon Sep 17 00:00:00 2001 From: pikaqiudeshujia Date: Wed, 15 May 2024 16:49:35 +0800 Subject: [PATCH] =?UTF-8?q?release-=20=E5=BC=82=E5=B8=B8=E5=A4=84=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../music/service/ArtistRepresentativeService.java | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/luoo_music/src/main/java/com/luoo/music/service/ArtistRepresentativeService.java b/luoo_music/src/main/java/com/luoo/music/service/ArtistRepresentativeService.java index 31b190a..76d02c0 100644 --- a/luoo_music/src/main/java/com/luoo/music/service/ArtistRepresentativeService.java +++ b/luoo_music/src/main/java/com/luoo/music/service/ArtistRepresentativeService.java @@ -79,9 +79,12 @@ public class ArtistRepresentativeService { artistRepresentative.setSongInfo(songInfo); case 3: // 商品 - PmsProduct pmsProduct = restTemplate.getForObject(mallConfig.getProductUrl().replace("{id}", representative.getRepresentativeId()), PmsProduct.class); - artistRepresentative.setPmsProduct(pmsProduct); - + try { + PmsProduct pmsProduct = restTemplate.getForObject(mallConfig.getProductUrl().replace("{id}", representative.getRepresentativeId()), PmsProduct.class); + artistRepresentative.setPmsProduct(pmsProduct); + } catch (Exception e) { + e.printStackTrace(); + } break; default: break; @@ -105,7 +108,7 @@ public class ArtistRepresentativeService { if (map.containsKey(pName)) { try { if (pd.getPropertyType().getName().equals("java.lang.Long")) { - if(StringUtils.isNotEmpty(map.get(pName).toString())){ + if (StringUtils.isNotEmpty(map.get(pName).toString())) { pd.getWriteMethod().invoke(obj, Long.parseLong(map.get(pName).toString())); } // else{