From bc9d4bf3fddcb3107f8509159a250f7a5a5f8ae5 Mon Sep 17 00:00:00 2001
From: admin <weikou2014>
Date: 星期五, 11 六月 2021 17:13:01 +0800
Subject: [PATCH] 特价bug修复

---
 fanli/src/main/java/com/yeshi/fanli/controller/client/v2/GoodsControllerV2.java |   75 +++----------------------------------
 1 files changed, 7 insertions(+), 68 deletions(-)

diff --git a/fanli/src/main/java/com/yeshi/fanli/controller/client/v2/GoodsControllerV2.java b/fanli/src/main/java/com/yeshi/fanli/controller/client/v2/GoodsControllerV2.java
index c131869..29e9db9 100644
--- a/fanli/src/main/java/com/yeshi/fanli/controller/client/v2/GoodsControllerV2.java
+++ b/fanli/src/main/java/com/yeshi/fanli/controller/client/v2/GoodsControllerV2.java
@@ -22,6 +22,7 @@
 import com.yeshi.fanli.service.inter.user.tb.UserExtraTaoBaoInfoService;
 import com.yeshi.fanli.service.manger.PIDManager;
 import com.yeshi.fanli.util.*;
+import com.yeshi.fanli.util.goods.GoodsJumpUtil;
 import com.yeshi.fanli.vo.common.WXXCXJumpInfoVO;
 import com.yeshi.fanli.vo.pdd.PDDConvertLinkResultVO;
 import com.yeshi.fanli.vo.goods.GoodsJumpLinkVO;
@@ -1689,7 +1690,7 @@
             }
         }
 
-        GoodsJumpLinkVO vo = new GoodsJumpLinkVO();
+        GoodsJumpLinkVO vo = GoodsJumpUtil.getJDJumpInfo(jumpLink);
         vo.set_native(true);
         vo.setJumpLink(jumpLink);
         vo.setNativeJumpLink(jumpLink);
@@ -1773,20 +1774,7 @@
             }
         }
 
-
-        GoodsJumpLinkVO vo = new GoodsJumpLinkVO();
-        vo.set_native(true);
-        vo.setJumpLink(jumpLink);
-        vo.setNativeJumpLink(jumpLink);
-        try {
-            String wxPage = "pages/union/proxy/proxy?spreadUrl=" + URLEncoder.encode(jumpLink, "UTF-8");
-            WXXCXJumpInfoVO wxxcxJumpInfoVO = new WXXCXJumpInfoVO();
-            wxxcxJumpInfoVO.setUserName("gh_45b306365c3d");
-            wxxcxJumpInfoVO.setPath(wxPage);
-            vo.setWxxcxJumpInfo(wxxcxJumpInfoVO);
-        } catch (UnsupportedEncodingException e) {
-            e.printStackTrace();
-        }
+        GoodsJumpLinkVO vo = GoodsJumpUtil.getJDJumpInfo(jumpLink);
         JSONObject data = JSONObject.fromObject(new Gson().toJson(vo));
         data.put("native", vo.is_native());
         data.put("userLevel", userLijinMnager.getUserLevelInfo(uid, acceptData.getSystem()));
@@ -1875,16 +1863,7 @@
             LogHelper.test(String.format("鎷煎澶氳浆閾�:uid:%s data:%s", uid + "", data.toString()));
         }
 
-        GoodsJumpLinkVO vo = new GoodsJumpLinkVO();
-        vo.set_native(true);
-        vo.setNativeJumpLink(PinDuoDuoUtil.getAndroidNativeURI(convertUrl.getUrl()));
-        vo.setJumpLink(convertUrl.getUrl());
-        if (convertUrl.getWe_app_info() != null) {
-            WXXCXJumpInfoVO wxxcxJumpInfoVO = new WXXCXJumpInfoVO();
-            wxxcxJumpInfoVO.setPath(convertUrl.getWe_app_info().getPage_path());
-            wxxcxJumpInfoVO.setUserName(convertUrl.getWe_app_info().getUser_name());
-            vo.setWxxcxJumpInfo(wxxcxJumpInfoVO);
-        }
+        GoodsJumpLinkVO vo = GoodsJumpUtil.getPDDJumpInfo(convertUrl);
         data = JSONObject.fromObject(new Gson().toJson(vo));
         data.put("native", vo.is_native());
         data.put("userLevel", userLijinMnager.getUserLevelInfo(uid, acceptData.getSystem()));
