| | |
| | | *
|
| | | * @return
|
| | | */
|
| | | public static String convertLink(String materialId, String couponUrl, String pid) {
|
| | | public static String convertLink(String materialId, String couponUrl, String positionId, String ext1) {
|
| | | JSONObject json = new JSONObject();
|
| | | json.put("materialId", materialId);
|
| | | json.put("siteId", APP_ID);
|
| | | if (couponUrl != null)
|
| | | json.put("positionId", positionId);
|
| | | |
| | | if (!StringUtil.isNullOrEmpty(couponUrl))
|
| | | json.put("couponUrl", couponUrl);
|
| | | // json.put("ext1", "437032_12");
|
| | | json.put("pid", pid);
|
| | | |
| | | if (!StringUtil.isNullOrEmpty(ext1))
|
| | | json.put("ext1", ext1);
|
| | |
|
| | | JSONObject root = new JSONObject();
|
| | | root.put("promotionCodeReq", json);
|
| | |
|
| | | String result = baseRequest("jd.union.open.promotion.common.get", null, json);
|
| | | String result = baseRequest("jd.union.open.promotion.common.get", null, root);
|
| | | JSONObject resultJson = JSONObject.fromObject(result);
|
| | | result = resultJson.optJSONObject("jd_union_open_promotion_common_get_response").optString("result");
|
| | | resultJson = JSONObject.fromObject(result);
|
| | |
| | | if (filter.getIsPG() != null)
|
| | | json.put("isPG", filter.getIsPG());
|
| | |
|
| | | if (filter.getIsCoupon() != null)
|
| | | json.put("isCoupon", filter.getIsCoupon());
|
| | |
|
| | | if (filter.getPingouPriceStart() != null)
|
| | | json.put("pingouPriceStart", filter.getPingouPriceStart());
|
| | |
|
| | |
| | |
|
| | | if (filter.getShopId() != null)
|
| | | json.put("shopId", filter.getShopId());
|
| | | |
| | | if (filter.getOwner() != null)
|
| | | json.put("owner", filter.getOwner());
|
| | | |
| | | System.out.println(json.toString());
|
| | |
|
| | | JSONObject jsonDTO = new JSONObject();
|