| | |
| | | return getTaoBaoLink(uid, auctionId, tbPid.getPid());
|
| | | }
|
| | |
|
| | | @Override
|
| | | public TaoBaoLink getTaoBaoLink(Long uid, Long auctionId, String pid) throws ShareGoodsException {
|
| | |
|
| | | if (uid == null || uid <= 0) {
|
| | |
| | | taoBaoLink.setCouponLink(goods.getCouponLink());
|
| | | taoBaoLink.setGoods(goods);
|
| | |
|
| | | TaoBaoGoodsBrief taoBaoGoods = null;
|
| | | try {
|
| | | taoBaoGoods = TaoKeApiUtil.getSimpleGoodsInfo(auctionId);
|
| | | } catch (TaobaoGoodsDownException e) {
|
| | | throw new ShareGoodsException(2, "商品为空");
|
| | | }
|
| | |
|
| | | String url = goods.getAuctionUrl();
|
| | | if (!StringUtil.isNullOrEmpty(goods.getCouponLink()))
|
| | | url = goods.getCouponLink();
|
| | | String token = TaoKeApiUtil.getTKToken(taoBaoGoods.getPictUrl(), taoBaoGoods.getTitle(), url);
|
| | | taoBaoLink.setTaoToken(token);
|
| | | return taoBaoLink;
|
| | | }
|
| | |
|