| | |
| | |
|
| | | @Resource
|
| | | private TaoBaoGoodsCacheUtil taoBaoGoodsCacheUtil;
|
| | | |
| | |
|
| | | @Resource
|
| | | private TaoBaoShopService taoBaoShopService;
|
| | | |
| | |
|
| | | @Resource
|
| | | private DaTaoKeGoodsDetailService daTaoKeGoodsDetailService;
|
| | |
| | |
|
| | | historySearchService.addHistorySearch(kw, bid);
|
| | |
|
| | | // BusinessSystem system = businessSystemService.getBusinessSystemCache(acceptData.getPlatform(),
|
| | | // acceptData.getPackages());
|
| | | // if (system == null) {
|
| | | // out.print(JsonUtil.loadFalseResult("系统不存在"));
|
| | | // return;
|
| | | // }
|
| | | // BusinessSystem system =
|
| | | // businessSystemService.getBusinessSystemCache(acceptData.getPlatform(),
|
| | | // acceptData.getPackages());
|
| | | // if (system == null) {
|
| | | // out.print(JsonUtil.loadFalseResult("系统不存在"));
|
| | | // return;
|
| | | // }
|
| | |
|
| | | if (!StringUtil.isNullOrEmpty(kw) && (kw.startsWith("http://") || kw.startsWith("https://"))) {
|
| | | out.print(JsonUtil.loadFalseResult("无法搜索链接"));
|
| | | JSONObject data = new JSONObject();
|
| | | data.put("result", new JSONArray());
|
| | | data.put("count", 0);
|
| | | data.put("nav", new JSONArray());
|
| | | out.print(JsonUtil.loadTrueResult(data));
|
| | | return;
|
| | | }
|
| | |
|
| | |
| | | if (listRecommendWords == null || listRecommendWords.size() == 0) {
|
| | | listRecommendWords = new ArrayList<String>();
|
| | | }
|
| | | |
| | | List<TaoBaoShopVO> listShop = taoBaoShopService.getShopByKey(kw);
|
| | | if (listShop != null && listShop.size() > 0) {
|
| | |
|
| | | List<TaoBaoShopVO> listShop =null; //taoBaoShopService.getShopByKey(kw);
|
| | | if (listShop != null && listShop.size() > 0 && listShop.get(0).getListGoods() != null
|
| | | && listShop.get(0).getListGoods().size() > 2) {
|
| | | data.put("shop", JsonUtil.getApiCommonGson().toJson(listShop.get(0)));
|
| | | }
|
| | | }
|
| | |
| | |
|
| | | private JSONObject searchDaTaoKeGoods(String key, int page, String filter, String order, String startprice,
|
| | | String endprice) {
|
| | | page=page+1;
|
| | | page = page + 1;
|
| | | int sort = DaTaoKeApiUtil.SORT_DEFAULT;
|
| | | if ("5".equalsIgnoreCase(order)) {
|
| | | sort = DaTaoKeApiUtil.SORT_COMMISSION;
|
| | |
| | | List<TaoBaoGoodsBriefExtra> listExtra = new ArrayList<TaoBaoGoodsBriefExtra>();
|
| | | BigDecimal proportion = manageService.getFanLiRate();
|
| | |
|
| | | DaTaoKeGoodsResult result = DaTaoKeApiUtil.search(key, null, page, 20, sort);
|
| | | DaTaoKeGoodsResult result = DaTaoKeApiUtil.search(key, null, null, null, page, 20, sort);
|
| | | if (result != null && result.getGoodsList() != null)
|
| | | for (DaTaoKeDetailV2 goods : result.getGoodsList()) {
|
| | | listExtra.add(
|