From 598d537f468c7c20a840c6ff8c9f742b6f542286 Mon Sep 17 00:00:00 2001 From: yujian <yujian@163.com> Date: 星期五, 03 一月 2020 17:00:02 +0800 Subject: [PATCH] configKey枚举 --- fanli/src/main/java/com/yeshi/fanli/controller/client/v2/GoodsControllerV2.java | 27 ++++++++++++++++++--------- 1 files changed, 18 insertions(+), 9 deletions(-) diff --git a/fanli/src/main/java/com/yeshi/fanli/controller/client/v2/GoodsControllerV2.java b/fanli/src/main/java/com/yeshi/fanli/controller/client/v2/GoodsControllerV2.java index e161b58..b36776a 100644 --- a/fanli/src/main/java/com/yeshi/fanli/controller/client/v2/GoodsControllerV2.java +++ b/fanli/src/main/java/com/yeshi/fanli/controller/client/v2/GoodsControllerV2.java @@ -70,6 +70,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 +194,10 @@ @Resource private UserVIPInfoService userVIPInfoService; + + @Resource + private UserVipConfigService userVipConfigService; + /** * 娣樺疂鍟嗗搧璇︽儏 @@ -375,7 +380,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("goods_detail_fanli_rate_help_url")); if (TaoBaoUtil.isYUShou(goods)) { if (!StringUtil.isNullOrEmpty(goods.getPresaleDiscountFeeText())) { @@ -535,11 +542,11 @@ if (!VersionUtil.greaterThan_2_0_5(acceptData.getPlatform(), acceptData.getVersion())) params1.put("url", configService.get("special_guide_reward_coupon_link")); 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("鐢ㄨ繑鍒╁鍔卞埜鏈�楂樿繑"); @@ -629,7 +636,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("goods_detail_fanli_rate_help_url")); // 闄勫姞淇℃伅 OtherInfo otherInfo = new OtherInfo(); @@ -653,9 +662,7 @@ // 浣跨敤濂栧姳鍒告渶楂樿繑 if (VersionUtil.greaterThan_2_0_5(acceptData.getPlatform(), acceptData.getVersion())) { maxMoneyPlus = "锛堜含涓減lus杩斅�" - + JDUtil.getGoodsFanLiMoneyPlus(jdGoods, - hongBaoManageService.getVIPFanLiRate()) - + "锛�"; + + JDUtil.getGoodsFanLiMoneyPlus(jdGoods, hongBaoManageService.getVIPFanLiRate()) + "锛�"; } else maxMoneyPlus = "锛堜含涓減lus鏈�楂樿繑楼" + fanliMoneyPlus.add(MoneyBigDecimalUtil.mul(fanliMoneyPlus, Constant.MAX_REWARD_RATE)) @@ -672,12 +679,12 @@ if (!VersionUtil.greaterThan_2_0_5(acceptData.getPlatform(), acceptData.getVersion())) params1.put("url", configService.get("special_guide_reward_coupon_link")); 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("鐢ㄨ繑鍒╁鍔卞埜鏈�楂樿繑"); @@ -825,7 +832,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("goods_detail_fanli_rate_help_url")); // 闄勫姞淇℃伅 OtherInfo otherInfo = new OtherInfo(); @@ -835,12 +844,12 @@ if (!VersionUtil.greaterThan_2_0_5(acceptData.getPlatform(), acceptData.getVersion())) params1.put("url", configService.get("special_guide_reward_coupon_link")); 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("鐢ㄨ繑鍒╁鍔卞埜鏈�楂樿繑"); -- Gitblit v1.8.0