|
@ -65,15 +65,15 @@ public class HealthEduArticleController extends BaseController {
|
|
|
json.put("read", article.getRead());
|
|
|
// 添加日期
|
|
|
json.put("czrq", DateUtil.dateToStrLong(article.getCzrq()));
|
|
|
int collectionAmount = healthEduArticleOpHistoryService.countCollectionAmount(article.getArticle());
|
|
|
int readAmount = healthEduArticleOpHistoryService.countReadAmount(article.getArticle());
|
|
|
int repeatAmount = healthEduArticleOpHistoryService.countRepeatAmount(article.getArticle());
|
|
|
//阅读量
|
|
|
json.put("readAmount", readAmount);
|
|
|
//收藏量
|
|
|
json.put("collectionAmount", collectionAmount);
|
|
|
//转发量
|
|
|
json.put("repeatAmount", repeatAmount);
|
|
|
//int collectionAmount = healthEduArticleOpHistoryService.countCollectionAmount(article.getArticle());
|
|
|
//int readAmount = healthEduArticleOpHistoryService.countReadAmount(article.getArticle());
|
|
|
//int repeatAmount = healthEduArticleOpHistoryService.countRepeatAmount(article.getArticle());
|
|
|
////阅读量
|
|
|
//json.put("readAmount", readAmount);
|
|
|
////收藏量
|
|
|
//json.put("collectionAmount", collectionAmount);
|
|
|
////转发量
|
|
|
//json.put("repeatAmount", repeatAmount);
|
|
|
jsonArray.put(json);
|
|
|
}
|
|
|
}
|
|
@ -102,7 +102,21 @@ public class HealthEduArticleController extends BaseController {
|
|
|
//将文章更新为已读
|
|
|
healthEduArticlePatientService.updateRead(getUID(), article);
|
|
|
}
|
|
|
return write(200, "查询成功", "data", healthEduArticlePatient);
|
|
|
JSONObject json = new JSONObject();
|
|
|
json.put("id", healthEduArticlePatient.getId());
|
|
|
// 文章标识
|
|
|
json.put("article", healthEduArticlePatient.getArticle());
|
|
|
// 医生姓名
|
|
|
json.put("doctorName", healthEduArticlePatient.getDoctorName());
|
|
|
// 文章标题
|
|
|
json.put("title", healthEduArticlePatient.getTitle());
|
|
|
// 文章内容
|
|
|
json.put("content", healthEduArticlePatient.getContent());
|
|
|
// 添加日期
|
|
|
json.put("czrq", DateUtil.dateToStrLong(healthEduArticlePatient.getCzrq()));
|
|
|
int readAmount = healthEduArticleOpHistoryService.countReadAmount(article);
|
|
|
json.put("readAmount",readAmount);
|
|
|
return write(200, "查询成功", "data", json);
|
|
|
} catch (Exception ex) {
|
|
|
error(ex);
|
|
|
return invalidUserException(ex, -1, "查询失败!");
|