1
This commit is contained in:
@@ -214,6 +214,7 @@ class PostService
|
||||
{
|
||||
$lng = $request->get('lng');
|
||||
$lat = $request->get('lat');
|
||||
$status = $request->get('status', 1);
|
||||
|
||||
if (!$lng || !$lat) {
|
||||
throw new BusinessException('经纬度必传');
|
||||
@@ -242,6 +243,7 @@ class PostService
|
||||
SIN(RADIANS(?)) * SIN(RADIANS(latitude))
|
||||
)) AS distance
|
||||
FROM post
|
||||
WHERE $status
|
||||
HAVING distance <= ?
|
||||
ORDER BY distance
|
||||
LIMIT 50";
|
||||
|
||||
Reference in New Issue
Block a user