yujian
2019-12-20 eda5d0e998204c7a49ab84d8528569b765bec2f9
fanli/src/main/java/com/yeshi/fanli/controller/client/v2/SearchControllerV2.java
@@ -129,11 +129,9 @@
   @Resource
   private IntegralGetCacheManager integralGetCacheManager;
   @Resource
   private BrandInfoService brandInfoService;
   /**
    * 粘贴板信息推荐
@@ -261,17 +259,17 @@
         if (tb == null)// 淘宝是空值
         {
            String jdId = JDUtil.getJDGoodsId(text);
            // 微信链接
            if (StringUtil.isNullOrEmpty(jdId)) {
               jdId = JDUtil.getJDGoodsIdByWeiXin(text);
            }
            // 领券短连接
            if (StringUtil.isNullOrEmpty(jdId) && text.contains("u.jd.com")) {
               jdId = JDUtil.getJDGoodsIdByUJD(text);
            }
            if (!StringUtil.isNullOrEmpty(jdId)) {
               JDGoods goods = JDApiUtil.getGoodsDetail(Long.parseLong(jdId));
               if (goods != null) {
@@ -367,8 +365,9 @@
         Gson gson = JsonUtil.getConvertBigDecimalToStringSubZeroBuilder(new GsonBuilder())
               .excludeFieldsWithoutExposeAnnotation().setDateFormat("yyyy-MM-dd").create();
         data.put("type", type);
         data.put("goods", gson.toJson(GoodsDetailVOFactory.convertCommonGoods(commonGoods,
               new ConfigParamsDTO(fanLiRate, shareRate, Constant.MAX_REWARD_RATE,hongBaoManageService.getVIPFanLiRate()))));
         data.put("goods",
               gson.toJson(GoodsDetailVOFactory.convertCommonGoods(commonGoods, new ConfigParamsDTO(fanLiRate,
                     shareRate, Constant.MAX_REWARD_RATE, hongBaoManageService.getVIPFanLiRate()))));
         out.print(JsonUtil.loadTrueResult(data));
         return;
      }
@@ -491,8 +490,10 @@
                  JSONObject data = new JSONObject();
                  data.put("type", 3);
                  data.put("goods", gson.toJson(GoodsDetailVOFactory.convertTaoBao(goodsBrief,
                        new ConfigParamsDTO(fanLiRate, shareRate, Constant.MAX_REWARD_RATE,hongBaoManageService.getVIPFanLiRate()))));
                  data.put("goods",
                        gson.toJson(GoodsDetailVOFactory.convertTaoBao(goodsBrief,
                              new ConfigParamsDTO(fanLiRate, shareRate, Constant.MAX_REWARD_RATE,
                                    hongBaoManageService.getVIPFanLiRate()))));
                  out.print(JsonUtil.loadTrueResult(data));
                  return true;
               }
@@ -764,7 +765,8 @@
      List<GoodsDetailVO> list = new ArrayList<GoodsDetailVO>();
      BigDecimal fanLiRate = hongBaoManageService.getFanLiRate();
      BigDecimal shareRate = hongBaoManageService.getShareRate();
      ConfigParamsDTO paramsDTO = new ConfigParamsDTO(fanLiRate, shareRate, Constant.MAX_REWARD_RATE,hongBaoManageService.getVIPFanLiRate());
      ConfigParamsDTO paramsDTO = new ConfigParamsDTO(fanLiRate, shareRate, Constant.MAX_REWARD_RATE,
            hongBaoManageService.getVIPFanLiRate());
      for (TaoBaoGoodsBrief goods : taoBaoGoodsBriefs) {
         list.add(GoodsDetailVOFactory.convertTaoBao(goods, paramsDTO));
@@ -782,7 +784,11 @@
         String version = acceptData.getVersion();
         if (("ios".equalsIgnoreCase(platform) && VersionUtil.greaterThan_2_1(platform, version))
               || ("android".equalsIgnoreCase(platform) && VersionUtil.greaterThan_2_0_2(platform, version))) {
            BrandInfoVO brandInfoVO = brandInfoService.listByAlikeName(key);
            BrandInfoVO brandInfoVO = null;
            try {
               brandInfoVO = brandInfoService.listByAlikeName(key);
            } catch (Exception e) {
            }
            if (brandInfoVO != null)
               data.put("shop", JsonUtil.getApiCommonGson().toJson(brandInfoVO));
         } else {
@@ -791,7 +797,8 @@
                  && listShop.get(0).getListGoodsVO().size() > 2) {
               TaoBaoShopVO taoBaoShop = listShop.get(0);
               if (("ios".equalsIgnoreCase(platform) && VersionUtil.greaterThan_2_0(platform, version))
                  || ("android".equalsIgnoreCase(platform) && VersionUtil.greaterThan_2_0_1(platform, version))) {
                     || ("android".equalsIgnoreCase(platform)
                           && VersionUtil.greaterThan_2_0_1(platform, version))) {
                  BrandInfoVO brandInfoVO = new BrandInfoVO();
                  brandInfoVO.setId(taoBaoShop.getId());
                  brandInfoVO.setName(taoBaoShop.getShopName());
@@ -804,7 +811,7 @@
            }
         }
      }
      out.print(JsonUtil.loadTrueResult(data));
   }
@@ -966,7 +973,8 @@
            BigDecimal shareRate = hongBaoManageService.getShareRate();
            Gson gson = JsonUtil.getConvertBigDecimalToStringSubZeroBuilder(new GsonBuilder())
                  .excludeFieldsWithoutExposeAnnotation().setDateFormat("yyyy-MM-dd").create();
            ConfigParamsDTO paramsDTO = new ConfigParamsDTO(fanLiRate, shareRate, Constant.MAX_REWARD_RATE,hongBaoManageService.getVIPFanLiRate());
            ConfigParamsDTO paramsDTO = new ConfigParamsDTO(fanLiRate, shareRate, Constant.MAX_REWARD_RATE,
                  hongBaoManageService.getVIPFanLiRate());
            for (JDGoods goods : goodsList) {
               GoodsDetailVO goodsDetailVO = GoodsDetailVOFactory.convertJDGoods(goods, paramsDTO);
@@ -1050,7 +1058,8 @@
         if (goodsList != null && goodsList.size() > 0) {
            BigDecimal fanLiRate = hongBaoManageService.getFanLiRate();
            BigDecimal shareRate = hongBaoManageService.getShareRate();
            ConfigParamsDTO paramsDTO = new ConfigParamsDTO(fanLiRate, shareRate, Constant.MAX_REWARD_RATE,hongBaoManageService.getVIPFanLiRate());
            ConfigParamsDTO paramsDTO = new ConfigParamsDTO(fanLiRate, shareRate, Constant.MAX_REWARD_RATE,
                  hongBaoManageService.getVIPFanLiRate());
            for (PDDGoodsDetail goods : goodsList) {
               GoodsDetailVO goodsDetailVO = GoodsDetailVOFactory.convertPDDGoods(goods, paramsDTO);