| | |
| | |
|
| | | import com.yeshi.fanli.dto.pdd.PDDPromotionUrl;
|
| | | import com.yeshi.fanli.dto.taobao.api.TaoKeOfficialActivityConvertResultDTO;
|
| | | import com.yeshi.fanli.entity.taobao.TaoBaoGoodsBrief;
|
| | | import com.yeshi.fanli.entity.taobao.TaoKeAppInfo;
|
| | | import com.yeshi.goods.facade.entity.taobao.TaoBaoGoodsBrief;
|
| | | import com.yeshi.common.entity.taobao.TaoKeAppInfo;
|
| | | import com.yeshi.fanli.exception.goods.ConvertLinkExceptionException;
|
| | | import com.yeshi.fanli.service.inter.taobao.TaoBaoBuyRelationMapService;
|
| | | import com.yeshi.fanli.service.inter.user.tb.UserExtraTaoBaoInfoService;
|
| | |
| | | if (StringUtil.isNullOrEmpty(relationId))
|
| | | throw new Exception("淘宝未授权");
|
| | | }
|
| | |
|
| | | Set<String> tokenSet = new HashSet<>();
|
| | | tokenSet.addAll(tokenList);
|
| | | Map<String, String> tokenMap = new HashMap<>();
|
| | |
| | | String link = null;
|
| | | if (share) {
|
| | | //暂时调用好单库API
|
| | | link=HaoDanKuApiUtil.getInstance().convertLink(auctionId, TaoBaoConstant.TAOBAO_RELATION_PID_DEFAULT, null);
|
| | | link=HaoDanKuApiUtil.getInstance().convertLink(auctionId, TaoBaoConstant.TAOBAO_RELATION_PID_DEFAULT, null,null,relationId);
|
| | | // TaoBaoGoodsBrief goods = TaoKeApiUtil.specialConvertCoupon(auctionId,
|
| | | // new TaoKeAppInfo(TaoBaoConstant.TAOBAO_AUTH_APPKEY, TaoBaoConstant.TAOBAO_AUTH_APPSECRET,
|
| | | // TaoBaoConstant.TAOBAO_RELATION_PID_DEFAULT));
|
| | |
| | | throw new Exception("商品转链失败");
|
| | | link += "&relationId=" + relationId;
|
| | | } else {
|
| | | String specialId=userExtraTaoBaoInfoService.getSpecialIdByUid(uid);
|
| | |
|
| | |
|
| | | if (simpleGoods.getMaterialLibType() != null && simpleGoods.getMaterialLibType() == 1) {
|
| | | TaoBaoGoodsBrief goods = TaoKeApiUtil.specialConvertCoupon(auctionId,
|
| | | new TaoKeAppInfo(TaoBaoConstant.TAOBAO_AUTH_APPKEY,
|
| | | TaoBaoConstant.TAOBAO_AUTH_APPSECRET,
|
| | | TaoBaoConstant.TAOBAO_SPECIAL_PID_DEFAULT));
|
| | | TaoBaoConstant.TAOBAO_SPECIAL_PID_DEFAULT),specialId,null);
|
| | | if (goods == null)
|
| | | throw new Exception("商品转链失败");
|
| | |
|
| | |
| | | TaoBaoGoodsBrief goods = TaoKeApiUtil.specialConvertCoupon(auctionId,
|
| | | new TaoKeAppInfo(TaoBaoConstant.TAOBAO_AUTH_APPKEY,
|
| | | TaoBaoConstant.TAOBAO_AUTH_APPSECRET,
|
| | | TaoBaoConstant.TAOBAO_RELATION_AS_SPECIAL_PID));
|
| | | TaoBaoConstant.TAOBAO_RELATION_AS_SPECIAL_PID),specialId,null);
|
| | | if (goods == null)
|
| | | throw new Exception("商品转链失败");
|
| | |
|