package com.yihu.wlyy.repository.education;

import com.yihu.wlyy.entity.education.HealthEduArticleDoctor;
import com.yihu.wlyy.entity.education.HealthEduArticleLabel;
import org.springframework.data.domain.Pageable;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.PagingAndSortingRepository;

import java.util.List;

public interface HealthEduArticleLabelDao extends PagingAndSortingRepository<HealthEduArticleLabel, Long>, JpaSpecificationExecutor<HealthEduArticleLabel> {

	HealthEduArticleLabel findByKeywordAndCreater(String keyword, String creater);

	@Query("select b from HealthEduArticleLabel b where b.keyword=?1 and b.creater ='public'")
	HealthEduArticleLabel findByPublicKeyword(String keyword);
}
