From d3326987a499f47fc66f0d565a322d7d518976f5 Mon Sep 17 00:00:00 2001 From: RuoYi Date: Mon, 21 Oct 2024 16:19:17 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E8=BA=AB=E4=BB=BD=E8=AF=81?= =?UTF-8?q?=E8=84=B1=E6=95=8F=E6=AD=A3=E5=88=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/java/com/ruoyi/common/enums/DesensitizedType.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ruoyi-common/src/main/java/com/ruoyi/common/enums/DesensitizedType.java b/ruoyi-common/src/main/java/com/ruoyi/common/enums/DesensitizedType.java index 450812293..07f02eebc 100644 --- a/ruoyi-common/src/main/java/com/ruoyi/common/enums/DesensitizedType.java +++ b/ruoyi-common/src/main/java/com/ruoyi/common/enums/DesensitizedType.java @@ -23,7 +23,7 @@ public enum DesensitizedType /** * 身份证,中间10位星号替换 */ - ID_CARD(s -> s.replaceAll("(\\d{4})\\d{10}(\\d{4})", "$1** **** ****$2")), + ID_CARD(s -> s.replaceAll("(\\d{4})\\d{10}(\\d{3}[Xx]|\\d{4})", "$1** **** ****$2")), /** * 手机号,中间4位星号替换