WIN-2308041133\Administrator преди 2 месеца
родител
ревизия
818d6abde0
променени са 1 файла, в които са добавени 5 реда и са изтрити 0 реда
  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']];
         }