| | |
| | | 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, "淘口令",
|
| | | String.format("復製这条%s\n进入【Tao宝】即可抢购", token), true, false));
|
| | | if (!StringUtil.isNullOrEmpty(link)) {
|
| | | 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));
|
| | | "下载链接:" + Constant.YINGYONGBAO_LINK, false, true));
|
| | |
|
| | | list.add(new ShareGoodsCommentChoiceInfo(ShareGoodsCommentChoiceInfo.TYPE_FANLI_MONEY, "返利金额",
|
| | | "¥ " + fanliMoney, false, true));
|
| | | "返利金额:¥ " + fanliMoney, false, true));
|
| | |
|
| | | return list;
|
| | | }
|
| | |
| | |
|
| | | String imgs = configService.get(ConfigKeyEnum.goodsShareNotifyImgs.getKey());
|
| | | JSONArray array = JSONArray.fromObject(imgs);
|
| | | int p = (int) (array.size() * Math.random());
|
| | | if (p < array.size()) {
|
| | | shareInfo.setNotifyPicture(array.optString(p));
|
| | | }
|
| | | shareInfo.setNotifyPicture(array.optString(0));
|
| | |
|
| | | shareInfo.setNotifyDesc(configService.get(ConfigKeyEnum.goodsShareNotify.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()) {
|
| | | shareInfo.setNotifyPicture(array.optString(p));
|
| | | }
|
| | |
|
| | | shareInfo.setNotifyPicture(array.optString(0));
|
| | |
|
| | | shareInfo.setNotifyDesc(configService.get(ConfigKeyEnum.goodsShareNotify.getKey()));
|
| | |
|
| | | // 分享金额
|
| | |
| | | // 设置评论文本选项
|
| | | shareInfo.setCommentTextChoiceList(getCommentChoiceList(shareInfo.getToken(), null, inviteCode,
|
| | | TaoBaoUtil.getGoodsHongBaoMoney(taoBaoLink.getGoods(), hongBaoManageService.getFanLiRate())));
|
| | |
|
| | | shareInfo.setCommentText(shareInfo.getShareText());
|
| | |
|
| | | if (VersionUtil.greaterThan_2_0_7(platform, version))
|
| | | shareInfo.setRecommendText(taoBaoLink.getGoods().getDescription());
|
| | | else
|
| | | shareInfo.setRecommendText(shareInfo.getDescText());
|
| | |
|
| | | out.print(JsonUtil.loadTrueResult(
|
| | |
| | | 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()) {
|
| | | shareInfo.setNotifyPicture(array.optString(p));
|
| | | }
|
| | |
|
| | | shareInfo.setNotifyPicture(array.size() > 1 ? array.optString(1) : array.optString(0));
|
| | |
|
| | | shareInfo.setNotifyDesc(configService.get(ConfigKeyEnum.goodsShareNotifyJD.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()) {
|
| | | shareInfo.setNotifyPicture(array.optString(p));
|
| | | }
|
| | |
|
| | | shareInfo.setNotifyPicture(array.size() > 1 ? array.optString(1) : array.optString(0));
|
| | |
|
| | | shareInfo.setNotifyDesc(configService.get(ConfigKeyEnum.goodsShareNotifyPDD.getKey()));
|
| | |
|
| | | // 添加分享记录
|