String urlnew = "https://api.weixin.qq.com/wxa/generate_urllink?access_token="+responseMap.get("access_token");
//创建连接
CloseableHttpClient httpClientnew = HttpClients.createDefault();
HttpResponse responsenew = null;
// 构建请求体
JSONObject requestBody = new JSONObject();
requestBody.put("path", "/pages/"); // 小程序页面路径(不可携带 query)
requestBody.put("query", "yqbh="+(String) param.get("yqbh")); // 查询参数
// 发送请求
xcxlj = sendPostRequest(urlnew, requestBody.toJSONString());
//规避返回数据为空的情况
Map responseMaps = StringToMap.stringToMap(xcxlj);
urllink=responseMaps.get("url_link");
参数也有值
