Commit 2e2da97a authored by 杨锐's avatar 杨锐

用户扩展信息NPE处理。

parent 6c15a35b
...@@ -382,11 +382,11 @@ public class UserServiceImpl implements IUserService, IBaseController { ...@@ -382,11 +382,11 @@ public class UserServiceImpl implements IUserService, IBaseController {
userFullResp.setIncomeRange(userExtInfo.getIncomeRangeEnum().ordinal()); userFullResp.setIncomeRange(userExtInfo.getIncomeRangeEnum().ordinal());
userFullResp.setOccupation(userExtInfo.getOccupationEnum().ordinal()); userFullResp.setOccupation(userExtInfo.getOccupationEnum().ordinal());
userFullResp.setEducation(userExtInfo.getEducationEnum().ordinal()); userFullResp.setEducation(userExtInfo.getEducationEnum().ordinal());
userFullResp.setHasCar(userExtInfo.getHasCar() ? 1 : 0); userFullResp.setHasCar(userExtInfo.getHasCar() == null ? 0 : userExtInfo.getHasCar() ? 1 : 0);
userFullResp.setHasSocialSecurity(userExtInfo.getHasSocialSecurity() ? 1 : 0); userFullResp.setHasSocialSecurity(userExtInfo.getHasSocialSecurity() == null ? 0 : userExtInfo.getHasSocialSecurity() ? 1 : 0);
userFullResp.setHasHouse(userExtInfo.getHasHouse() ? 1 : 0); userFullResp.setHasHouse(userExtInfo.getHasHouse() == null ? 0 : userExtInfo.getHasHouse() ? 1 : 0);
userFullResp.setHasCreditCard(userExtInfo.getHasCreditCard() ? 1 : 0); userFullResp.setHasCreditCard(userExtInfo.getHasCreditCard() == null ? 0 : userExtInfo.getHasCreditCard() ? 1 : 0);
userFullResp.setMarryStatus(userExtInfo.getMarryStatus().ordinal()); userFullResp.setMarryStatus(userExtInfo.getMarryStatus() != null ? userExtInfo.getMarryStatus().ordinal() : null);
} }
if (address != null) { if (address != null) {
userFullResp.setProvinceCode(address.getProvinceCode()); userFullResp.setProvinceCode(address.getProvinceCode());
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment