WIN-2308041133\Administrator vor 1 Tag
Ursprung
Commit
80e8508efc
1 geänderte Dateien mit 17 neuen und 13 gelöschten Zeilen
  1. 17 13
      app/model/api/User.php

+ 17 - 13
app/model/api/User.php

@@ -431,21 +431,25 @@ class User extends BaseModel
     {
     {
         $post["pageSize"] = $post["pageSize"] > 20 ? 20 : (int)$post["pageSize"];
         $post["pageSize"] = $post["pageSize"] > 20 ? 20 : (int)$post["pageSize"];
         $post["page"] = $post["page"] <= 0 ? 1 : (int)$post["page"];
         $post["page"] = $post["page"] <= 0 ? 1 : (int)$post["page"];
-        
         // 构建基础条件
         // 构建基础条件
-        $where = [["u.work_type_id", ">", 0], ["u.status", "=", 1]];
+        $where = [["work_type_id", ">", 0], ["status", "=", 1]];
         if (!empty($post['work_type_id'])) {
         if (!empty($post['work_type_id'])) {
-            $where[] = ["u.work_type_id", "=", $post['work_type_id']];
-        }
-        if ($post['servicePrice'] > 0) {
-            $where[] = ["a.service_min_price", "<=", $post['servicePrice']];
-        }
-        if (!empty($post['timetype'])) {
-            $where[] = ["a.service_type", "=", $post['timetype']];
-        }
-        if ($post['is_china'] != '') {
-            $where[] = ["a.is_china", '=', $post['is_china']];
+            $where[] = ["work_type_id", "=", $post['work_type_id']];
         }
         }
+//        // 构建基础条件
+//        $where = [["u.work_type_id", ">", 0], ["u.status", "=", 1]];
+//        if (!empty($post['work_type_id'])) {
+//            $where[] = ["u.work_type_id", "=", $post['work_type_id']];
+//        }
+//        if ($post['servicePrice'] > 0) {
+//            $where[] = ["a.service_min_price", "<=", $post['servicePrice']];
+//        }
+//        if (!empty($post['timetype'])) {
+//            $where[] = ["a.service_type", "=", $post['timetype']];
+//        }
+//        if ($post['is_china'] != '') {
+//            $where[] = ["a.is_china", '=', $post['is_china']];
+//        }
         
         
         // 城市查询条件
         // 城市查询条件
         $serviceAreaWhere = null;
         $serviceAreaWhere = null;
@@ -486,7 +490,7 @@ class User extends BaseModel
         $data = [];
         $data = [];
         if ($totalCount > 0) {
         if ($totalCount > 0) {
             $offset = ($post["page"] - 1) * $post["pageSize"];
             $offset = ($post["page"] - 1) * $post["pageSize"];
-            $result = $query->order("u.uid", "desc")
+            $result = $query->order("uid", "desc")
                 ->limit($offset, $post["pageSize"])
                 ->limit($offset, $post["pageSize"])
                 ->select();
                 ->select();
             if (!empty($result)) {
             if (!empty($result)) {