|  | @ -45,6 +45,27 @@ public class WeiXinEventProcess {
 | 
	
		
			
				|  |  |         return result;
 | 
	
		
			
				|  |  |     }
 | 
	
		
			
				|  |  | 
 | 
	
		
			
				|  |  |     /**
 | 
	
		
			
				|  |  |      * 微信菜单点击处理
 | 
	
		
			
				|  |  |      *
 | 
	
		
			
				|  |  |      * @param message
 | 
	
		
			
				|  |  |      * @return
 | 
	
		
			
				|  |  |      */
 | 
	
		
			
				|  |  |     public static String clickProcess(Map<String, String> message) throws Exception {
 | 
	
		
			
				|  |  |         String result = "";
 | 
	
		
			
				|  |  |         if(message.get("EventKey").equals("caozuoshuoming")){
 | 
	
		
			
				|  |  | 
 | 
	
		
			
				|  |  |             String tempStr = subscribeEventProcess(message);
 | 
	
		
			
				|  |  |             int firsIndex = tempStr.indexOf("<item>");
 | 
	
		
			
				|  |  |             String result1 = tempStr.substring(0,firsIndex-1);
 | 
	
		
			
				|  |  |             int secondIndex = tempStr.indexOf("<item>",firsIndex+10);
 | 
	
		
			
				|  |  |             String result2 = tempStr.substring(secondIndex-1);
 | 
	
		
			
				|  |  |             result=(result1+result2).replace("<ArticleCount>5</ArticleCount>","<ArticleCount>4</ArticleCount>");
 | 
	
		
			
				|  |  |         }
 | 
	
		
			
				|  |  | 
 | 
	
		
			
				|  |  |         return result;
 | 
	
		
			
				|  |  |     }
 | 
	
		
			
				|  |  | 
 | 
	
		
			
				|  |  |     /**
 | 
	
		
			
				|  |  |      * 关注事件消息发送
 | 
	
		
			
				|  |  |      *
 | 
	
	
		
			
				|  | @ -58,6 +79,7 @@ public class WeiXinEventProcess {
 | 
	
		
			
				|  |  |         Properties systemConf = SystemConf.getInstance().getSystemProperties();
 | 
	
		
			
				|  |  |         // 图文信息
 | 
	
		
			
				|  |  |         List<Map<String,String>> articles =  new ArrayList<>();
 | 
	
		
			
				|  |  | 
 | 
	
		
			
				|  |  |         Map<String,String> article = new HashMap<>();
 | 
	
		
			
				|  |  |         // 图文URL
 | 
	
		
			
				|  |  |         String url = systemConf.getProperty("doctor_subscribe_url");
 | 
	
	
		
			
				|  | @ -75,9 +97,89 @@ public class WeiXinEventProcess {
 | 
	
		
			
				|  |  |         article.put("PicUrl",picUrl);
 | 
	
		
			
				|  |  | 
 | 
	
		
			
				|  |  |         articles.add(article);
 | 
	
		
			
				|  |  | 
 | 
	
		
			
				|  |  |         Map<String,String> articleConsult = new HashMap<>();
 | 
	
		
			
				|  |  |         // 图文URL
 | 
	
		
			
				|  |  |         String urlConsult = systemConf.getProperty("patient_consult_url");
 | 
	
		
			
				|  |  |         // 图文消息图片URL
 | 
	
		
			
				|  |  |         String picUrlConsult = systemConf.getProperty("patient_operatinginstrutions_pic_url");
 | 
	
		
			
				|  |  |         // URL设置服务器URL、AppId
 | 
	
		
			
				|  |  |         urlConsult = urlConsult.replace("{server}", systemConf.getProperty("wechat_base_url"))
 | 
	
		
			
				|  |  |                 .replace("{appId}", systemConf.getProperty("appId"));
 | 
	
		
			
				|  |  |         //图片地址
 | 
	
		
			
				|  |  |         picUrlConsult = picUrlConsult.replace("{server}", systemConf.getProperty("server_url"));
 | 
	
		
			
				|  |  | 
 | 
	
		
			
				|  |  |         articleConsult.put("Url",urlConsult);
 | 
	
		
			
				|  |  |         articleConsult.put("Title", "医生咨询功能使用说明");
 | 
	
		
			
				|  |  |         articleConsult.put("Description","功能使用说明");
 | 
	
		
			
				|  |  |         articleConsult.put("PicUrl",picUrlConsult);
 | 
	
		
			
				|  |  | 
 | 
	
		
			
				|  |  |         articles.add(articleConsult);
 | 
	
		
			
				|  |  | 
 | 
	
		
			
				|  |  |         Map<String,String> articleBooking = new HashMap<>();
 | 
	
		
			
				|  |  |         // 图文URL
 | 
	
		
			
				|  |  |         String urlBooking = systemConf.getProperty("patient_booking_url");
 | 
	
		
			
				|  |  |         // 图文消息图片URL
 | 
	
		
			
				|  |  |         String picUrlBooking = systemConf.getProperty("patient_operatinginstrutions_pic_url");
 | 
	
		
			
				|  |  |         // URL设置服务器URL、AppId
 | 
	
		
			
				|  |  |         urlBooking = urlBooking.replace("{server}", systemConf.getProperty("wechat_base_url"))
 | 
	
		
			
				|  |  |                 .replace("{appId}", systemConf.getProperty("appId"));
 | 
	
		
			
				|  |  |         //图片地址
 | 
	
		
			
				|  |  |         picUrlBooking = picUrlBooking.replace("{server}", systemConf.getProperty("server_url"));
 | 
	
		
			
				|  |  | 
 | 
	
		
			
				|  |  |         articleBooking.put("Url",urlBooking);
 | 
	
		
			
				|  |  |         articleBooking.put("Title", "预约挂号功能使用说明");
 | 
	
		
			
				|  |  |         articleBooking.put("Description","功能使用说明");
 | 
	
		
			
				|  |  |         articleBooking.put("PicUrl",picUrlBooking);
 | 
	
		
			
				|  |  | 
 | 
	
		
			
				|  |  |         articles.add(articleBooking);
 | 
	
		
			
				|  |  | 
 | 
	
		
			
				|  |  |         Map<String,String> articleDevice = new HashMap<>();
 | 
	
		
			
				|  |  |         // 图文URL
 | 
	
		
			
				|  |  |         String urlDevice = systemConf.getProperty("patient_device_url");
 | 
	
		
			
				|  |  |         // 图文消息图片URL
 | 
	
		
			
				|  |  |         String picUrlDevice = systemConf.getProperty("patient_operatinginstrutions_pic_url");
 | 
	
		
			
				|  |  |         // URL设置服务器URL、AppId
 | 
	
		
			
				|  |  |         urlDevice = urlDevice.replace("{server}", systemConf.getProperty("wechat_base_url"))
 | 
	
		
			
				|  |  |                 .replace("{appId}", systemConf.getProperty("appId"));
 | 
	
		
			
				|  |  |         //图片地址
 | 
	
		
			
				|  |  |         picUrlDevice = picUrlDevice.replace("{server}", systemConf.getProperty("server_url"));
 | 
	
		
			
				|  |  | 
 | 
	
		
			
				|  |  |         articleDevice.put("Url",urlDevice);
 | 
	
		
			
				|  |  |         articleDevice.put("Title", "体征设备管理功能使用说明");
 | 
	
		
			
				|  |  |         articleDevice.put("Description","功能使用说明");
 | 
	
		
			
				|  |  |         articleDevice.put("PicUrl",picUrlDevice);
 | 
	
		
			
				|  |  | 
 | 
	
		
			
				|  |  |         articles.add(articleDevice);
 | 
	
		
			
				|  |  | 
 | 
	
		
			
				|  |  |         Map<String,String> articleFamily = new HashMap<>();
 | 
	
		
			
				|  |  |         // 图文URL
 | 
	
		
			
				|  |  |         String urlFamily = systemConf.getProperty("patient_family_url");
 | 
	
		
			
				|  |  |         // 图文消息图片URL
 | 
	
		
			
				|  |  |         String picUrlFamily = systemConf.getProperty("patient_operatinginstrutions_pic_url");
 | 
	
		
			
				|  |  |         // URL设置服务器URL、AppId
 | 
	
		
			
				|  |  |         urlFamily = urlFamily.replace("{server}", systemConf.getProperty("wechat_base_url"))
 | 
	
		
			
				|  |  |                 .replace("{appId}", systemConf.getProperty("appId"));
 | 
	
		
			
				|  |  |         //图片地址
 | 
	
		
			
				|  |  |         picUrlFamily = picUrlFamily.replace("{server}", systemConf.getProperty("server_url"));
 | 
	
		
			
				|  |  | 
 | 
	
		
			
				|  |  |         articleFamily.put("Url",urlFamily);
 | 
	
		
			
				|  |  |         articleFamily.put("Title", "我的家庭功能使用说明");
 | 
	
		
			
				|  |  |         articleFamily.put("Description","功能使用说明");
 | 
	
		
			
				|  |  |         articleFamily.put("PicUrl",picUrlFamily);
 | 
	
		
			
				|  |  | 
 | 
	
		
			
				|  |  |         articles.add(articleFamily);
 | 
	
		
			
				|  |  | 
 | 
	
		
			
				|  |  |         // 构建回复消息XML
 | 
	
		
			
				|  |  |         result = WeiXinMessageReplyUtils.replyNewsMessage(message.get("FromUserName"),message.get("ToUserName"),articles);
 | 
	
		
			
				|  |  | 
 | 
	
		
			
				|  |  |         /*String tempStr = result;
 | 
	
		
			
				|  |  |         int firsIndex = tempStr.indexOf("<item>");
 | 
	
		
			
				|  |  |         String result1 = tempStr.substring(0,firsIndex-1);
 | 
	
		
			
				|  |  |         int secondIndex = tempStr.indexOf("<item>",firsIndex+10);
 | 
	
		
			
				|  |  |         String result2 = tempStr.substring(secondIndex-1);
 | 
	
		
			
				|  |  |         result=(result1+result2).replace("<ArticleCount>5</ArticleCount>","<ArticleCount>4</ArticleCount>");*/
 | 
	
		
			
				|  |  | 
 | 
	
		
			
				|  |  |         return result;
 | 
	
		
			
				|  |  |     }
 | 
	
		
			
				|  |  | 
 |