@@ -1936,17 +1915,7 @@
         }
 
         VIPConvertResultDTO convertUrl = VipShopApiUtil.convertLink(id + "", tag);
-
-        GoodsJumpLinkVO vo = new GoodsJumpLinkVO();
-        vo.set_native(true);
-        vo.setJumpLink(convertUrl.getUrl());
-        vo.setNativeJumpLink(convertUrl.getDeeplinkUrl());
-        if (!StringUtil.isNullOrEmpty(convertUrl.getVipWxUrl())) {
-            WXXCXJumpInfoVO wxxcxJumpInfoVO = new WXXCXJumpInfoVO();
-            wxxcxJumpInfoVO.setUserName("gh_8ed2afad9972");
-            wxxcxJumpInfoVO.setPath(convertUrl.getVipWxUrl());
-            vo.setWxxcxJumpInfo(wxxcxJumpInfoVO);
-        }
+        GoodsJumpLinkVO vo = GoodsJumpUtil.getVIPShopJumpInfo(convertUrl);
 
         JSONObject data = JSONObject.fromObject(new Gson().toJson(vo));
         data.put("native", vo.is_native());
@@ -1996,23 +1965,7 @@
         SuningConvertLinkResult link = SuningApiUtil.convertLinkNew(goodsCode, supplierCode,
                 pid, uid + "");
 
-        GoodsJumpLinkVO vo = new GoodsJumpLinkVO();
-        vo.set_native(false);
-        try {
-            vo.setJumpLink(URLDecoder.decode(link.getWapExtendUrl(), "UTF-8"));
-        } catch (UnsupportedEncodingException e) {
-            e.printStackTrace();
-        }
-        if (!StringUtil.isNullOrEmpty(link.getSpPageUrl())) {
-            WXXCXJumpInfoVO wxxcxJumpInfoVO = new WXXCXJumpInfoVO();
-            wxxcxJumpInfoVO.setUserName("gh_1d1e15e90afc");
-            try {
-                wxxcxJumpInfoVO.setPath(URLDecoder.decode(link.getSpPageUrl(), "UTF-8"));
-            } catch (UnsupportedEncodingException e) {
-                e.printStackTrace();
-            }
-            vo.setWxxcxJumpInfo(wxxcxJumpInfoVO);
-        }
+        GoodsJumpLinkVO vo = GoodsJumpUtil.getSuningJumpInfo(link);
 
         JSONObject data = JSONObject.fromObject(new Gson().toJson(vo));
         data.put("native", vo.is_native());
@@ -2205,21 +2158,7 @@
         link = JDApiUtil.convertLinkWithSubUnionId(link, null, null, pidManager.getPidCache(acceptData.getSystem(), Constant.SOURCE_TYPE_JD, SystemPIDInfo.PidType.fanli), uid + "");
 
 
-        GoodsJumpLinkVO vo = new GoodsJumpLinkVO();
-        vo.set_native(true);
-        vo.setJumpLink(link);
-        vo.setNativeJumpLink(link);
-        try {
-            String wxPage = "pages/union/proxy/proxy?spreadUrl=" + URLEncoder.encode(link, "UTF-8");
-            WXXCXJumpInfoVO wxxcxJumpInfoVO = new WXXCXJumpInfoVO();
-            wxxcxJumpInfoVO.setUserName("gh_45b306365c3d");
-            wxxcxJumpInfoVO.setPath(wxPage);
-            vo.setWxxcxJumpInfo(wxxcxJumpInfoVO);
-        } catch (UnsupportedEncodingException e) {
-            e.printStackTrace();
-        }
-
-
+        GoodsJumpLinkVO vo = GoodsJumpUtil.getJDJumpInfo(link);
         JSONObject data = JSONObject.fromObject(new Gson().toJson(vo));
         data.put("native", vo.is_native());
         JsonUtil.printMode(out, callback, JsonUtil.loadTrueResult(data));

--
Gitblit v1.8.0