From 9073dee61a9279c2476305c34f92c96330ba16d3 Mon Sep 17 00:00:00 2001
From: yj <Administrator@192>
Date: 星期三, 04 三月 2020 15:38:24 +0800
Subject: [PATCH] 发圈

---
 fanli/src/main/java/com/yeshi/fanli/service/impl/goods/ShareGoodsTextTemplateServiceImpl.java |   17 +++++++++--------
 1 files changed, 9 insertions(+), 8 deletions(-)

diff --git a/fanli/src/main/java/com/yeshi/fanli/service/impl/goods/ShareGoodsTextTemplateServiceImpl.java b/fanli/src/main/java/com/yeshi/fanli/service/impl/goods/ShareGoodsTextTemplateServiceImpl.java
index f6fbe2d..e7cfea4 100644
--- a/fanli/src/main/java/com/yeshi/fanli/service/impl/goods/ShareGoodsTextTemplateServiceImpl.java
+++ b/fanli/src/main/java/com/yeshi/fanli/service/impl/goods/ShareGoodsTextTemplateServiceImpl.java
@@ -227,7 +227,8 @@
 		ShareGoodsTextTemplate objct = shareGoodsTextTemplateMapper.selectByUid(uid);
 		if (objct != null && !StringUtil.isNullOrEmpty(objct.getShareTextTemplate())) {
 			template = objct.getShareTextTemplate();
-			if (template.contains("{鍘熶环}")|| template.contains("{鍙d护}") || template.contains("{鍒稿悗浠穧")) {
+			if (template.contains("{鍟嗗搧鍘熶环}")|| template.contains("{浼樻儬鍒搁潰棰潁") ||
+					template.contains("{浼樻儬鍒镐环}")|| template.contains("{鏈堥攢閲弣")) {
 				template = ""; // 鑰佹澘鍒嗕韩
 			}
 		} 
@@ -244,7 +245,7 @@
 		ShareGoodsTextTemplate objct = shareGoodsTextTemplateMapper.selectByUid(uid);
 		if (objct != null && !StringUtil.isNullOrEmpty(objct.getShareJDTextTemplate())) {
 			template = objct.getShareJDTextTemplate();
-			if (template.contains("{鍘熶环}")|| template.contains("{鍒稿悗浠穧") || template.contains("{閾炬帴}")) {
+			if (template.contains("{鍟嗗搧鍘熶环}")|| template.contains("{鏈堥攢閲弣") || template.contains("{鐭摼鎺")) {
 				template = ""; // 鑰佹澘鍒嗕韩
 			}
 		} 
@@ -260,7 +261,7 @@
 		ShareGoodsTextTemplate objct = shareGoodsTextTemplateMapper.selectByUid(uid);
 		if (objct != null && !StringUtil.isNullOrEmpty(objct.getSharePDDTextTemplate())) {
 			template = objct.getSharePDDTextTemplate();
-			if (!template.contains("{鍘熶环}") && !template.contains("{鍒稿悗浠穧") && !template.contains("{閾炬帴}")) {
+			if (template.contains("{鍟嗗搧鍘熶环}")|| template.contains("{鎬婚攢閲弣") || template.contains("{鐭摼鎺")) {
 				template = ""; // 鑰佹澘鍒嗕韩
 			}
 		} 
@@ -332,7 +333,7 @@
 	
 	@Override
 	public void verifyRightTB(String template) throws ShareGoodsTextTemplateException {
-		String[] keys = new String[] { "{鍘熶环}", "{鍒稿悗浠穧","{鍙d护}" };
+		String[] keys = new String[] { "{鍘熶环}", "{鍒稿悗浠穧","{娣樺彛浠" };
 		int keysCount = 0;
 		for (String key : keys)
 			if (template != null && template.contains(key))
@@ -368,8 +369,8 @@
 	@Override
 	public String createContentTB(String template, TaoBaoGoodsBrief goods, String token, boolean coupon) {
 		String commentText = template.replace("{鍘熶环}", goods.getZkPrice().toString());
-		commentText = commentText.replace("{鍙d护}", TaoBaoUtil.filterTaoToken(token));
-		if (coupon) {
+		commentText = commentText.replace("{娣樺彛浠", TaoBaoUtil.filterTaoToken(token));
+		if (!coupon) {
 			commentText = commentText.replace("棰嗗埜鎶㈣喘", "鎶㈣喘");
 			commentText = commentText.replace("銆愬埜鍚庝环銆憑鍒稿悗浠穧鍏�", "");
 		} else {
@@ -383,7 +384,7 @@
 	public String createContentJD(String template, JDGoods goods, String jumpLink, boolean coupon) {
 		String commentText = template.replace("{鍘熶环}", goods.getPrice().toString());
 		commentText = commentText.replace("{閾炬帴}", jumpLink);
-		if (coupon) {
+		if (!coupon) {
 			commentText = commentText.replace("棰嗗埜鎶㈣喘", "鎶㈣喘");
 			commentText = commentText.replace("銆愬埜鍚庝环銆憑鍒稿悗浠穧鍏�", "");
 		} else {
@@ -398,7 +399,7 @@
 		String commentText = template.replace("{鍘熶环}", MoneyBigDecimalUtil
 				.div(new BigDecimal(goods.getMinGroupPrice()), new BigDecimal(100)).setScale(2).toString());
 		commentText = commentText.replace("{閾炬帴}", jumpLink);
-		if (coupon) {
+		if (!coupon) {
 			commentText = commentText.replace("棰嗗埜鎶㈣喘", "鎶㈣喘");
 			commentText = commentText.replace("銆愬埜鍚庝环銆憑鍒稿悗浠穧鍏�", "");
 		} else {

--
Gitblit v1.8.0