1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
| package com.common.core.domain;
|
| /**
| * @description: 脱敏参数
| * @author: holden
| * @time: 2022-01-20 10:50
| */
| public enum DesensitiveType {
|
| /**
| * 中文名
| */
| CHINESE_NAME(1,0, 3,null),
|
| /**
| * 身份证号
| */
| ID_CARD(8,3,10,null),
| /**
| * 手机号
| */
| MOBILE_PHONE(3,2,11,null),
| /**
| * 地址
| */
| ADDRESS(6,0,10,null),
| /**
| * 电子邮件
| */
| EMAIL(0,0,5,"@"),
| /**
| * 银行卡
| */
| BANK_CARD(6,4,10,null),
| /**
| * 公司开户银行联号
| */
| CNAPS_CODE(2,0,10,null),
| /**
| * 邮政编码
| */
| ZIP_CODE(1,1,6,null),
| /**
| * 年龄
| */
| AGE(1,1,2,null),
| /**
| * 职务
| */
| TITLE_TYPE(1,1,5,null),
|
| /**
| * 其他文本字段类型
| */
| BASIC(1,1,10,null),
|
| /**
| * 日期
| */
| Date(1,1,6,null),
|
| /**
| * 性别
| */
| SEX(1,0, 1,null);
|
| private Integer retainLeft;
| private Integer retainRight;
| private Integer padSize;
| private String separator;
|
| DesensitiveType(Integer retainLeft, Integer retainRight, Integer padSize, String separator) {
| this.retainLeft = retainLeft;
| this.retainRight = retainRight;
| this.padSize = padSize;
| this.separator=separator;
| }
|
|
| public void setRetainLeft(Integer retainLeft) {
| this.retainLeft = retainLeft;
| }
|
| public void setRetainRight(Integer retainRight) {
| this.retainRight = retainRight;
| }
|
| public Integer getRetainLeft() {
| return retainLeft;
| }
|
| public Integer getRetainRight() {
| return retainRight;
| }
|
| public Integer getPadSize(){
| return padSize;
| }
|
| public void setPadSize(Integer padSize){
| this.padSize = padSize;
| }
|
| public String getSeparator() {
| return separator;
| }
|
| public void setSeparator(String separator) {
| this.separator = separator;
| }
| }
|
|