Authored by bblu

昵称如果是11位数字,掩盖中间4位为*

@@ -70,6 +70,10 @@ public class DrawlineList2MapServiceImpl implements IDrawlineList2MapService { @@ -70,6 +70,10 @@ public class DrawlineList2MapServiceImpl implements IDrawlineList2MapService {
70 if (null == userBaseRspBO) { 70 if (null == userBaseRspBO) {
71 continue; 71 continue;
72 } 72 }
  73 + String nickname = userBaseRspBO.getNickname();
  74 + if (nickname.matches("\\d{11}")) {
  75 + userBaseRspBO.setNickname(nickname.substring(0, 3) + "****" + nickname.substring(7));
  76 + }
73 userBaseRspBOMap.put(userBaseRspBO.getUid(), userBaseRspBO); 77 userBaseRspBOMap.put(userBaseRspBO.getUid(), userBaseRspBO);
74 } 78 }
75 79
@@ -141,4 +145,8 @@ public class DrawlineList2MapServiceImpl implements IDrawlineList2MapService { @@ -141,4 +145,8 @@ public class DrawlineList2MapServiceImpl implements IDrawlineList2MapService {
141 return drawlineUserQueueMap; 145 return drawlineUserQueueMap;
142 } 146 }
143 147
  148 + public static void main(String[] args) {
  149 + System.out.println("11111234567".matches("\\d{11}"));
  150 + }
  151 +
144 } 152 }