| | |
| | | //是否包含淘宝链接/口令 |
| | | if (page == 1) { |
| | | List<String> linkList = HttpUtil.getUrlListFromText(key); |
| | | if ((linkList != null && linkList.size() > 0) || TaoBaoUtil.isHaveNewVersionTaoBaoToken(key)) { |
| | | |
| | | if (((linkList != null && linkList.size() > 0) || TaoBaoUtil.isHaveNewVersionTaoBaoToken(key))&&false) { |
| | | // 暂时不通过链接搜索 |
| | | String id = DaTaoKeApiUtil.parseGoodsIdFromToken(key); |
| | | if (id != null) { |
| | | goodsId = id; |
| | |
| | | } |
| | | if (goodsId == null) { |
| | | //解析链接 |
| | | if (linkList != null && linkList.size() > 0) { |
| | | String tempGoodsId = clipboardAnalysisManager.parseTBAuctionIdFromLink(linkList.get(0)); |
| | | if (!StringUtil.isNullOrEmpty(tempGoodsId)) { |
| | | goodsId = tempGoodsId; |
| | | } |
| | | } |
| | | // if (linkList != null && linkList.size() > 0) { |
| | | // String tempGoodsId = clipboardAnalysisManager.parseTBAuctionIdFromLink(linkList.get(0)); |
| | | // if (!StringUtil.isNullOrEmpty(tempGoodsId)) { |
| | | // goodsId = tempGoodsId; |
| | | // } |
| | | // } |
| | | } |
| | | } |
| | | |
| | |
| | | |
| | | if (goodsId != null) { |
| | | try { |
| | | PDDGoodsDetail pddGoodsDetail = PinDuoDuoApiUtil.getGoodsDetail(Long.parseLong(goodsId), PinDuoDuoApiUtil.PID_DEFAULT, customParams); |
| | | PDDGoodsDetail pddGoodsDetail = PinDuoDuoApiUtil.getGoodsDetail(goodsId, PinDuoDuoApiUtil.PID_DEFAULT, customParams); |
| | | if (pddGoodsDetail != null) { |
| | | count = 1; |
| | | goodsList.add(pddGoodsDetail); |
| | |
| | | e.printStackTrace(); |
| | | if (e.getCode() == PDDApiException.CODE_NOT_AUTH) { |
| | | try { |
| | | PDDGoodsDetail pddGoodsDetail = PinDuoDuoApiUtil.getGoodsDetail(Long.parseLong(goodsId), PinDuoDuoApiUtil.PID_DEFAULT, Constant.PDD_SEARCH_CUSTOMER_PARAMS); |
| | | PDDGoodsDetail pddGoodsDetail = PinDuoDuoApiUtil.getGoodsDetail(goodsId, PinDuoDuoApiUtil.PID_DEFAULT, Constant.PDD_SEARCH_CUSTOMER_PARAMS); |
| | | if (pddGoodsDetail != null) { |
| | | count = 1; |
| | | goodsList.add(pddGoodsDetail); |