From 12e5320abfb179f803758865bfd078a9abd03c67 Mon Sep 17 00:00:00 2001 From: liuchengqian Date: Wed, 8 Jun 2022 11:15:11 +0800 Subject: [PATCH] =?UTF-8?q?=E5=88=A0=E9=99=A4=E6=97=A0=E7=94=A8=E4=BB=A3?= =?UTF-8?q?=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../xkrs/common/config/WebSecurityConfig.java | 2 -- .../xkrs/controller/FirePointController.java | 23 ------------------- src/main/java/com/xkrs/dao/FirePointDao.java | 22 ++---------------- 3 files changed, 2 insertions(+), 45 deletions(-) diff --git a/src/main/java/com/xkrs/common/config/WebSecurityConfig.java b/src/main/java/com/xkrs/common/config/WebSecurityConfig.java index 9ca8ab3..cce40ba 100644 --- a/src/main/java/com/xkrs/common/config/WebSecurityConfig.java +++ b/src/main/java/com/xkrs/common/config/WebSecurityConfig.java @@ -58,8 +58,6 @@ class WebSecurityConfig extends WebSecurityConfigurerAdapter { .antMatchers(HttpMethod.GET, "/api/user/verificationCode").permitAll() .antMatchers(HttpMethod.POST, "/uploadFileMore").permitAll() .antMatchers(HttpMethod.POST, "/uploadFile").permitAll() - .antMatchers(HttpMethod.POST, "/deleteShuiTi").permitAll() - .antMatchers(HttpMethod.GET, "/selectBeijing").permitAll() .antMatchers(HttpMethod.GET, "/api/user/verificationCodeUpdate").permitAll() .antMatchers(HttpMethod.GET, "/api/user/getVerificationCode").permitAll() .antMatchers(HttpMethod.POST, "/api/user/userUnRememberPassword").permitAll() diff --git a/src/main/java/com/xkrs/controller/FirePointController.java b/src/main/java/com/xkrs/controller/FirePointController.java index 33194ec..fd6c285 100644 --- a/src/main/java/com/xkrs/controller/FirePointController.java +++ b/src/main/java/com/xkrs/controller/FirePointController.java @@ -372,29 +372,6 @@ public class FirePointController { return outputEncapsulationObject(PromptMessageEnum.SUCCESS, byFireCode, locale); } - /** - * 删除水体类型的火点信息 - * - * @return - */ - @Transactional(rollbackOn = Exception.class) - @PostMapping("/deleteShuiTi") - public String deleteShuiTi() { - // 获取区域信息 - Locale locale = LocaleContextHolder.getLocale(); - List integers = firePointDao.selectId(); - firePointDao.deleteByIdIn(integers); - return outputEncapsulationObject(PromptMessageEnum.SUCCESS, "删除成功", locale); - } - - @GetMapping("/selectBeijing") - public String selectBeijing() { - // 获取区域信息 - Locale locale = LocaleContextHolder.getLocale(); - List firePointEntities = firePointDao.selectBeijing(); - return outputEncapsulationObject(PromptMessageEnum.SUCCESS, firePointEntities, locale); - } - /** * 根据火点编码添加火点前后的图片 * diff --git a/src/main/java/com/xkrs/dao/FirePointDao.java b/src/main/java/com/xkrs/dao/FirePointDao.java index f0181d8..ed710d3 100644 --- a/src/main/java/com/xkrs/dao/FirePointDao.java +++ b/src/main/java/com/xkrs/dao/FirePointDao.java @@ -39,33 +39,15 @@ public interface FirePointDao extends JpaRepository, JpaS /** * 查询时间段内各植被类型的火点数量 */ - @Query(value = "select la.land_name landname,count(fp.id) as num from land la left join fire_point fp on fp.land_type = la.land_name AND fp.add_time BETWEEN ?1 AND ?2 group by la.land_name", nativeQuery = true) + @Query(value = "select la.land_name landname,count(fp.id) as num from land la left join fire_point fp on fp.land_type = la.land_name AND fp.satellite_time BETWEEN ?1 AND ?2 group by la.land_name", nativeQuery = true) List> selectNumByLandType(String startTime, String endTime); /** * 查询时间段内各地区的火点数量 */ - @Query(value = "select ci.city_name cityname,count(fp.id) from city ci left join fire_point fp " + "on fp.county_code like concat('%',ci.city_code,'%') AND fp.add_time BETWEEN ?1 AND ?2 " + "group by ci.city_name", nativeQuery = true) + @Query(value = "select ci.city_name cityname,count(fp.id) from street ci left join fire_point fp on fp.county_code like concat('%',ci.city_code,'%') AND fp.satellite_time BETWEEN ?1 AND ?2 group by ci.city_name", nativeQuery = true) List> selectNumByArea(String startTime, String endTime); - /** - * 查询水体类型的id - */ - @Query(value = "select id from fire_point where land_type = '水体'", nativeQuery = true) - List selectId(); - - /** - * 批量删除水体 - */ - @Modifying(clearAutomatically = true) - void deleteByIdIn(List id); - - /** - * 查询北京的火点 - */ - @Query(value = "select * from fire_point fp where fp.fire_point_address like concat('%','北京市','%') and fp.add_time BETWEEN '2021-10-19' AND '2021-11-20'", nativeQuery = true) - List selectBeijing(); - /** * 根据火点编码,修改火点前后图片路径 */