From 9129d51874b36943419994937af56c2f73aed1a0 Mon Sep 17 00:00:00 2001
From: admin <weikou2014>
Date: 星期三, 03 六月 2020 15:14:10 +0800
Subject: [PATCH] 唯品会,苏宁相关bug修改

---
 fanli/src/main/java/com/yeshi/fanli/controller/client/v2/ShareControllerV2.java |   17 +++++++++++------
 1 files changed, 11 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 56be522..2e58a85 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
@@ -233,14 +233,14 @@
 			return;
 		}
 
-		if (goodsId == null ) {
+		if (goodsId == null) {
 			out.print(JsonUtil.loadFalseResult(2, "鍟嗗搧ID涓嶈兘涓虹┖"));
 			return;
 		}
 
 		// 娣樺疂
 		if (goodsType == null || goodsType == Constant.SOURCE_TYPE_TAOBAO) {
-			createTaoBaoShare(acceptData, uid,Long.parseLong(goodsId), totalNum, source, needGoods, request, out);
+			createTaoBaoShare(acceptData, uid, Long.parseLong(goodsId), totalNum, source, needGoods, request, out);
 			return;
 		}
 
@@ -684,7 +684,7 @@
 			// 璁剧疆璇勮鏂囨湰閫夐」
 			shareInfo.setCommentTextChoiceList(
 					getCommentChoiceList(shareInfo.getCommentText(), null, inviteCode, TaoBaoUtil.getGoodsHongBaoMoney(
-							taoBaoLink.getGoods(), hongBaoManageService.getFanLiRate(UserLevelEnum.superVIP),false)));
+							taoBaoLink.getGoods(), hongBaoManageService.getFanLiRate(UserLevelEnum.superVIP), false)));
 
 			out.print(JsonUtil.loadTrueResult(
 					JsonUtil.getConvertBigDecimalToStringSubZeroBuilder(new GsonBuilder()).create().toJson(shareInfo)));
@@ -752,8 +752,10 @@
 			couponUrl = couponInfo.getLink();
 		}
 		String materialId = "https://item.jd.com/" + goodsId + ".html";
-		String jumpLink = JDApiUtil.convertLinkWithSubUnionId(materialId, couponUrl, JDApiUtil.POSITION_SHARE + "",
-				uid + "");
+		String jumpLink = JDApiUtil.convertLinkWithSubUnionId(materialId, couponUrl, JDApiUtil.POSITION_SHARE + "", uid + "");
+		if (StringUtil.isNullOrEmpty(jumpLink)) {
+			jumpLink = JDApiUtil.convertLinkWithSubUnionId(materialId, null, JDApiUtil.POSITION_SHARE + "", uid + "");
+		}
 
 		ShareInfoVO shareInfo = new ShareInfoVO();
 		shareInfo.setClickUrl(jumpLink);
@@ -858,6 +860,9 @@
 		out.print(JsonUtil.loadTrueResult(
 				JsonUtil.getConvertBigDecimalToStringSubZeroBuilder(new GsonBuilder()).create().toJson(shareInfo)));
 
+		
+	final String jumpLinkNew=jumpLink;
+		
 		// 寮傛鎿嶄綔
 		final JDGoods goods = jdGoods;
 		com.yeshi.fanli.util.ThreadUtil.run(new Runnable() {
@@ -874,7 +879,7 @@
 				history.setQuanLink(null);
 				history.setGoodsId(goodsId);
 				history.setPostPicture(goods.getPicUrl());
-				history.setShareImg(jumpLink);
+				history.setShareImg(jumpLinkNew);
 
 				List<String> imgList = goods.getImageList();
 				if (imgList == null) {

--
Gitblit v1.8.0