WIN-2308041133\Administrator hai 2 días
pai
achega
f79eb2b29b
Modificáronse 1 ficheiros con 6 adicións e 0 borrados
  1. 6 0
      app/model/api/User.php

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

@@ -432,6 +432,12 @@ class User extends BaseModel
         $post["pageSize"] = $post["pageSize"] > 20 ? 20 : (int)$post["pageSize"];
         $post["page"] = $post["page"] <= 0 ? 1 : (int)$post["page"];
 
+        // user 表的基础筛选条件
+        $where = [["u.work_type_id", ">", 0], ["u.status", "=", 1]];
+        if (!empty($post['work_type_id'])) {
+            $where[] = ["u.work_type_id", "=", $post['work_type_id']];
+        }
+
         // info_audit 表的筛选条件(需要在获取 uid 时应用)
         $infoAuditWhere = [["status", "=", 1], ["is_show", "=", 1]];
         if ($post['servicePrice'] > 0) {