Commit 004f40c3 authored by 谢森's avatar 谢森

<dev> 删除注释代码

parent 4e0789d8
...@@ -21,39 +21,32 @@ public class MaskUtil { ...@@ -21,39 +21,32 @@ public class MaskUtil {
* 姓名正则 * 姓名正则
*/ */
static Pattern namePattern = Pattern.compile("([\\u4e00-\\u9fa5]{1,20}|[a-zA-Z\\.\\s]{1,20})"); static Pattern namePattern = Pattern.compile("([\\u4e00-\\u9fa5]{1,20}|[a-zA-Z\\.\\s]{1,20})");
// Pattern namePattern = Pattern.compile(maskRegexConfig.getNameRegExp());
/** /**
* 手机号正则 * 手机号正则
*/ */
static Pattern mobilePattern = Pattern.compile("((13[0-9])|(14[5,7])|(15[0-3,5-9])|(17[0,3,5-8])|(18[0-9])|(147))" + static Pattern mobilePattern = Pattern.compile("((13[0-9])|(14[5,7])|(15[0-3,5-9])|(17[0,3,5-8])|(18[0-9])|(147))" +
"\\d{8}"); "\\d{8}");
// Pattern mobilePattern = Pattern.compile(maskRegexConfig.getMobileRegExp());
/** /**
* 电话号码正则 * 电话号码正则
*/ */
static Pattern phonePattern = Pattern.compile("(\\d{3,4}-)?\\d{6,8}"); static Pattern phonePattern = Pattern.compile("(\\d{3,4}-)?\\d{6,8}");
// Pattern phonePattern = Pattern.compile(maskRegexConfig.getPhoneRegExp());
/** /**
* 邮箱正则 * 邮箱正则
*/ */
static Pattern emailPattern = Pattern.compile("\\w+([-+.]\\w+)*@\\w+([-.]\\w+)*\\.\\w+([-.]\\w+)*"); static Pattern emailPattern = Pattern.compile("\\w+([-+.]\\w+)*@\\w+([-.]\\w+)*\\.\\w+([-.]\\w+)*");
// Pattern emailPattern = Pattern.compile(maskRegexConfig.getEmailRegExp());
/** /**
* 身份证号码(15位)正则 * 身份证号码(15位)正则
*/ */
static Pattern idPattern15 = Pattern.compile("[1-9]\\d{7}((0\\d)|(1[0-2]))(([0|1|2]\\d)|3[0-1])\\d{3}"); static Pattern idPattern15 = Pattern.compile("[1-9]\\d{7}((0\\d)|(1[0-2]))(([0|1|2]\\d)|3[0-1])\\d{3}");
// Pattern idPattern15 = Pattern.compile(maskRegexConfig.getIdRegExp15());
/** /**
* 身份证号码(18位)正则 * 身份证号码(18位)正则
*/ */
static Pattern idPattern18 = Pattern.compile("[1-9]\\d{5}[1-9]\\d{3}((0\\d)|(1[0-2]))(([0|1|2]\\d)|3[0-1])\\d{3}" + static Pattern idPattern18 = Pattern.compile("[1-9]\\d{5}[1-9]\\d{3}((0\\d)|(1[0-2]))(([0|1|2]\\d)|3[0-1])\\d{3}" +
"([0-9Xx])"); "([0-9Xx])");
// Pattern idPattern18 = Pattern.compile(maskRegexConfig.getIdRegExp18());
/** /**
* 家庭住址正则 * 家庭住址正则
*/ */
static Pattern addressPattern = Pattern.compile("([\\u4E00-\\u9FA5A-Za-z0-9_]+(省|市|区|县|道|路|街|号|弄|条|室)){2,}"); static Pattern addressPattern = Pattern.compile("([\\u4E00-\\u9FA5A-Za-z0-9_]+(省|市|区|县|道|路|街|号|弄|条|室)){2,}");
// Pattern addressPattern = Pattern.compile(maskRegexConfig.getAddressRegExp());
/** /**
* ip地址正则 * ip地址正则
* // static Pattern ipPattern = Pattern.compile("^((\\d|[1-9]\\d|1\\d\\d|2[0-4]\\d|25[0-5]|[*])\\.){3} * // static Pattern ipPattern = Pattern.compile("^((\\d|[1-9]\\d|1\\d\\d|2[0-4]\\d|25[0-5]|[*])\\.){3}
...@@ -61,13 +54,11 @@ public class MaskUtil { ...@@ -61,13 +54,11 @@ public class MaskUtil {
*/ */
static Pattern ipPattern = Pattern.compile("((2[0-4]\\d|25[0-5]|[01]?\\d\\d?)\\.){3}" + static Pattern ipPattern = Pattern.compile("((2[0-4]\\d|25[0-5]|[01]?\\d\\d?)\\.){3}" +
"(2[0-4]\\d|25[0-5]|[01]?\\d\\d?)"); "(2[0-4]\\d|25[0-5]|[01]?\\d\\d?)");
// Pattern ipPattern = Pattern.compile(maskRegexConfig.getIpRegExp());
/** /**
* mac地址正则 * mac地址正则
*/ */
static Pattern macPattern = Pattern.compile("([A-Fa-f0-9]{2}-){5}[A-Fa-f0-9]{2}"); static Pattern macPattern = Pattern.compile("([A-Fa-f0-9]{2}-){5}[A-Fa-f0-9]{2}");
// Pattern macPattern = Pattern.compile(maskRegexConfig.getMacRegExp());
static List<Pattern> patterns = new ArrayList<Pattern>() {{ static List<Pattern> patterns = new ArrayList<Pattern>() {{
add(macPattern); add(macPattern);
...@@ -91,7 +82,6 @@ public class MaskUtil { ...@@ -91,7 +82,6 @@ public class MaskUtil {
for (int i = 0; i < matcher.group().length(); i++) { for (int i = 0; i < matcher.group().length(); i++) {
replaceStr = replaceStr.concat("*"); replaceStr = replaceStr.concat("*");
} }
// System.out.println(replaceStr);
value = value.replace(matcher.group(), replaceStr); value = value.replace(matcher.group(), replaceStr);
} }
} }
...@@ -116,23 +106,5 @@ public class MaskUtil { ...@@ -116,23 +106,5 @@ public class MaskUtil {
map.put("message", "王海鹰,372925199008075158#15000101879"); map.put("message", "王海鹰,372925199008075158#15000101879");
map.put("messid", "0000011404342B32233DDCDA"); map.put("messid", "0000011404342B32233DDCDA");
System.out.println(maskUtil.mask(map)); System.out.println(maskUtil.mask(map));
// String mobile = "15000101879";
//
// Pattern pattern = Pattern.compile("(13\\d|14[579]|15[^4\\D]|17[^49\\D]|18\\d)\\d{8}");
// Matcher m = pattern.matcher(mobile);
////
// System.out.println(m.matches());
// if(m.matches()){
// System.out.println(m.group());
//
// String replaceStr = "";
// for(int i=0; i < m.group().length(); i++){
// replaceStr = replaceStr.concat("*");
// }
// System.out.println(replaceStr);
// mobile = mobile.replaceAll(m.group(), replaceStr);
// System.out.println(mobile);
// }
} }
} }
...@@ -209,7 +209,6 @@ public class AvroSerializer { ...@@ -209,7 +209,6 @@ public class AvroSerializer {
} catch (Exception e) { } catch (Exception e) {
System.out.println("序列化失败" + e); System.out.println("序列化失败" + e);
} }
// GenericRecord s = AvroDeserializerFactory.getTopicmetadataDeserializer().deserializing(returnstr);
return byteArray; return byteArray;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment