From 3bf5b889a12347d3e129d8e7f716294b43d71eec Mon Sep 17 00:00:00 2001 From: liuchengqian Date: Fri, 10 Mar 2023 16:27:40 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=20=E6=97=A0=E7=94=A8?= =?UTF-8?q?=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/xkrs/controller/DispatchFirePointController.java | 3 ++- src/main/java/com/xkrs/dao/FirePointOrdinaryDao.java | 6 ++++++ 2 files changed, 8 insertions(+), 1 deletion(-) 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(); }