فهرست منبع

Merge branch 'dev' of linzhuo/patient-co-management into dev

lyr 8 سال پیش
والد
کامیت
2df939dbcf

+ 1 - 1
patient-co-wlyy/src/main/java/com/yihu/wlyy/task/PushMsgTask.java

@ -382,7 +382,7 @@ public class PushMsgTask {
                keyword4.setValue(json.getString("content"));
                m.put("remark", keyword4);
            }else if (type == 9) {
                temp.setUrl(url + "jkjy/html/article.html?openid=" + openid + "&dataId=" + json.getString("article"));
                temp.setUrl(url + "jkjy/html/article.html?openid=" + openid + "&dataId=" + json.getString("article")+"&toUser="+ json.getString("toUser"));
                temp_id = SystemConf.getInstance().getSystemProperties().getProperty("template_healthy_article");
                temp.setTemplate_id(temp_id);
                WechatTemplateData keyword1 = new WechatTemplateData();

+ 2 - 1
patient-co-wlyy/src/main/java/com/yihu/wlyy/web/doctor/health/DoctorHealthEduArticleController.java

@ -307,7 +307,8 @@ public class DoctorHealthEduArticleController extends WeixinBaseController {
						// 推送消息给微信端
						JSONObject json = new JSONObject();
						json.put("first",msgHead);
						json.put("article",temp.getId()+"");
						json.put("toUser",p);
						json.put("article",temp.getCode()+"");
						json.put("title",temp.getTitle());
						json.put("doctorName",doctor.getName());
						json.put("date", DateUtil.dateToStrLong(DateUtil.getNowDate()));

+ 7 - 2
patient-co-wlyy/src/main/java/com/yihu/wlyy/web/patient/health/HealthEduArticleController.java

@ -27,6 +27,7 @@ import com.yihu.wlyy.util.DateUtil;
import com.yihu.wlyy.web.BaseController;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
/**
@ -110,12 +111,16 @@ public class HealthEduArticleController extends BaseController {
	 */
	@RequestMapping(value = "article")
	@ResponseBody
	public String article(@RequestParam(value = "article",required = true) long id) {
	public String article(@RequestParam(value = "article",required = true) String article) {
		try {
			//获取单条文章记录
			HealthEduArticlePatient healthEduArticlePatient = healthEduArticlePatientService.findById(id);
			List<HealthEduArticlePatient> healthEduArticlePatients = healthEduArticlePatientService.findByArticleAndPatient(article,getUID());
			if(healthEduArticlePatients==null||healthEduArticlePatients.size()==0){
				return error(-2,"对不起,该消息不是您的消息,您无法查看哦~");
			}
			int isRead  = healthEduArticleOpHistoryService.countByUserStatus(getUID(),HealthEduArticleOpHistory.READ_STATUS);
			//插入文章读取状态第一次阅读记录浏览数量//暂时更新每次都算一次浏览量
			HealthEduArticlePatient healthEduArticlePatient = healthEduArticlePatients.get(0);
			healthEduArticleOpHistoryService.saveByStatus(HealthEduArticleOpHistory.READ_STATUS,healthEduArticlePatient.getArticle(),healthEduArticlePatient.getTitle(),getUID());
			if(isRead==0){
				//将文章更新为已读