From 28cf328a098334b51a3e9d2d56f983fb8c862211 Mon Sep 17 00:00:00 2001
From: yujian <yujian@163.com>
Date: 星期六, 23 五月 2020 09:54:38 +0800
Subject: [PATCH] 足迹、收藏订单兼容新需求

---
 fanli/src/main/java/com/yeshi/fanli/controller/client/v1/UserInfoController.java |   32 +++++++++++++++++---------------
 1 files changed, 17 insertions(+), 15 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 fc6f33e..c9ad810 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
@@ -274,10 +274,9 @@
 
 	@Resource
 	private GiveVIPApplyInfoService giveVIPApplyInfoService;
-	
+
 	@Resource
 	private PreviewInfoService previewInfoService;
-	
 
 	private static final String EXTRACT_MIN_MONEY = ConfigKeyEnum.extractMoneyMin.getKey();
 	private static final String EXTRACT_MAX_MONEY = ConfigKeyEnum.extractMoneyMAX.getKey();
@@ -1516,11 +1515,11 @@
 	public void collectionGoodsList(AcceptData acceptData, long uid, int page, PrintWriter out) {
 
 		List<CollectionGoodsV2> collectionGoodsList = collectionGoodsV2Service.getCollectionGoodsList(uid, page + 1,
-				Constant.PAGE_SIZE, Constant.SOURCE_TYPE_TAOBAO);
+				Constant.PAGE_SIZE, Constant.SOURCE_TYPE_TAOBAO, true);
 
 		List<TaoBaoGoodsBriefExtra> list = new ArrayList<TaoBaoGoodsBriefExtra>();
 
-		long count = collectionGoodsV2Service.getCollectionGoodsCount(uid, Constant.SOURCE_TYPE_TAOBAO);
+		long count = collectionGoodsV2Service.getCollectionGoodsCount(uid, Constant.SOURCE_TYPE_TAOBAO, true);
 		JSONObject data = new JSONObject();
 
 		List<TaoBaoGoodsBrief> listTaoKeGoods = new ArrayList<TaoBaoGoodsBrief>();
@@ -2229,25 +2228,25 @@
 			if (VersionUtil.greaterThan_2_0_7(acceptData.getPlatform(), acceptData.getVersion())) {
 				UserInviteLevelEnum level = null;
 				// VIP棰勮淇℃伅
-				if (VersionUtil.greaterThan_2_1(acceptData.getPlatform(), acceptData.getVersion())) {
+				if (VersionUtil.greaterThan_2_1_1(acceptData.getPlatform(), acceptData.getVersion())) {
 					String redisContent = previewInfoService.getRedisContent(uid, PreviewEnum.mineInfo);
 					if (!StringUtil.isNullOrEmpty(redisContent)) {
 						MineInfoVO vo = new Gson().fromJson(redisContent, MineInfoVO.class);
 						if (vo != null) {
 							if (!StringUtil.isNullOrEmpty(vo.getBalance()))
 								userInfo.setMyHongBao(new BigDecimal(vo.getBalance()));
-							
+
 							if (!StringUtil.isNullOrEmpty(vo.getLevel()))
-								 for (UserInviteLevelEnum levelEnum: UserInviteLevelEnum.values()) {
-									 if (levelEnum.name().equals(vo.getLevel())) {
-										 level = levelEnum;
-										 break;
-									 }
-								 }
+								for (UserInviteLevelEnum levelEnum : UserInviteLevelEnum.values()) {
+									if (levelEnum.name().equals(vo.getLevel())) {
+										level = levelEnum;
+										break;
+									}
+								}
 						}
 					}
 				}
-				
+
 				if (level == null) {
 					if (VersionUtil.greaterThan_2_1(acceptData.getPlatform(), acceptData.getVersion())) {
 						level = userInviteService.getUserInviteLevelNew(uid);
@@ -2268,7 +2267,9 @@
 				UserLevelEnum level = userLevelManager.getUserLevel(uid);
 
 				JSONObject vipAction = null;
-				if (level == UserLevelEnum.superVIP || level == UserLevelEnum.tearcher) {
+				String managerLink = userVipConfigService.getValueByKey("vip_manager_link");
+				if ((level == UserLevelEnum.superVIP || level == UserLevelEnum.tearcher)
+						&& !StringUtil.isNullOrEmpty(managerLink)) {
 					vipAction = new JSONObject();
 					vipAction.put("name", "瓒呬細绠$悊");
 					vipAction.put("jumpDetail",
@@ -2278,7 +2279,6 @@
 					JSONObject params = new JSONObject();
 					params.put("url", userVipConfigService.getValueByKey("vip_manager_link"));
 					vipAction.put("params", params);
-
 				} else {
 					// 鏌ヨ鏄惁鍙互鎻愪氦浼氬憳鐢宠锛屾槸鐨勮瘽杩斿洖璧勬枡濉啓椤甸潰
 					List<GiveVIPApplyInfo> list = giveVIPApplyInfoService.listByStateAndTargetUid(uid,
@@ -2303,6 +2303,8 @@
 					data.put("vipAction", vipAction);
 
 			}
+			
+			data.put("user", JsonUtil.getConvertBigDecimalToStringBuilder(gsonBuilder).create().toJson(userInfo));
 
 			out.print(JsonUtil.loadTrueResult(data));
 

--
Gitblit v1.8.0