yujian
2019-10-21 ec76ed67c8154454ad608fb46d82a86e265a874a
fanli/src/main/java/com/yeshi/fanli/controller/client/v2/SearchControllerV2.java
@@ -182,6 +182,8 @@
         if (analysisTaoToken(acceptData, text, out)) {
            return;
         }
         if (!StringUtil.isNullOrEmpty(TaoBaoUtil.parseSystemTaoToken(text)))
            return;
         JSONObject root = new JSONObject();
         root.put("type", 2);
@@ -248,7 +250,6 @@
            }
         }
         
         if (tb == null)// 淘宝是空值
         {
            String jdId = JDUtil.getJDGoodsId(text);
@@ -309,7 +310,8 @@
            commonGoods.setPicture(tb.getPictUrl());
         }
         
         if (StringUtil.isNullOrEmpty(commonGoods.getTitle()) || StringUtil.isNullOrEmpty(commonGoods.getPicture())) {
         if (StringUtil.isNullOrEmpty(commonGoods.getTitle())
               || StringUtil.isNullOrEmpty(commonGoods.getPicture())) {
            out.println(JsonUtil.loadFalseResult("暂未找到该商品,请稍后再试!"));
            return;
         }
@@ -324,7 +326,6 @@
         out.print(JsonUtil.loadTrueResult(data));
         return;
      } 
      
      JSONObject data = new JSONObject();
      if (VersionUtil.greaterThan_1_6_5(acceptData.getPlatform(), acceptData.getVersion())) {
@@ -386,6 +387,7 @@
   
   /**
    * 解析抖音链接
    *
    * @param acceptData
    * @param text
    * @param out
@@ -418,10 +420,9 @@
      return;
   }
   /**
    * 解析淘口令
    *
    * @param acceptData
    * @param text
    * @param out
@@ -460,11 +461,11 @@
               
                  JSONObject data = new JSONObject();
                  data.put("type", 3);
                  data.put("goods", gson.toJson(GoodsDetailVOFactory.convertTaoBao(goodsBrief, null, fanLiRate, shareRate)));
                  data.put("goods", gson
                        .toJson(GoodsDetailVOFactory.convertTaoBao(goodsBrief, null, fanLiRate, shareRate)));
                  out.print(JsonUtil.loadTrueResult(data));
                  return true;
               }
               
               JSONObject data = new JSONObject();
               JSONObject taoBaoGoodsJSON = new JSONObject();
@@ -649,7 +650,8 @@
    * @param endprice
    * @return
    */
   private void searchTaoBaoGoods(AcceptData acceptData, String key, Integer page, String filter, Integer order, PrintWriter out) {
   private void searchTaoBaoGoods(AcceptData acceptData, String key, Integer page, String filter, Integer order,
         PrintWriter out) {
      SearchFilter sf = new SearchFilter();
      sf.setKey(SearchFilterUtil.filterSearchContent(key));
      sf.setPage(page);
@@ -750,7 +752,8 @@
            String platform = acceptData.getPlatform();
            TaoBaoShopVO taoBaoShop = listShop.get(0);
            if (("ios".equalsIgnoreCase(platform) && VersionUtil.greaterThan_2_0(platform, acceptData.getVersion()))
               || ("android".equalsIgnoreCase(platform) && VersionUtil.greaterThan_2_0_1(platform, acceptData.getVersion()))) {
                  || ("android".equalsIgnoreCase(platform)
                        && VersionUtil.greaterThan_2_0_1(platform, acceptData.getVersion()))) {
               BrandInfoVO brandInfoVO = new BrandInfoVO();
               brandInfoVO.setId(taoBaoShop.getId());
               brandInfoVO.setName(taoBaoShop.getShopName());
@@ -776,7 +779,8 @@
    * @param endprice
    * @return
    */
   private void searchJDGoods(AcceptData acceptData, String key, Integer page, String filter, Integer order, PrintWriter out) {
   private void searchJDGoods(AcceptData acceptData, String key, Integer page, String filter, Integer order,
         PrintWriter out) {
      JDSearchResult result = null;
      boolean hasCoupon = false;
@@ -951,7 +955,8 @@
    * @param endprice
    * @return
    */
   private void searchPDDGoods(AcceptData acceptData, String key, Integer page, String filter, Integer order, PrintWriter out) {
   private void searchPDDGoods(AcceptData acceptData, String key, Integer page, String filter, Integer order,
         PrintWriter out) {
      PDDSearchFilter pddfilter = new PDDSearchFilter();
      pddfilter.setKw(SearchFilterUtil.filterSearchContent(key));
      pddfilter.setPage(page);