|
@@ -7,16 +7,16 @@ import java.util.List;
|
|
|
|
|
|
public interface LandRepository extends JpaPlusRepository<Land, Long> {
|
|
|
|
|
|
- @Query(value = "select crop_type,sum(area) from leizhou_land group by crop_type",nativeQuery = true)
|
|
|
+ @Query(value = "select crop_type,sum(area),count(id) from leizhou_land group by crop_type",nativeQuery = true)
|
|
|
List<Object[]> statCropTypeAll();
|
|
|
|
|
|
- @Query(value = "select crop_type,sum(area) from leizhou_land where St_within(geom,st_geomfromtext(?1,4326)) group by crop_type",nativeQuery = true)
|
|
|
+ @Query(value = "select crop_type,sum(area),count(id) from leizhou_land where St_within(geom,st_geomfromtext(?1,4326)) group by crop_type",nativeQuery = true)
|
|
|
List<Object[]> statCropType(String wkt);
|
|
|
|
|
|
- @Query(value = "select parcel_type,sum(area) from leizhou_land group by parcel_type",nativeQuery = true)
|
|
|
+ @Query(value = "select parcel_type,sum(area),count(id) from leizhou_land group by parcel_type",nativeQuery = true)
|
|
|
List<Object[]> statParcelTypeAll();
|
|
|
|
|
|
- @Query(value = "select parcel_type,sum(area) from leizhou_land where St_within(geom,st_geomfromtext(?1,4326)) group by parcel_type",nativeQuery = true)
|
|
|
+ @Query(value = "select parcel_type,sum(area),count(id) from leizhou_land where St_within(geom,st_geomfromtext(?1,4326)) group by parcel_type",nativeQuery = true)
|
|
|
List<Object[]> statParcelType(String wkt);
|
|
|
|
|
|
@Query(value = "select * from leizhou_land where St_within(geom,st_geomfromtext(?1,4326)) limit ?2",nativeQuery = true)
|