| | |
| | | wrapper.select("city_code", "location_id").eq("is_delete", Constants.NOT_DELETE); |
| | | List<CityConfig> list = cityConfigService.list(wrapper); |
| | | for (CityConfig cityConfig : list) { |
| | | String cityCode = cityConfig.getCityCode(); |
| | | Integer cityCode = cityConfig.getCityCode(); |
| | | Integer locationId = cityConfig.getLocationId(); |
| | | Map<String, Object> data = restTemplate.getForObject("https://api.qweather.com/v7/weather/now?key=da05c6c4852d4f7aa3364a9236ee9e26&gzip=n&location={1}", Map.class, locationId); |
| | | Map<String, Object> now = (Map<String, Object>) data.get("now"); |