| | |
| | | }
|
| | | }
|
| | |
|
| | | 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)
|
| | |
| | | }
|
| | |
|
| | |
|
| | | 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;
|
| | | }
|
| | | }
|