|
@@ -24,16 +24,14 @@ public class WeixinService {
|
|
private static final String CAHR_CODE = "UTF-8";
|
|
private static final String CAHR_CODE = "UTF-8";
|
|
|
|
|
|
// 获取访问TOKEN
|
|
// 获取访问TOKEN
|
|
- private static final String WEIXIN_QRCODE = "http://wechat.pacsonline.cn/wx_patient/api/unifyGetWxQrcode?reportId=";
|
|
|
|
|
|
+ private static final String WEIXIN_QRCODE = "http://wechat.pacsonline.cn/wx_patient/api/unifyGetWxQrcode?reportId=%s";
|
|
|
|
|
|
/*
|
|
/*
|
|
* 获取用户信息
|
|
* 获取用户信息
|
|
*/
|
|
*/
|
|
public String requestWeixinQrcode(String reportid) {
|
|
public String requestWeixinQrcode(String reportid) {
|
|
- String url = reportid;
|
|
|
|
-// String content = doGet(url);
|
|
|
|
- String content = "";
|
|
|
|
-
|
|
|
|
|
|
+ String url = String.format(WEIXIN_QRCODE, reportid);
|
|
|
|
+ String content = doGet(url);
|
|
return content;
|
|
return content;
|
|
}
|
|
}
|
|
|
|
|
|
@@ -41,7 +39,7 @@ public class WeixinService {
|
|
StringBuilder apiLog = new StringBuilder();
|
|
StringBuilder apiLog = new StringBuilder();
|
|
apiLog.append(url).append("\t").append("params:").append("");
|
|
apiLog.append(url).append("\t").append("params:").append("");
|
|
CloseableHttpClient client = HttpClients.custom().setConnectionManager(POOL_CM).build();
|
|
CloseableHttpClient client = HttpClients.custom().setConnectionManager(POOL_CM).build();
|
|
- String content = "1"; // 返回内容
|
|
|
|
|
|
+ String content = null; // 返回内容
|
|
try {
|
|
try {
|
|
HttpGet get = new HttpGet(url);
|
|
HttpGet get = new HttpGet(url);
|
|
|
|
|