|
|
|
|
@ -11,7 +11,7 @@ public interface WeatherFutureRepository extends JpaRepository<WeatherFuture, In
|
|
|
|
|
//方法名称必须要遵循驼峰式命名规则,findBy(关键字)+属性名称(首字母大写)+查询条件(首字母大写)
|
|
|
|
|
Optional<WeatherFuture> findByDate(String date);
|
|
|
|
|
|
|
|
|
|
@Query(value = "select * from weather_future wf where wf.city = ?1 ORDER BY id DESC LIMIT 0,1", nativeQuery = true)
|
|
|
|
|
@Query(value = "select * from weather_future wf where wf.city = ?1 ORDER BY id DESC LIMIT 0,5", nativeQuery = true)
|
|
|
|
|
Optional<List<WeatherFuture>> findAllByCity(String city);
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|