Browse Source

优化天气服务缓存

develop
zhaoxianglong 5 months ago
parent
commit
2a25e3651b
  1. 4
      zc-business/src/main/java/com/zc/business/controller/WeatherForecastController.java

4
zc-business/src/main/java/com/zc/business/controller/WeatherForecastController.java

@ -265,7 +265,7 @@ public class WeatherForecastController extends BaseController {
return AjaxResult.success(redisCache.getCacheObject("currentWeatherAndForecastInformation" + numStake));
}
} else {
return AjaxResult.error(jsonResult.getInteger("code"), UniversalEnum.REQUEST_FAILED.getValue());
return AjaxResult.success(redisCache.getCacheObject("currentWeatherAndForecastInformation" + numStake));
}
}
} catch (Exception ignored) {
@ -273,7 +273,7 @@ public class WeatherForecastController extends BaseController {
logger.error(String.valueOf(ignored));
}
return AjaxResult.error(UniversalEnum.REQUEST_FAILED.getValue());
return AjaxResult.success(redisCache.getCacheObject("currentWeatherAndForecastInformation" + numStake));
}
public static int findNearestMultipleOfFive(int number) {

Loading…
Cancel
Save