| | |
| | | Long[] ids = new Long[goodsIds.size()];
|
| | | goodsIds.toArray(ids);
|
| | | filter.setGoodsIdList(ids);
|
| | | PDDGoodsResult result = searchGoods(filter,Constant.PDD_SEARCH_CUSTOMER_PARAMS);
|
| | | PDDGoodsResult result = searchGoods(filter, Constant.PDD_SEARCH_CUSTOMER_PARAMS);
|
| | | if (result != null)
|
| | | return result.getGoodsList();
|
| | | return null;
|
| | |
| | | Gson gson = new GsonBuilder().disableHtmlEscaping().create();
|
| | | return gson.fromJson(resultArray.optJSONObject(0).toString(), type);
|
| | | }
|
| | | return null;
|
| | | }
|
| | |
|
| | |
|
| | | public static PDDPromotionUrl convertResourceUrl(String pid) {
|
| | | Map<String, String> map = new HashMap<>();
|
| | | map.put("type", "pdd.ddk.resource.url.gen");
|
| | | map.put("pid", pid);
|
| | | map.put("resource_type", "39998");
|
| | | map.put("url", "https://mobile.yangkeduo.com/attendance.html?_pdd_fs=1&_pdd_tc=ffffff&_pdd_sbs=1&type=1&id=155075");
|
| | | String result = baseRequest(map);
|
| | | System.out.println(result);
|
| | | return null;
|
| | | }
|
| | |
|
| | |
| | | } else
|
| | | return true;
|
| | | }
|
| | |
|
| | |
|
| | | public static String getAuthLink(String pid, String customParameters) {
|
| | | Map<String, String> map = new HashMap<>();
|
| | | map.put("type", "pdd.ddk.rp.prom.url.generate");
|
| | | map.put("channel_type", 10 + "");
|
| | | map.put("custom_parameters", customParameters);
|
| | | map.put("p_id_list", "[\"" + pid + "\"]");
|
| | | String result = baseRequest(map);
|
| | | JSONObject resultJson = JSONObject.fromObject(result);
|
| | | JSONArray array = resultJson.optJSONObject("rp_promotion_url_generate_response").optJSONArray("url_list");
|
| | | if (array != null && array.size() > 0) {
|
| | | JSONObject item = array.optJSONObject(0);
|
| | | String url = item.optString("url");
|
| | | if (StringUtil.isNullOrEmpty(url)) {
|
| | | url = item.optString("mobile_url");
|
| | | }
|
| | | return url;
|
| | | }
|
| | | return null;
|
| | | }
|
| | | }
|