admin
2019-10-21 90637366bd34693217f246547eb76853d974cfd2
fanli/src/main/java/com/yeshi/fanli/controller/client/v2/GoodsControllerV2.java
@@ -186,7 +186,6 @@
   @Resource
   private JDGoodsClassService jdGoodsClassService;
   
   /**
    * 淘宝商品详情
    * 
@@ -351,6 +350,15 @@
      BigDecimal fanLiRate = hongBaoManageService.getFanLiRate();
      BigDecimal shareRate = hongBaoManageService.getShareRate();
      GoodsDetailVO goodsDetail = GoodsDetailVOFactory.convertTaoBao(goods, null, fanLiRate, shareRate);
      if (TaoBaoUtil.isYUShou(goods)) {
         if (!StringUtil.isNullOrEmpty(goods.getPresaleDiscountFeeText())) {
            if (goodsDetail.getLabels() == null)
               goodsDetail.setLabels(new ArrayList<>());
            goodsDetail.getLabels().add(new ClientTextStyleVO(goods.getPresaleDiscountFeeText(), "#FF2B4E"));
         }
      }
      // 在标题添加优惠信息
      // 店铺信息
      TaoBaoShop shop = taoBaoShopService.getTaoBaoShop(id, goods.getSellerId());
@@ -549,8 +557,8 @@
         JSONObject params1=new JSONObject();
         params1.put("url", configService.get("special_guide_reward_coupon_link"));
         rewardCoupon.setParams(params1.toString());
         rewardCoupon.setMaxMoney("¥" +TaoBaoUtil.getGoodsHongBaoMoney(goods, fanLiRate).add( MoneyBigDecimalUtil.mul(TaoBaoUtil.getGoodsHongBaoMoney(goods, fanLiRate),
               Constant.MAX_REWARD_RATE)));
         rewardCoupon.setMaxMoney("¥" + TaoBaoUtil.getGoodsHongBaoMoney(goods, fanLiRate).add(MoneyBigDecimalUtil
               .mul(TaoBaoUtil.getGoodsHongBaoMoney(goods, fanLiRate), Constant.MAX_REWARD_RATE)));
         rewardCoupon.setDesc("用返利奖励券最高返");
         otherInfo.setRewardCoupon(rewardCoupon);
         goodsDetail.setOtherInfo(otherInfo);
@@ -643,7 +651,8 @@
      if (categoryInfo != null && categoryInfo.getCid3() != null && jdGoods.getCommissionInfo() != null) {
         Long cid3 = categoryInfo.getCid3();
         JDGoodsClass threeClass = jdGoodsClassService.getThreeClassByCid(Integer.parseInt(cid3.toString()));
         if (threeClass != null && threeClass.getSelfComm() != null && threeClass.getSelfComm().compareTo(new BigDecimal(0)) > 0) {
         if (threeClass != null && threeClass.getSelfComm() != null
               && threeClass.getSelfComm().compareTo(new BigDecimal(0)) > 0) {
            BigDecimal commissionShare = jdGoods.getCommissionInfo().getCommissionShare();
            // plus比例 小于正常比例
            if (commissionShare != null && commissionShare.compareTo(threeClass.getSelfComm()) > 0) {
@@ -652,7 +661,9 @@
               BigDecimal fanliMoneyPlus = JDUtil.getGoodsFanLiMoneyPlus(jdGoods, fanLiRate);
               otherInfo.setFanliMoneyPlus("京东plus会员返¥" + fanliMoneyPlus);
               // 使用奖励券最高返
               maxMoneyPlus = "(京东plus会员最高返¥"+ fanliMoneyPlus.add(MoneyBigDecimalUtil.mul(fanliMoneyPlus, Constant.MAX_REWARD_RATE))+")";
               maxMoneyPlus = "(京东plus会员最高返¥"
                     + fanliMoneyPlus.add(MoneyBigDecimalUtil.mul(fanliMoneyPlus, Constant.MAX_REWARD_RATE))
                     + ")";
            }
         }
      }
@@ -664,8 +675,8 @@
      JSONObject params1=new JSONObject();
      params1.put("url", configService.get("special_guide_reward_coupon_link"));
      rewardCoupon.setParams(params1.toString());
      rewardCoupon.setMaxMoney(
            "¥" +JDUtil.getGoodsFanLiMoney(jdGoods, fanLiRate).add( MoneyBigDecimalUtil.mul(JDUtil.getGoodsFanLiMoney(jdGoods, fanLiRate), Constant.MAX_REWARD_RATE)));
      rewardCoupon.setMaxMoney("¥" + JDUtil.getGoodsFanLiMoney(jdGoods, fanLiRate)
            .add(MoneyBigDecimalUtil.mul(JDUtil.getGoodsFanLiMoney(jdGoods, fanLiRate), Constant.MAX_REWARD_RATE)));
      rewardCoupon.setDesc("用返利奖励券最高返");
      otherInfo.setRewardCoupon(rewardCoupon);
      goodsDetail.setOtherInfo(otherInfo);
@@ -812,8 +823,8 @@
      JSONObject params1=new JSONObject();
      params1.put("url", configService.get("special_guide_reward_coupon_link"));
      rewardCoupon.setParams(params1.toString());
      rewardCoupon.setMaxMoney("¥" +PinDuoDuoUtil.getGoodsFanLiMoney(pddGoods, fanLiRate).add(MoneyBigDecimalUtil.mul(PinDuoDuoUtil.getGoodsFanLiMoney(pddGoods, fanLiRate),
            Constant.MAX_REWARD_RATE)));
      rewardCoupon.setMaxMoney("¥" + PinDuoDuoUtil.getGoodsFanLiMoney(pddGoods, fanLiRate).add(MoneyBigDecimalUtil
            .mul(PinDuoDuoUtil.getGoodsFanLiMoney(pddGoods, fanLiRate), Constant.MAX_REWARD_RATE)));
      rewardCoupon.setDesc("用返利奖励券最高返");
      otherInfo.setRewardCoupon(rewardCoupon);
      goodsDetail.setOtherInfo(otherInfo);