|
|
@@ -6,7 +6,9 @@ AS
|
|
|
ap.addressCity AS city, ap.postalCode,
|
|
|
TRIM(BOTH ' ' FROM CONCAT( if(ap.streetAddress is null,'',ap.streetAddress), ' ', if(ap.streetAddressSecond is null,'',ap.streetAddressSecond), ' ', if(ap.streetAddressThird is null,'',ap.streetAddressThird))) AS streetAddress,
|
|
|
ap.longitude, ap.latitude,
|
|
|
- r.name AS roomName, r.description AS roomDescription, r.localisation AS roomLocalisation, r.capacity AS roomCapacity, r.floorSize AS roomFloorSize, b.image_id AS imageId,
|
|
|
+ r.name AS roomName, r.description AS roomDescription, r.localisation AS roomLocalisation, r.capacity AS roomCapacity, r.floorSize AS roomFloorSize,
|
|
|
+ If(b.image_id is not null, CONCAT('https://api.opentalent.fr/app.php/_internal/secure/files/', b.image_id, '/raw'), null) AS imageUrl,
|
|
|
+ If(b.image_id is not null, CONCAT('https://api.opentalent.fr/app.php/_internal/secure/files/', b.image_id, '/0x120'), null) AS thumbnailUrl,
|
|
|
(SELECT GROUP_CONCAT(CONCAT(f.code))
|
|
|
FROM event_categories AS ec
|
|
|
LEFT JOIN Categories AS cs ON(cs.id = ec.categories_id)
|
|
|
@@ -22,11 +24,11 @@ AS
|
|
|
WHERE b.discr = 'event' AND b.datetimeEnd >= NOW() AND b.visibility = 'PUBLIC_VISIBILITY' AND b.isCanceled = 0
|
|
|
UNION
|
|
|
SELECT
|
|
|
- aw.uuid, null AS organizationId, aw.name, aw.description, NULL AS url, aw.datetimeStart, aw.datetimeEnd,
|
|
|
+ aw.uuid, null AS organizationId, aw.name, aw.description, aw.deepLink AS url, aw.datetimeStart, aw.datetimeEnd,
|
|
|
aw.place AS placeName, NULL AS placeDescription, NULL AS placeFloorSize, NULL AS placeCapacity,
|
|
|
aw.city, aw.postalCode, aw.streetAddress, aw.longitude, aw.latitude,
|
|
|
NULL AS roomName, NULL AS roomDescription, NULL AS roomLocalisation, NULL AS roomCapacity, NULL AS roomFloorSize,
|
|
|
- aw.largeimage AS imageId, aw.categories AS categories, 'awin' as origin, aw.id as entityId
|
|
|
+ aw.largeimage AS imageUrl, aw.mediumimage as thumbnailUrl, aw.categories AS categories, 'awin' as origin, aw.id as entityId
|
|
|
FROM AwinProduct as aw
|
|
|
WHERE
|
|
|
aw.datetimeEnd >= NOW() AND aw.datetimeStart IS NOT NULL;
|