Commit 5b8e8f22 by java-李谡

短信发送

parent b29be75d
...@@ -79,9 +79,11 @@ public class SecurityPropertyPlaceholderConfigurer extends PropertyPlaceholderCo ...@@ -79,9 +79,11 @@ public class SecurityPropertyPlaceholderConfigurer extends PropertyPlaceholderCo
} }
public static void main(String[] args) { public static void main(String[] args) {
// System.out.println(DES3Utils.encrypt("foctest", CONF_DESC_KEY)); System.out.println(Util.phoneReg("18501501226"));
// System.out.println(DES3Utils.decrypt("dc6788486fc8fa46bdc79e88019874d2dba29c9323df0d41d422c89b73b481946acb4985946fc04c9e83784b79a27bf935e0dbe240259eb88daa2a68d7c26b3c05ef21acf1ec90e77072592f9207bf97", CONF_DESC_KEY)); System.out.println(Util.phoneReg("018501501226".replaceAll("^0+", "")));
// System.out.println(DES3Utils.decrypt("776b3d2f912b12f8", CONF_DESC_KEY)); System.out.println(Util.phoneReg("0018501501226".replaceAll("^0+", "")));
System.out.println(DES3Utils.decrypt("f5c9d35c1df1eb31c0f15d23ee5af33d15ee14d1133b16ae580893ec603fc77c0057d3cccb34407d0505fc99a849cd7ee060d2c605d68b21ea7fea2a325dd4026e7f13e65e216d967bc7696f608fe56ef11ae4801b727c51d09bc4beb44b24f0", CONF_DESC_KEY)); System.out.println(Util.phoneReg("51018501501226".replaceAll("^0+", "")));
System.out.println(Util.phoneReg("8618501501226".replaceAll("^0+", "")));
System.out.println(Util.phoneReg("+8618501501226".replaceAll("^0+", "")));
} }
} }
...@@ -25,7 +25,7 @@ import java.util.regex.Pattern; ...@@ -25,7 +25,7 @@ import java.util.regex.Pattern;
public class Util { public class Util {
static Pattern p = Pattern.compile("^1(3([0-35-9]\\d|4[1-8])|4[14-9]\\d|5([0125689]\\d|7[1-79])|66\\d|7[2-35-8]\\d|8\\d{2}|9[89]\\d)\\d{7}$"); static Pattern p = Pattern.compile("^((\\+86)|(86))?[1][3456789][0-9]{9}$");
public static String phoneNumberFormat(String phone) { public static String phoneNumberFormat(String phone) {
if (phone == null) { if (phone == null) {
......
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