From 87a1f741ed6124f73789b0c105091c83cebf87b3 Mon Sep 17 00:00:00 2001
From: admin <weikou2014>
Date: 星期五, 24 四月 2020 13:55:55 +0800
Subject: [PATCH] 用户会员信息修改
---
fanli/src/main/java/com/yeshi/fanli/controller/client/v1/InviteGetMoneyController.java | 43 +++++++++++++++++++++++++++++++------------
1 files changed, 31 insertions(+), 12 deletions(-)
diff --git a/fanli/src/main/java/com/yeshi/fanli/controller/client/v1/InviteGetMoneyController.java b/fanli/src/main/java/com/yeshi/fanli/controller/client/v1/InviteGetMoneyController.java
index 433ddd7..d4b6331 100644
--- a/fanli/src/main/java/com/yeshi/fanli/controller/client/v1/InviteGetMoneyController.java
+++ b/fanli/src/main/java/com/yeshi/fanli/controller/client/v1/InviteGetMoneyController.java
@@ -20,6 +20,7 @@
import com.yeshi.fanli.entity.bus.user.ThreeSale;
import com.yeshi.fanli.entity.bus.user.UserInfo;
import com.yeshi.fanli.entity.system.BusinessSystem;
+import com.yeshi.fanli.entity.system.ConfigKeyEnum;
import com.yeshi.fanli.entity.system.SystemClientParams;
import com.yeshi.fanli.exception.NotExistObjectException;
import com.yeshi.fanli.exception.user.UserInfoExtraException;
@@ -35,6 +36,7 @@
import com.yeshi.fanli.util.Constant;
import com.yeshi.fanli.util.RedisManager;
import com.yeshi.fanli.util.StringUtil;
+import com.yeshi.fanli.util.VersionUtil;
import com.yeshi.fanli.util.account.UserUtil;
import com.yeshi.fanli.util.annotation.RequestSerializableByKey;
@@ -102,8 +104,8 @@
data.put("moneyLastMonth", "---");
} else {
// 鎴戠殑闃熷憳
- long myFirstTeamCount = threeSaleSerivce.getFirstUsersCount(Long.parseLong(uid));
- long mySecondTeamCount = threeSaleSerivce.getSecondUsersCount(Long.parseLong(uid));
+ long myFirstTeamCount = threeSaleSerivce.countFirstTeam(Long.parseLong(uid));
+ long mySecondTeamCount = threeSaleSerivce.countSecondTeam(Long.parseLong(uid));
long myTeamCount = myFirstTeamCount + mySecondTeamCount;
data.put("myTeam", myTeamCount);
// 1.5.0鍚庡凡缁忎笉浣跨敤姝ゅ瓧娈�
@@ -126,7 +128,8 @@
data.put("activityRules", valueBr);
data.put("inviteList", String.format("http://%s/%s/client/share/friends_new.html",
Constant.systemCommonConfig.getProjectHost(), Constant.systemCommonConfig.getProjectName()));
- List<SwiperPicture> pictureList = swiperPictureService.getByBannerCardAndVersion("invite_top_banner",acceptData.getPlatform(), Integer.parseInt(acceptData.getVersion()));
+ List<SwiperPicture> pictureList = swiperPictureService.getByBannerCardAndVersion("invite_top_banner",
+ acceptData.getPlatform(), Integer.parseInt(acceptData.getVersion()));
if (pictureList != null && pictureList.size() > 0) {
SwiperPicture picture = pictureList.get(0);
com.alibaba.fastjson.JSONObject pictureJson = new com.alibaba.fastjson.JSONObject();
@@ -136,7 +139,7 @@
data.put("topBanner", pictureJson);
}
- data.put("desc", configService.get("invite_desc"));
+ data.put("desc", configService.get(ConfigKeyEnum.inviteDesc.getKey()));
boolean hasCode = false;
if (uid != null && uid.trim().length() > 0) {
@@ -148,7 +151,7 @@
// 閭�璇锋縺娲婚摼鎺�
if (!hasCode) {
- data.put("activationlink", configService.get("invite_activation_url"));
+ data.put("activationlink", configService.get(ConfigKeyEnum.inviteActivationUrl.getKey()));
}
data.put("hasCode", hasCode);
@@ -170,6 +173,7 @@
* @throws NotExistObjectException
* @throws IOException
*/
+ @RequestSerializableByKey(key = "'listInviteFriendImg-'+#uid")
@RequestMapping(value = "/listInviteFriendImg", method = RequestMethod.POST)
public void listInviteFriendImg(AcceptData acceptData, Long uid, PrintWriter out, HttpServletRequest request)
throws NotExistObjectException, IOException {
@@ -180,8 +184,10 @@
}
// 閭�璇烽摼鎺�
-// String shortLink = HttpUtil.getShortLink("http://" + Constant.wxGZConfig.getLoginHost() + "/"
-// + Constant.systemCommonConfig.getProjectName() + "/client/threeShareNew?uid=" + uid);
+ // String shortLink = HttpUtil.getShortLink("http://" +
+ // Constant.wxGZConfig.getLoginHost() + "/"
+ // + Constant.systemCommonConfig.getProjectName() +
+ // "/client/threeShareNew?uid=" + uid);
data.put("inviteLink", "http://a.app.qq.com/o/simple.jsp?pkgname=com.yeshi.ec.rebate");
String inviteCode = userInfoExtraService.getInviteCodeByUid(uid);
@@ -200,7 +206,7 @@
String valueN = values.getValue();
String valueBr = valueN.replace("\n", "<br><br>");
- data.put("helpLink", configService.get("invite_help_link"));
+ data.put("helpLink", configService.get(ConfigKeyEnum.inviteHelpLink.getKey()));
data.put("inviteRules", valueBr);
out.print(JsonUtil.loadTrue(0, JsonUtil.getSimpleGson().toJson(data), "鎴愬姛"));
@@ -215,7 +221,7 @@
@RequestMapping(value = "getActivationTip")
public void getActivationTip(AcceptData acceptData, String callback, PrintWriter out) {
try {
- String tip = configService.get("invite_activation_tip");
+ String tip = configService.get(ConfigKeyEnum.inviteActivationTip.getKey());
if (tip == null || tip.trim().length() == 0) {
JsonUtil.printMode(out, callback, JsonUtil.loadFalseResult("鏆傛棤鎻愰啋"));
return;
@@ -256,8 +262,14 @@
JsonUtil.printMode(out, callback, JsonUtil.loadFalseResult("婵�娲诲け璐�"));
return;
}
+ if (VersionUtil.greaterThan_2_0_7(acceptData.getPlatform(), acceptData.getVersion())) {
+ String myInviteCode = userInfoExtraService.getInviteCodeByUid(uid);
+ JSONObject data = new JSONObject();
+ data.put("inviteCode", myInviteCode);
+ JsonUtil.printMode(out, callback, JsonUtil.loadTrueResult(data));
- JsonUtil.printMode(out, callback, JsonUtil.loadTrueResult("閭�璇风爜婵�娲绘垚鍔�"));
+ } else
+ JsonUtil.printMode(out, callback, JsonUtil.loadTrueResult("閭�璇风爜婵�娲绘垚鍔�"));
} catch (UserInfoExtraException e) {
JsonUtil.printMode(out, callback, JsonUtil.loadFalseResult(e.getMsg()));
@@ -283,7 +295,14 @@
try {
userInfoExtraService.activationInviteWX(
Constant.getWXAccount(acceptData.getPlatform(), acceptData.getVersion()), uid, code);
- out.print(JsonUtil.loadTrueResult("閭�璇风爜婵�娲绘垚鍔�"));
+
+ if (VersionUtil.greaterThan_2_0_7(acceptData.getPlatform(), acceptData.getVersion())) {
+ String myInviteCode = userInfoExtraService.getInviteCodeByUid(uid);
+ JSONObject data = new JSONObject();
+ data.put("inviteCode", myInviteCode);
+ JsonUtil.printMode(out, "", JsonUtil.loadTrueResult(data));
+ } else
+ out.print(JsonUtil.loadTrueResult("閭�璇风爜婵�娲绘垚鍔�"));
} catch (UserInfoExtraException e) {
out.print(JsonUtil.loadFalseResult(e.getMsg()));
} catch (Exception e) {
@@ -314,7 +333,7 @@
JsonUtil.printMode(out, callback, JsonUtil.loadFalseResult("閭�璇风爜涓嶅瓨鍦�"));
return;
}
- String tip = configService.get("invite_activation_success_tip");
+ String tip = configService.get(ConfigKeyEnum.inviteActivationSuccessTip.getKey());
JSONObject data = new JSONObject();
data.put("inviteCode", inviteCode);
--
Gitblit v1.8.0