|
@ -23,6 +23,7 @@ import com.baomidou.mybatisplus.core.metadata.IPage; |
|
|
import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; |
|
|
import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; |
|
|
import com.epmet.commons.tools.constant.FieldConstant; |
|
|
import com.epmet.commons.tools.constant.FieldConstant; |
|
|
import com.epmet.commons.tools.constant.NumConstant; |
|
|
import com.epmet.commons.tools.constant.NumConstant; |
|
|
|
|
|
import com.epmet.commons.tools.constant.StrConstant; |
|
|
import com.epmet.commons.tools.exception.RenException; |
|
|
import com.epmet.commons.tools.exception.RenException; |
|
|
import com.epmet.commons.tools.page.PageData; |
|
|
import com.epmet.commons.tools.page.PageData; |
|
|
import com.epmet.commons.tools.utils.ConvertUtils; |
|
|
import com.epmet.commons.tools.utils.ConvertUtils; |
|
@ -181,6 +182,21 @@ public class UserBaseInfoServiceImpl extends BaseServiceImpl<UserBaseInfoDao, Us |
|
|
UserBaseInfoResultDTO baseInfo = userBaseInfoRedis.getUserInfo(id); |
|
|
UserBaseInfoResultDTO baseInfo = userBaseInfoRedis.getUserInfo(id); |
|
|
//为了保证传过来的user数量与返回的一致,就算查出的用户信息为空也要添加进集合里
|
|
|
//为了保证传过来的user数量与返回的一致,就算查出的用户信息为空也要添加进集合里
|
|
|
//if(null != baseInfo && StringUtils.isNotBlank(baseInfo.getId())){
|
|
|
//if(null != baseInfo && StringUtils.isNotBlank(baseInfo.getId())){
|
|
|
|
|
|
if (StringUtils.isNotBlank(baseInfo.getStreet()) && StringUtils.isNotBlank(baseInfo.getSurname())) { |
|
|
|
|
|
if ("1".equals(baseInfo.getGender())) { |
|
|
|
|
|
// 男
|
|
|
|
|
|
baseInfo.setUserShowName(baseInfo.getStreet().concat(StrConstant.HYPHEN).concat(baseInfo.getSurname().concat("先生"))); |
|
|
|
|
|
} else if ("2".equals(baseInfo.getGender())) { |
|
|
|
|
|
// 女
|
|
|
|
|
|
baseInfo.setUserShowName(baseInfo.getStreet().concat(StrConstant.HYPHEN).concat(baseInfo.getSurname().concat("女士"))); |
|
|
|
|
|
} else { |
|
|
|
|
|
// 0 未知
|
|
|
|
|
|
baseInfo.setUserShowName(baseInfo.getStreet().concat(StrConstant.HYPHEN).concat(baseInfo.getSurname().concat("女士/先生"))); |
|
|
|
|
|
} |
|
|
|
|
|
} else { |
|
|
|
|
|
// 社会为微信昵称
|
|
|
|
|
|
baseInfo.setUserShowName(baseInfo.getNickname()); |
|
|
|
|
|
} |
|
|
userBaseInfoList.add(baseInfo); |
|
|
userBaseInfoList.add(baseInfo); |
|
|
//}
|
|
|
//}
|
|
|
}); |
|
|
}); |
|
|