package com.yihu.jw.base.dao.article;

import com.yihu.jw.entity.hospital.article.KnowledgeArticleUserDO;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.PagingAndSortingRepository;

/**
 * 健康文章中间库DAO
 * @author
 * @date 2019/9/10 14:07
 */
public interface KnowledgeArticleUserDao extends PagingAndSortingRepository<KnowledgeArticleUserDO, String>, JpaSpecificationExecutor<KnowledgeArticleUserDO> {
	@Query("select a from KnowledgeArticleUserDO a where a.del=1 and a.relationCode=?1 and a.user=?2")
	KnowledgeArticleUserDO findByrelationCodeAndUserAndDel(String relationCode, String user);
}
