|
|
@@ -176,32 +176,6 @@ private static final long serialVersionUID=1L;
|
|
|
@ExcelExport(value = "注销时间")
|
|
|
private String cancellationTime;
|
|
|
|
|
|
- private static final Pattern ID_CARD_MASK_PATTERN = Pattern.compile("(?<=\\d{6})\\d(?=\\d{4})");
|
|
|
- private static final Pattern PHONE_NUMBER_MASK_PATTERN = Pattern.compile("(\\d{3})\\d{4}(\\d{4})");
|
|
|
-
|
|
|
- // 身份证号脱敏:显示前6位和后4位,中间用*代替
|
|
|
- public String getLegalRepresentativeId() {
|
|
|
- if (this.legalRepresentativeId == null || this.legalRepresentativeId.length() <= 10) {
|
|
|
- return this.legalRepresentativeId;
|
|
|
- }
|
|
|
- return ID_CARD_MASK_PATTERN.matcher(this.legalRepresentativeId).replaceAll("*");
|
|
|
- }
|
|
|
-
|
|
|
- // 电话号码脱敏:显示前3位和后4位,中间用*代替
|
|
|
- public String getContactPhone() {
|
|
|
- if (this.contactPhone == null || this.contactPhone.length() < 7) {
|
|
|
- return this.contactPhone;
|
|
|
- }
|
|
|
- return PHONE_NUMBER_MASK_PATTERN.matcher(this.contactPhone).replaceAll("$1****$2");
|
|
|
- }
|
|
|
- // 企业联系电话
|
|
|
- public String getEnterprisePhone() {
|
|
|
- if (this.enterprisePhone == null || this.enterprisePhone.length() < 7) {
|
|
|
- return this.enterprisePhone;
|
|
|
- }
|
|
|
- return PHONE_NUMBER_MASK_PATTERN.matcher(this.enterprisePhone).replaceAll("$1****$2");
|
|
|
- }
|
|
|
-
|
|
|
// 姓名脱敏:只保留姓氏,名字部分用*代替
|
|
|
public String getLegalRepresentative() {
|
|
|
if (this.legalRepresentative == null || this.legalRepresentative.length() <= 1) {
|
|
|
@@ -210,11 +184,4 @@ private static final long serialVersionUID=1L;
|
|
|
return this.legalRepresentative.substring(0, 1) + "*";
|
|
|
}
|
|
|
|
|
|
- public String getContactName() {
|
|
|
- if (this.contactName == null || this.contactName.length() <= 1) {
|
|
|
- return this.contactName;
|
|
|
- }
|
|
|
- return this.contactName.substring(0, 1) + "*";
|
|
|
- }
|
|
|
-
|
|
|
}
|