| | |
| | | *
|
| | | * @return
|
| | | */
|
| | | public static String convertLink1(String materialId, String couponUrl, String positionId, String ext1) {
|
| | | public static String convertLink1(String materialId, String couponUrl, String positionId, String ext1, String giftCouponKey) {
|
| | | JSONObject json = new JSONObject();
|
| | | json.put("materialId", materialId);
|
| | | json.put("siteId", APP_ID);
|
| | |
| | |
|
| | | if (!StringUtil.isNullOrEmpty(ext1))
|
| | | json.put("ext1", ext1);
|
| | | if (!StringUtil.isNullOrEmpty(giftCouponKey))
|
| | | json.put("giftCouponKey", giftCouponKey);
|
| | |
|
| | | JSONObject root = new JSONObject();
|
| | | root.put("promotionCodeReq", json);
|
| | |
| | | JSONObject json = new JSONObject();
|
| | | JSONObject couponReq = new JSONObject();
|
| | | couponReq.put("skuMaterialId", sku);
|
| | | couponReq.put("discount", 10);
|
| | | couponReq.put("discount", 10.01);
|
| | | couponReq.put("amount", 5);
|
| | | couponReq.put("receiveStartTime", TimeUtil.getGernalTime(System.currentTimeMillis(), "yyyy-MM-dd HH"));
|
| | | couponReq.put("receiveEndTime", TimeUtil.getGernalTime(System.currentTimeMillis() + 1000 * 60 * 2, "yyyy-MM-dd HH"));
|
| | |
| | | couponReq.put("unionId", "2011217145");
|
| | | // couponReq.put("pid", "2011217145_4100059717_3003005722");
|
| | | couponReq.put("subUnionId", "123_437032");
|
| | | couponReq.put("giftCouponKey","123123123123");
|
| | | couponReq.put("giftCouponKey", "123123123123");
|
| | | json.put("promotionCodeReq", couponReq);
|
| | | String result = baseRequest2("jd.union.open.promotion.byunionid.get", null, json);
|
| | | System.out.println(result);
|