| | |
| | |
|
| | | import org.springframework.stereotype.Controller;
|
| | | import org.springframework.web.bind.annotation.RequestMapping;
|
| | | import org.springframework.web.bind.annotation.RequestMethod;
|
| | | import org.yeshi.utils.JsonUtil;
|
| | |
|
| | | import com.google.gson.Gson;
|
| | |
| | | import com.yeshi.fanli.entity.taobao.TaoBaoGoodsBrief;
|
| | | import com.yeshi.fanli.entity.taobao.TaoBaoSearchResult;
|
| | | import com.yeshi.fanli.entity.taobao.dataoke.DaTaoKeDetailV2;
|
| | | import com.yeshi.fanli.exception.integral.IntegralExchangeException;
|
| | | import com.yeshi.fanli.log.LogHelper;
|
| | | import com.yeshi.fanli.service.inter.common.JumpDetailV2Service;
|
| | | import com.yeshi.fanli.service.inter.config.ConfigService;
|
| | |
| | | import com.yeshi.fanli.util.taobao.TaoKeApiUtil;
|
| | | import com.yeshi.fanli.vo.goods.GoodsDetailVO;
|
| | | import com.yeshi.fanli.vo.goods.OtherInfo;
|
| | | import com.yeshi.fanli.vo.integral.ExchangeTipVO;
|
| | | import com.yeshi.fanli.vo.msg.ClientTextStyleVO;
|
| | | import com.yeshi.fanli.vo.search.SearchKeyVO;
|
| | | import com.yeshi.fanli.vo.tlj.ReduceHongBao;
|
| | |
| | | if (VersionUtil.greaterThan_1_6_5(acceptData.getPlatform(), acceptData.getVersion()))
|
| | | root.put("scoreExchange", getScoreExchangeInfo(acceptData));
|
| | |
|
| | | if (VersionUtil.greaterThan_2_0_0(acceptData.getPlatform(), acceptData.getVersion()))
|
| | | root.put("searchDiscovery", getSearchDiscoveryInfo(acceptData));
|
| | | |
| | | out.print(JsonUtil.loadTrueResult(root));
|
| | | } catch (Exception e) {
|
| | | out.print(JsonUtil.loadFalseResult(1, "获取数据失败"));
|
| | |
| | | */
|
| | | private JSONObject getSearchDiscoveryInfo(AcceptData acceptData) {
|
| | | JSONArray array = new JSONArray();
|
| | | String keys = configService.get("search_discovery_keys");
|
| | | String keys = configService.getSearchDiscoveryKeys();
|
| | | if (!StringUtil.isNullOrEmpty(keys)) {
|
| | | JSONArray arrayKeys = JSONArray.fromObject(keys);
|
| | | for (int i = 0; i < arrayKeys.size(); i++) {
|
| | |
| | | out.print(JsonUtil.loadTrueResult(data));
|
| | | }
|
| | |
|
| | | |
| | | |
| | | @RequestMapping(value = "getSearchDiscoveryTop", method = RequestMethod.POST)
|
| | | public void getSearchDiscoveryTop(AcceptData acceptData, Long uid, Integer page, PrintWriter out) {
|
| | | // try {
|
| | | // String keys = configService.getSearchDiscoveryKeys();
|
| | | // if (!StringUtil.isNullOrEmpty(keys)) {
|
| | | // JSONArray arrayKeys = JSONArray.fromObject(keys);
|
| | | // for (int i = (page-1) * 3; i < arrayKeys.size(); i++) {
|
| | | // String keys = arrayKeys.get(i).toString();
|
| | | // }
|
| | | // |
| | | // |
| | | // }
|
| | | // |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | //
|
| | | // GsonBuilder gsonBuilder = new GsonBuilder().excludeFieldsWithoutExposeAnnotation();
|
| | | // Gson gson = gsonBuilder.create();
|
| | | // JSONObject data = new JSONObject();
|
| | | // data.put("result", gson.toJson(exchange));
|
| | | // out.print(JsonUtil.loadTrueResult(data));
|
| | | // } catch (IntegralExchangeException e) {
|
| | | // out.print(JsonUtil.loadFalseResult(1, e.getMsg()));
|
| | | // }
|
| | | }
|
| | | |
| | | }
|