|
|
@ -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); |
|
|
|