From 94e3a209bb9a31c4ddbd31494bb1628f6fe2e96e Mon Sep 17 00:00:00 2001
From: lidongdong <1459917685@qq.com>
Date: 星期三, 12 十月 2022 17:54:49 +0800
Subject: [PATCH] 新增首页工单 办事指南排行榜接口 导办人员排行榜接口 组织排行榜接口 新增办事指南统计接口 导办人员统计接口 组织胖行榜统计接口
---
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/utlis/SensitiveUtil.java | 16 +++++++++++++++-
1 files changed, 15 insertions(+), 1 deletions(-)
diff --git a/springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/utlis/SensitiveUtil.java b/springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/utlis/SensitiveUtil.java
index 41ff1c2..f6278fb 100644
--- a/springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/utlis/SensitiveUtil.java
+++ b/springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/utlis/SensitiveUtil.java
@@ -1,5 +1,8 @@
package com.panzhihua.common.utlis;
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
+
/**
* @description: 身份证手机号脱敏处理
* @author: Null
@@ -20,7 +23,6 @@
return phoneNumber;
}
-
/**
* 身份证号码脱敏处理
*
@@ -39,4 +41,16 @@
return idNumber;
}
+
+ public static String replaceName(String str) {
+ if(StringUtils.isNotEmpty(str)){
+ if(str.length()==2){
+ str=str.replace(str.substring(1),"*");
+ }
+ if(str.length()>2) {
+ str=str.replace(str.substring(1,str.length()-1),"*");
+ }
+ }
+ return str;
+ }
}
--
Gitblit v1.7.1