admin
2019-10-22 32f925357776c46bd9e35cf9aad4fdd0f6535d1d
fanli/src/main/java/com/yeshi/fanli/controller/client/v2/GoodsControllerV2.java
@@ -182,10 +182,9 @@
   @Resource
   private JumpDetailV2Service jumpDetailV2Service;
   @Resource
   private JDGoodsClassService jdGoodsClassService;
   /**
    * 淘宝商品详情
@@ -266,7 +265,6 @@
                  taoBaoGoodsUpdateService.offlineTaoBaoGoods(id);
               }
            });
         }
      } else {
@@ -351,6 +349,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());
@@ -545,12 +552,12 @@
      } else {// 普通购买
         OtherInfo otherInfo = new OtherInfo();
         RewardCouponVO rewardCoupon = new RewardCouponVO();
         rewardCoupon.setJumpDetail(jumpDetailV2Service.getByTypeCache("integralExchange"));
         JSONObject params1=new JSONObject();
         params1.put("balanceMore", true);
         rewardCoupon.setJumpDetail(jumpDetailV2Service.getByTypeCache("web"));
         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);
@@ -636,14 +643,15 @@
      // 附加信息
      OtherInfo otherInfo = new OtherInfo();
      // 京东plus返利
      String maxMoneyPlus = null;
      JDCategoryInfo categoryInfo = jdGoods.getCategoryInfo();
      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,20 +660,22 @@
               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))
                     + ")";
            }
         }
      }
      // 奖励券返利
      RewardCouponVO rewardCoupon = new RewardCouponVO();
      rewardCoupon.setMaxMoneyPlus(maxMoneyPlus);
      rewardCoupon.setJumpDetail(jumpDetailV2Service.getByTypeCache("integralExchange"));
      JSONObject params1=new JSONObject();
      params1.put("balanceMore", true);
      rewardCoupon.setJumpDetail(jumpDetailV2Service.getByTypeCache("web"));
      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);
@@ -808,12 +818,12 @@
      // 附加信息
      OtherInfo otherInfo = new OtherInfo();
      RewardCouponVO rewardCoupon = new RewardCouponVO();
      rewardCoupon.setJumpDetail(jumpDetailV2Service.getByTypeCache("integralExchange"));
      JSONObject params1=new JSONObject();
      params1.put("balanceMore", true);
      rewardCoupon.setJumpDetail(jumpDetailV2Service.getByTypeCache("web"));
      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);