admin
2020-07-01 c54fb6a88876be994906d57d2d18e844686964d0
fanli/src/main/java/com/yeshi/fanli/controller/client/v2/SearchControllerV2.java
@@ -31,7 +31,6 @@
import com.yeshi.fanli.dto.vip.VIPSearchResult;
import com.yeshi.fanli.dto.vip.goods.VIPGoodsInfo;
import com.yeshi.fanli.entity.accept.AcceptData;
import com.yeshi.fanli.entity.bus.activity.RecommendActivity;
import com.yeshi.fanli.entity.bus.help.AppPageNotification;
import com.yeshi.fanli.entity.goods.CommonGoods;
import com.yeshi.fanli.entity.jd.JDGoods;
@@ -88,7 +87,6 @@
import com.yeshi.fanli.vo.recommend.RecommendJumpInfoVO;
import com.yeshi.fanli.vo.search.GoodsDocParseResultVO;
import net.sf.json.JSON;
import net.sf.json.JSONArray;
import net.sf.json.JSONObject;
@@ -296,7 +294,7 @@
                                                      acceptData.getPlatform(),
                                                      acceptData.getVersion()))));
                              // 跳转详情
                              if (VersionUtil.greaterThan_2_1_2(acceptData.getPlatform(),
                              if (VersionUtil.greaterThan_2_1_3(acceptData.getPlatform(),
                                    acceptData.getVersion())) {
                                 buildGoodsClick(data, goods, acceptData, gson);
                              }
@@ -315,10 +313,12 @@
                                             orderHongBaoMoneyComputeService.getShowComputeRate(
                                                   acceptData.getPlatform(),
                                                   acceptData.getVersion()))));
//                           if (VersionUtil.greaterThan_2_1_2(acceptData.getPlatform(),
//                                 acceptData.getVersion())) {
//                              buildGoodsClick(data, goods, acceptData, gson);
//                           }
                           // if
                           // (VersionUtil.greaterThan_2_1_2(acceptData.getPlatform(),
                           // acceptData.getVersion())) {
                           // buildGoodsClick(data, goods, acceptData,
                           // gson);
                           // }
                           out.print(JsonUtil.loadTrueResult(data));
                           return;
                        }
@@ -385,40 +385,46 @@
      JSONObject params = new JSONObject();
      params.put("id", goods.getGoodsId() + "");
      params.put("from", "猜你喜欢");
      String type="";
      switch(goods.getGoodsType()){
      String type = "";
      switch (goods.getGoodsType()) {
      case Constant.SOURCE_TYPE_TAOBAO:
         type="goodsdetail";
         type = "goodsdetail";
         break;
      case Constant.SOURCE_TYPE_JD:
         type="goodsdetail_jd";
         type = "goodsdetail_jd";
         break;
      case Constant.SOURCE_TYPE_PDD:
         type="goodsdetail_pdd";
         type = "goodsdetail_pdd";
         break;
      case Constant.SOURCE_TYPE_VIP:
         type="goodsdetail_vip";
         type = "goodsdetail_vip";
         break;
      case Constant.SOURCE_TYPE_SUNING:
         type="goodsdetail_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));
      // 去网页
      params = new JSONObject();
      params.put("url", "http://www.baidu.com");
      RecommendJumpInfoVO right = new RecommendJumpInfoVO("有更高返利?", jumpDetailV2Service.getByTypeCache("web",
      RecommendJumpInfoVO left = new RecommendJumpInfoVO("去看看", jumpDetailV2Service.getByTypeCache(type,
            Constant.getPlatformCode(acceptData.getPlatform()), Integer.parseInt(acceptData.getVersion())), params);
      data.put("right", gson.toJson(right));
      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));
      }
   }
   /**