From 47da52461dd5e2648abbd7825ce92e88f64907b5 Mon Sep 17 00:00:00 2001 From: wans <747101512@qq.com> Date: Thu, 22 Apr 2021 15:43:31 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=9F=BA=E7=A1=80=E4=BF=A1?= =?UTF-8?q?=E6=81=AF=E6=9F=A5=E8=AF=A2=E6=97=B6gender=E5=AD=97=E6=AE=B5?= =?UTF-8?q?=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../impl/BasePopulationInfoServiceImpl.java | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/main/java/com/cm/population/service/basepopulationinfo/impl/BasePopulationInfoServiceImpl.java b/src/main/java/com/cm/population/service/basepopulationinfo/impl/BasePopulationInfoServiceImpl.java index dec331b..6e0f231 100644 --- a/src/main/java/com/cm/population/service/basepopulationinfo/impl/BasePopulationInfoServiceImpl.java +++ b/src/main/java/com/cm/population/service/basepopulationinfo/impl/BasePopulationInfoServiceImpl.java @@ -302,10 +302,8 @@ public class BasePopulationInfoServiceImpl extends AbstractService implements IB if(populationInfoDTO == null){ return new BasePopulationInfoDTO(); } - if(populationInfoDTO != null){ - DataDictionaryDTO dictDto = dataDictionaryService.getDictionaryById(populationInfoDTO.getGender()); - populationInfoDTO.setGender(dictDto.getDictionaryName()); - } + DataDictionaryDTO dictDto = dataDictionaryService.getDictionaryById(populationInfoDTO.getGender()); + populationInfoDTO.setGender(dictDto == null ? "" : dictDto.getDictionaryName()); return populationInfoDTO; } } \ No newline at end of file