From b59fef5c00b15fdfdfa9d4be26e5bf6b41c75458 Mon Sep 17 00:00:00 2001
From: admin <2780501319@qq.com>
Date: 星期日, 23 二月 2020 00:16:52 +0800
Subject: [PATCH] 2.0.7相关服务端功能添加

---
 fanli/src/main/java/com/yeshi/fanli/controller/client/v2/UserAccountControllerV2.java |   49 +++++++++++++++++++++++++++----------------------
 1 files changed, 27 insertions(+), 22 deletions(-)

diff --git a/fanli/src/main/java/com/yeshi/fanli/controller/client/v2/UserAccountControllerV2.java b/fanli/src/main/java/com/yeshi/fanli/controller/client/v2/UserAccountControllerV2.java
index 259d793..d4178a3 100644
--- a/fanli/src/main/java/com/yeshi/fanli/controller/client/v2/UserAccountControllerV2.java
+++ b/fanli/src/main/java/com/yeshi/fanli/controller/client/v2/UserAccountControllerV2.java
@@ -32,6 +32,7 @@
 import com.yeshi.fanli.entity.push.DeviceActive;
 import com.yeshi.fanli.entity.shop.BanLiShopOrder;
 import com.yeshi.fanli.entity.system.BusinessSystem;
+import com.yeshi.fanli.entity.system.ConfigKeyEnum;
 import com.yeshi.fanli.exception.user.UserAccountException;
 import com.yeshi.fanli.exception.user.vip.UserVIPInfoException;
 import com.yeshi.fanli.log.LogHelper;
@@ -231,6 +232,7 @@
 			} else {
 				JSONObject data = new JSONObject();
 				data.put("userInfo", UserUtil.filterForClientUser(userInfo));
+				data.put("inviteCode", userInfoExtraService.getInviteCodeByUid(userInfo.getId()));
 				out.print(JsonUtil.loadTrueResult(data));
 
 				final UserInfo uuser = userInfo;
@@ -267,7 +269,7 @@
 			} else {
 				out.print(JsonUtil.loadFalseResult(e.getCode(), e.getMsg()));
 				try {
-					LogHelper.cookieLog("鐧诲綍鍑洪敊:" + e.getCode() + "-" + e.getMessage());
+					LogHelper.error("鐧诲綍鍑洪敊:" + e.getCode() + "-" + e.getMessage());
 				} catch (Exception e1) {
 					e1.printStackTrace();
 				}
@@ -388,7 +390,7 @@
 		vo.setNickName(userInfo.getNickName());
 		vo.setPortrait(userInfo.getPortrait());
 		vo.setHelpLink(userVipConfigService.getValueByKey("help_link_vip_h5"));
-		vo.setCsdLink(configService.get("customer_service_link"));
+		vo.setCsdLink(configService.get(ConfigKeyEnum.customerServiceLink.getKey()));
 
 		Date now = new Date();
 		Date start = new Date(0);
@@ -440,7 +442,16 @@
 		}
 		vo.setFinishMoney(hongBaoV2CountService.getRewardMoneyBySelf(uid));
 
-		// 浼氬憳瑙勫垯鎵ц鏃堕棿
+		List<Integer> list = new ArrayList<Integer>();
+		list.add(BanLiShopOrder.STATE_SUCCESS);
+		BigDecimal payMoney = new BigDecimal(userVipConfigService.getValueByKey("require_order_pay"));
+
+		vo.setFinishGoldCoin(Long.parseLong(integralDetailService.getCumulativeMoney(uid).setScale(0).toString()));
+		vo.setFinishTeam(hongBaoV2CountService.countValidOrderTeamUserByUid(uid,
+				TimeUtil.convertDateToTemp(Constant.VIP_ONLINE_TIME), payMoney));
+		vo.setFinishHongBao(banLiShopOrderService.countByUidAndState(uid, list));
+
+		// 鍖哄垎鑰佺敤鎴峰拰鏂扮敤鎴�
 		String limtDate = userVipConfigService.getValueByKey("vip_execute_time");
 		Date executeDate = null;
 		try {
@@ -449,14 +460,6 @@
 		} catch (ParseException e) {
 			e.printStackTrace();
 		}
-		List<Integer> list = new ArrayList<Integer>();
-		list.add(BanLiShopOrder.STATE_SUCCESS);
-		BigDecimal payMoney = new BigDecimal(userVipConfigService.getValueByKey("require_order_pay"));
-
-		vo.setFinishGoldCoin(Long.parseLong(integralDetailService.getCumulativeMoney(uid).setScale(0).toString()));
-		vo.setFinishTeam(hongBaoV2CountService.countValidOrderTeamUserByUid(uid, executeDate.getTime(), payMoney));
-		vo.setFinishHongBao(banLiShopOrderService.countByUidAndState(uid, list));
-
 		UserInfoExtra extra = userInfoExtraService.getUserInfoExtra(uid);
 		if (extra != null
 				&& (extra.getFirstLoginTime() == null || extra.getFirstLoginTime().getTime() < executeDate.getTime())) {
@@ -513,7 +516,19 @@
 
 		// 鐪侀挶 -鑷喘浜х敓杩斿埄
 
-		// 浼氬憳瑙勫垯鎵ц鏃堕棿
+		List<Integer> list = new ArrayList<Integer>();
+		list.add(BanLiShopOrder.STATE_SUCCESS);
+		BigDecimal payMoney = new BigDecimal(userVipConfigService.getValueByKey("require_order_pay"));
+
+		BigDecimal finishGoldCoin = integralDetailService.getCumulativeMoney(uid);
+		long finishTeam = hongBaoV2CountService.countValidOrderTeamUserByUid(uid,
+				TimeUtil.convertDateToTemp(Constant.VIP_ONLINE_TIME), payMoney);
+		long finishHongBao = banLiShopOrderService.countByUidAndState(uid, list);
+		BigDecimal finishMoney = hongBaoV2CountService.getRewardMoneyBySelf(uid);
+
+		long limitTeam = 0;
+
+		// 鍖哄垎鑰佺敤鎴峰拰鏂扮敤鎴�
 		String limtDate = userVipConfigService.getValueByKey("vip_execute_time");
 		Date executeDate = null;
 		try {
@@ -522,16 +537,6 @@
 		} catch (ParseException e) {
 			e.printStackTrace();
 		}
-		List<Integer> list = new ArrayList<Integer>();
-		list.add(BanLiShopOrder.STATE_SUCCESS);
-		BigDecimal payMoney = new BigDecimal(userVipConfigService.getValueByKey("require_order_pay"));
-
-		BigDecimal finishGoldCoin = integralDetailService.getCumulativeMoney(uid);
-		long finishTeam = hongBaoV2CountService.countValidOrderTeamUserByUid(uid, executeDate.getTime(), payMoney);
-		long finishHongBao = banLiShopOrderService.countByUidAndState(uid, list);
-		BigDecimal finishMoney = hongBaoV2CountService.getRewardMoneyBySelf(uid);
-
-		long limitTeam = 0;
 
 		UserInfoExtra extra = userInfoExtraService.getUserInfoExtra(uid);
 		if (extra != null

--
Gitblit v1.8.0