|  | @ -7,6 +7,7 @@ import com.yihu.wlyy.entity.education.HealthEduArticlePatient;
 | 
	
		
			
				|  |  | import com.yihu.wlyy.repository.education.HealthEduArticleDoctorDao;
 | 
	
		
			
				|  |  | import com.yihu.wlyy.repository.education.HealthEduArticleLabelDao;
 | 
	
		
			
				|  |  | import com.yihu.wlyy.service.BaseService;
 | 
	
		
			
				|  |  | import com.yihu.wlyy.util.DateUtil;
 | 
	
		
			
				|  |  | import org.apache.commons.lang3.StringUtils;
 | 
	
		
			
				|  |  | import org.springframework.beans.factory.annotation.Autowired;
 | 
	
		
			
				|  |  | import org.springframework.data.domain.Page;
 | 
	
	
		
			
				|  | @ -49,10 +50,12 @@ public class HealthEduArticleLabelService extends BaseService {
 | 
	
		
			
				|  |  | 			 publicLabel.setAmount(1);
 | 
	
		
			
				|  |  | 			 publicLabel.setCreater("public");
 | 
	
		
			
				|  |  | 			 publicLabel.setKeyword(keyword);
 | 
	
		
			
				|  |  | 			 publicLabel.setCzrq(DateUtil.getNow());
 | 
	
		
			
				|  |  | 			 this.healthEduArticleLabelDao.save(publicLabel);
 | 
	
		
			
				|  |  | 		 }else{//存在更新次数
 | 
	
		
			
				|  |  | 			 int amount = healthEduArticleLabel.getAmount();
 | 
	
		
			
				|  |  | 			 healthEduArticleLabel.setAmount(amount+1);
 | 
	
		
			
				|  |  | 			 healthEduArticleLabel.setCzrq(DateUtil.getNow());
 | 
	
		
			
				|  |  | 			 this.healthEduArticleLabelDao.save(healthEduArticleLabel);
 | 
	
		
			
				|  |  | 		 }
 | 
	
		
			
				|  |  | 		HealthEduArticleLabel userLabel =  healthEduArticleLabelDao.findByKeywordAndCreater(keyword, user);
 | 
	
	
		
			
				|  | @ -61,10 +64,12 @@ public class HealthEduArticleLabelService extends BaseService {
 | 
	
		
			
				|  |  | 			userLabel.setAmount(1);
 | 
	
		
			
				|  |  | 			userLabel.setCreater(user);
 | 
	
		
			
				|  |  | 			userLabel.setKeyword(keyword);
 | 
	
		
			
				|  |  | 			userLabel.setCzrq(DateUtil.getNow());
 | 
	
		
			
				|  |  | 			this.healthEduArticleLabelDao.save(userLabel);
 | 
	
		
			
				|  |  | 		}else{//存在更新次数
 | 
	
		
			
				|  |  | 			int amount = userLabel.getAmount();
 | 
	
		
			
				|  |  | 			userLabel.setAmount(amount+1);
 | 
	
		
			
				|  |  | 			userLabel.setCzrq(DateUtil.getNow());
 | 
	
		
			
				|  |  | 			this.healthEduArticleLabelDao.save(userLabel);
 | 
	
		
			
				|  |  | 		}
 | 
	
		
			
				|  |  | 	}
 | 
	
	
		
			
				|  | @ -83,7 +88,7 @@ public class HealthEduArticleLabelService extends BaseService {
 | 
	
		
			
				|  |  | 			page = 0;
 | 
	
		
			
				|  |  | 		}
 | 
	
		
			
				|  |  | 		// 排序
 | 
	
		
			
				|  |  | 		Sort sort = new Sort(Direction.DESC, "amount");
 | 
	
		
			
				|  |  | 		Sort sort = new Sort(Direction.DESC,"amount","cjrq");
 | 
	
		
			
				|  |  | 		// 分页信息
 | 
	
		
			
				|  |  | 		PageRequest pageRequest = new PageRequest(page, pagesize, sort);
 | 
	
		
			
				|  |  | 		// 设置查询条件
 |