|
@@ -127,8 +127,9 @@ public class WeixinService {
|
|
|
/*
|
|
|
* 发送模板消息
|
|
|
*/
|
|
|
- public void sendTemplateMsg(String openid, String url, String userName,Integer pushtype) {
|
|
|
+ public ApiResult sendTemplateMsg(String openid, String url, String userName,Integer pushtype) {
|
|
|
PUSH_TYPE dType2 = null;
|
|
|
+ ApiResult apiResult = null;
|
|
|
for (PUSH_TYPE xxxEnum : PUSH_TYPE.values()) {
|
|
|
if (xxxEnum.getPushType() == pushtype) {
|
|
|
dType2 = xxxEnum;
|
|
@@ -136,15 +137,16 @@ public class WeixinService {
|
|
|
}
|
|
|
switch (dType2) {
|
|
|
case REMOTE_DIAGNOSIS_PATIENT_PAY:
|
|
|
- sendRemoteDiagnosisPatientPayMsg(openid,url,userName);
|
|
|
+ apiResult = sendRemoteDiagnosisPatientPayMsg(openid,url,userName);
|
|
|
break;
|
|
|
|
|
|
default:
|
|
|
break;
|
|
|
}
|
|
|
+ return apiResult;
|
|
|
}
|
|
|
|
|
|
- public void sendRemoteDiagnosisPatientPayMsg(String openid, String url, String userName) {
|
|
|
+ public ApiResult sendRemoteDiagnosisPatientPayMsg(String openid, String url, String userName) {
|
|
|
String str = " {\n" +
|
|
|
" \"touser\":\""+openid+"\",\n" +
|
|
|
" \"template_id\":\"VZ0Y3yj6N6187EggHdtdUZYcdQ-UycrjKCZKjqLn60Y\",\n" +
|
|
@@ -182,6 +184,7 @@ public class WeixinService {
|
|
|
" }\n" +
|
|
|
" }";
|
|
|
ApiResult apiResult = TemplateMsgApi.send(str);
|
|
|
+ return apiResult;
|
|
|
}
|
|
|
public static String getParamByUrl(String url, String name) {
|
|
|
url += "&";
|