版权声明:版权声明:本文为博主原创文章,转载请注明出处。 https://blog.csdn.net/lililuni/article/details/83069940
@Query(value="select h from HourdbEntity h where h.senid=?1 and h.time between ?2 and ?3")
List<HourdbEntity> findBySenidAndTimeBetween(double id,Date startTime,Date endTime);
注意:
HourdbEntity 为对象数据库表的实体类名称
select 后面不能跟 *
senid time 分别为实体类的属性
?1 ?2 ?3要与方法中的参数对应