| | |
| | | |
| | | String link = null; |
| | | try { |
| | | link = DaTaoKeApiUtil.convertLink(auctionId, app.getPid()); |
| | | link = DaTaoKeApiUtil.convertLink(auctionId, app.getPid(),false); |
| | | } catch (Exception e) { |
| | | } |
| | | |
| | |
| | | return taoBaoLink; |
| | | } |
| | | |
| | | TaoBaoGoodsBrief goods = TaoKeApiUtil.specialConvertCoupon(auctionId, app, specialId, null); |
| | | TaoBaoGoodsBrief goods = TaoKeApiUtil.specialConvertCouponV2(auctionId, app, specialId, null); |
| | | if (goods == null) { |
| | | throw new TaoBaoConvertLinkException(1, ""); |
| | | } |
| | |
| | | |
| | | if (StringUtil.isNullOrEmpty(goods.getCouponLink()) && !goods.getAuctionUrl().contains("s.click.taobao.com")) { |
| | | |
| | | TaoBaoGoodsBrief taoBaoLink = TaoKeApiUtil.specialConvertCoupon(auctionId, info, null, relationId); |
| | | TaoBaoGoodsBrief taoBaoLink = TaoKeApiUtil.specialConvertCouponV2(auctionId, info, null, relationId); |
| | | if (taoBaoLink == null) { |
| | | throw new TaoBaoConvertLinkException(201, "商品转链失败"); |
| | | } |
| | |
| | | DaTaoKeFilterResult result = daTaoKeGoodsDetailV2Service.filterTaoBaoGoods(goods); |
| | | if (result.getFilterType() == DaTaoKeFilterResult.FILTER_TYPE_COUPON |
| | | || result.getFilterType() == DaTaoKeFilterResult.FILTER_TYPE_PRICE_AND_COUPON) { |
| | | link = DaTaoKeApiUtil.convertLink(auctionId, info.getPid()); |
| | | link = DaTaoKeApiUtil.convertLink(auctionId, info.getPid(),true); |
| | | } else if (goods.getCouponAmount() != null && goods.getCouponAmount().compareTo(new BigDecimal(0)) > 0) {// 有券 |
| | | link = DaTaoKeApiUtil.convertLink(auctionId, info.getPid()); |
| | | |
| | | link = DaTaoKeApiUtil.convertLink(auctionId, info.getPid(),true); |
| | | } |
| | | |
| | | if (!StringUtil.isNullOrEmpty(link)) { |
| | |
| | | //保存券链接 |
| | | cacheCouponInfo(goods, info.getPid()); |
| | | } else { |
| | | TaoBaoGoodsBrief taoBaoLink = TaoKeApiUtil.specialConvertCoupon(auctionId, info, null, relationId); |
| | | TaoBaoGoodsBrief taoBaoLink = TaoKeApiUtil.specialConvertCouponV2(auctionId, info, null, relationId); |
| | | if (taoBaoLink == null) { |
| | | throw new TaoBaoConvertLinkException(201, "商品转链失败"); |
| | | } |
| | |
| | | if (StringUtil.isNullOrEmpty(goods.getCouponLink()) && !goods.getAuctionUrl().contains("s.click.taobao.com")) { |
| | | TaoBaoUnionConfig taoBaoUnionConfig = taoBaoUnionConfigService |
| | | .getConfigByAppIdCache(info.getPid().split("_")[2]); |
| | | TaoBaoGoodsBrief taoBaoLink = TaoKeApiUtil.specialConvertCoupon(auctionId, info, null, relationId); |
| | | TaoBaoGoodsBrief taoBaoLink = TaoKeApiUtil.specialConvertCouponV2(auctionId, info, null, relationId); |
| | | if (taoBaoLink == null) { |
| | | throw new TaoBaoConvertLinkException(201, "商品转链失败"); |
| | | } |