|
|
|
@ -7,6 +7,7 @@ const infoDataMapper = (row) => {
|
|
|
|
|
const item = objectMapper(row, {
|
|
|
|
|
HotelId: 'hotel_id',
|
|
|
|
|
HotelName: 'hotel_name',
|
|
|
|
|
// LocaleName: 'hotel_name',
|
|
|
|
|
CountryCode: 'country_code',
|
|
|
|
|
CityId: 'city_id',
|
|
|
|
|
Address: 'address',
|
|
|
|
@ -20,6 +21,7 @@ const infoDataMapper = (row) => {
|
|
|
|
|
HeroImg: 'hero_img',
|
|
|
|
|
SupplierType: 'supplier_type',
|
|
|
|
|
});
|
|
|
|
|
item.hotel_name = isEmpty(item.hotel_name) ? row.LocaleName : item.hotel_name;
|
|
|
|
|
const review = objectMapper(row.Review, {
|
|
|
|
|
Score: 'review_score',
|
|
|
|
|
ReviewCount: 'review_count',
|
|
|
|
@ -213,7 +215,7 @@ const scoresMapper = (sourceName, hotelId, scores, lgcObj) => scores.map((item)
|
|
|
|
|
const resolveDetails = (res, lgcObj) => {
|
|
|
|
|
return res.reduce(
|
|
|
|
|
(rd, c) => {
|
|
|
|
|
if (isEmpty(c.HotelName)) {
|
|
|
|
|
if (isEmpty(c.HotelName) && isEmpty(c.LocaleName)) {
|
|
|
|
|
return rd;
|
|
|
|
|
}
|
|
|
|
|
rd.info.push(infoDataMapper(c));
|
|
|
|
|