From b33bf7963ef112597301619724252415a10ad3fa Mon Sep 17 00:00:00 2001
From: admin <2780501319@qq.com>
Date: 星期二, 10 三月 2020 17:47:26 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/div' into div

---
 fanli/src/main/java/com/yeshi/fanli/service/impl/dynamic/GoodsEvaluateServiceImpl.java |   39 +++++++++++++++++++++++++++++----------
 1 files changed, 29 insertions(+), 10 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 2ca96d5..415c687 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
@@ -495,16 +495,16 @@
 				commentText = template.replace("[閾炬帴]", jumpLink);
 			}
 
-			commentText = commentText.replace("[鍘熶环]", MoneyBigDecimalUtil.getWithNoZera(goodsDetailVO.getZkPrice())+"");
-			if (!goodsDetailVO.isHasCoupon()) {
-				commentText = commentText.replace("棰嗗埜鎶㈣喘", "鎶㈣喘");
-				commentText = commentText.replace("銆愬埜鍚庝环銆慬鍒稿悗浠穄鍏�", "");
-			} else {
-				commentText = commentText.replace("[鍒稿悗浠穄",  MoneyBigDecimalUtil.getWithNoZera(goodsDetailVO.getCouponPrice())+"");
-			}
-
-			commentText = commentText.replace("\r\n\r\n", "\r\n").replace("\r\n\r\n", "\r\n").replace("\r\n\r\n",
-					"\r\n");
+//			commentText = commentText.replace("[鍘熶环]", MoneyBigDecimalUtil.getWithNoZera(goodsDetailVO.getZkPrice())+"");
+//			if (!goodsDetailVO.isHasCoupon()) {
+//				commentText = commentText.replace("棰嗗埜鎶㈣喘", "鎶㈣喘");
+//				commentText = commentText.replace("銆愬埜鍚庝环銆慬鍒稿悗浠穄鍏�", "");
+//			} else {
+//				commentText = commentText.replace("[鍒稿悗浠穄",  MoneyBigDecimalUtil.getWithNoZera(goodsDetailVO.getCouponPrice())+"");
+//			}
+//
+//			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("-", ""));
@@ -1527,6 +1527,25 @@
 						continue;
 					}
 
+					if (typeEnum != null && typeEnum == EvaluateEnum.single) {
+						GoodsDetailVO goods = evaluateNew.getGoods();
+						if (goods != null) {
+							String content = commentInfoNew.getContent();
+							if (!StringUtil.isNullOrEmpty(content)) {
+								content = content.replace("[鍘熶环]", MoneyBigDecimalUtil.getWithNoZera(goods.getZkPrice())+"");
+								if (goods.isHasCoupon()) {
+									content = content.replace("[鍒稿悗浠穄",MoneyBigDecimalUtil.getWithNoZera(goods.getCouponPrice())+"");
+								} else {
+									content = content.replace("棰嗗埜鎶㈣喘", "鎶㈣喘");
+									content = content.replace("銆愬埜鍚庝环銆慬鍒稿悗浠穄鍏�", "");
+								}
+								content = content.replace("\r\n\r\n", "\r\n").replace("\r\n\r\n", "\r\n");
+								commentInfoNew.setContent(content);
+							}
+						}
+					}
+					
+					
 					comment++;
 					CommentInfoEnum typeComment = commentInfoNew.getTypeEnum();
 					if (typeComment != null && typeComment == CommentInfoEnum.goodsCoupon) {

--
Gitblit v1.8.0