From 3727469752a977dde6327e2c48d761b20b565d3d Mon Sep 17 00:00:00 2001
From: admin <weikou2014>
Date: 星期五, 15 七月 2022 09:19:21 +0800
Subject: [PATCH] 商品ID字符串化

---
 fanli/src/main/java/com/yeshi/fanli/controller/h5/H5RecommendController.java |   21 +++++++++++++--------
 1 files changed, 13 insertions(+), 8 deletions(-)

diff --git a/fanli/src/main/java/com/yeshi/fanli/controller/h5/H5RecommendController.java b/fanli/src/main/java/com/yeshi/fanli/controller/h5/H5RecommendController.java
index bd31d0f..d015d21 100644
--- a/fanli/src/main/java/com/yeshi/fanli/controller/h5/H5RecommendController.java
+++ b/fanli/src/main/java/com/yeshi/fanli/controller/h5/H5RecommendController.java
@@ -183,7 +183,7 @@
             return;
         }
 
-        Long auctionId = record.getGoodsId();
+        String auctionId = record.getGoodsId();
         String tljLink = record.getSendUrl();
         BigDecimal tljMoney = record.getPerFace();
 
@@ -277,7 +277,7 @@
             // 鏌ヨ鏄惁鏈夊垎浜褰�
             UserShareGoodsHistory shareHistory = null;
             try {
-                shareHistory = shareGoodsService.getShareGoodsHistoryDetail(Long.parseLong(uid), Long.parseLong(id));
+                shareHistory = shareGoodsService.getShareGoodsHistoryDetail(Long.parseLong(uid), id);
             } catch (NumberFormatException e) {
                 e.printStackTrace();
             } catch (ShareGoodsException e) {
@@ -289,7 +289,7 @@
                 goods = redisManager.getTaoBaoGoodsTemp(Long.parseLong(id));
                 if (goods == null)
                     try {
-                        goods = TaoKeApiUtil.searchGoodsDetail(Long.parseLong(id));
+                        goods = TaoKeApiUtil.searchGoodsDetail(id);
                     } catch (NumberFormatException e) {
                         e.printStackTrace();
                     } catch (TaobaoGoodsDownException e) {
@@ -306,7 +306,7 @@
                 app.setAppSecret(TaoBaoConstant.TAOBAO_AUTH_APPSECRET);
 
                 try {
-                    goods = TaoKeApiUtil.searchGoodsDetail(Long.parseLong(id), app);
+                    goods = TaoKeApiUtil.searchGoodsDetail(id, app);
                 } catch (NumberFormatException e) {
                     e.printStackTrace();
                 } catch (TaobaoGoodsDownException e) {
@@ -334,7 +334,7 @@
             app.setAppSecret(configList.get(0).getAppSecret());
             app.setPid(pid);
             try {
-                goods = TaoKeApiUtil.searchGoodsDetail(Long.parseLong(id), app);
+                goods = TaoKeApiUtil.searchGoodsDetail(id, app);
             } catch (NumberFormatException e) {
                 e.printStackTrace();
             } catch (TaobaoGoodsDownException e) {
@@ -346,7 +346,7 @@
                     url = goods.getCouponLink();
                 }
                 if (!url.contains("uland.taobao.com") && !url.contains("s.click.taobao.com")) {
-                    TaoBaoGoodsBrief linkInfo = TaoKeApiUtil.specialConvertCoupon(Long.parseLong(id), app, null, null);
+                    TaoBaoGoodsBrief linkInfo = TaoKeApiUtil.specialConvertCoupon(id, app, null, null);
                     url = linkInfo.getCouponLink();
                     if (StringUtil.isNullOrEmpty(url))
                         url = linkInfo.getAuctionUrl();
@@ -470,8 +470,13 @@
         }
 
         String materialId = "https://item.jd.com/" + id + ".html";
-        String jumpLink = JDApiUtil.convertLinkWithSubUnionId(materialId, couponUrl, null, pidManager.getPidCache(acceptData.getSystem(), Constant.SOURCE_TYPE_JD, SystemPIDInfo.PidType.share),
-                uid);
+        String jumpLink = null;
+        try {
+            jumpLink = JDApiUtil.convertLinkWithSubUnionId(materialId, couponUrl, null, pidManager.getPidCache(acceptData.getSystem(), Constant.SOURCE_TYPE_JD, SystemPIDInfo.PidType.share),
+                    uid);
+        } catch (Exception e) {
+            e.printStackTrace();
+        }
 
         int priceType = 1;
         BigDecimal price = jdGoods.getPrice();

--
Gitblit v1.8.0