From 80f97526586cb5d11421bfb628f2fe31c4585d58 Mon Sep 17 00:00:00 2001 From: admin <2780501319@qq.com> Date: 星期二, 03 三月 2020 13:14:43 +0800 Subject: [PATCH] 拼多多通过链接获取商品ID修改,快捷分享小黄条 --- fanli/src/main/java/com/yeshi/fanli/service/impl/dynamic/GoodsEvaluateServiceImpl.java | 8 +++++++- 1 files changed, 7 insertions(+), 1 deletions(-) diff --git a/fanli/src/main/java/com/yeshi/fanli/service/impl/dynamic/GoodsEvaluateServiceImpl.java b/fanli/src/main/java/com/yeshi/fanli/service/impl/dynamic/GoodsEvaluateServiceImpl.java index 4298a3a..9132dca 100644 --- a/fanli/src/main/java/com/yeshi/fanli/service/impl/dynamic/GoodsEvaluateServiceImpl.java +++ b/fanli/src/main/java/com/yeshi/fanli/service/impl/dynamic/GoodsEvaluateServiceImpl.java @@ -444,6 +444,9 @@ commentText = commentText.replace("[鍒稿悗浠穄", goodsDetailVO.getCouponPrice().toString()); } + commentText =commentText.replace("\r\n\r\n", "\r\n").replace("\r\n\r\n", "\r\n").replace("\r\n\r\n", "\r\n"); + + CommentInfo commentInfo = new CommentInfo(); commentInfo.setId(UUID.randomUUID().toString().replace("-", "")); commentInfo.setContent(commentText); @@ -1470,7 +1473,7 @@ goodsEvaluate.setGoods(goodsVO); - TaoBaoLink taoBaoLink = shareGoodsService.getTaoBaoLinkForShare(0L, goodsVO.getGoodsId(), null); + TaoBaoLink taoBaoLink = shareGoodsService.getTaoBaoLinkForShare(1L, goodsVO.getGoodsId(), null); String template = configService.get(ConfigKeyEnum.quickShareTBCommentText.getKey()); String commentText = template.replace("[鍙d护]", TaoBaoUtil.filterTaoToken(taoBaoLink.getTaoToken())); @@ -1481,11 +1484,14 @@ } else { commentText = commentText.replace("[鍒稿悗浠穄", goodsVO.getCouponPrice().toString()); } + commentText =commentText.replace("\r\n\r\n", "\r\n").replace("\r\n\r\n", "\r\n").replace("\r\n\r\n", "\r\n"); + CommentInfo commentInfo = new CommentInfo(); commentInfo.setId(UUID.randomUUID().toString().replace("-", "")); commentInfo.setContent(commentText); commentInfo.setTypeEnum(CommentInfoEnum.goodsCoupon); + commentInfo.setType(CommentInfoEnum.goodsCoupon.getDesc()); List<CommentInfo> commentsNew = new ArrayList<>(); commentsNew.add(commentInfo); -- Gitblit v1.8.0