|
@@ -22,13 +22,13 @@ public interface LandRepository extends JpaPlusRepository<Land, Long> {
|
|
|
|
|
|
@Query(value = "select count(1) from leizhou_land where St_within(geom,st_geomfromtext(?1,4326))",nativeQuery = true)
|
|
|
int findCountByWkt(String wkt);
|
|
|
- @Query(value = "select * from leizhou_land where St_within(geom,st_geomfromtext(?1,4326)) limit ?2",nativeQuery = true)
|
|
|
- List<Land> findListByWkt(String wkt,Integer limit);
|
|
|
+ @Query(value = "select * from leizhou_land where St_within(geom,st_geomfromtext(?1,4326)) limit ?2 OFFSET ?3",nativeQuery = true)
|
|
|
+ List<Land> findListByWkt(String wkt, Integer limit, Integer start);
|
|
|
|
|
|
@Query(value = "select count(1) from leizhou_land where St_within(geom,st_geomfromtext(?1,4326)) and crop_type = ?2",nativeQuery = true)
|
|
|
int findCountByWktAndCropType(String wkt, String cropType);
|
|
|
- @Query(value = "select * from leizhou_land where St_within(geom,st_geomfromtext(?1,4326)) and crop_type = ?2 limit ?3",nativeQuery = true)
|
|
|
- List<Land> findListByWktAndCropType(String wkt, String cropType, Integer limit);
|
|
|
+ @Query(value = "select * from leizhou_land where St_within(geom,st_geomfromtext(?1,4326)) and crop_type = ?2 limit ?3 OFFSET ?4",nativeQuery = true)
|
|
|
+ List<Land> findListByWktAndCropType(String wkt, String cropType, Integer limit, Integer start);
|
|
|
|
|
|
@Query(value = "select new Land(geom) from Land")
|
|
|
List<Land> findAllGeom();
|