|  | @ -1,7 +1,9 @@
 | 
	
		
			
				|  |  | package com.yihu.wlyy.wechat.process;
 | 
	
		
			
				|  |  | 
 | 
	
		
			
				|  |  | import com.yihu.wlyy.entity.dict.SystemDict;
 | 
	
		
			
				|  |  | import com.yihu.wlyy.entity.doctor.profile.Doctor;
 | 
	
		
			
				|  |  | import com.yihu.wlyy.repository.dict.SystemDictDao;
 | 
	
		
			
				|  |  | import com.yihu.wlyy.repository.doctor.DoctorDao;
 | 
	
		
			
				|  |  | import com.yihu.wlyy.service.common.account.PatientService;
 | 
	
		
			
				|  |  | import com.yihu.wlyy.task.PushMsgTask;
 | 
	
		
			
				|  |  | import com.yihu.wlyy.util.SystemConf;
 | 
	
	
		
			
				|  | @ -45,6 +47,8 @@ public class WeiXinEventProcess {
 | 
	
		
			
				|  |  |     
 | 
	
		
			
				|  |  |     @Autowired
 | 
	
		
			
				|  |  |     private PatientService patientService;
 | 
	
		
			
				|  |  |     @Autowired
 | 
	
		
			
				|  |  |     private DoctorDao doctorDao;
 | 
	
		
			
				|  |  | 
 | 
	
		
			
				|  |  |     /**
 | 
	
		
			
				|  |  |      * 微信推送事件处理
 | 
	
	
		
			
				|  | @ -691,6 +695,8 @@ public class WeiXinEventProcess {
 | 
	
		
			
				|  |  | 
 | 
	
		
			
				|  |  |             articles.add(article);
 | 
	
		
			
				|  |  | 
 | 
	
		
			
				|  |  |             //设置医生活动二维码
 | 
	
		
			
				|  |  |             setDoctorActivity(keys[0],articles,systemConf);
 | 
	
		
			
				|  |  |             //设置通用链接
 | 
	
		
			
				|  |  |             setUrlItems(articles, systemConf);
 | 
	
		
			
				|  |  |             //加入续签图文
 | 
	
	
		
			
				|  | @ -851,6 +857,13 @@ public class WeiXinEventProcess {
 | 
	
		
			
				|  |  |         return result;
 | 
	
		
			
				|  |  |     }
 | 
	
		
			
				|  |  | 
 | 
	
		
			
				|  |  |     /**
 | 
	
		
			
				|  |  |      * 设置专科医生二维码
 | 
	
		
			
				|  |  |      * @param articles
 | 
	
		
			
				|  |  |      * @param doctor
 | 
	
		
			
				|  |  |      * @param teamId
 | 
	
		
			
				|  |  |      * @param systemConf
 | 
	
		
			
				|  |  |      */
 | 
	
		
			
				|  |  |     public void setSpDisease(List<Map<String, String>> articles,String doctor,String teamId,Properties systemConf){
 | 
	
		
			
				|  |  | 
 | 
	
		
			
				|  |  |         String url = systemDictDao.findByDictName("SP_DISEASE").get(0).getCode();
 | 
	
	
		
			
				|  | @ -872,6 +885,11 @@ public class WeiXinEventProcess {
 | 
	
		
			
				|  |  |         articles.add(articleConsult);
 | 
	
		
			
				|  |  |     }
 | 
	
		
			
				|  |  | 
 | 
	
		
			
				|  |  |     /**
 | 
	
		
			
				|  |  |      * 设置通用二维码
 | 
	
		
			
				|  |  |      * @param articles
 | 
	
		
			
				|  |  |      * @param systemConf
 | 
	
		
			
				|  |  |      */
 | 
	
		
			
				|  |  |     public void setCurrency(List<Map<String, String>> articles,Properties systemConf){
 | 
	
		
			
				|  |  | 
 | 
	
		
			
				|  |  |         String url = systemDictDao.findByDictName("WX_CURRENCY_QR_PATH").get(0).getCode();
 | 
	
	
		
			
				|  | @ -894,6 +912,22 @@ public class WeiXinEventProcess {
 | 
	
		
			
				|  |  |         articles.add(articleConsult);
 | 
	
		
			
				|  |  |     }
 | 
	
		
			
				|  |  | 
 | 
	
		
			
				|  |  |     public void setDoctorActivity(String doctor,List<Map<String, String>> articles,Properties systemConf){
 | 
	
		
			
				|  |  |         Doctor d = doctorDao.findByCode(doctor);
 | 
	
		
			
				|  |  |         if(d!=null&&StringUtils.isNotBlank(d.getActivityPath())){
 | 
	
		
			
				|  |  |             logger.info("setDoctorActivity:"+d.getActivityPath());
 | 
	
		
			
				|  |  |             // 图文消息图片URL
 | 
	
		
			
				|  |  |             String activityPath = systemConf.getProperty("doctor_activity_url");
 | 
	
		
			
				|  |  |             activityPath = activityPath.replace("{server}", serverUrl);
 | 
	
		
			
				|  |  | 
 | 
	
		
			
				|  |  |             Map<String, String> articleConsult = new HashMap<>();
 | 
	
		
			
				|  |  |             articleConsult.put("Url", d.getActivityPath());
 | 
	
		
			
				|  |  |             articleConsult.put("Title", "家庭医生线上签约指引");
 | 
	
		
			
				|  |  |             articleConsult.put("Description", "贴心家庭医生为居民提供健康指导、随访等服务\n");
 | 
	
		
			
				|  |  |             articleConsult.put("PicUrl", activityPath);
 | 
	
		
			
				|  |  |             articles.add(articleConsult);
 | 
	
		
			
				|  |  |         }
 | 
	
		
			
				|  |  |     }
 | 
	
		
			
				|  |  |     /**
 | 
	
		
			
				|  |  |      * 构建单个图文消息工具类
 | 
	
		
			
				|  |  |      *
 |