| package com.fzzy.async.fzzy30.repository; | 
|   | 
| import com.fzzy.async.fzzy30.entity.Pest; | 
| import org.springframework.data.jpa.repository.JpaRepository; | 
| import org.springframework.data.jpa.repository.Query; | 
| import org.springframework.data.repository.query.Param; | 
|   | 
| import java.util.Date; | 
| import java.util.List; | 
|   | 
| /** | 
|  * 查询虫害检测数据 | 
|  * | 
|  * @author chen | 
|  * @date 2022-09-08 09:51 | 
|  */ | 
| public interface FzzySync1303Rep extends JpaRepository<Pest, String> { | 
|   | 
|     /** | 
|      * 根据时间段查询粮情数据 | 
|      * @param start | 
|      * @param end | 
|      * @return | 
|      */ | 
|     @Query("from Pest where receiveDate >=:start and receiveDate <:end order by receiveDate ") | 
|     List<Pest> findByReceiveDate(@Param("start") Date start, @Param("end") Date end); | 
| } |