From d99f45a1c358282ab0d4333232da25f03560778f Mon Sep 17 00:00:00 2001
From: admin <weikou2014>
Date: 星期五, 29 五月 2020 18:49:31 +0800
Subject: [PATCH] 苏宁,唯品会接口修改

---
 fanli/src/main/java/com/yeshi/fanli/controller/client/v2/DynamicControllerV2.java |   17 +++++++++--------
 1 files changed, 9 insertions(+), 8 deletions(-)

diff --git a/fanli/src/main/java/com/yeshi/fanli/controller/client/v2/DynamicControllerV2.java b/fanli/src/main/java/com/yeshi/fanli/controller/client/v2/DynamicControllerV2.java
index f5ce570..c3e24b8 100644
--- a/fanli/src/main/java/com/yeshi/fanli/controller/client/v2/DynamicControllerV2.java
+++ b/fanli/src/main/java/com/yeshi/fanli/controller/client/v2/DynamicControllerV2.java
@@ -813,8 +813,8 @@
 	 * @param out
 	 */
 	@RequestMapping(value = "evaluateShare", method = RequestMethod.POST)
-	public void evaluateShare(AcceptData acceptData, Long uid, String id, Integer type, Long goodsId, Integer goodsType,
-			PrintWriter out) {
+	public void evaluateShare(AcceptData acceptData, Long uid, String id, Integer type, String goodsId,
+			Integer goodsType, PrintWriter out) {
 		try {
 			if (uid == null) {
 				out.print(JsonUtil.loadFalseResult("鐢ㄦ埛鏈櫥褰�"));
@@ -826,7 +826,7 @@
 				return;
 			}
 
-			if (type == 1 && (goodsId == null || goodsType == null)) {
+			if (type == 1 && (StringUtil.isNullOrEmpty(goodsId) || goodsType == null)) {
 				out.print(JsonUtil.loadFalseResult("鍟嗗搧鍙傛暟涓嶈兘涓虹┖"));
 				return;
 			}
@@ -908,7 +908,7 @@
 					if (type == 1) {
 						for (ImgInfo imgInfo : imgs) {
 							if (imgInfo.getGoodsVO() != null)
-								if (imgInfo.getGoodsVO().getGoodsId().longValue() == goodsId.longValue()
+								if (imgInfo.getGoodsVO().getGoodsId().equalsIgnoreCase(goodsId)
 										&& imgInfo.getGoodsVO().getGoodsType() == goodsType.intValue()) {
 									String jumpLink = getJumpLink(imgInfo.getGoodsVO(), user, relationId, inviteCode,
 											imgInfo.getUrl());
@@ -985,7 +985,8 @@
 		if (goodsVO.getGoodsType() == Constant.SOURCE_TYPE_TAOBAO) {
 			TaoBaoLink taoBaoLink = null;
 			try {
-				taoBaoLink = shareGoodsService.getTaoBaoLinkForShare(user.getId(), goodsVO.getGoodsId(), relationId);
+				taoBaoLink = shareGoodsService.getTaoBaoLinkForShare(user.getId(), Long.parseLong(goodsVO.getGoodsId()),
+						relationId);
 			} catch (ShareGoodsException e) {
 				e.printStackTrace();
 			}
@@ -993,7 +994,7 @@
 					configService.get(ConfigKeyEnum.taobaoShareQrcodeText.getKey()), taoBaoLink.getGoods(),
 					TaoBaoUtil.filterTaoToken(taoBaoLink.getTaoToken()));
 		} else if (goodsVO.getGoodsType() == Constant.SOURCE_TYPE_JD) {
-			JDGoods jdGoods = jdGoodsCacheUtil.getGoodsInfo(goodsVO.getGoodsId());
+			JDGoods jdGoods = jdGoodsCacheUtil.getGoodsInfo(Long.parseLong(goodsVO.getGoodsId()));
 			if (jdGoods == null) {
 				return null;
 			}
@@ -1007,8 +1008,8 @@
 			jumpLink = JDApiUtil.convertLinkWithSubUnionId(materialId, couponUrl, JDApiUtil.POSITION_SHARE + "",
 					user.getId() + "");
 		} else if (goodsVO.getGoodsType() == Constant.SOURCE_TYPE_PDD) {
-			jumpLink = PinDuoDuoApiUtil.getPromotionUrl(goodsVO.getGoodsId(), PinDuoDuoApiUtil.PID_SHARE + "",
-					user.getId() + "");
+			jumpLink = PinDuoDuoApiUtil.getPromotionUrl(Long.parseLong(goodsVO.getGoodsId()),
+					PinDuoDuoApiUtil.PID_SHARE + "", user.getId() + "");
 		}
 
 		FileUploadResult uploadResult = qrCodeService.drawDynamicGoodsPoster(jumpLink, user.getPortrait(), inviteCode,

--
Gitblit v1.8.0