| | |
| | |
|
| | | import javax.annotation.Resource;
|
| | |
|
| | | import com.yeshi.fanli.service.inter.pdd.PDDAuthService;
|
| | | import org.springframework.stereotype.Component;
|
| | | import org.yeshi.utils.StringUtil;
|
| | |
|
| | |
| | |
|
| | | @Resource
|
| | | private TaoBaoTokenAuctionIdMapManager taoBaoTokenAuctionIdMapManager;
|
| | |
|
| | | @Resource
|
| | | private PDDAuthService pddAuthService;
|
| | |
|
| | | /**
|
| | | * @Title: convertJDLinkFromText @Description:转链文本中的京东短链 @param text @param
|
| | |
| | | List<String> pddShortLink = PinDuoDuoUtil.getPDDShortLinksFromText(text);
|
| | | Set<String> linkSet = new HashSet<>();
|
| | | Map<String, String> linkMap = new HashMap<>();
|
| | |
|
| | | if (pddShortLink != null && pddShortLink.size() > 0) {
|
| | | linkSet.addAll(pddShortLink);
|
| | | for (String shortLink : linkSet) {
|
| | | String goodsId = PinDuoDuoUtil.getPDDGoodsId(shortLink);
|
| | | if (!StringUtil.isNullOrEmpty(goodsId)) {
|
| | | PDDPromotionUrl pddUrl = PinDuoDuoApiUtil.convert(Long.parseLong(goodsId),
|
| | | share ? PinDuoDuoApiUtil.PID_SHARE : PinDuoDuoApiUtil.PID_FANLI, uid + "", false);
|
| | | share ? PinDuoDuoApiUtil.PID_SHARE : PinDuoDuoApiUtil.PID_FANLI, pddAuthService.getFanliCustomParams(uid), false);
|
| | | if (pddUrl != null) {
|
| | | linkMap.put(shortLink, pddUrl.getShortUrl());
|
| | | }
|