yujian
2019-07-23 a39422f2a8ce45dd6cf65701ed5f9e65391c46c1
fanli/src/main/java/com/yeshi/fanli/util/jd/JDApiUtil.java
@@ -151,19 +151,22 @@
    * 
    * @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);