feat: refs #7882 Now supports coords, address and long address
gitea/salix/pipeline/pr-dev This commit looks good
Details
gitea/salix/pipeline/pr-dev This commit looks good
Details
This commit is contained in:
parent
a25e619036
commit
8165830934
|
@ -34,6 +34,12 @@ module.exports = Self => {
|
|||
)
|
||||
SELECT a.id code,
|
||||
c.socialName name,
|
||||
IF(ABS(a.latitude - ROUND(a.latitude)) < 0.000001, NULL, a.latitude) latitude,
|
||||
IF(ABS(a.longitude - ROUND(a.longitude)) < 0.000001, NULL, a.longitude) longitude,
|
||||
a.street,
|
||||
a.city locality,
|
||||
p.name state,
|
||||
co.name country,
|
||||
CONCAT_WS(', ', IFNULL(a.street, ''), IFNULL(a.city, ''), IFNULL(p.name, '')) longAddress,
|
||||
CONCAT(IFNULL(a.mobile, c.mobile)) phoneNumber,
|
||||
dn.description poiDeliveryComments,
|
||||
|
@ -53,6 +59,14 @@ module.exports = Self => {
|
|||
return {
|
||||
...poi,
|
||||
code: poi.code.toString(),
|
||||
latitude: poi.latitude || undefined,
|
||||
longitude: poi.longitude || undefined,
|
||||
address: {
|
||||
street: poi.street || undefined,
|
||||
locality: poi.locality || undefined,
|
||||
state: poi.state || undefined,
|
||||
country: poi.country || undefined
|
||||
},
|
||||
poiDeliveryComments: poi.poiDeliveryComments || undefined,
|
||||
phoneNumber: poi.phoneNumber || undefined,
|
||||
email: poi.email || undefined
|
||||
|
|
Loading…
Reference in New Issue