admin
2020-07-01 c54fb6a88876be994906d57d2d18e844686964d0
fanli/src/main/java/com/yeshi/fanli/controller/client/v2/SearchControllerV2.java
@@ -84,6 +84,7 @@
import com.yeshi.fanli.vo.common.JumpDetailContentVO;
import com.yeshi.fanli.vo.goods.GoodsDetailVO;
import com.yeshi.fanli.vo.msg.TokenVO;
import com.yeshi.fanli.vo.recommend.RecommendJumpInfoVO;
import com.yeshi.fanli.vo.search.GoodsDocParseResultVO;
import net.sf.json.JSONArray;
@@ -292,6 +293,12 @@
                                                orderHongBaoMoneyComputeService.getShowComputeRate(
                                                      acceptData.getPlatform(),
                                                      acceptData.getVersion()))));
                              // 跳转详情
                              if (VersionUtil.greaterThan_2_1_3(acceptData.getPlatform(),
                                    acceptData.getVersion())) {
                                 buildGoodsClick(data, goods, acceptData, gson);
                              }
                              out.print(JsonUtil.loadTrueResult(data));
                              return;
                           }
@@ -306,6 +313,12 @@
                                             orderHongBaoMoneyComputeService.getShowComputeRate(
                                                   acceptData.getPlatform(),
                                                   acceptData.getVersion()))));
                           // if
                           // (VersionUtil.greaterThan_2_1_2(acceptData.getPlatform(),
                           // acceptData.getVersion())) {
                           // buildGoodsClick(data, goods, acceptData,
                           // gson);
                           // }
                           out.print(JsonUtil.loadTrueResult(data));
                           return;
                        }
@@ -367,6 +380,53 @@
            });
   }
   private void buildGoodsClick(JSONObject data, CommonGoods goods, AcceptData acceptData, Gson gson) {
      JSONObject params = new JSONObject();
      params.put("id", goods.getGoodsId() + "");
      params.put("from", "猜你喜欢");
      String type = "";
      switch (goods.getGoodsType()) {
      case Constant.SOURCE_TYPE_TAOBAO:
         type = "goodsdetail";
         break;
      case Constant.SOURCE_TYPE_JD:
         type = "goodsdetail_jd";
         break;
      case Constant.SOURCE_TYPE_PDD:
         type = "goodsdetail_pdd";
         break;
      case Constant.SOURCE_TYPE_VIP:
         type = "goodsdetail_vip";
         break;
      case Constant.SOURCE_TYPE_SUNING:
         type = "goodsdetail_suning";
         break;
      }
      RecommendJumpInfoVO left = new RecommendJumpInfoVO("去看看", jumpDetailV2Service.getByTypeCache(type,
            Constant.getPlatformCode(acceptData.getPlatform()), Integer.parseInt(acceptData.getVersion())), params);
      data.put("left", gson.toJson(left));
      // 去网页
      String rightValue = configService.getByVersion(ConfigKeyEnum.clipboardRecommendGoodsMakeMore.getKey(),
            acceptData.getPlatform(), Integer.parseInt(acceptData.getVersion()));
      if (StringUtil.isNullOrEmpty(rightValue)) {
         data.remove("left");
      } else {
         params = new JSONObject();
         params.put("url", rightValue);
         RecommendJumpInfoVO right = new RecommendJumpInfoVO("有更高返利?", jumpDetailV2Service.getByTypeCache("web",
               Constant.getPlatformCode(acceptData.getPlatform()), Integer.parseInt(acceptData.getVersion())),
               params);
         data.put("right", gson.toJson(right));
      }
   }
   /**
    * 口令领取
    *