package com.yihu.wlyy.repository.education;

import com.yihu.wlyy.entity.education.FoodComp;
import com.yihu.wlyy.entity.education.HealthEduArticle;
import org.springframework.data.domain.Page;
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 FoodCompDao extends PagingAndSortingRepository<FoodComp, Long>, JpaSpecificationExecutor<FoodComp> {

	List<FoodComp> findByPid(Long pid);

	@Query("select a from FoodComp a where a.name like ?1")
	List<FoodComp> findByName(String name);

	FoodComp findById(Long id);



}
