From d28f4a170d1d494c70391476b804922d6fb0aca4 Mon Sep 17 00:00:00 2001 From: zhaoqifeng Date: Tue, 7 Jun 2022 17:47:56 +0800 Subject: [PATCH] =?UTF-8?q?=E7=BB=91=E5=AE=9A=E6=88=BF=E5=B1=8Bbug?= =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../mine/service/impl/PersonalCenterServiceImpl.java | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/epmet-module/resi-mine/resi-mine-server/src/main/java/com/epmet/modules/mine/service/impl/PersonalCenterServiceImpl.java b/epmet-module/resi-mine/resi-mine-server/src/main/java/com/epmet/modules/mine/service/impl/PersonalCenterServiceImpl.java index a508fffe31..5c4788f7b7 100644 --- a/epmet-module/resi-mine/resi-mine-server/src/main/java/com/epmet/modules/mine/service/impl/PersonalCenterServiceImpl.java +++ b/epmet-module/resi-mine/resi-mine-server/src/main/java/com/epmet/modules/mine/service/impl/PersonalCenterServiceImpl.java @@ -28,11 +28,14 @@ public class PersonalCenterServiceImpl implements PersonalCenterService { @Override public InitInfoResultDTO initInfo(TokenDto tokenDto) { + InitInfoResultDTO resultDTO = new InitInfoResultDTO(); Result baseInfoResult = epmetUserOpenFeignClient.selectUserBaseInfo(tokenDto); - if (!baseInfoResult.success() || null == baseInfoResult.getData()) { + if (!baseInfoResult.success()) { throw new RenException(baseInfoResult.getCode(), baseInfoResult.getMsg()); } - InitInfoResultDTO resultDTO = new InitInfoResultDTO(); + if (null == baseInfoResult.getData()) { + return resultDTO; + } resultDTO.setHeadImgUrl(baseInfoResult.getData().getHeadImgUrl()); resultDTO.setSurname(baseInfoResult.getData().getSurname()); resultDTO.setName(baseInfoResult.getData().getName());