From 7f943e54f259c7ff69c7591dbd6803171126b01e Mon Sep 17 00:00:00 2001 From: admin <weikou2014> Date: 星期五, 21 六月 2019 09:35:08 +0800 Subject: [PATCH] 发起提现增加统计,添加京东订单与商品,拼多多订单与商品 --- fanli/src/main/java/com/yeshi/fanli/util/StringUtil.java | 33 ++++++++++++++++++++++----------- 1 files changed, 22 insertions(+), 11 deletions(-) diff --git a/fanli/src/main/java/com/yeshi/fanli/util/StringUtil.java b/fanli/src/main/java/com/yeshi/fanli/util/StringUtil.java index b0c3346..3b7a5ee 100644 --- a/fanli/src/main/java/com/yeshi/fanli/util/StringUtil.java +++ b/fanli/src/main/java/com/yeshi/fanli/util/StringUtil.java @@ -4,6 +4,7 @@ import java.lang.reflect.Method; import java.security.MessageDigest; import java.security.NoSuchAlgorithmException; +import java.util.List; import java.util.regex.Matcher; import java.util.regex.Pattern; @@ -40,7 +41,7 @@ // 鏄惁涓虹數璇濆彿鐮� public static boolean isMobile(String mobile) { - String regex = "^((13[0-9])|(17[0-9])|(15[^4,\\D])|(18[0-9])|(19[0-9])|(16[0-9]))\\d{8}$"; + String regex = "^((13[0-9])|(14[0-9])|(17[0-9])|(15[^4,\\D])|(18[0-9])|(19[0-9])|(16[0-9]))\\d{8}$"; Pattern p = Pattern.compile(regex); Matcher m = p.matcher(mobile); @@ -92,7 +93,7 @@ } return code; } - + public static String getVerifyCode(int count) { String sts = "0123456789"; String code = ""; @@ -102,8 +103,6 @@ } return code; } - - // 锟斤拷取锟斤拷锟脚凤拷锟酵的革拷式 public static String getMessageStyle(String code) { @@ -285,11 +284,23 @@ } public static boolean isJson(String content) { - try { - JSONObject.fromObject(content); - return true; - } catch (Exception e) { - return false; - } - } + try { + JSONObject.fromObject(content); + return true; + } catch (Exception e) { + return false; + } + } + + public static String concat(List list, String sperator) { + if (list == null) + return null; + String str = ""; + for (Object obj : list) { + str += obj + sperator; + } + if (str.endsWith(sperator)) + str = str.substring(0, str.length() - sperator.length()); + return str; + } } -- Gitblit v1.8.0