浏览代码

修复积分商城会员没有手机号的bug

Jacky Wong 4 年之前
父节点
当前提交
66b714dc6f

+ 5 - 1
member-services/src/main/java/com/liangjian/dataplatform/member/service/impl/WeixinUserInfoQueryService.java

@@ -57,7 +57,11 @@ public class WeixinUserInfoQueryService implements IWeixinUserInfoQueryService,
         Page<WeixinUserInfo> weixinUserInfos=weixinUserInfoRepository.findAll(specification, pageable);
         for (WeixinUserInfo weixinUserInfo:weixinUserInfos.getContent()){
             String sePhone=iSecretEncodeDecodeService.decode(weixinUserInfo.getSecretPhone());
-            weixinUserInfo.setRemark(sePhone.substring(0,3)+"****"+sePhone.substring(7,sePhone.length()));
+            if (sePhone == null || sePhone.isEmpty()) {
+                weixinUserInfo.setRemark("***********");
+            } else {
+                weixinUserInfo.setRemark(sePhone.substring(0, 3) + "****" + sePhone.substring(7, sePhone.length()));
+            }
         }
         return weixinUserInfos;
     }