国外区域、天气api获取
This commit is contained in:
@ -310,9 +310,9 @@ public class StationServiceImpl implements StationService {
|
||||
* @param station
|
||||
*/
|
||||
private void updateStationInfo(Station station) {
|
||||
MyAddress address = AddressUntils.getAddress(String.valueOf(station.getLatitude()),String.valueOf(station.getLongitude()));
|
||||
MyAddress address = AbroadAddressUtils.getAddress(String.valueOf(station.getLatitude()),String.valueOf(station.getLongitude()));
|
||||
if (null != address) {
|
||||
String adCode = address.getAdcode();
|
||||
String adCode = address.getCityCode();
|
||||
station.setAdCode(adCode);
|
||||
station.setDistrict(address.getDistrict());
|
||||
station.setCity(address.getCity());
|
||||
@ -320,7 +320,7 @@ public class StationServiceImpl implements StationService {
|
||||
station.setNation(address.getNation());
|
||||
String key = RedisKeyConstant.WEATHER_PROVINCE_CITY + adCode;
|
||||
if (!redisService.hasKey(key)) {
|
||||
WeatherRespVo weatherRespVo = WeatherUntils.getWeatherRespVo(station.getAdCode());
|
||||
WeatherRespVo weatherRespVo = AbroadWeatherUtils.getWeatherRespVo(String.valueOf(station.getLatitude()),String.valueOf(station.getLongitude()));
|
||||
if (weatherRespVo != null) {
|
||||
weatherRespVo.setUpdateTime(System.currentTimeMillis());
|
||||
redisService.set(key, weatherRespVo);
|
||||
|
||||
Reference in New Issue
Block a user