admin
2020-11-28 dc5be7d38446f70e6ff86df311119c32b41fe7f8
fanli/src/main/java/com/yeshi/fanli/util/jd/JDApiUtil.java
@@ -116,7 +116,7 @@
     *
     * @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);
@@ -127,6 +127,8 @@
        if (!StringUtil.isNullOrEmpty(ext1))
            json.put("ext1", ext1);
        if (!StringUtil.isNullOrEmpty(giftCouponKey))
            json.put("giftCouponKey", giftCouponKey);
        JSONObject root = new JSONObject();
        root.put("promotionCodeReq", json);
@@ -726,7 +728,7 @@
        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"));
@@ -761,7 +763,7 @@
        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);