From 69bee82b81626b82b7f39f0e459e4f56b1699b51 Mon Sep 17 00:00:00 2001 From: admin <weikou2014> Date: 星期三, 13 三月 2019 12:02:16 +0800 Subject: [PATCH] 正式数据库修改 --- fanli/src/main/java/com/yeshi/fanli/service/impl/goods/ShareGoodsServiceImpl.java | 19 ++++++++++++++++++- 1 files changed, 18 insertions(+), 1 deletions(-) diff --git a/fanli/src/main/java/com/yeshi/fanli/service/impl/goods/ShareGoodsServiceImpl.java b/fanli/src/main/java/com/yeshi/fanli/service/impl/goods/ShareGoodsServiceImpl.java index f474455..0ee2ca7 100644 --- a/fanli/src/main/java/com/yeshi/fanli/service/impl/goods/ShareGoodsServiceImpl.java +++ b/fanli/src/main/java/com/yeshi/fanli/service/impl/goods/ShareGoodsServiceImpl.java @@ -461,6 +461,7 @@ return getTaoBaoLink(uid, auctionId, tbPid.getPid()); } + @Override public TaoBaoLink getTaoBaoLink(Long uid, Long auctionId, String pid) throws ShareGoodsException { if (uid == null || uid <= 0) { @@ -490,6 +491,7 @@ } catch (TaobaoGoodsDownException e) { throw new ShareGoodsException(4, "鍟嗗搧宸蹭笅鏋�"); } finally { + } if (goods == null) { throw new ShareGoodsException(5, "鑾峰彇鍟嗗搧璇︽儏澶辫触"); @@ -523,7 +525,22 @@ throw new ShareGoodsException(2, "鍟嗗搧ID涓嶈兘涓虹┖"); } - return getTaoBaoLink(uid, auctionId, Constant.TAOBAO_SPECIAL_PID_DEFAULT); + TaoKeAppInfo app = new TaoKeAppInfo(); + app.setAppKey(Constant.TAOBAO_AUTH_APPKEY); + app.setAppSecret(Constant.TAOBAO_AUTH_APPSECRET); + app.setPid(Constant.TAOBAO_SPECIAL_PID_DEFAULT); + TaoBaoGoodsBrief goods = TaoKeApiUtil.specialConvertCoupon(auctionId, app); + if (goods == null) { + throw new ShareGoodsException(1, ""); + } + + TaoBaoLink taoBaoLink = new TaoBaoLink(); + taoBaoLink.setAuctionId(auctionId); + taoBaoLink.setClickUrl(goods.getAuctionUrl()); + taoBaoLink.setCouponLink(goods.getCouponLink()); + taoBaoLink.setGoods(goods); + + return taoBaoLink; } } -- Gitblit v1.8.0