Administrator
2020-02-24 09417e97672be66c5e312b10f23a9e30da3acb97
fanli/src/main/java/com/yeshi/fanli/controller/wxmp/v1/GoodsController.java
@@ -61,7 +61,6 @@
import com.yeshi.fanli.tag.PageEntity;
import com.yeshi.fanli.util.Constant;
import com.yeshi.fanli.util.JumpDetailUtil;
import com.yeshi.fanli.util.MoneyBigDecimalUtil;
import com.yeshi.fanli.util.StringUtil;
import com.yeshi.fanli.util.ThreadUtil;
import com.yeshi.fanli.util.VersionUtil;
@@ -263,7 +262,7 @@
    *            页面来源
    * @param out
    */
   @RequestMapping(value = "getGoodsDetial", method = RequestMethod.POST)
   @RequestMapping(value = "getGoodsDetial")
   public void getGoodsDetial(WXMPAcceptData acceptData, Long goodsId, Integer goodsType, String from, Long uid,
         PrintWriter out) {
      if (goodsType == null || goodsType < 2 || goodsType > 3) {
@@ -343,13 +342,10 @@
                     hongBaoManageService.getFanLiRate());
               otherInfo.setFanliMoneyPlus("京东plus返¥" + fanliMoneyPlus);
               // 使用奖励券最高返
               if (VersionUtil.greaterThan_2_0_5(acceptData.getPlatform(), acceptData.getVersion())) {
                  maxMoneyPlus = "(京东plus返¥"
                        + JDUtil.getGoodsFanLiMoneyPlus(jdGoods, hongBaoManageService.getVIPFanLiRate()) + ")";
               } else
                  maxMoneyPlus = "(京东plus最高返¥"
                        + fanliMoneyPlus.add(MoneyBigDecimalUtil.mul(fanliMoneyPlus, Constant.MAX_REWARD_RATE))
                        + ")";
               maxMoneyPlus = "(京东plus返¥"
                     + JDUtil.getGoodsFanLiMoneyPlus(jdGoods, hongBaoManageService.getVIPFanLiRate()) + ")";
            }
         }
      }
@@ -357,7 +353,10 @@
      // 奖励券返利
      RewardCouponVO rewardCoupon = new RewardCouponVO();
      rewardCoupon.setMaxMoneyPlus(maxMoneyPlus);
      rewardCoupon.setJumpDetail(jumpDetailV2Service.getByTypeCache("web"));
      rewardCoupon.setMaxMoney(goodsDetail.getMoneyInfo().getMaxMoney());
      rewardCoupon.setDesc("返");
      otherInfo.setRewardCoupon(rewardCoupon);
      goodsDetail.setOtherInfo(otherInfo);
      CouponInfoVO couponInfo = goodsDetail.getCouponInfo();
@@ -440,6 +439,10 @@
      shareInfoVO.setHelpLink(helpLink);
      extraVO.setShare(shareInfoVO);
      // 判断vip
      if (uid != null) {
         extraVO.setVip(userVIPInfoService.isVIP(uid));
      }
      JSONObject object = new JSONObject();
      object.put("extra", JsonUtil.getApiCommonGson().toJson(extraVO));
      object.put("goods", JsonUtil.getApiCommonGson().toJson(goodsDetail));
@@ -482,6 +485,22 @@
         goodsDetail.getMoneyInfo().setShareMoney(
               "¥" + PinDuoDuoUtil.getGoodsFanLiMoney(pddGoods, hongBaoManageService.getVIPShareRate()));
      }
      if (goodsDetail.getCouponInfo() != null) {
         List<CouponInfoVO> list = new ArrayList<>();
         list.add(goodsDetail.getCouponInfo());
         goodsDetail.setCouponInfoList(list);
      }
      // 奖励券返利
      RewardCouponVO rewardCoupon = new RewardCouponVO();
      rewardCoupon.setMaxMoney(goodsDetail.getMoneyInfo().getMaxMoney());
      rewardCoupon.setDesc("返");
      OtherInfo otherInfo = new OtherInfo();
      otherInfo.setRewardCoupon(rewardCoupon);
      goodsDetail.setOtherInfo(otherInfo);
      CouponInfoVO couponInfo = goodsDetail.getCouponInfo();
      PDDPromotionUrl convertUrl = null;
@@ -563,6 +582,11 @@
      shareInfoVO.setHelpLink(helpLink);
      extraVO.setShare(shareInfoVO);
      // 判断vip
      if (uid != null) {
         extraVO.setVip(userVIPInfoService.isVIP(uid));
      }
      if (convertUrl != null) {
         extraVO.setCouponJumpLink(convertUrl.getUrl());
         extraVO.setNativeCouponJumpLink(PinDuoDuoUtil.getAndroidNativeURI(convertUrl.getUrl()));