From ad233381a240dce92cd5d9626d67a9dd25cf6473 Mon Sep 17 00:00:00 2001 From: yujian <yujian@123.com> Date: 星期四, 05 九月 2019 17:58:41 +0800 Subject: [PATCH] 品牌 --- fanli/src/main/java/com/yeshi/fanli/controller/client/v2/RecommendControllerV2.java | 42 ++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 42 insertions(+), 0 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 9af3056..5aab800 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; @@ -166,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, "鑾峰彇鏁版嵁澶辫触")); @@ -339,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", "http://apph5.yeshitv.com/AppPage/1.8.0/all_help_content.html?id=204"); + + 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("integralExchange", + Constant.getPlatformCode(acceptData.getPlatform()), Integer.parseInt(acceptData.getVersion()))); + + root.put("jumpResult", jumpDetailV2Service.getByTypeCache("web", + Constant.getPlatformCode(acceptData.getPlatform()), Integer.parseInt(acceptData.getVersion()))); + root.put("keyList", array); + return root; + } + /** * 棣栭〉搴曢儴鍟嗗搧鎺ㄨ崘 -- Gitblit v1.8.0