From 103bdb901cb533cb22f922d3797a729f7ec04631 Mon Sep 17 00:00:00 2001 From: liuchengqian Date: Thu, 2 Mar 2023 11:54:13 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../xkrs/common/config/WebSecurityConfig.java | 1 - .../com/xkrs/service/FirePointService.java | 7 ------- .../service/impl/FirePointServiceImpl.java | 18 ------------------ .../straw/controller/FirePointController.java | 12 ------------ 4 files changed, 38 deletions(-) diff --git a/src/main/java/com/xkrs/common/config/WebSecurityConfig.java b/src/main/java/com/xkrs/common/config/WebSecurityConfig.java index cc4d0f6..94b5577 100644 --- a/src/main/java/com/xkrs/common/config/WebSecurityConfig.java +++ b/src/main/java/com/xkrs/common/config/WebSecurityConfig.java @@ -54,7 +54,6 @@ class WebSecurityConfig extends WebSecurityConfigurerAdapter { .antMatchers(HttpMethod.POST, "/insertFirePoint").permitAll() .antMatchers(HttpMethod.POST, "/insertAppTask").permitAll() .antMatchers(HttpMethod.GET, "/selectAppTask").permitAll() - .antMatchers(HttpMethod.GET, "/selectFirePointBetweenSeven").permitAll() .antMatchers(HttpMethod.GET, "/selectFirePointNum").permitAll() .antMatchers(HttpMethod.GET, "/selectCityName").permitAll() .antMatchers(HttpMethod.GET, "/weather/cityName").permitAll() diff --git a/src/main/java/com/xkrs/service/FirePointService.java b/src/main/java/com/xkrs/service/FirePointService.java index 163e500..cb28011 100644 --- a/src/main/java/com/xkrs/service/FirePointService.java +++ b/src/main/java/com/xkrs/service/FirePointService.java @@ -28,13 +28,6 @@ public interface FirePointService { */ List selectTodayFirePoint(String countyCode); - /** - * 查询近一周天的火点信息 - * - * @return - */ - List selectFirePointBetweenSeven(); - /** * 查询近一个月的火点信息 * diff --git a/src/main/java/com/xkrs/service/impl/FirePointServiceImpl.java b/src/main/java/com/xkrs/service/impl/FirePointServiceImpl.java index 8ea5edd..c5d3e95 100644 --- a/src/main/java/com/xkrs/service/impl/FirePointServiceImpl.java +++ b/src/main/java/com/xkrs/service/impl/FirePointServiceImpl.java @@ -306,24 +306,6 @@ public class FirePointServiceImpl implements FirePointService { return firePointQueryHelper.queryFirePoint(countyCode, startTimeString, endTimeString, null, null); } - /** - * 查询近一周的火点信息 - */ -// @Cacheable(keyGenerator = "keyGenerator", unless = "#result == null") - @Override - public List selectFirePointBetweenSeven() { - - LocalDateTime startTime1 = LocalDateTime.now().minusDays(7); - LocalDateTime startTime2 = LocalDateTime.of(startTime1.getYear(), startTime1.getMonth(), startTime1.getDayOfMonth(), 0, 0, 0, 0); - String startTimeString = DateTimeUtils.localDateTimeToString(startTime2); - - LocalDateTime endTime1 = LocalDateTime.now().plusDays(1); - LocalDateTime endTime2 = LocalDateTime.of(endTime1.getYear(), endTime1.getMonth(), endTime1.getDayOfMonth(), 0, 0, 0, 0); - String endTimeString = DateTimeUtils.localDateTimeToString(endTime2); - - return firePointQueryHelper.queryFirePoint(null, startTimeString, endTimeString, null, null); - } - /** * 查询近一个月的火点信息 */ diff --git a/src/main/java/com/xkrs/straw/controller/FirePointController.java b/src/main/java/com/xkrs/straw/controller/FirePointController.java index 38dc793..0c98944 100644 --- a/src/main/java/com/xkrs/straw/controller/FirePointController.java +++ b/src/main/java/com/xkrs/straw/controller/FirePointController.java @@ -150,18 +150,6 @@ public class FirePointController { return outputEncapsulationObject(PromptMessageEnum.SUCCESS, firePointList, locale); } - /** - * 查询近一周的火点信息 - */ - @GetMapping("/selectFirePointBetweenSeven") - public String selectFirePointBetweenSeven() { - List firePointEntities = firePointService.selectFirePointBetweenSeven(); - if (firePointEntities == null || firePointEntities.size() == 0) { - return outputEncapsulationObject(PromptMessageEnum.DATA_NONE, "暂时没有火点数据", locale); - } - return outputEncapsulationObject(PromptMessageEnum.SUCCESS, firePointEntities, locale); - } - /** * 查询近一个月的火点信息 */