perf: 同步信息没有酒店名字

main
Lei OT 10 months ago
parent 21ef6e9fef
commit af142a0809

@ -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));

Loading…
Cancel
Save