scott 6 years ago
parent
commit
97411904e6

+ 5 - 1
hotels_api/src/main/java/com/tripto/api/supplier/cnbooking/service/CNBookingStaticInforImpl.java

@@ -26,6 +26,7 @@ import com.tripto.supplier.service.entity.DistrictEntity;
 import com.tripto.supplier.service.entity.HoltelEnty;
 import com.tripto.supplier.service.entity.RoomEntity;
 import com.tripto.supplier.service.entity.RoomTypeEntity;
+import com.tripto.util.LocationUtils;
 
 /**
  * 龙腾捷旅ServiceImpl
@@ -72,7 +73,7 @@ public class CNBookingStaticInforImpl implements CNBookingStaticInforApi {
 									districtEntity.setProvinceName(province.attributeValue("ProvinceName"));
 									districtEntity.setCityId(city.attributeValue("CityId"));
 									districtEntity.setCityName(city.attributeValue("CityName"));
-									districtEntity.setDistrictId(Long.valueOf(location.attributeValue("LocationId")));
+									districtEntity.setDistrictId(location.attributeValue("LocationId"));
 									districtEntity.setDistrictName(location.attributeValue("LocationName"));
 								}
 							} else {
@@ -241,6 +242,9 @@ public class CNBookingStaticInforImpl implements CNBookingStaticInforApi {
 			holtelEnty.setStar(hotel.elementTextTrim("Star"));
 			holtelEnty.setGoogleLon(hotel.elementTextTrim("Lon"));
 			holtelEnty.setGoogleLat(hotel.elementTextTrim("Lat"));
+			long[] xy = LocationUtils.Cutting(Double.valueOf(hotel.elementTextTrim("Lon")), Double.valueOf(hotel.elementTextTrim("Lat")), 500);
+			holtelEnty.setPointx(xy[0]);
+			holtelEnty.setPointy(xy[1]);
 			holtelEnty.setIntro(hotel.elementTextTrim("Intro"));
 			holtelEnty.setAllowWebSale(hotel.elementTextTrim("AllowWebSale"));
 			holtelEnty.setGuide(hotel.elementTextTrim("Guide"));