yujian
2020-01-08 dce20aaab9d06c21fe51d5a9efcc2542f82bb6cb
fanli/src/main/java/com/yeshi/fanli/controller/client/v2/GoodsControllerV2.java
@@ -33,6 +33,7 @@
import com.yeshi.fanli.entity.jd.JDGoods;
import com.yeshi.fanli.entity.jd.JDGoodsClass;
import com.yeshi.fanli.entity.system.BusinessSystem;
import com.yeshi.fanli.entity.system.ConfigKeyEnum;
import com.yeshi.fanli.entity.system.SystemClientParams;
import com.yeshi.fanli.entity.taobao.ClientTBPid;
import com.yeshi.fanli.entity.taobao.TLJBuyGoods;
@@ -70,6 +71,7 @@
import com.yeshi.fanli.service.inter.user.UserInfoService;
import com.yeshi.fanli.service.inter.user.integral.IntegralGetService;
import com.yeshi.fanli.service.inter.user.vip.UserVIPInfoService;
import com.yeshi.fanli.service.inter.user.vip.UserVipConfigService;
import com.yeshi.fanli.util.Constant;
import com.yeshi.fanli.util.MoneyBigDecimalUtil;
import com.yeshi.fanli.util.RedisManager;
@@ -193,6 +195,10 @@
   @Resource
   private UserVIPInfoService userVIPInfoService;
   @Resource
   private UserVipConfigService userVipConfigService;
   /**
    * 淘宝商品详情
@@ -375,7 +381,9 @@
         goodsDetail.getMoneyInfo().setFanliMoney(goodsDetail.getMoneyInfo().getMaxMoney());
         goodsDetail.getMoneyInfo().setShareMoney(
               "¥" + TaoBaoUtil.getGoodsHongBaoMoney(goods, hongBaoManageService.getVIPShareRate()));
         goodsDetail.getMoneyInfo().setRateInfo(goodsDetail.getMoneyInfo().getMaxRateInfo());
      }
      goodsDetail.getMoneyInfo().setRateInfoHelpUrl(configService.get(ConfigKeyEnum.goodsDetailFanliRateHelpUrl.getKey()));
      if (TaoBaoUtil.isYUShou(goods)) {
         if (!StringUtil.isNullOrEmpty(goods.getPresaleDiscountFeeText())) {
@@ -473,7 +481,7 @@
         moneyType = 2;
         fanliValid = true;
         shareValid = false;
         helpLink = configService.get("zigoulijian_nofanli_help");
         helpLink = configService.get(ConfigKeyEnum.zigoulijianNofanliHelp.getKey());
         BigDecimal tljHongBao = TaoBaoUtil.getGoodsHongBaoMoney(goods, TaoBaoConstant.OWN_BUY_WITHOUT_FANLI_RATE);
@@ -533,13 +541,13 @@
         rewardCoupon.setJumpDetail(jumpDetailV2Service.getByTypeCache("web"));
         JSONObject params1 = new JSONObject();
         if (!VersionUtil.greaterThan_2_0_5(acceptData.getPlatform(), acceptData.getVersion()))
            params1.put("url", configService.get("special_guide_reward_coupon_link"));
            params1.put("url", configService.get(ConfigKeyEnum.specialGuideRewardCouponLink.getKey()));
         else
            params1.put("url", configService.get("vip_link"));
            params1.put("url", userVipConfigService.getValueByKey("vip_link"));
         rewardCoupon.setMaxMoney(goodsDetail.getMoneyInfo().getMaxMoney());
         if (VersionUtil.greaterThan_2_0_5(acceptData.getPlatform(), acceptData.getVersion())) {
            rewardCoupon.setDesc("返");
            params1.put("url", configService.get("vip_link"));
            params1.put("url", userVipConfigService.getValueByKey("vip_link"));
            rewardCoupon.getJumpDetail().setNeedLogin(true);
         } else
            rewardCoupon.setDesc("用返利奖励券最高返");
@@ -557,7 +565,7 @@
      // 分享路径
      if (StringUtil.isNullOrEmpty(helpLink)) {
         helpLink = configService.get("no_rebate_help_link");
         helpLink = configService.get(ConfigKeyEnum.noRebateHelpLink.getKey());
      }
      // 分享路径
@@ -629,7 +637,9 @@
         goodsDetail.getMoneyInfo().setFanliMoney(goodsDetail.getMoneyInfo().getMaxMoney());
         goodsDetail.getMoneyInfo()
               .setShareMoney("¥" + JDUtil.getGoodsFanLiMoney(jdGoods, hongBaoManageService.getVIPShareRate()));
         goodsDetail.getMoneyInfo().setRateInfo(goodsDetail.getMoneyInfo().getMaxRateInfo());
      }
      goodsDetail.getMoneyInfo().setRateInfoHelpUrl(configService.get(ConfigKeyEnum.goodsDetailFanliRateHelpUrl.getKey()));
      // 附加信息
      OtherInfo otherInfo = new OtherInfo();
@@ -653,9 +663,7 @@
               // 使用奖励券最高返
               if (VersionUtil.greaterThan_2_0_5(acceptData.getPlatform(), acceptData.getVersion())) {
                  maxMoneyPlus = "(京东plus返¥"
                        + JDUtil.getGoodsFanLiMoneyPlus(jdGoods,
                              hongBaoManageService.getVIPFanLiRate())
                        + ")";
                        + JDUtil.getGoodsFanLiMoneyPlus(jdGoods, hongBaoManageService.getVIPFanLiRate()) + ")";
               } else
                  maxMoneyPlus = "(京东plus最高返¥"
                        + fanliMoneyPlus.add(MoneyBigDecimalUtil.mul(fanliMoneyPlus, Constant.MAX_REWARD_RATE))
@@ -670,14 +678,14 @@
      rewardCoupon.setJumpDetail(jumpDetailV2Service.getByTypeCache("web"));
      JSONObject params1 = new JSONObject();
      if (!VersionUtil.greaterThan_2_0_5(acceptData.getPlatform(), acceptData.getVersion()))
         params1.put("url", configService.get("special_guide_reward_coupon_link"));
         params1.put("url", configService.get(ConfigKeyEnum.specialGuideRewardCouponLink.getKey()));
      else
         params1.put("url", configService.get("vip_link"));
         params1.put("url", userVipConfigService.getValueByKey("vip_link"));
      rewardCoupon.setMaxMoney(goodsDetail.getMoneyInfo().getMaxMoney());
      if (VersionUtil.greaterThan_2_0_5(acceptData.getPlatform(), acceptData.getVersion())) {
         rewardCoupon.setDesc("返");
         params1.put("url", configService.get("vip_link"));
         params1.put("url", userVipConfigService.getValueByKey("vip_link"));
         rewardCoupon.getJumpDetail().setNeedLogin(true);
      } else {
         rewardCoupon.setDesc("用返利奖励券最高返");
@@ -715,7 +723,7 @@
      List<ShamUser> listShareUser = new ArrayList<ShamUser>();
      // 京东开启分享
      String open = configService.get("share_jd_open");
      String open = configService.get(ConfigKeyEnum.shareOpenJD.getKey());
      if ("1".equals(open.trim())) {
         extraVO.setShareValid(true);
         MoneyInfoVO moneyInfo = goodsDetail.getMoneyInfo();
@@ -768,7 +776,7 @@
      extraVO.setFanliValid(true);
      if (StringUtil.isNullOrEmpty(helpLink)) {
         helpLink = configService.get("no_rebate_help_link");
         helpLink = configService.get(ConfigKeyEnum.noRebateHelpLink.getKey());
      }
      ShareVO shareInfoVO = new ShareVO();
@@ -825,7 +833,9 @@
         goodsDetail.getMoneyInfo().setFanliMoney(goodsDetail.getMoneyInfo().getMaxMoney());
         goodsDetail.getMoneyInfo().setShareMoney(
               "¥" + PinDuoDuoUtil.getGoodsFanLiMoney(pddGoods, hongBaoManageService.getVIPShareRate()));
         goodsDetail.getMoneyInfo().setRateInfo(goodsDetail.getMoneyInfo().getMaxRateInfo());
      }
      goodsDetail.getMoneyInfo().setRateInfoHelpUrl(configService.get(ConfigKeyEnum.goodsDetailFanliRateHelpUrl.getKey()));
      // 附加信息
      OtherInfo otherInfo = new OtherInfo();
@@ -833,14 +843,14 @@
      rewardCoupon.setJumpDetail(jumpDetailV2Service.getByTypeCache("web"));
      JSONObject params1 = new JSONObject();
      if (!VersionUtil.greaterThan_2_0_5(acceptData.getPlatform(), acceptData.getVersion()))
         params1.put("url", configService.get("special_guide_reward_coupon_link"));
         params1.put("url", configService.get(ConfigKeyEnum.specialGuideRewardCouponLink.getKey()));
      else
         params1.put("url", configService.get("vip_link"));
         params1.put("url", userVipConfigService.getValueByKey("vip_link"));
      rewardCoupon.setMaxMoney(goodsDetail.getMoneyInfo().getMaxMoney());
      if (VersionUtil.greaterThan_2_0_5(acceptData.getPlatform(), acceptData.getVersion())) {
         rewardCoupon.setDesc("返");
         params1.put("url", configService.get("vip_link"));
         params1.put("url", userVipConfigService.getValueByKey("vip_link"));
         rewardCoupon.getJumpDetail().setNeedLogin(true);
      } else
         rewardCoupon.setDesc("用返利奖励券最高返");
@@ -933,7 +943,7 @@
      extraVO.setShareValid(true);
      if (StringUtil.isNullOrEmpty(helpLink)) {
         helpLink = configService.get("no_rebate_help_link");
         helpLink = configService.get(ConfigKeyEnum.noRebateHelpLink.getKey());
      }
      ShareVO shareInfoVO = new ShareVO();