admin
2020-06-28 eda623f37c3260f4b4657e34a8a39798c72432b1
fanli/src/main/java/com/yeshi/fanli/util/taobao/HaoDanKuApiUtil.java
@@ -264,15 +264,6 @@
      }
   }
   public void getGoodsDetail(Long auctionId) {
      List<ParamsKeyValue> params = new ArrayList<HaoDanKuApiUtil.ParamsKeyValue>();
      params.add(new ParamsKeyValue("itemid", auctionId + ""));
      String result = baseGetRequest("item_detail", params);
      JSONObject resultJSON = JSONObject.fromObject(result);
      System.out.println(resultJSON.optJSONObject("data").optString("coupon_share_url"));
      System.out.println(resultJSON.optJSONObject("data").optString("couponurl"));
   }
   
   public HDKGoodsListResultDTO  listSelected(Integer minId) {
      if (minId == null)
@@ -316,20 +307,17 @@
   }
   
   
   public HDKGoodsListResultDTO getItemDetail(String itemid) {
   public HDKGoodsDetail getItemDetail(String itemid) {
      List<ParamsKeyValue> params = new ArrayList<HaoDanKuApiUtil.ParamsKeyValue>();
      params.add(new ParamsKeyValue("itemid", itemid));
      String result = baseGetRequest("item_detail", params);
      JSONObject resultData = JSONObject.fromObject(result);
      if (resultData.optInt("code") == 1) {
         Integer newMinId = resultData.optInt("min_id");
         Type type = new TypeToken<ArrayList<HDKGoodsDetail>>() {
         }.getType();
         List<HDKGoodsDetail> list = new Gson().fromJson(resultData.optJSONArray("data").toString(), type);
         return new HDKGoodsListResultDTO(list, newMinId);
         Type type = new TypeToken<HDKGoodsDetail>() {}.getType();
         HDKGoodsDetail goodsDetail = new Gson().fromJson(resultData.optJSONObject("data").toString(), type);
         return goodsDetail;
      }
      return null;
   }
}