fix: use correct join column
This commit is contained in:
@@ -1,7 +1,7 @@
|
|||||||
### GET product data for myep
|
### GET product data for myep
|
||||||
GET https://ep-reisen.ddev.site/api/product
|
GET https://ep-reisen.ddev.site/api/product
|
||||||
?product=SBW
|
?product=SSTMR
|
||||||
&hotel=SBWOU2
|
&hotel=SSTGR
|
||||||
&key=abcabc123
|
&key=abcabc123
|
||||||
|
|
||||||
###
|
###
|
||||||
|
|||||||
@@ -119,9 +119,10 @@ class ProductApiMiddleware implements MiddlewareInterface
|
|||||||
'hotel.features',
|
'hotel.features',
|
||||||
'hotel.room_types',
|
'hotel.room_types',
|
||||||
'hotel.additional_information',
|
'hotel.additional_information',
|
||||||
|
'hotel.address',
|
||||||
)
|
)
|
||||||
->from('tx_epproducts_domain_model_hotel', 'hotel')
|
->from('tx_epproducts_domain_model_hotel', 'hotel')
|
||||||
->leftJoin('hotel', 'tx_epproducts_domain_model_matchcode', 'alias', 'hotel.uid = alias.uid AND alias.entity_type="hotel"')
|
->leftJoin('hotel', 'tx_epproducts_domain_model_matchcode', 'alias', 'hotel.uid = alias.entity AND alias.entity_type="hotel"')
|
||||||
->where(
|
->where(
|
||||||
$queryBuilder->expr()->orX(
|
$queryBuilder->expr()->orX(
|
||||||
$queryBuilder->expr()->eq('hotel.code', $queryBuilder->createNamedParameter($hotelCode)),
|
$queryBuilder->expr()->eq('hotel.code', $queryBuilder->createNamedParameter($hotelCode)),
|
||||||
@@ -147,6 +148,7 @@ class ProductApiMiddleware implements MiddlewareInterface
|
|||||||
'features' => $hotel['features'],
|
'features' => $hotel['features'],
|
||||||
'roomTypes' => $hotel['room_types'],
|
'roomTypes' => $hotel['room_types'],
|
||||||
'additionalInformation' => $hotel['additional_information'],
|
'additionalInformation' => $hotel['additional_information'],
|
||||||
|
'address' => $hotel['address'],
|
||||||
'images' => $images,
|
'images' => $images,
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user