mirror of
				https://gitee.com/hhyykk/ipms-sjy.git
				synced 2025-10-31 18:28:43 +08:00 
			
		
		
		
	优化脱敏组件的注释
This commit is contained in:
		| @@ -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"; | ||||||
| } | } | ||||||
|   | |||||||
| @@ -33,7 +33,7 @@ public @interface BankCardDesensitize { | |||||||
|     int suffixKeep() default 2; |     int suffixKeep() default 2; | ||||||
|  |  | ||||||
|     /** |     /** | ||||||
|      * 替换规则,银行卡号;比如:9988002866797031脱敏之后为998800********31 |      * 替换规则,银行卡号; 比如:9988002866797031 脱敏之后为 998800********31 | ||||||
|      */ |      */ | ||||||
|     String replacer() default "*"; |     String replacer() default "*"; | ||||||
|  |  | ||||||
|   | |||||||
| @@ -33,7 +33,7 @@ public @interface CarLicenseDesensitize { | |||||||
|     int suffixKeep() default 1; |     int suffixKeep() default 1; | ||||||
|  |  | ||||||
|     /** |     /** | ||||||
|      * 替换规则,车牌号;比如:粤A66666脱敏之后为粤A6***6 |      * 替换规则,车牌号;比如:粤A66666 脱敏之后为粤A6***6 | ||||||
|      */ |      */ | ||||||
|     String replacer() default "*"; |     String replacer() default "*"; | ||||||
|  |  | ||||||
|   | |||||||
| @@ -33,7 +33,7 @@ public @interface FixedPhoneDesensitize { | |||||||
|     int suffixKeep() default 2; |     int suffixKeep() default 2; | ||||||
|  |  | ||||||
|     /** |     /** | ||||||
|      * 替换规则,固定电话;比如:01086551122脱敏之后为0108*****22 |      * 替换规则,固定电话;比如:01086551122 脱敏之后为 0108*****22 | ||||||
|      */ |      */ | ||||||
|     String replacer() default "*"; |     String replacer() default "*"; | ||||||
|  |  | ||||||
|   | |||||||
| @@ -33,7 +33,7 @@ public @interface IdCardDesensitize { | |||||||
|     int suffixKeep() default 2; |     int suffixKeep() default 2; | ||||||
|  |  | ||||||
|     /** |     /** | ||||||
|      * 替换规则,身份证号码;比如:530321199204074611脱敏之后为530321**********11 |      * 替换规则,身份证号码;比如:530321199204074611 脱敏之后为 530321**********11 | ||||||
|      */ |      */ | ||||||
|     String replacer() default "*"; |     String replacer() default "*"; | ||||||
|  |  | ||||||
|   | |||||||
| @@ -33,7 +33,7 @@ public @interface MobileDesensitize { | |||||||
|     int suffixKeep() default 4; |     int suffixKeep() default 4; | ||||||
|  |  | ||||||
|     /** |     /** | ||||||
|      * 替换规则,手机号;比如:13248765917脱敏之后为132****5917 |      * 替换规则,手机号;比如:13248765917 脱敏之后为 132****5917 | ||||||
|      */ |      */ | ||||||
|     String replacer() default "*"; |     String replacer() default "*"; | ||||||
|  |  | ||||||
|   | |||||||
| @@ -35,7 +35,7 @@ public @interface PasswordDesensitize { | |||||||
|     /** |     /** | ||||||
|      * 替换规则,密码; |      * 替换规则,密码; | ||||||
|      * |      * | ||||||
|      * 比如:123456脱敏之后为****** |      * 比如:123456 脱敏之后为 ****** | ||||||
|      */ |      */ | ||||||
|     String replacer() default "*"; |     String replacer() default "*"; | ||||||
|  |  | ||||||
|   | |||||||
| @@ -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 | ||||||
|   | |||||||
| @@ -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 | ||||||
| @@ -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) { | ||||||
|   | |||||||
| @@ -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(); | ||||||
|   | |||||||
| @@ -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) { | ||||||
|   | |||||||
| @@ -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(); | ||||||
|   | |||||||
| @@ -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(); | ||||||
|   | |||||||
| @@ -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(); | ||||||
|   | |||||||
| @@ -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) { | ||||||
|   | |||||||
| @@ -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(); | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user
	 YunaiV
					YunaiV