From ec8a1c6f81b5747e9efce86faaba33d10df7f61d Mon Sep 17 00:00:00 2001
From: admin <2780501319@qq.com>
Date: 星期日, 01 三月 2020 16:37:26 +0800
Subject: [PATCH] 动态提示语调整

---
 fanli/src/main/java/com/yeshi/fanli/controller/client/v2/ShareControllerV2.java |   28 ++++++++++++++++++++++------
 1 files changed, 22 insertions(+), 6 deletions(-)

diff --git a/fanli/src/main/java/com/yeshi/fanli/controller/client/v2/ShareControllerV2.java b/fanli/src/main/java/com/yeshi/fanli/controller/client/v2/ShareControllerV2.java
index 13d3b85..b601fa6 100644
--- a/fanli/src/main/java/com/yeshi/fanli/controller/client/v2/ShareControllerV2.java
+++ b/fanli/src/main/java/com/yeshi/fanli/controller/client/v2/ShareControllerV2.java
@@ -245,7 +245,11 @@
 	}
 
 	public static String getERCodeContent(String template, TaoBaoGoodsBrief goods, String token) {
-		// return template.replace("[娣樺彛浠", token);
+		 return template.replace("[娣樺彛浠", token);
+	}
+
+	
+	public static String getERCodeContentNew(String template, TaoBaoGoodsBrief goods, String token) {
 		String commentText = template.replace("[鍘熶环]", goods.getZkPrice().toString());
 		commentText = commentText.replace("[鍙d护]", token);
 		if (StringUtil.isNullOrEmpty(goods.getCouponInfo())) {
@@ -256,7 +260,7 @@
 		}
 		return commentText;
 	}
-
+	
 	/**
 	 * 鍒涘缓娣樺疂鍒嗕韩淇℃伅
 	 * 
@@ -565,15 +569,27 @@
 				descText = descText.substring(0);
 			}
 			shareInfo.setDescText(descText);
+			
+			
 			// 娴嬭瘯
 			// 2.0.2涔嬪墠
-			if (!VersionUtil.greaterThan_2_0_2(platform, version))
+			if (VersionUtil.greaterThan_2_0_7(platform, version)) {
+				shareInfo.setClickUrl(getERCodeContentNew(configService.get(ConfigKeyEnum.quickShareTBCommentText.getKey()),
+						taoBaoLink.getGoods(), shareInfo.getToken()));
+			} else if (!VersionUtil.greaterThan_2_0_2(platform, version)) {
 				shareInfo.setClickUrl(getERCodeContent(configService.get(ConfigKeyEnum.taobaoShareQrcodeText.getKey()),
 						taoBaoLink.getGoods(), shareInfo.getToken()));
+			}
 
-			shareInfo.setWxErCode(getERCodeContent(configService.get(ConfigKeyEnum.taobaoShareQrcodeText.getKey()),
+			if (VersionUtil.greaterThan_2_0_7(platform, version)) {
+				shareInfo.setWxErCode(getERCodeContentNew(configService.get(ConfigKeyEnum.quickShareTBCommentText.getKey()),
 					taoBaoLink.getGoods(), shareInfo.getToken()));
-
+			} else {
+				shareInfo.setWxErCode(getERCodeContent(configService.get(ConfigKeyEnum.taobaoShareQrcodeText.getKey()),
+						taoBaoLink.getGoods(), shareInfo.getToken()));
+			}
+			
+			
 			// 鎻愮ず鍥炬枃鍐呭
 			String imgs = configService.getByVersion(ConfigKeyEnum.goodsShareNotifyImgs.getKey(), platform,
 					Integer.parseInt(version));
@@ -615,7 +631,7 @@
 				if (StringUtil.isNullOrEmpty(goods.getDescription())) {
 					recommendText = recommendText.replace("鎺ㄨ崘鐞嗙敱:[鎺ㄨ崘璇璢", "");
 				} else {
-					recommendText = recommendText.replace("[鎺ㄨ崘鐞嗙敱]", goods.getDescription());
+					recommendText = recommendText.replace("[鎺ㄨ崘璇璢", goods.getDescription());
 				}
 				
 				String sales = TaoBaoUtil.getSaleCount(taoBaoLink.getGoods().getBiz30day());

--
Gitblit v1.8.0