liujie
2026-06-09 c96fbe6b0aeb413a17c429133ee6d81d138144b9
xp-robotaxi-map-boot/src/main/java/com/xiaopeng/map/controller/XpMapController.java
@@ -13,6 +13,7 @@
import com.xiaopeng.api.vo.operation.RouteVo;
import com.xiaopeng.common.core.domain.R;
import com.xiaopeng.common.redis.service.RedisService;
import com.xiaopeng.map.config.MapApiProperties;
import com.xiaopeng.map.mangodb.model.GeoPoint;
import com.xiaopeng.map.mangodb.service.XpGeoFencingPolygonService;
import com.xiaopeng.map.service.XpElectronicFenceAreaService;
@@ -30,7 +31,6 @@
import org.apache.http.util.EntityUtils;
import org.bson.Document;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.data.geo.Point;
import org.springframework.data.mongodb.core.MongoTemplate;
import org.springframework.data.mongodb.core.geo.GeoJsonPolygon;
@@ -272,21 +272,18 @@
    @Value("${map.urls.weather:https://restapi.amap.com/v3/weather/weatherInfo?key=%s&city=%s}")
    String WEATHER_URL;
    @Autowired
    ObjectMapper om;
    @Value("${map.apikey:66ae577f63898dae3016d599fda57221}")
    String key;
    @Autowired
    private MapApiProperties mapApiProperties;
    @ApiOperation(value = "获取天气信息", tags = {"内部-调价"})
    @PostMapping("/logan/inner/weatherInfo")
    public R<WeatherDTO> wether(@RequestParam("cityCode") String cityCode) {
        try{
            CloseableHttpClient httpClient = HttpClients.createDefault();
            HttpGet httpGet = new HttpGet(String.format(WEATHER_URL, key, cityCode));
            HttpGet httpGet = new HttpGet(String.format(mapApiProperties.getUrls().getWeather(), mapApiProperties.getApiKey(), cityCode));
            CloseableHttpResponse response = httpClient.execute(httpGet);
            HttpEntity entity = response.getEntity();
            if (entity != null) {