|
|
|
|
@ -1,6 +1,5 @@ |
|
|
|
|
package com.ynxbd.wx.wxfactory; |
|
|
|
|
|
|
|
|
|
import com.ynxbd.common.helper.common.ErrorHelper; |
|
|
|
|
import com.ynxbd.common.helper.common.RepeatKeyHelper; |
|
|
|
|
import com.ynxbd.wx.config.HospConfigEnum; |
|
|
|
|
import com.ynxbd.wx.config.WeChatConfig; |
|
|
|
|
@ -103,35 +102,25 @@ public class WxPassiveReplyHelper { |
|
|
|
|
public static boolean textCommon(HttpServletResponse response, String content, String msgType, String fromUserName, String toUserName) { |
|
|
|
|
String webUrl = WeChatConfig.getWebReqURL(); |
|
|
|
|
|
|
|
|
|
if (Arrays.asList(new String[]{ |
|
|
|
|
"缓", |
|
|
|
|
"缓存", |
|
|
|
|
"用不了", |
|
|
|
|
"页面", |
|
|
|
|
"404", |
|
|
|
|
"进不去" |
|
|
|
|
}).contains(content)) { |
|
|
|
|
if (Arrays.asList(new String[]{"缓存"}).contains(content)) { |
|
|
|
|
return createNewsMsg(response, fromUserName, toUserName, "公众号用不了(缓存清理)", msgType, content, |
|
|
|
|
(webUrl + "wx-cache.html"), |
|
|
|
|
(webUrl + "images/message/cache.png")); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
if (Arrays.asList(new String[]{ |
|
|
|
|
"你好", |
|
|
|
|
"链接", |
|
|
|
|
"指引", |
|
|
|
|
"微官网", |
|
|
|
|
}).contains(content)) { |
|
|
|
|
if (Arrays.asList(new String[]{"微官网"}).contains(content)) { |
|
|
|
|
return createNewsMsg(response, fromUserName, toUserName, "微官网链接", msgType, content, |
|
|
|
|
(webUrl + "app.html"), |
|
|
|
|
(webUrl + "images/message/hospital.png")); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
if (Arrays.asList(new String[]{ |
|
|
|
|
"查", |
|
|
|
|
"查询", |
|
|
|
|
"报告" |
|
|
|
|
}).contains(content)) { |
|
|
|
|
if (Arrays.asList(new String[]{"挂号", "预约"}).contains(content)) { |
|
|
|
|
return createNewsMsg(response, fromUserName, toUserName, "预约挂号", msgType, content, |
|
|
|
|
(webUrl + "reg-reserve.html"), |
|
|
|
|
(webUrl + "images/message/report.png")); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
if (Arrays.asList(new String[]{"查", "报告"}).contains(content)) { |
|
|
|
|
return createNewsMsg(response, fromUserName, toUserName, "报告单查询", msgType, content, |
|
|
|
|
(webUrl + "all-result.html"), |
|
|
|
|
(webUrl + "images/message/report.png")); |
|
|
|
|
@ -466,23 +455,14 @@ public class WxPassiveReplyHelper { |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
public static boolean 德宏州妇幼保健院(HttpServletResponse response, String content, String msgType, String fromUserName, String toUserName, String eventKey, String event) { |
|
|
|
|
boolean isEventSubscribe = false; |
|
|
|
|
if (WxEventEnum.MSG_TYPE_EVENT.isEvent(msgType)) { // 事件
|
|
|
|
|
if (WxEventEnum.EVENT_SUBSCRIBE.isEvent(event)) { // 关注
|
|
|
|
|
isEventSubscribe = true; |
|
|
|
|
String respContent = "您好!欢迎关注德宏州妇幼保健院!如有疑问请拨打 24小时值班电话:15368666599"; |
|
|
|
|
WxFactory.Base.PassiveMsg().createXmlTextMsg(response, fromUserName, toUserName, respContent); |
|
|
|
|
return WxFactory.Base.PassiveMsg().createXmlTextMsg(response, fromUserName, toUserName, respContent); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
if (content == null) { |
|
|
|
|
content = ""; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
if (isEventSubscribe || content.contains("电话")) { |
|
|
|
|
String mediaId = ""; // 图片ID
|
|
|
|
|
WxFactory.Base.PassiveMsg().createXmlImageMsg(response, fromUserName, toUserName, mediaId); |
|
|
|
|
} |
|
|
|
|
return true; |
|
|
|
|
String mediaId = "w-XoPbF-UEDfuGAOkMm24hOecA4Al2zZLf0WETLDXAm9nNhacFNJlZTEe3MlX1xG"; // 图片ID
|
|
|
|
|
return WxFactory.Base.PassiveMsg().createXmlImageMsg(response, fromUserName, toUserName, mediaId); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
public static boolean 蒙自市妇幼保健院(HttpServletResponse response, String content, String msgType, String fromUserName, String toUserName, String eventKey, String event) { |
|
|
|
|
|