From 8dc8133fb93405c6fc34c9c3c6c6bbce09ebe7f0 Mon Sep 17 00:00:00 2001
From: admin <weikou2014>
Date: 星期二, 24 十二月 2019 10:52:52 +0800
Subject: [PATCH] 品牌商品更新调整 订单维权修改
---
fanli/src/main/java/com/yeshi/fanli/util/account/UserUtil.java | 97 +++++++++++++++++++++++++++---------------------
1 files changed, 54 insertions(+), 43 deletions(-)
diff --git a/fanli/src/main/java/com/yeshi/fanli/util/account/UserUtil.java b/fanli/src/main/java/com/yeshi/fanli/util/account/UserUtil.java
index ad5bce2..ecb280c 100644
--- a/fanli/src/main/java/com/yeshi/fanli/util/account/UserUtil.java
+++ b/fanli/src/main/java/com/yeshi/fanli/util/account/UserUtil.java
@@ -68,19 +68,16 @@
return String.format(Constant.systemCommonConfig.getBaseUserRankIconUrl() + "/rank_picture_%s.png", rank + "");
}
-
-
- public static String getInviteShortLink (Long uid) {
- return HttpUtil.getShortLink("http://" + Constant.wxGZConfig.getLoginHost() + "/"
- + Constant.systemCommonConfig.getProjectName() +
- "/client/threeShareNew?uid=" + uid +"&_=" + java.lang.System.currentTimeMillis());
- }
-
-
-
- public static String getInviteCode(Long uid) {
- long num = 1000000000L + uid;
+ public static String getInviteShortLink(Long uid) {
+ return HttpUtil.getShortLink(
+ "http://" + Constant.wxGZConfig.getLoginHost() + "/" + Constant.systemCommonConfig.getProjectName()
+ + "/client/threeShareNew?uid=" + uid + "&_=" + java.lang.System.currentTimeMillis());
+ }
+
+ public static String getInviteCode(int base, Long uid) {
+
+ long num = base * 1000000000L + uid ;
return convert10To36(num);
}
@@ -137,37 +134,7 @@
name = dest.getName().charAt(0) + "*";
dest.setName(name);
- String account = "";
- if (dest.getAccount().indexOf("@") > -1) {// 閭
- int index = dest.getAccount().indexOf("@");
-
- for (int i = 0; i < dest.getAccount().length(); i++) {
- if (i < 3 || i >= index)
- account += dest.getAccount().charAt(i);
- else
- account += "*";
- }
- } else if (StringUtil.isMobile(dest.getAccount())) {// 鐢佃瘽
- account = dest.getAccount().substring(0, 3) + "*****"
- + dest.getAccount().substring(dest.getAccount().length() - 2, dest.getAccount().length());
-
- } else {// 鍏朵粬
- if (dest.getAccount().length() >= 6) {
- for (int i = 0; i < dest.getAccount().length(); i++) {
- if (i < 3 || i >= dest.getAccount().length() - 2)
- account += dest.getAccount().charAt(i);
- else
- account += "*";
- }
- } else {
- for (int i = 0; i < dest.getAccount().length(); i++) {
- if (i < 1 || i >= dest.getAccount().length() - 1)
- account += dest.getAccount().charAt(i);
- else
- account += "*";
- }
- }
- }
+ String account = filterAlipayAccount(dest.getAccount());
dest.setAccount(account);
}
@@ -177,4 +144,48 @@
return dest;
}
+ public static String filterAlipayAccount(String alipayAccount) {
+ String account = "";
+ if (alipayAccount.indexOf("@") > -1) {// 閭
+ int index = alipayAccount.indexOf("@");
+
+ for (int i = 0; i < alipayAccount.length(); i++) {
+ if (i < 3 || i >= index)
+ account += alipayAccount.charAt(i);
+ else
+ account += "*";
+ }
+ } else if (StringUtil.isMobile(alipayAccount)) {// 鐢佃瘽
+ account = alipayAccount.substring(0, 3) + "*****"
+ + alipayAccount.substring(alipayAccount.length() - 2, alipayAccount.length());
+
+ } else {// 鍏朵粬
+ if (alipayAccount.length() >= 6) {
+ for (int i = 0; i < alipayAccount.length(); i++) {
+ if (i < 3 || i >= alipayAccount.length() - 2)
+ account += alipayAccount.charAt(i);
+ else
+ account += "*";
+ }
+ } else {
+ for (int i = 0; i < alipayAccount.length(); i++) {
+ if (i < 1 || i >= alipayAccount.length() - 1)
+ account += alipayAccount.charAt(i);
+ else
+ account += "*";
+ }
+ }
+ }
+ return account;
+ }
+
+ public static String filterOrderId(String orderId) {
+ if (orderId == null || orderId.length() <= 6)
+ return orderId;
+ if (orderId.length() <= 16) {// 闅愯棌2浣�
+ return orderId.substring(0, orderId.length() - 2) + "**";
+ } else {// 闅愯棌6浣�
+ return orderId.substring(0, orderId.length() - 6) + "******";
+ }
+ }
}
--
Gitblit v1.8.0