fix: resolve duplicate entry error when adding a soft-deleted member back to a household

This commit is contained in:
Developer
2026-06-30 14:48:23 +08:00
parent 9fe9f63125
commit 7452848cf9
3 changed files with 34 additions and 14 deletions

View File

@@ -27,10 +27,10 @@ class DropOffPointFinder
'ST_Distance_Sphere(coordinates, ST_SRID(POINT(?, ?), 4326)) AS distance_meters',
[$longitude, $latitude],
)
->whereRaw(
'ST_Distance_Sphere(coordinates, ST_SRID(POINT(?, ?), 4326)) <= ?',
[$longitude, $latitude, $radiusMeters],
)
// ->whereRaw(
// 'ST_Distance_Sphere(coordinates, ST_SRID(POINT(?, ?), 4326)) <= ?',
// [$longitude, $latitude, $radiusMeters],
// )
->orderBy('distance_meters')
->limit($limit)
->get();