Переглянути джерело

医生端健康教育需求完善

8 роки тому
батько
коміт
6af67eb2b1

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

@ -152,7 +152,7 @@ public class DoctorHealthEduArticleController extends BaseController {
				int collectionAmount =  healthEduArticleOpHistoryService.countCollectionAmount(healthEduArticle.getCode());
				int readAmount = healthEduArticleOpHistoryService.countReadAmount(healthEduArticle.getCode());
				int repeatAmount = healthEduArticleOpHistoryService.countRepeatAmount(healthEduArticle.getCode());
				HealthEduArticleDoctor healthEduArticleDoctor = healthEduArticleDoctorService.findByArticle(healthEduArticle.getCode(), getUID());
				//HealthEduArticleDoctor healthEduArticleDoctor = healthEduArticleDoctorService.findByArticle(healthEduArticle.getCode(), getUID());
				if(StringUtils.isNotBlank(patient)){
					List<HealthEduArticlePatient> healthEduArticlePatients = healthEduArticlePatientService.findByArticleAndPatient(healthEduArticle.getCode(),patient);
					if(healthEduArticlePatients!=null&&healthEduArticlePatients.size()>0){
@ -169,12 +169,13 @@ public class DoctorHealthEduArticleController extends BaseController {
				json.put("collectionAmount", collectionAmount);
				//转发量
				json.put("repeatAmount", repeatAmount);
				//是否收藏
				if(healthEduArticleDoctor!=null){
					json.put("collection",1);
				}else{
					json.put("collection",0);
				}
				//是否收藏(医生收藏的列表肯定是收藏的无需额外校验)
				json.put("collection",1);
				//if(healthEduArticleDoctor!=null){
				//	json.put("collection",1);
				//}else{
				//	json.put("collection",0);
				//}
				jsonArray.put(json);
			}
			return write(200, "查询成功", "list", jsonArray);