优化脱敏组件的注释

pull/2/head
YunaiV 2023-01-21 13:17:08 +08:00
parent e7f8e0c507
commit 0763c720d2
17 changed files with 17 additions and 16 deletions

View File

@ -30,7 +30,7 @@ public @interface EmailDesensitize {
/** /**
* ; * ;
* *
* example@gmail.com e****@gmail.com * example@gmail.com e****@gmail.com
*/ */
String replacer() default "$1****$2"; String replacer() default "$1****$2";
} }

View File

@ -33,7 +33,7 @@ public @interface BankCardDesensitize {
int suffixKeep() default 2; int suffixKeep() default 2;
/** /**
* ;9988002866797031998800********31 * ; 9988002866797031 998800********31
*/ */
String replacer() default "*"; String replacer() default "*";

View File

@ -33,7 +33,7 @@ public @interface CarLicenseDesensitize {
int suffixKeep() default 1; int suffixKeep() default 1;
/** /**
* ;A66666A6***6 * ;A66666 A6***6
*/ */
String replacer() default "*"; String replacer() default "*";

View File

@ -33,7 +33,7 @@ public @interface FixedPhoneDesensitize {
int suffixKeep() default 2; int suffixKeep() default 2;
/** /**
* ;010865511220108*****22 * ;01086551122 0108*****22
*/ */
String replacer() default "*"; String replacer() default "*";

View File

@ -33,7 +33,7 @@ public @interface IdCardDesensitize {
int suffixKeep() default 2; int suffixKeep() default 2;
/** /**
* ;530321199204074611530321**********11 * ;530321199204074611 530321**********11
*/ */
String replacer() default "*"; String replacer() default "*";

View File

@ -33,7 +33,7 @@ public @interface MobileDesensitize {
int suffixKeep() default 4; int suffixKeep() default 4;
/** /**
* ;13248765917132****5917 * ;13248765917 132****5917
*/ */
String replacer() default "*"; String replacer() default "*";

View File

@ -35,7 +35,7 @@ public @interface PasswordDesensitize {
/** /**
* ; * ;
* *
* 123456****** * 123456 ******
*/ */
String replacer() default "*"; String replacer() default "*";

View File

@ -29,6 +29,7 @@ public @interface SliderDesensitize {
/** /**
* replacer * replacer
*
* prefixKeep = 1; suffixKeep = 2; replacer = "*"; * prefixKeep = 1; suffixKeep = 2; replacer = "*";
* 123456 * 123456
* 1***56 * 1***56

View File

@ -9,7 +9,7 @@ import java.lang.annotation.Annotation;
* *
* @author gaibu * @author gaibu
*/ */
public abstract class AbstractDesensitizationHandler<T extends Annotation> public abstract class AbstractSliderDesensitizationHandler<T extends Annotation>
implements DesensitizationHandler<T> { implements DesensitizationHandler<T> {
@Override @Override

View File

@ -7,7 +7,7 @@ import cn.iocoder.yudao.framework.desensitize.core.slider.annotation.BankCardDes
* *
* @author gaibu * @author gaibu
*/ */
public class BankCardDesensitization extends AbstractDesensitizationHandler<BankCardDesensitize> { public class BankCardDesensitization extends AbstractSliderDesensitizationHandler<BankCardDesensitize> {
@Override @Override
Integer getPrefixKeep(BankCardDesensitize annotation) { Integer getPrefixKeep(BankCardDesensitize annotation) {

View File

@ -7,7 +7,7 @@ import cn.iocoder.yudao.framework.desensitize.core.slider.annotation.CarLicenseD
* *
* @author gaibu * @author gaibu
*/ */
public class CarLicenseDesensitization extends AbstractDesensitizationHandler<CarLicenseDesensitize> { public class CarLicenseDesensitization extends AbstractSliderDesensitizationHandler<CarLicenseDesensitize> {
@Override @Override
Integer getPrefixKeep(CarLicenseDesensitize annotation) { Integer getPrefixKeep(CarLicenseDesensitize annotation) {
return annotation.prefixKeep(); return annotation.prefixKeep();

View File

@ -7,7 +7,7 @@ import cn.iocoder.yudao.framework.desensitize.core.slider.annotation.ChineseName
* *
* @author gaibu * @author gaibu
*/ */
public class ChineseNameDesensitization extends AbstractDesensitizationHandler<ChineseNameDesensitize> { public class ChineseNameDesensitization extends AbstractSliderDesensitizationHandler<ChineseNameDesensitize> {
@Override @Override
Integer getPrefixKeep(ChineseNameDesensitize annotation) { Integer getPrefixKeep(ChineseNameDesensitize annotation) {

View File

@ -7,7 +7,7 @@ import cn.iocoder.yudao.framework.desensitize.core.slider.annotation.SliderDesen
* *
* @author gaibu * @author gaibu
*/ */
public class DefaultDesensitizationHandler extends AbstractDesensitizationHandler<SliderDesensitize> { public class DefaultDesensitizationHandler extends AbstractSliderDesensitizationHandler<SliderDesensitize> {
@Override @Override
Integer getPrefixKeep(SliderDesensitize annotation) { Integer getPrefixKeep(SliderDesensitize annotation) {
return annotation.prefixKeep(); return annotation.prefixKeep();

View File

@ -7,7 +7,7 @@ import cn.iocoder.yudao.framework.desensitize.core.slider.annotation.FixedPhoneD
* *
* @author gaibu * @author gaibu
*/ */
public class FixedPhoneDesensitization extends AbstractDesensitizationHandler<FixedPhoneDesensitize> { public class FixedPhoneDesensitization extends AbstractSliderDesensitizationHandler<FixedPhoneDesensitize> {
@Override @Override
Integer getPrefixKeep(FixedPhoneDesensitize annotation) { Integer getPrefixKeep(FixedPhoneDesensitize annotation) {
return annotation.prefixKeep(); return annotation.prefixKeep();

View File

@ -7,7 +7,7 @@ import cn.iocoder.yudao.framework.desensitize.core.slider.annotation.IdCardDesen
* *
* @author gaibu * @author gaibu
*/ */
public class IdCardDesensitization extends AbstractDesensitizationHandler<IdCardDesensitize> { public class IdCardDesensitization extends AbstractSliderDesensitizationHandler<IdCardDesensitize> {
@Override @Override
Integer getPrefixKeep(IdCardDesensitize annotation) { Integer getPrefixKeep(IdCardDesensitize annotation) {
return annotation.prefixKeep(); return annotation.prefixKeep();

View File

@ -7,7 +7,7 @@ import cn.iocoder.yudao.framework.desensitize.core.slider.annotation.MobileDesen
* *
* @author gaibu * @author gaibu
*/ */
public class MobileDesensitization extends AbstractDesensitizationHandler<MobileDesensitize> { public class MobileDesensitization extends AbstractSliderDesensitizationHandler<MobileDesensitize> {
@Override @Override
Integer getPrefixKeep(MobileDesensitize annotation) { Integer getPrefixKeep(MobileDesensitize annotation) {

View File

@ -7,7 +7,7 @@ import cn.iocoder.yudao.framework.desensitize.core.slider.annotation.PasswordDes
* *
* @author gaibu * @author gaibu
*/ */
public class PasswordDesensitization extends AbstractDesensitizationHandler<PasswordDesensitize> { public class PasswordDesensitization extends AbstractSliderDesensitizationHandler<PasswordDesensitize> {
@Override @Override
Integer getPrefixKeep(PasswordDesensitize annotation) { Integer getPrefixKeep(PasswordDesensitize annotation) {
return annotation.prefixKeep(); return annotation.prefixKeep();