diff --git a/src/main/java/com/xkrs/controller/DispatchFirePointController.java b/src/main/java/com/xkrs/controller/DispatchFirePointController.java index 0f049a8..33573db 100644 --- a/src/main/java/com/xkrs/controller/DispatchFirePointController.java +++ b/src/main/java/com/xkrs/controller/DispatchFirePointController.java @@ -72,7 +72,8 @@ public class DispatchFirePointController { // } List> maps = streetDao.selectProCityPair(); - List firePointOrdinaryEntityList = firePointOrdinaryDao.findAll(); +// List firePointOrdinaryEntityList = firePointOrdinaryDao.findAll(); + List firePointOrdinaryEntityList = firePointOrdinaryDao.finghjhgfdhjk(); List errorList = new ArrayList<>(); for (FirePointOrdinaryEntity firePointOrdinaryEntity : firePointOrdinaryEntityList) { String countyCode = firePointOrdinaryEntity.getCountyCode(); diff --git a/src/main/java/com/xkrs/dao/FirePointOrdinaryDao.java b/src/main/java/com/xkrs/dao/FirePointOrdinaryDao.java index 8b449d4..517c83a 100644 --- a/src/main/java/com/xkrs/dao/FirePointOrdinaryDao.java +++ b/src/main/java/com/xkrs/dao/FirePointOrdinaryDao.java @@ -3,8 +3,14 @@ package com.xkrs.dao; import com.xkrs.model.entity.FirePointOrdinaryEntity; import org.springframework.data.jpa.repository.JpaRepository; import org.springframework.data.jpa.repository.JpaSpecificationExecutor; +import org.springframework.data.jpa.repository.Query; import org.springframework.stereotype.Component; +import java.util.List; + @Component public interface FirePointOrdinaryDao extends JpaRepository, JpaSpecificationExecutor { + + @Query(value = "SELECT * FROM fire_point_ordinary ORDER BY satellite_time DESC LIMIT 10000", nativeQuery = true) + List finghjhgfdhjk(); }