Sfoglia il codice sorgente

健康教育相关后台业务添加

8 anni fa
parent
commit
99163c9656

+ 24 - 10
patient-co-wlyy/src/main/java/com/yihu/wlyy/web/patient/health/HealthEduArticleController.java

@ -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, "查询失败!");

+ 1 - 1
patient-co-wlyy/src/main/resources/applicationContext.xml

@ -109,7 +109,7 @@
	<bean id="quartzScheduler" class="org.springframework.scheduling.quartz.SchedulerFactoryBean" scope="singleton">
		<property name="dataSource" ref="dataSource"/>
		<property name="configLocation" value="classpath:/quartz.properties" />
		<property name="autoStartup" value="true"/>
		<property name="autoStartup" value="false"/>
	</bean>
	<bean id="poolConfig" class="redis.clients.jedis.JedisPoolConfig">