From e26a53e729c16a36825a399f26e7ab069890320a Mon Sep 17 00:00:00 2001 From: admin <2780501319@qq.com> Date: 星期一, 17 二月 2020 10:11:18 +0800 Subject: [PATCH] 小程序相关接口修改 --- fanli/src/main/java/com/yeshi/fanli/controller/wxmp/v1/GoodsController.java | 44 ++++++++++++++++++++++++++++++++++---------- 1 files changed, 34 insertions(+), 10 deletions(-) diff --git a/fanli/src/main/java/com/yeshi/fanli/controller/wxmp/v1/GoodsController.java b/fanli/src/main/java/com/yeshi/fanli/controller/wxmp/v1/GoodsController.java index ceb7f8c..5873e9b 100644 --- a/fanli/src/main/java/com/yeshi/fanli/controller/wxmp/v1/GoodsController.java +++ b/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 = "锛堜含涓減lus杩斅�" - + JDUtil.getGoodsFanLiMoneyPlus(jdGoods, hongBaoManageService.getVIPFanLiRate()) + "锛�"; - } else - maxMoneyPlus = "锛堜含涓減lus鏈�楂樿繑楼" - + fanliMoneyPlus.add(MoneyBigDecimalUtil.mul(fanliMoneyPlus, Constant.MAX_REWARD_RATE)) - + "锛�"; + + maxMoneyPlus = "锛堜含涓減lus杩斅�" + + 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())); -- Gitblit v1.8.0