WIN-2308041133\Administrator 4 tháng trước cách đây
mục cha
commit
818d6abde0
1 tập tin đã thay đổi với 5 bổ sung và 0 xóa
  1. 5 0
      app/model/api/User.php

+ 5 - 0
app/model/api/User.php

@@ -336,6 +336,11 @@ class User extends BaseModel
         $where = [];
         $where[] = ["u.work_type_id", ">", 0];
         $where[] = ["u.status", "=", 1];
+        // 排除经纬度为0的数据(当有传入经纬度搜索时)
+        if ($hasLocation) {
+            $where[] = ["u.longitude", "<>", 0];
+            $where[] = ["u.latitude", "<>", 0];
+        }
         if (!empty($post['work_type_id'])) {
             $where[] = ["u.work_type_id", "=", $post['work_type_id']];
         }