This commit is contained in:
2025-12-13 10:48:51 +08:00
parent 9a215866fa
commit 22a4c9fb8f
4 changed files with 41 additions and 2 deletions
@@ -59,6 +59,11 @@ class PostCommentService
if (isset($p['user_id']) && !empty($p['user_id'])) {
$config['where']['user_id'] = $p['user_id'];
}
if (isset($p['scene']) && $p['scene']=='self') {
if(!empty($request->user) && !empty($request->user->uid)){
$config['where']['user_id'] = $request->user->uid;
}
}
// 只查询根评论
if (isset($p['parent_id']) && $p['parent_id'] == 0) {
$config['where']['parent_id'] = 0;
+1 -1
View File
@@ -240,7 +240,7 @@ class PostService
LIMIT 50";
// 根据场景设置半径
$radius = $scene === 'nearby' ? 5000 : 20000;
$radius = $scene === 'nearby' ? 20000 : 200000;
// $query = Db::select($sql, [
// 'lat' => $lat,