diff --git a/zc-business/src/main/java/com/zc/business/controller/DeviceStatus.java b/zc-business/src/main/java/com/zc/business/controller/DeviceStatus.java index 48596918..2d3b050c 100644 --- a/zc-business/src/main/java/com/zc/business/controller/DeviceStatus.java +++ b/zc-business/src/main/java/com/zc/business/controller/DeviceStatus.java @@ -100,8 +100,7 @@ public class DeviceStatus { executor.shutdown(); } - @Scheduled(cron = "0 30 23 * * ?") - //@Scheduled(cron = "0 30 * * * ?") + //@Scheduled(cron = "0 30 23 * * ?") public void periodicDataClearing() { StatusService statusService = SpringUtils.getBean(StatusService.class); LocalDateTime startTime = LocalDateTime.now().minusMonths(UniversalEnum.THREE.getNumber()); diff --git a/zc-business/src/main/java/com/zc/business/controller/WeatherForecastController.java b/zc-business/src/main/java/com/zc/business/controller/WeatherForecastController.java index ad47570d..d1e14635 100644 --- a/zc-business/src/main/java/com/zc/business/controller/WeatherForecastController.java +++ b/zc-business/src/main/java/com/zc/business/controller/WeatherForecastController.java @@ -265,13 +265,13 @@ public class WeatherForecastController extends BaseController { String visLevel = jsonObject.getString("visLevel"); - if (Objects.equals(visLevel, UniversalEnum.ONE.getValue()) || Objects.equals(visLevel, UniversalEnum.TWO.getValue())) { + if (Objects.equals(visLevel, UniversalEnum.ONE.getValue())) { jsonObject.put("weatherCondition", UniversalEnum.CLEAR_WEATHER.getValue()); jsonObject.put("weatherConditionCode", UniversalEnum.CLEAR_WEATHER.getNumber()); - } else if (Objects.equals(visLevel, UniversalEnum.THREE.getValue()) || Objects.equals(visLevel, UniversalEnum.FOUR.getValue())) { + } else if (Objects.equals(visLevel, UniversalEnum.TWO.getValue()) || Objects.equals(visLevel, UniversalEnum.THREE.getValue())) { jsonObject.put("weatherCondition", UniversalEnum.CLOUDY.getValue()); jsonObject.put("weatherConditionCode", UniversalEnum.CLOUDY.getNumber()); - } else if (Objects.equals(visLevel, UniversalEnum.FIVE.getValue()) || Objects.equals(visLevel, UniversalEnum.SIX.getValue())) { + } else if (Objects.equals(visLevel, UniversalEnum.FOUR.getValue()) || Objects.equals(visLevel, UniversalEnum.FIVE.getValue()) || Objects.equals(visLevel, UniversalEnum.SIX.getValue())) { jsonObject.put("weatherCondition", UniversalEnum.OVERCAST_SKY.getValue()); jsonObject.put("weatherConditionCode", UniversalEnum.OVERCAST_SKY.getNumber()); } @@ -397,8 +397,9 @@ public class WeatherForecastController extends BaseController { } } - jsonArray.add(i,jsonObject); - }; + jsonArray.add(i, jsonObject); + } + ; if (jsonArray.size() != UniversalEnum.ZERO.getNumber()) { redisCache.deleteObject(UniversalEnum.CURRENT_WEATHER_AND_FORECAST_INFORMATION_SINGLE_WORD.getValue() + numStake); redisCache.setCacheObject(UniversalEnum.CURRENT_WEATHER_AND_FORECAST_INFORMATION_SINGLE_WORD.getValue() + numStake, jsonArray);