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(); - /** * 根据火点编码,修改火点前后图片路径 */