Browse Source

返回空串代替null

dev
wangchao 5 years ago
parent
commit
259119d309
  1. 2
      epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/UserBaseInfoServiceImpl.java

2
epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/UserBaseInfoServiceImpl.java

@ -249,7 +249,7 @@ public class UserBaseInfoServiceImpl extends BaseServiceImpl<UserBaseInfoDao, Us
result.setGender(StringUtils.equals(NumConstant.ZERO_STR,userInfo.getGender()) || StringUtils.isBlank(userInfo.getGender()) ?
ModuleConstant.GENDER_UNKNOWN : (StringUtils.equals(NumConstant.ONE_STR,userInfo.getGender()) ? ModuleConstant.GENDER_MALE : ModuleConstant.GENDER_FEMALE));
result.setAddress(new StringBuilder(StringUtils.isBlank(userInfo.getDistrict()) ? ModuleConstant.EMPTY_STR : userInfo.getDistrict()).append(StringUtils.isBlank(userInfo.getStreet())? ModuleConstant.EMPTY_STR : userInfo.getStreet()).append(StringUtils.isBlank(userInfo.getBuildingAddress()) ? ModuleConstant.EMPTY_STR : userInfo.getBuildingAddress()).toString());
result.setAssociatedGrid(userInfo.getRegisteredGridName());
result.setAssociatedGrid(StringUtils.isBlank(userInfo.getRegisteredGridName()) ? ModuleConstant.EMPTY_STR : userInfo.getRegisteredGridName());
return result;
}
return null;

Loading…
Cancel
Save