|
|
@ -255,10 +255,10 @@ public class WeatherForecastController extends BaseController { |
|
|
|
if (jsonResult.getInteger("code") == UniversalEnum.TWO_HUNDRED.getNumber()) { |
|
|
|
JSONArray data = jsonResult.getJSONArray("data"); |
|
|
|
if (data.size() != UniversalEnum.ZERO.getNumber()) { |
|
|
|
redisCache.setCacheList("currentWeatherAndForecastInformation", data); |
|
|
|
redisCache.setCacheObject("currentWeatherAndForecastInformation", data); |
|
|
|
return AjaxResult.success(data); |
|
|
|
} else { |
|
|
|
return AjaxResult.success(redisCache.getCacheList("currentWeatherAndForecastInformation")); |
|
|
|
return AjaxResult.success(redisCache.getCacheObject("currentWeatherAndForecastInformation")); |
|
|
|
} |
|
|
|
} else { |
|
|
|
return AjaxResult.error(jsonResult.getInteger("code"), UniversalEnum.REQUEST_FAILED.getValue()); |
|
|
|