yujian
2020-01-18 f4a0f2acc63d7785eab108419a4e16f5f688cb95
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,9 @@
   @Resource
   private UserVIPInfoService userVIPInfoService;
   @Resource
   private UserVipConfigService userVipConfigService;
   /**
    * 淘宝商品详情
@@ -377,7 +382,8 @@
               "¥" + TaoBaoUtil.getGoodsHongBaoMoney(goods, hongBaoManageService.getVIPShareRate()));
         goodsDetail.getMoneyInfo().setRateInfo(goodsDetail.getMoneyInfo().getMaxRateInfo());
      }
      goodsDetail.getMoneyInfo().setRateInfoHelpUrl(configService.get("goods_detail_fanli_rate_help_url"));
      goodsDetail.getMoneyInfo()
            .setRateInfoHelpUrl(configService.get(ConfigKeyEnum.goodsDetailFanliRateHelpUrl.getKey()));
      if (TaoBaoUtil.isYUShou(goods)) {
         if (!StringUtil.isNullOrEmpty(goods.getPresaleDiscountFeeText())) {
@@ -410,7 +416,7 @@
      }
      extraVO.setTbPidInfo(clientTBPid);
      extraVO.setDetailUrl("http://apph5.yeshitv.com/apppage/goods_img.html?id=" + id);
      extraVO.setDetailUrl("http://apph5.banliapp.com/apppage/goods_img.html?id=" + id);
      // 分享赚人提示
      MoneyInfoVO moneyInfo = goodsDetail.getMoneyInfo();
@@ -475,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);
@@ -535,18 +541,23 @@
         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("用返利奖励券最高返");
         rewardCoupon.setParams(params1.toString());
         otherInfo.setRewardCoupon(rewardCoupon);
         if ("ios".equalsIgnoreCase(acceptData.getPlatform())
               && configService.iosOnLining(Integer.parseInt(acceptData.getVersion())))
            otherInfo.setRewardCoupon(null);
         goodsDetail.setOtherInfo(otherInfo);
      }
      extraVO.setFanliValid(fanliValid);
@@ -559,7 +570,7 @@
      // 分享路径
      if (StringUtil.isNullOrEmpty(helpLink)) {
         helpLink = configService.get("no_rebate_help_link");
         helpLink = configService.get(ConfigKeyEnum.noRebateHelpLink.getKey());
      }
      // 分享路径
@@ -633,7 +644,8 @@
               .setShareMoney("¥" + JDUtil.getGoodsFanLiMoney(jdGoods, hongBaoManageService.getVIPShareRate()));
         goodsDetail.getMoneyInfo().setRateInfo(goodsDetail.getMoneyInfo().getMaxRateInfo());
      }
      goodsDetail.getMoneyInfo().setRateInfoHelpUrl(configService.get("goods_detail_fanli_rate_help_url"));
      goodsDetail.getMoneyInfo()
            .setRateInfoHelpUrl(configService.get(ConfigKeyEnum.goodsDetailFanliRateHelpUrl.getKey()));
      // 附加信息
      OtherInfo otherInfo = new OtherInfo();
@@ -672,20 +684,25 @@
      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("用返利奖励券最高返");
      }
      rewardCoupon.setParams(params1.toString());
      otherInfo.setRewardCoupon(rewardCoupon);
      if ("ios".equalsIgnoreCase(acceptData.getPlatform())
            && configService.iosOnLining(Integer.parseInt(acceptData.getVersion())))
         otherInfo.setRewardCoupon(null);
      goodsDetail.setOtherInfo(otherInfo);
      CouponInfoVO couponInfo = goodsDetail.getCouponInfo();
@@ -717,7 +734,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();
@@ -770,7 +787,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();
@@ -829,7 +846,8 @@
               "¥" + PinDuoDuoUtil.getGoodsFanLiMoney(pddGoods, hongBaoManageService.getVIPShareRate()));
         goodsDetail.getMoneyInfo().setRateInfo(goodsDetail.getMoneyInfo().getMaxRateInfo());
      }
      goodsDetail.getMoneyInfo().setRateInfoHelpUrl(configService.get("goods_detail_fanli_rate_help_url"));
      goodsDetail.getMoneyInfo()
            .setRateInfoHelpUrl(configService.get(ConfigKeyEnum.goodsDetailFanliRateHelpUrl.getKey()));
      // 附加信息
      OtherInfo otherInfo = new OtherInfo();
@@ -837,19 +855,22 @@
      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("用返利奖励券最高返");
      rewardCoupon.setParams(params1.toString());
      otherInfo.setRewardCoupon(rewardCoupon);
      if ("ios".equalsIgnoreCase(acceptData.getPlatform())
            && configService.iosOnLining(Integer.parseInt(acceptData.getVersion())))
         otherInfo.setRewardCoupon(null);
      goodsDetail.setOtherInfo(otherInfo);
      CouponInfoVO couponInfo = goodsDetail.getCouponInfo();
@@ -877,7 +898,7 @@
      }
      // 图文详情
      extraVO.setDetailUrl("http://apph5.yeshitv.com/apppage/goods_img_pdd.html?id=" + id);
      extraVO.setDetailUrl("http://apph5.banliapp.com/apppage/goods_img_pdd.html?id=" + id);
      String salesTip = pddGoods.getSalesTip();
      if (!StringUtil.isNullOrEmpty(salesTip)) {
@@ -937,7 +958,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();