diff --git a/src/main/java/com/xkrs/service/impl/FirePointServiceImpl.java b/src/main/java/com/xkrs/service/impl/FirePointServiceImpl.java index d9070b0..f9a4bc3 100644 --- a/src/main/java/com/xkrs/service/impl/FirePointServiceImpl.java +++ b/src/main/java/com/xkrs/service/impl/FirePointServiceImpl.java @@ -474,7 +474,7 @@ public class FirePointServiceImpl implements FirePointService { /** * 查询今天的火点信息 */ - @Cacheable(keyGenerator = "keyGenerator", unless = "#result == null") +// @Cacheable(keyGenerator = "keyGenerator", unless = "#result == null") @Override public List selectTodayFirePoint(String countyCode) { @@ -492,7 +492,7 @@ public class FirePointServiceImpl implements FirePointService { /** * 查询近一周的火点信息 */ - @Cacheable(keyGenerator = "keyGenerator", unless = "#result == null") +// @Cacheable(keyGenerator = "keyGenerator", unless = "#result == null") @Override public List selectFirePointBetweenSeven() { @@ -510,19 +510,21 @@ public class FirePointServiceImpl implements FirePointService { /** * 查询近一个月的火点信息 */ - @Cacheable(keyGenerator = "keyGenerator", unless = "#result == null") +// @Cacheable(keyGenerator = "keyGenerator", unless = "#result == null") @Override public List selectFirePointByMonth(String countyCode) { - LocalDateTime startTime1 = LocalDateTime.now().minusMonths(1); - 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(countyCode, startTimeString, endTimeString, null, null); +// LocalDateTime startTime1 = LocalDateTime.now().minusMonths(1); +// 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(countyCode, startTimeString, endTimeString, null, null); + List firePointEntities = firePointQueryHelper.queryFirePoint(countyCode, null, null, null, null); + return firePointEntities; } /** @@ -643,7 +645,7 @@ public class FirePointServiceImpl implements FirePointService { * * @return */ - @Cacheable(keyGenerator = "keyGenerator", unless = "#result == null") +// @Cacheable(keyGenerator = "keyGenerator", unless = "#result == null") @Override public String selectFirePointNumMonth() { Map map = new HashMap(3); @@ -668,7 +670,7 @@ public class FirePointServiceImpl implements FirePointService { * * @return */ - @Cacheable(keyGenerator = "keyGenerator", unless = "#result == null") +// @Cacheable(keyGenerator = "keyGenerator", unless = "#result == null") @Override public String selectFirePointNumDay() { Map map = new HashMap(3); @@ -693,7 +695,7 @@ public class FirePointServiceImpl implements FirePointService { * * @return */ - @Cacheable(keyGenerator = "keyGenerator", unless = "#result == null") +// @Cacheable(keyGenerator = "keyGenerator", unless = "#result == null") @Override public String selectFirePointNumWeek() { Map map = new HashMap(3); diff --git a/src/main/java/com/xkrs/utils/FirePointQueryHelper.java b/src/main/java/com/xkrs/utils/FirePointQueryHelper.java index 62fa3a1..5126daa 100644 --- a/src/main/java/com/xkrs/utils/FirePointQueryHelper.java +++ b/src/main/java/com/xkrs/utils/FirePointQueryHelper.java @@ -41,7 +41,7 @@ public class FirePointQueryHelper { LocalDateTime lastMonth1 = LocalDateTime.now().minusDays(30); LocalDateTime lastMonth2 = LocalDateTime.of(lastMonth1.getYear(), lastMonth1.getMonth(), lastMonth1.getDayOfMonth(), 0, 0, 0, 0); String lastMonthString = DateTimeUtils.localDateTimeToString(lastMonth2); - predicateList.add(criteriaBuilder.greaterThanOrEqualTo(root.get("satelliteTime").as(String.class), lastMonthString)); +// predicateList.add(criteriaBuilder.greaterThanOrEqualTo(root.get("satelliteTime").as(String.class), lastMonthString)); //开始时间查询条件 if (!TextUtils.isEmpty(startTime)) { LocalDateTime startTime1 = DateTimeUtils.stringToLocalDateTime(startTime);