From 0cbdd620aac13ac8b06599294183cf1246626f0e Mon Sep 17 00:00:00 2001
From: admin <weikou2014>
Date: 星期一, 16 十二月 2019 16:05:32 +0800
Subject: [PATCH] 专题版本控制
---
fanli/src/main/java/com/yeshi/fanli/controller/client/v1/UserInfoController.java | 56 +++++++++++++++++++++-----------------------------------
1 files changed, 21 insertions(+), 35 deletions(-)
diff --git a/fanli/src/main/java/com/yeshi/fanli/controller/client/v1/UserInfoController.java b/fanli/src/main/java/com/yeshi/fanli/controller/client/v1/UserInfoController.java
index 226a0cc..7d13a92 100644
--- a/fanli/src/main/java/com/yeshi/fanli/controller/client/v1/UserInfoController.java
+++ b/fanli/src/main/java/com/yeshi/fanli/controller/client/v1/UserInfoController.java
@@ -631,7 +631,9 @@
welfareCenterNews = userInfoExtra.getCouponNews();
}
- if (userInfoExtra.getInviteCode() != null && userInfoExtra.getInviteCode().trim().length() > 0) {
+ if (!StringUtil.isNullOrEmpty(userInfoExtra.getInviteCodeVip())) {
+ invitCode = userInfoExtra.getInviteCodeVip();
+ } else {
invitCode = userInfoExtra.getInviteCode();
}
}
@@ -645,13 +647,8 @@
final UserInfo uuser = user;
ThreadUtil.run(new Runnable() {
public void run() {
-
- try {
- // 鑾峰彇閭�璇风爜锛氳嫢鏃犻個璇风爜涓斿瓨鍦ㄦ湁鏁堢殑闃熷憳鍏崇郴 鍒欒嚜鍔ㄧ敓鎴愰個璇风爜
- userInfoExtraService.getUserInviteCode(uuser.getId());
- } catch (UserInfoExtraException e) {
- e.printStackTrace();
- }
+ // 鑾峰彇閭�璇风爜锛氳嫢鏃犻個璇风爜涓斿瓨鍦ㄦ湁鏁堢殑闃熷憳鍏崇郴 鍒欒嚜鍔ㄧ敓鎴愰個璇风爜
+ userInfoExtraService.getInviteCodeByUid(uuser.getId());
LogHelper.userInfo(GsonUtil.toJsonExpose(uuser));
uuser.setLastLoginIp(remotIP);
@@ -1233,7 +1230,7 @@
} else if (etype == 111) {
out.print(JsonUtil.loadFalseResult("淇敼鎵嬫満鍙峰悗锛�7澶╁唴鏃犳硶鎻愮幇"));
} else if (etype == 110) {
- out.print(JsonUtil.loadFalseResult("鏈夌淮鏉冭鍗曞皻鏈墸娆�"));
+ out.print(JsonUtil.loadFalseResult("鏈夊敭鍚庤鍗曞皻鏈墸娆�"));
}
}
@@ -1706,7 +1703,7 @@
}
boolean hasCode = false;
- String inviteCode = userInfoExtraService.getUserInviteCode(uid);
+ String inviteCode = userInfoExtraService.getInviteCodeByUid(uid);
if (inviteCode != null && inviteCode.trim().length() > 0) {
hasCode = true; // 宸叉湁閭�璇风爜
} else {
@@ -1723,8 +1720,6 @@
resultData.put("boss", bossData);
}
out.print(JsonUtil.loadTrueResult(resultData));
- } catch (UserInfoExtraException e) {
- out.print(JsonUtil.loadFalseResult(e.getMsg()));
} catch (Exception e) {
out.print(JsonUtil.loadFalseResult("缁熻澶辫触"));
e.printStackTrace();
@@ -1781,7 +1776,7 @@
}
boolean hasCode = false;
- String inviteCode = userInfoExtraService.getUserInviteCode(uid);
+ String inviteCode = userInfoExtraService.getInviteCodeByUid(uid);
if (inviteCode != null && inviteCode.trim().length() > 0) {
hasCode = true; // 宸叉湁閭�璇风爜
} else {
@@ -1796,8 +1791,6 @@
resultData.put("boss", bossData);
}
out.print(JsonUtil.loadTrueResult(resultData));
- } catch (UserInfoExtraException e) {
- out.print(JsonUtil.loadFalseResult(e.getMsg()));
} catch (Exception e) {
out.print(JsonUtil.loadFalseResult("缁熻澶辫触"));
e.printStackTrace();
@@ -1848,7 +1841,7 @@
resultData.put("boss", bossData);
boolean hasCode = false;
- String inviteCode = userInfoExtraService.getUserInviteCode(uid);
+ String inviteCode = userInfoExtraService.getInviteCodeByUid(uid);
if (inviteCode != null && inviteCode.trim().length() > 0) {
hasCode = true; // 宸叉湁閭�璇风爜
} else {
@@ -1859,8 +1852,6 @@
out.print(JsonUtil.loadTrueResult(resultData));
- } catch (UserInfoExtraException e) {
- out.print(JsonUtil.loadFalseResult(e.getMsg()));
} catch (Exception e) {
out.print(JsonUtil.loadFalseResult("缁熻澶辫触"));
e.printStackTrace();
@@ -2036,7 +2027,7 @@
try {
- String inviteCode = userInfoExtraService.getUserInviteCode(uid);
+ String inviteCode = userInfoExtraService.getInviteCodeByUid(uid);
JSONObject inviteData = new JSONObject();
if (inviteCode == null || inviteCode.trim().length() == 0) {
@@ -2054,8 +2045,6 @@
out.print(JsonUtil.loadTrueResult(data));
- } catch (UserInfoExtraException e) {
- out.print(JsonUtil.loadFalseResult(e.getMsg()));
} catch (Exception e) {
out.print(JsonUtil.loadFalseResult("鑾峰彇澶辫触"));
e.printStackTrace();
@@ -2145,11 +2134,13 @@
if (userInfoExtra.getCouponNews() != null) {
welfareCenterNews = userInfoExtra.getCouponNews();
}
-
- if (userInfoExtra.getInviteCode() != null && userInfoExtra.getInviteCode().trim().length() > 0) {
+ // vip閭�璇风爜浼樺厛
+ if (!StringUtil.isNullOrEmpty(userInfoExtra.getInviteCodeVip())) {
+ invitCode = userInfoExtra.getInviteCodeVip();
+ } else if (!StringUtil.isNullOrEmpty(userInfoExtra.getInviteCode())) {
invitCode = userInfoExtra.getInviteCode();
}
-
+
if (userInfoExtra.getUserRank() != null) {
String picture = userInfoExtra.getUserRank().getPicture();
String icon = userInfoExtra.getUserRank().getIcon();
@@ -2180,8 +2171,7 @@
data.put("user", JsonUtil.getConvertBigDecimalToStringBuilder(gsonBuilder).create().toJson(userInfo));
data.put("invitCode", invitCode); // 閭�璇风爜
- if (userInfoExtra.getInviteCodeState() != null
- && userInfoExtra.getInviteCodeState() == UserInfoExtra.INVITE_CODE_SATTE_VALID_UPDATED)
+ if (!StringUtil.isNullOrEmpty(userInfoExtra.getInviteCodeVip()))
data.put("invitCodeUpdated", true);// 閭�璇风爜鏄惁宸茬粡淇敼杩�
else
data.put("invitCodeUpdated", false);
@@ -2207,12 +2197,8 @@
final UserInfo uuser = userInfo;
ThreadUtil.run(new Runnable() {
public void run() {
- try {
- // 鑾峰彇閭�璇风爜锛氳嫢鏃犻個璇风爜涓斿瓨鍦ㄦ湁鏁堢殑闃熷憳鍏崇郴 鍒欒嚜鍔ㄧ敓鎴愰個璇风爜
- userInfoExtraService.getUserInviteCode(uuser.getId());
- } catch (UserInfoExtraException e) {
- e.printStackTrace();
- }
+ // 鑾峰彇閭�璇风爜锛氳嫢鏃犻個璇风爜涓斿瓨鍦ㄦ湁鏁堢殑闃熷憳鍏崇郴 鍒欒嚜鍔ㄧ敓鎴愰個璇风爜
+ userInfoExtraService.getInviteCodeByUid(uuser.getId());
// 鏇存柊鐢ㄦ埛闄勫姞淇℃伅锛岃�佺敤鎴蜂笉瀛樺湪鐨勯渶瑕佹坊鍔�
try {
@@ -2374,7 +2360,7 @@
if (!StringUtil.isNullOrEmpty(inviteCode)) {// 閭�璇风爜涓嶄负绌�
inviteCode = inviteCode.trim();
- if (inviteCode.length() >= 6 && inviteCode.length() <= 12) {
+ if (inviteCode.length() >= 4 && inviteCode.length() <= 12) {
if (!userVIPInfoService.isVIP(uid)) {
out.print(JsonUtil.loadFalseResult(20, "鍙湁瓒呯骇浼氬憳鎵嶈兘淇敼"));
@@ -2382,14 +2368,14 @@
}
try {
- userInfoExtraService.updateInviteCode(inviteCode, uid);
+ userInfoExtraService.updateInviteCodeVip(inviteCode, uid);
out.print(JsonUtil.loadTrueResult("淇濆瓨鎴愬姛"));
return;
} catch (UserInfoExtraException e) {
out.print(JsonUtil.loadFalseResult(e.getCode(), e.getMessage()));
}
} else {
- out.print(JsonUtil.loadFalseResult(1, "閭�璇风爜蹇呴』涓�6鍒�12浣�"));
+ out.print(JsonUtil.loadFalseResult(1, "閭�璇风爜蹇呴』涓�4鍒�12浣�"));
return;
}
}
--
Gitblit v1.8.0