yujian
2019-07-23 a39422f2a8ce45dd6cf65701ed5f9e65391c46c1
fanli/src/main/java/com/yeshi/fanli/controller/client/v2/SearchControllerV2.java
@@ -102,8 +102,6 @@
   @Resource(name = "taskExecutor")
   private TaskExecutor executor;
   /**
    * 粘贴板信息推荐
    * 
@@ -145,37 +143,13 @@
            out.print(JsonUtil.loadFalseResult("值过长"));
            return;
         }
         SearchFilter sf = new SearchFilter();
         sf.setKey(text);
         JSONObject root = new JSONObject();
         TaoBaoSearchResult result = TaoBaoUtil.search(sf);
         if (result != null && result.getTaoBaoGoodsBriefs() != null && result.getTaoBaoGoodsBriefs().size() > 0)
            for (TaoBaoGoodsBrief goods : result.getTaoBaoGoodsBriefs()) {
               // 是属于淘宝联盟商品
               if (goods.getTitle().equalsIgnoreCase(text)) {
                  root.put("type", 2);
                  JSONObject data = new JSONObject();
                  data.put("title", goods.getTitle());
         data.put("title", text);
                  root.put("data", data);
                  out.print(JsonUtil.loadTrueResult(root));
                  return;
               }
            }
         // 查询大淘客标题
         List<DaTaoKeDetail> list = daTaoKeGoodsDetailService.listByDtitle(text);
         if (list != null && list.size() > 0) {
            root.put("type", 2);
            JSONObject data = new JSONObject();
            data.put("title", list.get(0).getdTitle());
            root.put("data", data);
            out.print(JsonUtil.loadTrueResult(root));
            return;
         }
         out.print(JsonUtil.loadFalseResult("暂不支持该类型!"));
         return;
      }
@@ -237,8 +211,6 @@
      out.print(JsonUtil.loadTrueResult(root));
   }
   
   /**
    * 搜索候选词
    * 
@@ -281,7 +253,8 @@
    * @param kw
    * @param page
    * @param filter
    * @param order      销量由高到低:1 、 价格从高到低:2 、 价格从低到高:3 、 推广量高到低:4(综合默认)、返利比高到低:5
    * @param order
    *            销量由高到低:1 、 价格从高到低:2 、 价格从低到高:3 、 推广量高到低:4(综合默认)、返利比高到低:5
    *                   、返利比低到高:6 、推荐20
    * @param startprice
    * @param endprice
@@ -289,8 +262,8 @@
    * @param out
    */
   @RequestMapping(value = "searchGoods")
   public void searchGoods(AcceptData acceptData, Integer goodsType, String key, Integer page, String filter, Integer order,
         PrintWriter out) {
   public void searchGoods(AcceptData acceptData, Integer goodsType, String key, Integer page, String filter,
         Integer order, PrintWriter out) {
      if (goodsType == null || goodsType < 1 || goodsType >3) {
         out.print(JsonUtil.loadFalseResult(1, "请传递正确平台参数"));
         return;
@@ -322,7 +295,6 @@
            historySearchService.addHistorySearch(searchkey, bid);
         }
      });
      if (searchkey.startsWith("http://") || searchkey.startsWith("https://")) {
         JSONObject data = new JSONObject();
@@ -464,7 +436,6 @@
      out.print(JsonUtil.loadTrueResult(data));
   }
   /**
    * 京东
    * 
@@ -510,7 +481,6 @@
            }
         }
         if (!StringUtil.isNullOrEmpty(filter)) {
            JSONObject jsonfilter = JSONObject.fromObject(filter);
            Boolean coupon = jsonfilter.optBoolean("coupon");
@@ -522,7 +492,6 @@
            if (zy != null && zy) {
               filterAPI.setOwner("g"); // 自营
            }
            
            String minPrice = jsonfilter.optString("minPrice");
            if (!StringUtil.isNullOrEmpty(minPrice)) {