|
@ -1,6 +1,7 @@
|
|
|
package com.yihu.wlyy.web.patient.health;
|
|
|
|
|
|
import com.yihu.wlyy.entity.doctor.profile.Doctor;
|
|
|
import com.yihu.wlyy.entity.education.HealthEduArticle;
|
|
|
import com.yihu.wlyy.entity.education.HealthEduArticleOpHistory;
|
|
|
import com.yihu.wlyy.service.app.health.HealthEduArticleOpHistoryService;
|
|
|
import com.yihu.wlyy.service.app.health.HealthEduArticlePatientService;
|
|
@ -45,6 +46,9 @@ public class HealthEduArticleController extends BaseController {
|
|
|
|
|
|
@Autowired
|
|
|
private HealthEduArticleOpHistoryService healthEduArticleOpHistoryService;
|
|
|
|
|
|
@Autowired
|
|
|
private HealthEduArticleService healthEduArticleService;
|
|
|
@Autowired
|
|
|
private DoctorService doctorService;
|
|
|
|
|
@ -127,18 +131,20 @@ public class HealthEduArticleController extends BaseController {
|
|
|
//将文章更新为已读
|
|
|
healthEduArticlePatientService.updateRead(getUID(), healthEduArticlePatient.getArticle());
|
|
|
}
|
|
|
HealthEduArticle healthEduArticle = healthEduArticleService.findArticleByCode(healthEduArticlePatient.getArticle());
|
|
|
|
|
|
JSONObject json = new JSONObject();
|
|
|
json.put("id", healthEduArticlePatient.getId());
|
|
|
json.put("id", healthEduArticle.getId());
|
|
|
// 文章标识
|
|
|
json.put("article", healthEduArticlePatient.getArticle());
|
|
|
// 医生姓名
|
|
|
json.put("doctorName", healthEduArticlePatient.getDoctorName());
|
|
|
// 文章标题
|
|
|
json.put("title", healthEduArticlePatient.getTitle());
|
|
|
json.put("title", healthEduArticle.getTitle());
|
|
|
// 文章内容
|
|
|
json.put("content", healthEduArticlePatient.getContent());
|
|
|
json.put("content", healthEduArticle.getContent());
|
|
|
|
|
|
json.put("url", healthEduArticlePatient.getUrl());
|
|
|
json.put("url", healthEduArticle.getUrl());
|
|
|
// 添加日期
|
|
|
json.put("czrq", DateUtil.dateToStrLong(healthEduArticlePatient.getCzrq()));
|
|
|
int readAmount = healthEduArticleOpHistoryService.countReadAmount(healthEduArticlePatient.getArticle());
|