|  | @ -1,11 +1,15 @@
 | 
	
		
			
				|  |  | package com.yihu.jw.hospital.service.wechat;
 | 
	
		
			
				|  |  | 
 | 
	
		
			
				|  |  | 
 | 
	
		
			
				|  |  | import com.netflix.discovery.converters.Auto;
 | 
	
		
			
				|  |  | import com.yihu.jw.doctor.dao.BaseDoctorDao;
 | 
	
		
			
				|  |  | import com.yihu.jw.entity.base.doctor.BaseDoctorDO;
 | 
	
		
			
				|  |  | import com.yihu.jw.util.wechat.WeiXinMessageReplyUtils;
 | 
	
		
			
				|  |  | import com.yihu.jw.util.wechat.WeiXinMessageUtils;
 | 
	
		
			
				|  |  | import org.apache.commons.lang3.StringUtils;
 | 
	
		
			
				|  |  | import org.slf4j.Logger;
 | 
	
		
			
				|  |  | import org.slf4j.LoggerFactory;
 | 
	
		
			
				|  |  | import org.springframework.beans.factory.annotation.Autowired;
 | 
	
		
			
				|  |  | import org.springframework.beans.factory.annotation.Value;
 | 
	
		
			
				|  |  | import org.springframework.stereotype.Component;
 | 
	
		
			
				|  |  | 
 | 
	
	
		
			
				|  | @ -26,6 +30,8 @@ public class WeiXinEventProcess {
 | 
	
		
			
				|  |  | 
 | 
	
		
			
				|  |  |     @Value("${wechat.id}")
 | 
	
		
			
				|  |  |     private String wechatId;
 | 
	
		
			
				|  |  |     @Autowired
 | 
	
		
			
				|  |  |     private BaseDoctorDao baseDoctorDao;
 | 
	
		
			
				|  |  | 
 | 
	
		
			
				|  |  |     /**
 | 
	
		
			
				|  |  |      * 微信推送事件处理
 | 
	
	
		
			
				|  | @ -77,15 +83,21 @@ public class WeiXinEventProcess {
 | 
	
		
			
				|  |  |             // 图文信息
 | 
	
		
			
				|  |  |             List<Map<String, String>> articles = new ArrayList<>();
 | 
	
		
			
				|  |  |             Map<String, String> article = new HashMap<>();
 | 
	
		
			
				|  |  |             // 图片URL
 | 
	
		
			
				|  |  | //            String picUrl = systemConf.getProperty("doctor_qrcode_pic_url");
 | 
	
		
			
				|  |  |             // 二维码参数
 | 
	
		
			
				|  |  |             String[] keys = eventKey.replace("doctor_", "").split("_");
 | 
	
		
			
				|  |  |             // 图片URL
 | 
	
		
			
				|  |  |             String picUrl = "";
 | 
	
		
			
				|  |  |             BaseDoctorDO baseDoctorDO = baseDoctorDao.findById(keys[0]);
 | 
	
		
			
				|  |  |             String url = null;
 | 
	
		
			
				|  |  |             if (null!=baseDoctorDO){
 | 
	
		
			
				|  |  |                 picUrl = baseDoctorDO.getPhoto();
 | 
	
		
			
				|  |  |             }
 | 
	
		
			
				|  |  |             // 医生二维码跳转URL
 | 
	
		
			
				|  |  |             if ("xm_ykyy_wx".equalsIgnoreCase(wechatId)){
 | 
	
		
			
				|  |  |                 url = "https://intel.yanketong.com/ims-wx/#/doctorInfo?doctorCode="+keys[0];
 | 
	
		
			
				|  |  |                 picUrl = "https://intel.yanketong.com/"+picUrl;
 | 
	
		
			
				|  |  |             }
 | 
	
		
			
				|  |  | 
 | 
	
		
			
				|  |  |             // 图文消息URL
 | 
	
		
			
				|  |  | 
 | 
	
		
			
				|  |  |             //图片地址
 | 
	
	
		
			
				|  | @ -94,7 +106,7 @@ public class WeiXinEventProcess {
 | 
	
		
			
				|  |  |             article.put("Url", url);
 | 
	
		
			
				|  |  |             article.put("Title", keys[1] + "医生个人诊间");
 | 
	
		
			
				|  |  |             article.put("Description", "厦门眼科中心医院互联网医院");
 | 
	
		
			
				|  |  |             article.put("PicUrl", url);
 | 
	
		
			
				|  |  |             article.put("PicUrl", picUrl);
 | 
	
		
			
				|  |  |             articles.add(article);
 | 
	
		
			
				|  |  | 
 | 
	
		
			
				|  |  |             // 消息XML
 |