From 7b7536f2923b5ce06d4b69b22c16e1a4946bf16b Mon Sep 17 00:00:00 2001
From: admin <2780501319@qq.com>
Date: 星期二, 03 三月 2020 15:15:18 +0800
Subject: [PATCH] 小程序商品详情更改

---
 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