| | |
| | | System.out.println(result);
|
| | | }
|
| | |
|
| | | public void convertLink(Long auctionId, String pid, String activityId) {
|
| | | public String convertLink(Long auctionId, String pid, String activityId) {
|
| | | List<ParamsKeyValue> params = new ArrayList<HaoDanKuApiUtil.ParamsKeyValue>();
|
| | | params.add(new ParamsKeyValue("itemid", auctionId + ""));
|
| | | params.add(new ParamsKeyValue("pid", pid));
|
| | | if (activityId != null)
|
| | | params.add(new ParamsKeyValue("activityid", activityId));
|
| | | String result = basePostRequest("http://v2.api.haodanku.com/ratesurl", params);
|
| | | System.out.println(result);
|
| | | JSONObject resultData = JSONObject.fromObject(result);
|
| | | String link = "";
|
| | | if (resultData.optInt("code") == 1) {
|
| | | resultData = resultData.optJSONObject("data");
|
| | | link = resultData.optString("coupon_click_url");
|
| | | if (StringUtil.isNullOrEmpty(link)) {
|
| | | link = resultData.optString("item_url");
|
| | | }
|
| | | }
|
| | |
|
| | | return link;
|
| | | }
|
| | |
|
| | | /**
|
| | |
| | | if (minId == null)
|
| | | minId = 1;
|
| | | List<ParamsKeyValue> params = new ArrayList<HaoDanKuApiUtil.ParamsKeyValue>();
|
| | | params.add(new ParamsKeyValue("nav", 3+ ""));
|
| | | params.add(new ParamsKeyValue("nav", 3 + ""));
|
| | | params.add(new ParamsKeyValue("back", pageSize + ""));
|
| | | params.add(new ParamsKeyValue("min_id", minId + ""));
|
| | | params.add(new ParamsKeyValue("sort", 0 + ""));
|