Commit 87b2c6a9dc0d3f7878bbd31f613f0486eb9d1332

Authored by liquanyu
1 parent c0e76cf2a3

复诊

Showing 1 changed file with 11 additions and 3 deletions

platform-operate-api/src/main/java/com/lyms/platform/operate/web/utils/FunvCommonUtil.java View file @ 87b2c6a
... ... @@ -57,9 +57,17 @@
57 57 * @return
58 58 */
59 59 public static String getXingPhone(String phone){
60   - if (StringUtils.isNotEmpty(phone)){
61   - String a = phone.substring(0,3)+"****"+phone.substring(7,11);
62   - return a;
  60 + if (StringUtils.isNotEmpty(phone) ){
  61 + if (phone.length() >= 11)
  62 + {
  63 + String a = phone.substring(0,3)+"****"+phone.substring(7,11);
  64 + return a;
  65 + }
  66 + else
  67 + {
  68 + return phone.substring(0,3)+"****";
  69 + }
  70 +
63 71 }
64 72 return "";
65 73 }