|
@ -175,13 +175,14 @@ public class PushMsgTask {
|
|
/**
|
|
/**
|
|
* 发送微信模板消息
|
|
* 发送微信模板消息
|
|
*
|
|
*
|
|
* @param type 1:签约成功 2:签约失败 3:咨询回复通知 4:健康指导提醒 5:解约申请通知 6:预约挂号成功通知 7:预约取消通知 8 缴费提醒
|
|
|
|
|
|
* @param type 1:签约成功 2:签约失败 3:咨询回复通知 4:健康指导提醒 5:解约申请通知 6:预约挂号成功通知 7:预约取消通知 8 缴费提醒 9 健康教育
|
|
* @param json 当type==1||type==2时:{"first":"消息主题",”doctor":"医生code","doctorName":"医生名","date":"签约时间","content":"签约内容","remark":"消息备注"}
|
|
* @param json 当type==1||type==2时:{"first":"消息主题",”doctor":"医生code","doctorName":"医生名","date":"签约时间","content":"签约内容","remark":"消息备注"}
|
|
* type==3时:{"first":"消息主题","consult":"医生咨询编号","consultcontent":"咨询内容","replycontent":"回复内容","doctorName":"医生名","remark":"消息备注"}
|
|
* type==3时:{"first":"消息主题","consult":"医生咨询编号","consultcontent":"咨询内容","replycontent":"回复内容","doctorName":"医生名","remark":"消息备注"}
|
|
* type==4时:{"first":"消息主题","date":"指导时间","orgName":"指导机构","doctorName":"指导医生名","content":"指导内容","remark":"消息备注"}
|
|
* type==4时:{"first":"消息主题","date":"指导时间","orgName":"指导机构","doctorName":"指导医生名","content":"指导内容","remark":"消息备注"}
|
|
* type==5时:{"first":"消息主题","date":"解约时间",”doctor":"医生code","doctorName":"医生名","orgName":"解约机构","remark":"消息备注"}
|
|
* type==5时:{"first":"消息主题","date":"解约时间",”doctor":"医生code","doctorName":"医生名","orgName":"解约机构","remark":"消息备注"}
|
|
* type==6时:{"first":"消息主题","date":"预约时间",”id":"预约ID","doctorName":"医生名","orgName":"预约医院","deptName":"预约科室","remark":"消息备注"}
|
|
* type==6时:{"first":"消息主题","date":"预约时间",”id":"预约ID","doctorName":"医生名","orgName":"预约医院","deptName":"预约科室","remark":"消息备注"}
|
|
* type==7时:{"first":"消息主题","name":"就诊人名","date":"预约时间","doctorName":"医生名","orgName":"预约医院","remark":"消息备注"}
|
|
* type==7时:{"first":"消息主题","name":"就诊人名","date":"预约时间","doctorName":"医生名","orgName":"预约医院","remark":"消息备注"}
|
|
|
|
* type==9时:{"first":"消息主题","name":"患教标题","doctorName":"医生名","date":"发送时间","remark":"消息备注"}
|
|
* @return
|
|
* @return
|
|
*/
|
|
*/
|
|
private boolean sendWeixinMessage(String access_token, int type, String openid, String name, JSONObject json) {
|
|
private boolean sendWeixinMessage(String access_token, int type, String openid, String name, JSONObject json) {
|
|
@ -380,6 +381,30 @@ public class PushMsgTask {
|
|
keyword4.setColor("#000000");
|
|
keyword4.setColor("#000000");
|
|
keyword4.setValue(json.getString("content"));
|
|
keyword4.setValue(json.getString("content"));
|
|
m.put("remark", keyword4);
|
|
m.put("remark", keyword4);
|
|
|
|
}else if (type == 9) {
|
|
|
|
temp.setUrl(url + "jkjy/html/article.html?openid=" + openid + "&dataId=" + json.getString("article"));
|
|
|
|
temp_id = SystemConf.getInstance().getSystemProperties().getProperty("template_healthy_article");
|
|
|
|
temp.setTemplate_id(temp_id);
|
|
|
|
WechatTemplateData keyword1 = new WechatTemplateData();
|
|
|
|
keyword1.setColor("#000000");
|
|
|
|
keyword1.setValue(json.getString("first"));
|
|
|
|
m.put("first", keyword1);
|
|
|
|
WechatTemplateData keyword2 = new WechatTemplateData();
|
|
|
|
keyword2.setColor("#000000");
|
|
|
|
keyword2.setValue(json.getString("title"));
|
|
|
|
m.put("keyword1", keyword2);
|
|
|
|
WechatTemplateData keyword3 = new WechatTemplateData();
|
|
|
|
keyword3.setColor("#000000");
|
|
|
|
keyword3.setValue(json.getString("doctorName"));
|
|
|
|
m.put("keyword2", keyword3);
|
|
|
|
WechatTemplateData keyword4 = new WechatTemplateData();
|
|
|
|
keyword4.setColor("#000000");
|
|
|
|
keyword4.setValue(json.getString("date"));
|
|
|
|
m.put("keyword3", keyword4);
|
|
|
|
WechatTemplateData keyword5 = new WechatTemplateData();
|
|
|
|
keyword5.setColor("#000000");
|
|
|
|
keyword5.setValue(json.getString("remark"));
|
|
|
|
m.put("remark", keyword5);
|
|
}
|
|
}
|
|
temp.setData(m);
|
|
temp.setData(m);
|
|
ObjectMapper mapper = new ObjectMapper();
|
|
ObjectMapper mapper = new ObjectMapper();
|