From ec8a1c6f81b5747e9efce86faaba33d10df7f61d Mon Sep 17 00:00:00 2001 From: admin <2780501319@qq.com> Date: 星期日, 01 三月 2020 16:37:26 +0800 Subject: [PATCH] 动态提示语调整 --- fanli/src/main/java/com/yeshi/fanli/controller/wxmp/v1/GoodsController.java | 46 +++++++++++++++++++++++++++++++++++----------- 1 files changed, 35 insertions(+), 11 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..6cd1a21 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)); @@ -468,7 +471,7 @@ * @param out */ private void getDetialPDD(WXMPAcceptData acceptData, Long id, Long uid, String from, PrintWriter out) { - PDDGoodsDetail pddGoods = PinDuoDuoApiUtil.getGoodsDetail(id); + PDDGoodsDetail pddGoods =null; //PinDuoDuoApiUtil.getGoodsDetail(id); if (pddGoods == null) { out.print(JsonUtil.loadFalseResult(2, "鍟嗗搧涓嶅瓨鍦�")); return; @@ -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