|  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | Map<String, Object> forecastMap = new HashMap<>(); | 
|---|
|  |  |  | for (Object obj : cityCodes) { | 
|---|
|  |  |  | Forecast forecast = new Forecast(); | 
|---|
|  |  |  | Integer cityCode = Integer.parseInt(obj.toString()); | 
|---|
|  |  |  |  | 
|---|
|  |  |  | forecast.setCityCode(cityCode); | 
|---|
|  |  |  |  | 
|---|
|  |  |  | //预测 | 
|---|
|  |  |  | List<CityWeatherForecast> cityWeatherForecasts = cityForecast.get(cityCode); | 
|---|
|  |  |  | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | for (CityWeatherForecast cityWeatherForecast : cityWeatherForecasts) { | 
|---|
|  |  |  | Forecast forecast = new Forecast(); | 
|---|
|  |  |  | forecast.setCityCode(cityCode); | 
|---|
|  |  |  | Date time = cityWeatherForecast.getTime(); | 
|---|
|  |  |  | Map<String, Object> value = JSONObject.parseObject(cityWeatherForecast.getValue(), Map.class); | 
|---|
|  |  |  | String weather = value.get("text").toString(); | 
|---|