From b59fef5c00b15fdfdfa9d4be26e5bf6b41c75458 Mon Sep 17 00:00:00 2001 From: admin <2780501319@qq.com> Date: 星期日, 23 二月 2020 00:16:52 +0800 Subject: [PATCH] 2.0.7相关服务端功能添加 --- fanli/src/main/java/com/yeshi/fanli/controller/client/v2/ShareControllerV2.java | 30 +++++++++++++++++------------- 1 files changed, 17 insertions(+), 13 deletions(-) diff --git a/fanli/src/main/java/com/yeshi/fanli/controller/client/v2/ShareControllerV2.java b/fanli/src/main/java/com/yeshi/fanli/controller/client/v2/ShareControllerV2.java index 40e69b7..e42cbf1 100644 --- a/fanli/src/main/java/com/yeshi/fanli/controller/client/v2/ShareControllerV2.java +++ b/fanli/src/main/java/com/yeshi/fanli/controller/client/v2/ShareControllerV2.java @@ -162,20 +162,21 @@ BigDecimal fanliMoney) { List<ShareGoodsCommentChoiceInfo> list = new ArrayList<>(); if (!StringUtil.isNullOrEmpty(token)) - list.add(new ShareGoodsCommentChoiceInfo(ShareGoodsCommentChoiceInfo.TYPE_TOKEN, "娣樺彛浠�", token, true, false)); + list.add( + new ShareGoodsCommentChoiceInfo(ShareGoodsCommentChoiceInfo.TYPE_TOKEN, "娣樺彛浠�", token, true, false)); if (!StringUtil.isNullOrEmpty(link)) { - list.add(new ShareGoodsCommentChoiceInfo(ShareGoodsCommentChoiceInfo.TYPE_LINK, "閾炬帴",link, true, false)); + list.add(new ShareGoodsCommentChoiceInfo(ShareGoodsCommentChoiceInfo.TYPE_LINK, "閾炬帴", link, true, false)); } if (!StringUtil.isNullOrEmpty(inviteCode)) { - list.add(new ShareGoodsCommentChoiceInfo(ShareGoodsCommentChoiceInfo.TYPE_INVITE_CODE, "閭�璇风爜", inviteCode, false, - true)); + list.add(new ShareGoodsCommentChoiceInfo(ShareGoodsCommentChoiceInfo.TYPE_INVITE_CODE, "閭�璇风爜", inviteCode, + false, true)); } - list.add(new ShareGoodsCommentChoiceInfo(ShareGoodsCommentChoiceInfo.TYPE_DOWNLOAD_LINK, "涓嬭浇閾炬帴", "http://www.baidu.com", false, - true)); + list.add(new ShareGoodsCommentChoiceInfo(ShareGoodsCommentChoiceInfo.TYPE_DOWNLOAD_LINK, "涓嬭浇閾炬帴", + "http://www.baidu.com", false, true)); - list.add( - new ShareGoodsCommentChoiceInfo(ShareGoodsCommentChoiceInfo.TYPE_FANLI_MONEY, "杩斿埄閲戦", "楼 "+fanliMoney, false, true)); + list.add(new ShareGoodsCommentChoiceInfo(ShareGoodsCommentChoiceInfo.TYPE_FANLI_MONEY, "杩斿埄閲戦", + "楼 " + fanliMoney, false, true)); return list; } @@ -561,7 +562,8 @@ taoBaoLink.getGoods(), shareInfo.getToken())); // 鎻愮ず鍥炬枃鍐呭 - String imgs = configService.get(ConfigKeyEnum.goodsShareNotifyImgs.getKey()); + String imgs = configService.getByVersion(ConfigKeyEnum.goodsShareNotifyImgs.getKey(), platform, + Integer.parseInt(version)); JSONArray array = JSONArray.fromObject(imgs); int p = (int) (array.size() * Math.random()); if (p < array.size()) { @@ -703,7 +705,8 @@ } shareInfo.setDescText(descText); - String imgs = configService.get(ConfigKeyEnum.goodsShareNotifyImgs.getKey()); + String imgs = configService.getByVersion(ConfigKeyEnum.goodsShareNotifyImgs.getKey(), acceptData.getPlatform(), + Integer.parseInt(acceptData.getVersion())); JSONArray array = JSONArray.fromObject(imgs); int p = (int) (array.size() * Math.random()); if (p < array.size()) { @@ -732,7 +735,7 @@ // 璁剧疆璇勮鏂囨湰閫夐」 shareInfo.setCommentTextChoiceList(getCommentChoiceList(null, shareInfo.getClickUrl(), inviteCode, JDUtil.getGoodsFanLiMoney(jdGoods, hongBaoManageService.getFanLiRate()))); - + shareInfo.setCommentText(shareInfo.getShareText()); shareInfo.setRecommendText(shareInfo.getDescText()); @@ -839,7 +842,8 @@ shareInfo.setDescText(descText); // - String imgs = configService.get(ConfigKeyEnum.goodsShareNotifyImgs.getKey()); + String imgs = configService.getByVersion(ConfigKeyEnum.goodsShareNotifyImgs.getKey(), acceptData.getPlatform(), + Integer.parseInt(acceptData.getVersion())); JSONArray array = JSONArray.fromObject(imgs); int p = (int) (array.size() * Math.random()); if (p < array.size()) { @@ -869,7 +873,7 @@ // 璁剧疆璇勮鏂囨湰閫夐」 shareInfo.setCommentTextChoiceList(getCommentChoiceList(null, shareInfo.getClickUrl(), inviteCode, PinDuoDuoUtil.getGoodsFanLiMoney(goods, hongBaoManageService.getFanLiRate()))); - + shareInfo.setCommentText(shareInfo.getShareText()); shareInfo.setRecommendText(shareInfo.getDescText()); -- Gitblit v1.8.0