From 8d46364e2b3a54526bb077789e4045d4c717048f Mon Sep 17 00:00:00 2001 From: "WIN-C27C5MSVTPO\\16961" <1696136552@qq.com> Date: Mon, 15 Dec 2025 15:00:34 +0800 Subject: [PATCH] 1 --- app/common/service/PostService.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/app/common/service/PostService.php b/app/common/service/PostService.php index f103854..02a006c 100644 --- a/app/common/service/PostService.php +++ b/app/common/service/PostService.php @@ -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";