|
@ -451,6 +451,17 @@ public class WeiXinEventProcess {
|
|
|
setSpDisease(articles,keys[0],keys[1],systemConf);
|
|
|
// 构建回复消息XMLs
|
|
|
result = WeiXinMessageReplyUtils.replyNewsMessage(message.get("FromUserName"), message.get("ToUserName"), articles);
|
|
|
}else if (StringUtils.isNotEmpty(eventKey) && (eventKey.startsWith("jkzl_")||eventKey.startsWith("qrscene_jkzl_"))){
|
|
|
// 配置信息
|
|
|
Properties systemConf = SystemConf.getInstance().getSystemProperties();
|
|
|
// 图文信息
|
|
|
List<Map<String, String>> articles = new ArrayList<>();
|
|
|
// 二维码参数
|
|
|
// String[] keys = eventKey.replace("qrscene_","").replace("sp_disease_", "").split("_");
|
|
|
//设置图文消息
|
|
|
setCurrency(articles,systemConf);
|
|
|
// 构建回复消息XMLs
|
|
|
result = WeiXinMessageReplyUtils.replyNewsMessage(message.get("FromUserName"), message.get("ToUserName"), articles);
|
|
|
}else {
|
|
|
// 配置信息
|
|
|
Properties systemConf = SystemConf.getInstance().getSystemProperties();
|
|
@ -545,7 +556,7 @@ public class WeiXinEventProcess {
|
|
|
picUrlConsult = picUrlConsult.replace("{server}", serverUrl);
|
|
|
|
|
|
articleConsult.put("Url", urlConsult);
|
|
|
articleConsult.put("Title", "把健康带回家,流动人口网上回访问卷赢电影票");
|
|
|
articleConsult.put("Title", "新市民健康城市行,网上回访问卷赢电影票");
|
|
|
articleConsult.put("Description", "数量有限,小伙伴们千万不要错过!");
|
|
|
articleConsult.put("PicUrl", picUrlConsult);
|
|
|
|
|
@ -824,6 +835,17 @@ public class WeiXinEventProcess {
|
|
|
setSpDisease(articles,keys[0],keys[1],systemConf);
|
|
|
// 构建回复消息XMLs
|
|
|
result = WeiXinMessageReplyUtils.replyNewsMessage(message.get("FromUserName"), message.get("ToUserName"), articles);
|
|
|
}else if (StringUtils.isNotEmpty(eventKey) && (eventKey.startsWith("jkzl_")||eventKey.startsWith("qrscene_jkzl_"))){
|
|
|
// 配置信息
|
|
|
Properties systemConf = SystemConf.getInstance().getSystemProperties();
|
|
|
// 图文信息
|
|
|
List<Map<String, String>> articles = new ArrayList<>();
|
|
|
// 二维码参数
|
|
|
// String[] keys = eventKey.replace("qrscene_","").replace("sp_disease_", "").split("_");
|
|
|
//设置图文消息
|
|
|
setCurrency(articles,systemConf);
|
|
|
// 构建回复消息XMLs
|
|
|
result = WeiXinMessageReplyUtils.replyNewsMessage(message.get("FromUserName"), message.get("ToUserName"), articles);
|
|
|
}
|
|
|
|
|
|
return result;
|
|
@ -850,6 +872,28 @@ public class WeiXinEventProcess {
|
|
|
articles.add(articleConsult);
|
|
|
}
|
|
|
|
|
|
public void setCurrency(List<Map<String, String>> articles,Properties systemConf){
|
|
|
|
|
|
String url = systemDictDao.findByDictName("WX_CURRENCY_QR_PATH").get(0).getCode();
|
|
|
String title = systemDictDao.findByDictName("WX_CURRENCY_QR_TITLE").get(0).getCode();
|
|
|
String content = systemDictDao.findByDictName("WX_CURRENCY_QR_CONTENT").get(0).getCode();
|
|
|
|
|
|
url = url.replace("{appId}", appId);
|
|
|
logger.info("setCurrency:"+url);
|
|
|
|
|
|
// 图文消息图片URL
|
|
|
String picUrlConsult = systemConf.getProperty("currency_url");
|
|
|
picUrlConsult = picUrlConsult.replace("{server}", serverUrl);
|
|
|
|
|
|
Map<String, String> articleConsult = new HashMap<>();
|
|
|
articleConsult.put("Url", url);
|
|
|
articleConsult.put("Title", title);
|
|
|
articleConsult.put("Description", content);
|
|
|
articleConsult.put("PicUrl", picUrlConsult);
|
|
|
logger.info("setCurrency:"+url+"_"+picUrlConsult+"_"+content+"_"+title);
|
|
|
articles.add(articleConsult);
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
* 构建单个图文消息工具类
|
|
|
*
|