From 2012b3b5db3c6b06535a68f775bcc81b16151b90 Mon Sep 17 00:00:00 2001
From: admin <weikou2014>
Date: 星期五, 06 九月 2019 16:54:00 +0800
Subject: [PATCH] 加入任务

---
 fanli/src/main/java/com/yeshi/fanli/controller/client/v2/RecommendControllerV2.java |   47 ++++++++++++++++++++++++++++++++++++++++++-----
 1 files changed, 42 insertions(+), 5 deletions(-)

diff --git a/fanli/src/main/java/com/yeshi/fanli/controller/client/v2/RecommendControllerV2.java b/fanli/src/main/java/com/yeshi/fanli/controller/client/v2/RecommendControllerV2.java
index 8424964..70cf105 100644
--- a/fanli/src/main/java/com/yeshi/fanli/controller/client/v2/RecommendControllerV2.java
+++ b/fanli/src/main/java/com/yeshi/fanli/controller/client/v2/RecommendControllerV2.java
@@ -59,6 +59,7 @@
 import com.yeshi.fanli.vo.goods.GoodsDetailVO;
 import com.yeshi.fanli.vo.goods.OtherInfo;
 import com.yeshi.fanli.vo.msg.ClientTextStyleVO;
+import com.yeshi.fanli.vo.search.SearchKeyVO;
 import com.yeshi.fanli.vo.tlj.ReduceHongBao;
 
 import net.sf.json.JSONArray;
@@ -139,11 +140,6 @@
 			List<SwiperPicture> topPicList = new ArrayList<>();
 			if (oldtopPicList != null && oldtopPicList.size() > 0)
 				topPicList.addAll(oldtopPicList);
-			if ("ios".equalsIgnoreCase(acceptData.getPlatform())) {
-				SwiperPicture notifyReName = swiperPictureService.selectByPrimaryKey(162L);
-				if (notifyReName != null)
-					topPicList.add(0, notifyReName);
-			}
 
 			root.put("topPicList", JsonUtil.getApiCommonGson().toJson(topPicList));
 
@@ -171,6 +167,7 @@
 			if (VersionUtil.greaterThan_1_6_5(acceptData.getPlatform(), acceptData.getVersion()))
 				root.put("scoreExchange", getScoreExchangeInfo(acceptData));
 
+			root.put("searchDiscovery", getSearchDiscoveryInfo(acceptData));
 			out.print(JsonUtil.loadTrueResult(root));
 		} catch (Exception e) {
 			out.print(JsonUtil.loadFalseResult(1, "鑾峰彇鏁版嵁澶辫触"));
@@ -344,6 +341,46 @@
 		root.put("tagImg", "http://img.flqapp.com/resource/score_exchange_tag.png");
 		return root;
 	}
+	
+	
+	/**
+	 * 閲戝竵鍏戞崲淇℃伅
+	 * 
+	 * @param acceptData
+	 * @return
+	 */
+	private JSONObject getSearchDiscoveryInfo(AcceptData acceptData) {
+		JSONArray array = new JSONArray();
+		String keys = configService.get("search_discovery_keys");
+		if (!StringUtil.isNullOrEmpty(keys)) {
+			JSONArray arrayKeys = JSONArray.fromObject(keys);
+			for (int i = 0; i < arrayKeys.size(); i++) {
+				String name = arrayKeys.get(i).toString();
+				JSONObject params = new JSONObject();
+				params.put("searchKey", name);
+				
+				SearchKeyVO keyVO = new SearchKeyVO();
+				keyVO.setName(name);
+				keyVO.setParams(params.toString());
+				array.add(keyVO);
+			}
+		}
+		
+		JSONObject params = new JSONObject();
+		params.put("url", configService.get("search_discovery_h5_link"));
+		
+		JSONObject root = new JSONObject();
+		root.put("picture", "http://img.flqapp.com/resource/home_search_found.png");
+		root.put("params", params);
+		root.put("jumpDetail", jumpDetailV2Service.getByTypeCache("web",
+				Constant.getPlatformCode(acceptData.getPlatform()), Integer.parseInt(acceptData.getVersion())));
+		
+		root.put("jumpResult", jumpDetailV2Service.getByTypeCache("search_goods_result",
+				Constant.getPlatformCode(acceptData.getPlatform()), Integer.parseInt(acceptData.getVersion())));
+		root.put("keyList", array);
+		return root;
+	}
+	
 
 	/**
 	 * 棣栭〉搴曢儴鍟嗗搧鎺ㄨ崘

--
Gitblit v1.8.0