yujian
2019-05-20 179b39401c406579a0d10c442a665aeb2802e931
fanli/src/main/java/com/yeshi/fanli/controller/client/RecommendController.java
@@ -1602,6 +1602,8 @@
         if ("ios".equalsIgnoreCase(platform)) {
            root.put("htmlLink", configService.get("index_html_link_ios"));
         }
         root.put("spikeGoods",  getSpikeGoodsContent(acceptData));
         out.print(JsonUtil.loadTrueResult(root));
      } catch (Exception e) {
@@ -1648,15 +1650,7 @@
      return swiperList;
   }
   /**
    * 限时秒杀 1.5.3
    *
    * @param acceptData
    * @param out
    */
   @RequestMapping(value = "getSpikeGoods")
   public void getSpikeGoods(AcceptData acceptData, PrintWriter out) {
   private JSONObject getSpikeGoodsContent(AcceptData acceptData) {
      // 下一次倒计时的时间
      int type = qualityFlashSaleService.getNowType() + 1;
      int hour = 0;
@@ -1734,10 +1728,30 @@
         redisManager.cacheCommonString(cachekey, array.toString(), 60 * 30);
      }
      Long endTime = nextTime.getTimeInMillis() - java.lang.System.currentTimeMillis();
      JSONObject root = new JSONObject();
      root.put("time", nextTime.getTimeInMillis());
      root.put("endTime", endTime > 0? endTime : 0);
      root.put("listgoods", array);
      return root;
   }
   /**
    * 限时秒杀 1.5.3
    *
    * @param acceptData
    * @param out
    */
   @RequestMapping(value = "getSpikeGoods")
   public void getSpikeGoods(AcceptData acceptData, PrintWriter out) {
      JSONObject params = new JSONObject();
      params.put("url", configService.get("spike_goods_link"));
      JumpDetailV2 jumpDetail = jumpDetailV2Service.getByTypeCache("web");
      JSONObject root = getSpikeGoodsContent(acceptData);
      root.put("params", params);
      root.put("jumpDetail", jumpDetail);
      out.print(JsonUtil.loadTrueResult(root));
   }
@@ -1917,9 +1931,11 @@
      goodsJson.put("price", tb.getReservePrice().toString());
      goodsJson.put("zkPrice", tb.getZkPrice().toString());
      // 30天销量
      goodsJson.put("saleCount", TaoBaoUtil.getSaleCount(tb.getBiz30day()));
      goodsJson.put("salesCount", TaoBaoUtil.getSaleCount(tb.getBiz30day()));
      // 分享赚
      BigDecimal shareMoney = taoBaoGoodsBriefService.getShareGoodsUserHongBao(tb);
      data.put("shareMoney", "¥" + shareMoney);
@@ -2011,8 +2027,8 @@
      goodsJson.put("hongBao", hongBao);
      List<ClientTextStyleVO> labels = new ArrayList<>();
      labels.add(new ClientTextStyleVO("标签测试内容", "#FF0000"));
      labels.add(new ClientTextStyleVO("标签测试内容", "#00FF00"));
      labels.add(new ClientTextStyleVO("标签内容", "#F14242"));
      labels.add(new ClientTextStyleVO("标签内容", "#00FF00"));
      goodsJson.put("labels", labels);
      data.put("tbPidInfo", clientTBPid);
@@ -2041,19 +2057,29 @@
         } else {
            tbShopInfo.setUserType("0");
         }
         String shopLink = tbShopInfo.getShopUrl();
         if (StringUtil.isNullOrEmpty(shopLink)) {
            tbShopInfo.setShopUrl(TaoBaoUtil.getShopLink(tbShopInfo.getUserId()));
         }
      }
      // 店铺
      if (("android".equalsIgnoreCase(acceptData.getPlatform()) && Integer.parseInt(acceptData.getVersion()) >= 40)
            || ("ios".equalsIgnoreCase(acceptData.getPlatform())
                  && Integer.parseInt(acceptData.getVersion()) >= 49)) {
         TaoBaoShop shop = taoBaoShopService.getTaoBaoShop(goods.getAuctionId(), goods.getSellerId());
         if (shop != null)
         if (shop != null) {
            String shopLink = shop.getShopLink();
            if (StringUtil.isNullOrEmpty(shopLink)) {
               shop.setShopLink(TaoBaoUtil.getShopLink(shop.getId()));
            }
            goodsJson.put("shopInfo", shop);
         }
      } else {
         goodsJson.put("shopInfo", tbShopInfo);
      }
      goodsJson.put("fanliValid", true);// 是否有返利
      goodsJson.put("fanliValid",Math.random()>0.5? true:false);// 是否有返利
      // 分享路径
      String shareUrl = String.format("%s?id=" + tb.getAuctionId(), Constant.systemCommonConfig.getAppShareInfoUrl());
@@ -2071,6 +2097,9 @@
      data.put("shareUsers", listShareUser);
      data.put("couponUsers", listCouponUser);
      data.put("detailWebUrl", "http://apph5.yeshitv.com/apppage/goods_img.html?id=" + id);
      data.put("noRebateHelpLink", configService.get("no_rebate_help_link"));
      // 商品链接
      String h5Url = String.format("http://%s%s?id=%s&appType=flq", configService.getH5Host(),
            Constant.systemCommonConfig.getShareGoodsPagePath(), tb.getAuctionId() + "");