admin
2019-01-11 20f1758957a19bb5fec47fcc1c83818ee268676b
fanli/src/main/java/com/yeshi/fanli/util/taobao/TaoKeApiUtil.java
@@ -225,8 +225,8 @@
      return null;
   }
   
   public static List<TaoBaoGoodsBrief> getBatchGoodsInfo(List<Long> listId) throws TaoKeApiException,TaobaoGoodsDownException {
   public static List<TaoBaoGoodsBrief> getBatchGoodsInfo(List<Long> listId)
         throws TaoKeApiException, TaobaoGoodsDownException {
      if (listId == null || listId.size() == 0) {
         throw new TaobaoGoodsDownException(1,"淘宝商品ID不能为空");
      }
@@ -242,7 +242,6 @@
      
      return getBatchGoodsInfos(ids.substring(0, ids.length() -1));
   }
   /**
    * 获取商品详情,简版
@@ -1436,6 +1435,29 @@
      return result;
   }
   /**
    * 从淘宝链接中解析商品ID(高级接口)
    * @param link
    * @return
    */
   public static String parseAuctionIdFromLink(String link) {
      Map<String, String> map = new HashMap<>();
      map.put("method", "taobao.tbk.item.click.extract");
      map.put("click_url", link + "");
      JSONObject resultJSON = null;
      try {
         resultJSON = TaoKeBaseUtil.baseRequest(map, true);
      } catch (TaoKeApiException e) {
         e.printStackTrace();
      }
      if (resultJSON == null)
         return null;
      return null;
   }
   private static TaoBaoGoodsBrief parseWuLiaoItemFromMaterialId(JSONObject item) {
      TaoBaoGoodsBrief goods = new TaoBaoGoodsBrief();
      // 设置成320*320的图片尺寸