Browse Source

/epmetuser/userbaseinfo/getUserInfo/{userId}性别位置

dev
yinzuomei 3 years ago
parent
commit
edfa7ffcd8
  1. 22
      epmet-user/epmet-user-server/src/main/java/com/epmet/redis/UserBaseInfoRedis.java

22
epmet-user/epmet-user-server/src/main/java/com/epmet/redis/UserBaseInfoRedis.java

@ -131,15 +131,19 @@ public class UserBaseInfoRedis {
String gridFullName = gridInfoCache.getGridNamePath();
baseInfo.setRegisteredGridName(gridFullName);
StringBuffer buffer = new StringBuffer(baseInfo.getSurname());
switch (baseInfo.getGender()) {
case NumConstant.ONE_STR:
buffer.append(ModuleConstant.RESI_USER_NICKNAME_SUFFIX_MALE);
break;
case NumConstant.TWO_STR:
buffer.append(ModuleConstant.RESI_USER_NICKNAME_SUFFIX_FEMALE);
break;
default:
buffer.append(ModuleConstant.RESI_USER_NICKNAME_SUFFIX_GENDER_UNKNOWN);
if(StringUtils.isNotBlank(baseInfo.getGender())){
switch (baseInfo.getGender()) {
case NumConstant.ONE_STR:
buffer.append(ModuleConstant.RESI_USER_NICKNAME_SUFFIX_MALE);
break;
case NumConstant.TWO_STR:
buffer.append(ModuleConstant.RESI_USER_NICKNAME_SUFFIX_FEMALE);
break;
default:
buffer.append(ModuleConstant.RESI_USER_NICKNAME_SUFFIX_GENDER_UNKNOWN);
}
}else{
buffer.append(ModuleConstant.RESI_USER_NICKNAME_SUFFIX_GENDER_UNKNOWN);
}
baseInfo.setShowName(buffer.toString());
}

Loading…
Cancel
Save